Card City Nights/ROM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a ROM map for Card City Nights.

Add card to deck

mov eax,[edi+64]                              ;eax = pointer to ???
mov ecx,[edi+2C]
mov ecx,[ecx+74]
sub esp,04
push ecx
push eax
push edi
call --------
add esp,10
mov [ebp-00000690],eax                        ;write current_card_quantity to [ebp-0x690]
movzx eax,byte ptr [ebp-00000689]             ;no_legendary_card flag
test eax,eax
je --------                                   ;if no_legendary_card added is false, jump to another subroutine
mov eax,[ebp-00000690]                        ;pointer to current_card_quantity
mov eax,[eax+0C]                              ;eax = current_card_quantity
cmp eax,[ebp-00000684]                        ;compare current_card_quantity with card_limit
jnl --------                                  ;if card_limit would be exceeded, jump to another subroutine
fld1 
fldz 
push 01
sub esp,04
fstp dword ptr [esp]
sub esp,04
fstp dword ptr [esp]
push 0D074D70 : [--------]
call --------
add esp,10
mov eax,[ebp-00000690]                         ;eax = pointer to current_card_quantity
mov ecx,[eax+0C]                               ;ecx = current_card_quantity
inc ecx                                        ;ecx++
mov [eax+0C],ecx                               ;write new_card_quantity to [card_quantity]