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...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{rommap|game=Card City Nights}}
{{rommap|game=Card City Nights}}
===Add card to deck===
==Add card to deck==
  mov eax,[edi+64]                              ;eax = pointer to ???
  mov eax,[edi+64]                              ;eax = pointer to ???
  mov ecx,[edi+2C]
  mov ecx,[edi+2C]
Line 10: Line 10:
  call --------
  call --------
  add esp,10
  add esp,10
  mov [ebp-00000690],eax                        ;write current_card_quantity to ebp-0x690
  mov [ebp-00000690],eax                        ;write current_card_quantity to [ebp-0x690]
  movzx eax,byte ptr [ebp-00000689]            ;no_legendary_card flag
  movzx eax,byte ptr [ebp-00000689]            ;no_legendary_card flag
  test eax,eax
  test eax,eax

Latest revision as of 19:11, 28 January 2024

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]