Card City Nights/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Created page with "{{rommap|game=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 p...")
 
m (Mantidactyle moved page Card City Nights:Rom map to Card City Nights:ROM map: caps)
(No difference)

Revision as of 21:10, 10 February 2018

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]