forked from Xkeeper0/smb2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
789 additions
and
409 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
HandlePlayer_ChangeChar: ; make this less dumb | ||
LDA CharSelectAnytime | ||
BEQ ++ | ||
LDA PlayerInAir | ||
BNE + | ||
LDA Player1JoypadHeld | ||
AND #ControllerInput_Select | ||
BEQ + | ||
LDA Player1JoypadPress | ||
AND #ControllerInput_Left | ||
BEQ ++ | ||
- INC CurrentCharacter | ||
JSR ChkToNextValidCharacter | ||
BNE - | ||
BEQ + | ||
++ | ||
LDA Player1JoypadPress | ||
AND #ControllerInput_Right | ||
BEQ + | ||
- DEC CurrentCharacter | ||
JSR ChkToNextValidCharacter | ||
BNE - | ||
+ | ||
LDA CurrentCharacter | ||
CMP PreviousCharacter | ||
BEQ ++ | ||
STA PreviousCharacter | ||
LDA PlayerCurrentSize | ||
EOR #$1 | ||
STA PlayerCurrentSize | ||
JSR CustomCopyChar | ||
++ | ||
RTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
|
||
; Copies all character stats to RAM for hot-swapping the current character | ||
; | ||
CopyCarryYOffsets: | ||
LDX #(AreaMainRoutine - CarryYOffsets - 1) | ||
CopyCarryYOffsets_Loop: | ||
LDA CarryYOffsets, X | ||
STA CarryYOffsetsRAM, X | ||
DEX | ||
BPL CopyCarryYOffsets_Loop | ||
|
||
RTS | ||
|
||
AreaDebugRoutine: | ||
LDA CreateObjectType | ||
BEQ AreaDebugRoutine_Exit | ||
|
||
JSR DebugCreateObject | ||
|
||
AreaDebugRoutine_Exit: | ||
RTS | ||
|
||
; | ||
; Input | ||
; CreateObjectType = object type | ||
; | ||
DebugCreateObject: | ||
JSR CreateEnemy | ||
|
||
BMI AreaDebugRoutine_Exit | ||
|
||
LDX byte_RAM_0 | ||
LDA CreateObjectType | ||
STA ObjectType, X | ||
LDA ScreenBoundaryLeftLo | ||
ADC #$80 | ||
STA ObjectXLo, X | ||
LDA ScreenBoundaryLeftHi | ||
ADC #$00 | ||
STA ObjectXHi, X | ||
LDA ScreenYLo | ||
STA ObjectYLo, X | ||
LDA ScreenYHi | ||
ADC #$00 | ||
STA ObjectYHi, X | ||
|
||
JSR InitializeEnemy | ||
|
||
LDA CreateObjectAttributes | ||
BEQ DebugCreateObject_ClearObjectType | ||
|
||
DebugCreateObject_ObjectCarried: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_ObjectTimer | ||
|
||
LDA #$01 | ||
STA HoldingItem | ||
STA ObjectBeingCarriedTimer, X | ||
STX ObjectBeingCarriedIndex | ||
|
||
LDA #SoundEffect1_CherryGet | ||
STA SoundEffectQueue1 | ||
|
||
DebugCreateObject_ObjectTimer: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_ObjectBottomScreen | ||
|
||
LDA #$FF | ||
STA EnemyTimer, X | ||
|
||
DebugCreateObject_ObjectBottomScreen: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_Bit4 | ||
|
||
LDA ObjectYLo, X | ||
CLC | ||
ADC #$E0 | ||
STA ObjectYLo, X | ||
LDA ObjectYHi, X | ||
ADC #$00 | ||
STA ObjectYHi, X | ||
|
||
DebugCreateObject_Bit4: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_Bit3 | ||
|
||
DebugCreateObject_Bit3: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_Bit2 | ||
|
||
DebugCreateObject_Bit2: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_ObjectThrown | ||
|
||
DebugCreateObject_ObjectThrown: | ||
ROL CreateObjectAttributes | ||
BCC DebugCreateObject_ObjectNoVelocityReset | ||
|
||
LDA #$01 | ||
STA EnemyArray_42F, X | ||
|
||
DebugCreateObject_ObjectNoVelocityReset: | ||
ROL CreateObjectAttributes | ||
BCS DebugCreateObject_ClearObjectType | ||
|
||
LDA #$00 | ||
STA ObjectXVelocity, X | ||
STA ObjectYVelocity, X | ||
|
||
DebugCreateObject_ClearObjectType: | ||
LDA #$00 | ||
STA CreateObjectType | ||
|
||
DebugCreateObject_Exit: | ||
RTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
JumpAttack: | ||
LDA PlayerYVelocity | ||
BMI + | ||
CMP #$10 | ||
BCC + | ||
JSR LoadFlagPlayer3 | ||
LDY CurrentCharacter | ||
LDA ($c5), Y | ||
AND #CustomBitFlag_BounceAll | ||
BNE +ok | ||
LDA ($c5), Y | ||
AND #CustomBitFlag_BounceJump | ||
BEQ +o | ||
LDA PlayerAnimationFrame | ||
CMP #SpriteAnimation_Jumping | ||
BEQ +ok | ||
JMP + | ||
+o | ||
LDA ($c5), Y | ||
AND #CustomBitFlag_GroundPound | ||
BEQ +o | ||
LDA Player1JoypadHeld | ||
AND #ControllerInput_Down | ||
BEQ + | ||
LDA CrushTimer | ||
CMP #$08 | ||
BCS +ok | ||
LDA #$0 | ||
STA CrushTimer | ||
JMP + | ||
+o | ||
JMP + | ||
+ok | ||
LDA #$0 | ||
STA CrushTimer | ||
LDA Player1JoypadHeld | ||
AND #ControllerInput_A | ||
BEQ ++ | ||
LDA #$A0 | ||
STA PlayerYVelocity | ||
BNE +++ | ||
++ LDA #$C0 | ||
STA PlayerYVelocity | ||
+++ LDX byte_RAM_12 | ||
INX | ||
LDY #$14 | ||
JSR DamageEnemySingle | ||
LDX byte_RAM_ED | ||
PLA | ||
PLA | ||
RTS | ||
+ | ||
RTS |
Oops, something went wrong.