Skip to content

Commit

Permalink
Smash Remix 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JSsixtyfour committed Aug 29, 2022
1 parent 12b2638 commit 99d29aa
Show file tree
Hide file tree
Showing 16 changed files with 273 additions and 73 deletions.
Binary file modified build/credits.bin
Binary file not shown.
Binary file modified original.xdelta
Binary file not shown.
193 changes: 193 additions & 0 deletions src/AI.asm
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,199 @@ scope AI {
nop
}

// @ Description
// Improves cpu ability to not care about or dodge projectiles hook after M.MARIO/GDK id check
// Used for Franklin Badge cpus and GBOWSER
scope remix_ignore_projectiles_: {
OS.patch_start(0xB2224, 0x801377E4)
j remix_ignore_projectiles_
nop
_return:
OS.patch_end()

// v0 = character id
// s0 = player struct
lli at, Character.id.GBOWSER
beq at, v0, _ignore_projectile // ignore the projectile if GBOWSER
nop
// TODO: add a check for remix 1P giant so they are similar to giant DK

li v0, Item.FranklinBadge.players_with_franklin_badge
lbu at, 0x000D(s0) // at = port
sll at, at, 0x0002 // at = offset to player entry
addu v0, v0, at // v0 = address of players badge
lw v0, 0x0000(v0) // v0 = entry in table

bnez v0, _ignore_projectile // ignore the projectile if cpu wearing badge
nop

// if here, proceed as normal
jal 0x80135B78 // original line 1
sw a2, 0x0034(sp) // original line 2
j _return
nop

_ignore_projectile:
j 0x80137804
nop

}

// @ Description
// Allows remix characters to initiate their reflect or absorb actions when a projectile is near
// easy when action ids are shared
scope remix_initiate_reflect_and_absorb_: {
OS.patch_start(0xB08D0, 0x80135E90)
j remix_initiate_reflect_and_absorb_
nop
_return:
OS.patch_end()

// v0 = character id
// a2 = player struct

beq v0, at, _ness_absorb // modified og line 1
lli at, Character.id.JFOX
beq at, v0, _fox_reflect // Fox branch if JFOX
lli at, Character.id.FALCO
beq at, v0, _fox_reflect // Fox branch if FALCO
lli at, Character.id.WOLF
beq at, v0, _fox_reflect // Fox branch if WOLF
lli at, Character.id.JNESS
beq at, v0, _ness_absorb // Ness branch if JNESS
lli at, Character.id.LUCAS
beq at, v0, _ness_absorb // Ness branch if LUCAS
lli at, Character.id.PIANO
beq at, v0, _ness_absorb // Ness branch if PIANO
nop

// add character checks here as needed

_normal:
j 0x80135EA4 // og line 1
nop

_fox_reflect:
j 0x80135E9C
lbu t0, 0x0049(s1) // original line

_ness_absorb:
j 0x80135E98
lbu t0, 0x0049(s1) // original line

}

// @ Description
// decide if a character should maintain their reflect or absorb actions.
// easy when action ids are shared
scope remix_reflect_and_absorb_check_: {
OS.patch_start(0xB2A98, 0x80138058)
j remix_reflect_and_absorb_check_
nop
_return:
OS.patch_end()

// v0 = character id
// a2 = player struct

lli at, Character.id.JFOX
beq at, v0, _fox_reflect // Fox branch if JFOX
lli at, Character.id.FALCO
beq at, v0, _fox_reflect // Fox branch if FALCO
lli at, Character.id.WOLF
beq at, v0, _fox_reflect // Fox branch if WOLF
lli at, Character.id.JNESS
beq at, v0, _ness_absorb // Ness branch if JNESS
lli at, Character.id.LUCAS
beq at, v0, _ness_absorb // Ness branch if LUCAS
lli at, Character.id.PIANO
beq at, v0, _piano_absorb // Piano branch if PIANO
lw v0, 0x0024(a0) // v0 = current action id

// add more character checks here

_normal:
j 0x801380F8 // og line 1
lw ra, 0x0014(sp) // og line 2

_fox_reflect:
j 0x80138064
lw v0, 0x0024(a0) // v0 = current action id

_ness_absorb:
j 0x8013808C
lw v0, 0x0024(a0) // v0 = current action id

_piano_absorb:
lw v0, 0x0024(a0) // v0 = current action id
slti at, v0, 0x00E5 // original logic checks action
bnez at, _piano_start_absorb
slti at, v0, 0x00EE // original logic
j 0x80138098 // original logic checks action
nop

_piano_start_absorb:
j 0x801380A0
nop

}

// @ Description
// improves reflect and absorb behaviour for cpus
// easy when action ids are shared
scope remix_maintain_reflect_and_absorb_: {
OS.patch_start(0xB226C, 0x8013782C)
j remix_maintain_reflect_and_absorb_
nop
_return:
OS.patch_end()

// v0 = character id
// a2 = player struct

lli at, Character.id.JFOX
beq at, v0, _fox_reflect // Fox branch if JFOX
lli at, Character.id.FALCO
beq at, v0, _fox_reflect // Fox branch if FALCO
lli at, Character.id.WOLF
beq at, v0, _fox_reflect // Fox branch if WOLF
lli at, Character.id.JNESS
beq at, v0, _ness_absorb // Ness branch if JNESS
lli at, Character.id.LUCAS
beq at, v0, _ness_absorb // Ness branch if LUCAS
lli at, Character.id.PIANO
beq at, v0, _piano_absorb // Piano branch if PIANO
nop

// add more character checks here

_normal:
j 0x80137884 // og line 1
lw v0, 0x0024(a2) // og line 2

_fox_reflect:
j 0x80137838 // take Fox branch (dsp)
lw v0, 0x0024(a2) // v0 = current action id

_ness_absorb:
j 0x80137860 // take Ness branch (dsp)
// don't add any lines here
_piano_absorb:
lw v0, 0x0024(a2) // v0 = current action id
slti at, v0, 0x00E5 // min absorb action
bnez at, _piano_exit //
slti at, v0, 0x00EE // max absorb action
beqz at, _piano_exit //
or a0, a2, r0 //
j 0x80137874 // return to normal routine
nop

_piano_exit:
j 0x80137884
nop

}

}

} // __AI__
2 changes: 1 addition & 1 deletion src/Boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ scope Boot {
nop
}

string_version:; String.insert("Smash Remix v1.2.0")
string_version:; String.insert("Smash Remix v1.2.1")

// @ Description
// Nintendo 64 logo cannot be skipped.
Expand Down
2 changes: 1 addition & 1 deletion src/Character.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ scope Character {
// 0x3D - SUPER SONIC
define_character(SSONIC, FOX, File.SSONIC_MAIN, 0x0D0, 0, File.SSONIC_CHARACTER, File.SONIC_SHIELD_POSE, File.SONIC_SPRING_HITBOX, 0x15A, File.SONIC_ENTRY, File.SONIC_SPRING_GRAPHIC, 0x58C, 18, OS.TRUE, OS.TRUE, Stages.id.BTT_SONIC, Stages.id.BTP_SONIC, Stages.id.BTT_WARIO, Stages.id.BTP_DS, sound_type.U, variant_type.SPECIAL)
// 0x3E - SHEIK
define_character(SHEIK, CAPTAIN, File.SHEIK_MAIN, 0x0EB, 0, 0x14C, File.SHEIK_SHIELD_POSE, File.SHEIK_PROJECTILE_HITBOX, 0x15E, 0x14D, 0, 0x4B0, 0x5, OS.TRUE, OS.TRUE, Stages.id.BTT_SHEIK, Stages.id.BTP_SHEIK, Stages.id.BTT_LINK, Stages.id.BTP_LUCAS2, sound_type.U, variant_type.NA)
define_character(SHEIK, CAPTAIN, File.SHEIK_MAIN, 0x0EB, 0, File.SHEIK_CHARACTER, File.SHEIK_SHIELD_POSE, File.SHEIK_PROJECTILE_HITBOX, 0x15E, 0x14D, 0, 0x4B0, 0x5, OS.TRUE, OS.TRUE, Stages.id.BTT_SHEIK, Stages.id.BTP_SHEIK, Stages.id.BTT_LINK, Stages.id.BTP_LUCAS2, sound_type.U, variant_type.NA)

print "========================================================================== \n"
}
Expand Down
5 changes: 5 additions & 0 deletions src/Costumes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ scope Costumes {
db 0x05 // Sandbag
db 0x05 // Super Sonic
db 0x05 // Classic Sonic
db 0x05 // Sheik
OS.align(4)

functions:
Expand Down Expand Up @@ -1222,6 +1223,10 @@ scope Costumes {
addiu t5, t5, 0x0001 // t5 = index of first extra costume
sltu at, t4, t5 // at = 0 if this is a new costume, 1 if an original
bnez at, _original_check // if an original costume, skip
lbu at, 0x0000(t3) // at = number of extra costumes for this character
addu at, t5, at // at = max costume_id + 1
sltu at, t4, at // at = 1 if this is a valid costume, 0 if not
beqz at, _original_check // if not a valid costume, skip
nop

// get the unique ID for this "image"
Expand Down
1 change: 1 addition & 0 deletions src/Credits.asm
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ scope Credits {
add_name("epona", "", remix)
add_name("Stew", "", remix)
add_name("thetaiter", "", remix)
add_name("LesbianChemicalPlant", "", remix)


add_title("Original Sequencing Musical Credits")
Expand Down
4 changes: 2 additions & 2 deletions src/KirbyHats.asm
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ scope KirbyHats {
// @ Description
// Prevents kirby from having his power ID set to 0
scope kirby_power_loss_prevent_: {
OS.patch_start(0xD7D84, 0x8015D344)
OS.patch_start(0xD18E4, 0x80156EA4)
j kirby_power_loss_prevent_
lbu a1, 0x000D(a0) // amount of port loops
_return:
Expand All @@ -628,7 +628,7 @@ scope KirbyHats {
sw r0, 0x0AE0(a0) // original line 2, remove power

_no_kirbyhat_selected:
jal 0x80156E60 // original line 2
jal 0x80156E60 // original line 1
nop

j _return
Expand Down
2 changes: 1 addition & 1 deletion src/SRAM.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ scope SRAM {
// - A new MIDI is added
// - A new toggle is added
// - The order of the toggles is changed
constant REVISION(0x0081)
constant REVISION(0x0083)

// @ Description
// Struct that holds information for a block of save data.
Expand Down
Binary file modified src/Sheik/Moveset/F_TILT.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Sheik/Sheik.asm
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ Character.edit_action_parameters(SHEIK, Action.LandingAirX, File.SHE
Character.add_new_action_params(SHEIK, DSP_Recoil, -1, File.SHEIK_DSP_RECOIL, DSP_RECOIL, 0x00000000)

// Add Actions // Action Name // Base Action // Parameters // Staling ID // Main ASM // Interrupt/Other ASM // Movement/Physics ASM // Collision ASM
Character.add_new_action(SHEIK, NSP_Shoot_Air, -1, ActionParams.NSP_Shoot_Air, 0x12, SheikNSP.shoot_main_, 0, 0x800D91EC, SheikNSP.air_shoot_collision_)
Character.add_new_action(SHEIK, NSP_Shoot_Air, -1, ActionParams.NSP_Shoot_Air, 0x12, SheikNSP.shoot_main_, 0, 0x800D91EC, 0x800DE934)
Character.add_new_action(SHEIK, DSP_Begin, -1, ActionParams.DSP_Begin, 0x13, SheikDSP.main_, 0, SheikDSP.physics_, SheikDSP.air_collision_)
Character.add_new_action(SHEIK, DSP_Attack, -1, ActionParams.DSP_Attack, 0x13, 0x800D94E8, 0, SheikDSP.physics_, SheikDSP.attack_collision_)
Character.add_new_action(SHEIK, DSP_Landing, -1, ActionParams.DSP_Landing, 0x13, 0x800D94C4, 0, 0x800D8CCC, 0x800DDEE8)
Expand Down
12 changes: 7 additions & 5 deletions src/SinglePlayerModes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,7 @@ scope SinglePlayerModes: {

// ALLSTAR

// Total characters: 25
// Total characters: 26
// @ Description
// Randomly generates a list of characters and stages for the matches
// This only gets run after a player presses start on the 1p CSS screen
Expand Down Expand Up @@ -4402,7 +4402,7 @@ scope SinglePlayerModes: {
li t0, match_begin_flag
sw r0, 0x0000(t0) // clear match begin flag

addiu t0, r0, 0x0019 // slot countdown (currently 25 character slots to fill), UPDATE when new character added
addiu t0, r0, 0x0019 // slot countdown (currently 26 character slots to fill), UPDATE when new character added
addiu t1, r0, 0x0018 // jump multiplier for match pool
li t5, match_pool // load match pool address
li t7, allstar_character_order // load character slots address
Expand Down Expand Up @@ -4505,6 +4505,7 @@ scope SinglePlayerModes: {
dw 0x00000000
dw 0x00000000

dw 0x00000000
dw 0x00000000

OS.align(16)
Expand Down Expand Up @@ -4539,6 +4540,7 @@ scope SinglePlayerModes: {
dw 0x00000000
dw 0x00000000

dw 0x00000000
dw 0x00000000

OS.align(16)
Expand Down Expand Up @@ -5447,9 +5449,9 @@ scope SinglePlayerModes: {

// @ Description
// This establishes Rest Area functions such as portraits and heart spawns
constant DOUBLE_STAGE_AMOUNT(0x5) // amount of character progress to have 1v2
constant TRIPLE_STAGE_AMOUNT(0xF) // amount of character progress to have 1v3
constant FINAL_STAGE_AMOUNT(0x18) // amount of character progress to have yoshi team style battle
constant DOUBLE_STAGE_AMOUNT(0x6) // amount of character progress to have 1v2
constant TRIPLE_STAGE_AMOUNT(0x10) // amount of character progress to have 1v3
constant FINAL_STAGE_AMOUNT(0x19) // amount of character progress to have yoshi team style battle

scope rest_area_routine: {
lui t7, 0x800A
Expand Down
Loading

0 comments on commit 99d29aa

Please sign in to comment.