Users browsing this thread: 1 Guest(s)
Edit Chainsaw codes

#22
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
because X-Kill/Scimitar writes an additional entry to the animation buffers, it will be tricky.  with this being done at the END of that function, a caller can't readily skip it.  instead, you'll probably have to undo it.

i'm thinking you'll need to:
1) null out the buffer data that makes the game think there's another animation to depict.  i'm not sure what's required, but suspect that:
a. for the 4-byte $76 buffer, one step is to "null" (set to Mimic, 12h) the equivalent of $B5.  another is to FFh-null $B7.  do with "LDA #$12 / STA $B5 / LDA #$FF / STA $B7 / JSR $35BB" or "LDA #$12 / STA $2D77 / LDA #$FF / STA $2D79".
b. for the 16-byte $78 buffer, make use of a preexisting function to clear it: "JSR $6400 / JSR $63DB".
2) subtract 4 from $3A72, the ($76) buffer pointer, so as to "free" the no longer used entry.
3) subtract 16 from $3A32, the ($78) buffer pointer, so as to "free" the no longer used entry.

EDIT: err, i think you'll need to do Step 3 before 1b so it edits the proper buffer entry.  that is:
Step 1a
Step 2
Step 3
Step 1b
Step 3 again

now, it's possible that some steps, in particular, #2 and the repeat of #3, are unnecessary albeit logical.  you might be able to get away with just the $B5-related revision, and maybe zeroing $A2 - $A5 then doing a $63DB call.

[EDIT 2:] i just was reminded that the second ($78) buffer write occurs AFTER the special effect finishes running.  so we can't undo something that hasn't happened yet; nor can we prevent it!  this means that we DON'T want nor need to do Step 3 before Step 1b.  and it makes Step 3 in general fraught with trouble.  it'd be nice to have that buffer's $3A32 pointer end 16 bytes earlier, now that no 2nd entry needs to be written or read.  however, the only way i'm seeing to do that is to perform Step 3, then trust that the upcoming jump from C2/3480 to C2/63DB writes the $AN variables we wanted for the first entry.  it probably will, as nothing meaningfully modifies them between the end of C2/388D and C2/3480.  however, one potential issue i see involves my "Reflect barrier shown on bodyguards fix".  it overwrites $A6-$A7, so in the off-chance you hacked Chainsaw to allow True Knight, it wouldn't have the bodyguard(s) display correctly.

if shortening the buffers is concluded as infeasible or unnecessary, then i'd settle for calling C2/6400 to zero out $A0-$AF in anticipation of said second execution of C2/63DB.[/EDIT 2]

oh, AAAND you likely also want to revert the marking of Hide done at C2/38E4 - C2/38EB.

...... motherfucker, the list just keeps piling up!!  depending on how much undoing is actually required, an epiphany i just had could apply:

copy+paste the portions of C2/388D that you actually want to keep. Tongue

that is, C2/3891 thru 3897, C2/389F thru 38AA, and C2/38CA thru 38D3 (with me being unsure on inclusion of "STZ $341D'').
Quote  



Messages In This Thread
Edit Chainsaw codes - by doofenH - 02-26-2020, 08:32 AM
RE: Edit Chainsaw codes - by PowerPanda - 02-26-2020, 04:47 PM
RE: Edit Chainsaw codes - by Warrax - 02-27-2020, 03:38 PM
RE: Edit Chainsaw codes - by doofenH - 04-16-2020, 12:47 PM
RE: Edit Chainsaw codes - by seibaby - 04-16-2020, 01:33 PM
RE: Edit Chainsaw codes - by doofenH - 04-16-2020, 09:40 PM
RE: Edit Chainsaw codes - by Warrax - 04-17-2020, 11:05 PM
RE: Edit Chainsaw codes - by doofenH - 04-19-2020, 06:36 AM
RE: Edit Chainsaw codes - by Warrax - 05-02-2020, 03:53 PM
RE: Edit Chainsaw codes - by SSJ Rick - 04-17-2020, 11:05 AM
RE: Edit Chainsaw codes - by Lightning - 03-07-2021, 08:32 PM
RE: Edit Chainsaw codes - by assassin - 03-07-2021, 11:35 PM
RE: Edit Chainsaw codes - by Lightning - 03-08-2021, 12:20 AM
RE: Edit Chainsaw codes - by assassin - 03-08-2021, 12:43 AM
RE: Edit Chainsaw codes - by Lightning - 03-08-2021, 01:50 AM
RE: Edit Chainsaw codes - by assassin - 03-08-2021, 02:06 AM
RE: Edit Chainsaw codes - by Lightning - 03-08-2021, 02:39 AM
RE: Edit Chainsaw codes - by Lightning - 04-09-2021, 04:49 PM
RE: Edit Chainsaw codes - by assassin - 03-08-2021, 08:04 AM
RE: Edit Chainsaw codes - by Lightning - 03-08-2021, 04:23 PM
RE: Edit Chainsaw codes - by Warrax - 03-09-2021, 05:40 PM
RE: Edit Chainsaw codes - by assassin - 04-09-2021, 05:59 PM
RE: Edit Chainsaw codes - by Lightning - 04-09-2021, 08:25 PM
RE: Edit Chainsaw codes - by assassin - 04-09-2021, 10:08 PM
RE: Edit Chainsaw codes - by Lightning - 04-10-2021, 12:21 AM
RE: Edit Chainsaw codes - by assassin - 04-10-2021, 08:47 AM
RE: Edit Chainsaw codes - by Drakkhen - 04-10-2021, 11:15 AM
RE: Edit Chainsaw codes - by Lightning - 04-11-2021, 07:54 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite