mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2024-11-12 18:02:52 +00:00
62 lines
798 B
Plaintext
62 lines
798 B
Plaintext
|
offset 40cf90
|
||
|
|
||
|
#define
|
||
|
count=EBP-4
|
||
|
Strip_addr=0049D628
|
||
|
Credit=49D620
|
||
|
MAX_STRIP=7F
|
||
|
size=50
|
||
|
#enddefine
|
||
|
|
||
|
:ActionStripper
|
||
|
PUSH EBP
|
||
|
MOV EBP,ESP
|
||
|
PUSH ECX
|
||
|
MOV [count],0 // s = 0
|
||
|
|
||
|
MOV ECX,[Strip_addr] // ECX = *Strip
|
||
|
#define
|
||
|
Strip.flag=ECX
|
||
|
Strip.x=ECX+4
|
||
|
Strip.y=ECX+8
|
||
|
Strip.cast=ECX+0C
|
||
|
Strip.str=ECX+10
|
||
|
#enddefine
|
||
|
|
||
|
JMP :loop
|
||
|
|
||
|
:increment
|
||
|
MOV EAX,[count]
|
||
|
ADD EAX,1
|
||
|
MOV [count],EAX // s++
|
||
|
:loop
|
||
|
CMP [count],MAX_STRIP // s < MAX_STRIP
|
||
|
JGE :end
|
||
|
|
||
|
MOV EBX,[count]
|
||
|
IMUL EBX,EBX,size // EBX = s * sizeof(STRIP)
|
||
|
|
||
|
:move_up
|
||
|
MOV EAX,[EBX+Strip.flag]
|
||
|
AND EAX,00000080
|
||
|
JE :remove_offscreen
|
||
|
CMP [Credit],0
|
||
|
JE :remove_offscreen
|
||
|
|
||
|
MOV EAX,[EBX+Strip.y]
|
||
|
SUB EAX,100
|
||
|
MOV [EBX+Strip.y],EAX
|
||
|
|
||
|
:remove_offscreen
|
||
|
CMP [EBX+Strip.y],-2000
|
||
|
JG :endloop
|
||
|
|
||
|
MOV [EBX+Strip.flag],0
|
||
|
|
||
|
:endloop
|
||
|
JMP :increment
|
||
|
:end
|
||
|
MOV ESP,EBP
|
||
|
POP EBP
|
||
|
RETN
|
||
|
INT3
|