It is currently 02 May 2025, 14:11
   
Text Size

Manalink C/ASM Dll

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Re: Manalink C/ASM Dll

Postby gmzombie » 11 Feb 2011, 05:01

foolin around again and i think i found the code that shows what sealed booster and or starter deck bmp you show when you choose in the sealed deck page. It seems stupid that we cant add any more into this system due to its ancient way of showing up pics. here is the code.
Code: Select all
.text:0047F9C0 ; =============== S U B R O U T I N E =======================================
.text:0047F9C0
.text:0047F9C0 ; Attributes: bp-based frame
.text:0047F9C0
.text:0047F9C0 ; int __cdecl sub_47F9C0(HDC hdc, int, int, int, int)
.text:0047F9C0 sub_47F9C0      proc near               ; CODE XREF: sub_44A2A0+1BA3p
.text:0047F9C0                                         ; sub_44A2A0+1BE8p ...
.text:0047F9C0
.text:0047F9C0 pv              = byte ptr -14Ch
.text:0047F9C0 var_148         = dword ptr -148h
.text:0047F9C0 var_144         = dword ptr -144h
.text:0047F9C0 hSrc            = dword ptr -134h
.text:0047F9C0 wSrc            = dword ptr -130h
.text:0047F9C0 var_12C         = dword ptr -12Ch
.text:0047F9C0 var_128         = dword ptr -128h
.text:0047F9C0 ySrc            = dword ptr -124h
.text:0047F9C0 var_120         = dword ptr -120h
.text:0047F9C0 xSrc            = dword ptr -110h
.text:0047F9C0 FileName        = byte ptr -10Ch
.text:0047F9C0 nSavedDC        = dword ptr -4
.text:0047F9C0 hdc             = dword ptr  8
.text:0047F9C0 arg_4           = dword ptr  0Ch
.text:0047F9C0 arg_8           = dword ptr  10h
.text:0047F9C0 arg_C           = dword ptr  14h
.text:0047F9C0 arg_10          = dword ptr  18h
.text:0047F9C0
.text:0047F9C0                 push    ebp
.text:0047F9C1                 mov     ebp, esp
.text:0047F9C3                 sub     esp, 14Ch
.text:0047F9C9                 push    ebx
.text:0047F9CA                 push    esi
.text:0047F9CB                 push    edi
.text:0047F9CC                 cmp     [ebp+hdc], 0
.text:0047F9D0                 jz      short loc_47F9D8
.text:0047F9D2                 cmp     [ebp+arg_4], 0
.text:0047F9D6                 jnz     short loc_47F9DF
.text:0047F9D8
.text:0047F9D8 loc_47F9D8:                             ; CODE XREF: sub_47F9C0+10j
.text:0047F9D8                 xor     eax, eax
.text:0047F9DA                 jmp     loc_47FCB6
.text:0047F9DF ; ---------------------------------------------------------------------------
.text:0047F9DF
.text:0047F9DF loc_47F9DF:                             ; CODE XREF: sub_47F9C0+16j
.text:0047F9DF                 cmp     [ebp+arg_8], 9
.text:0047F9E3                 jle     short loc_47F9EC
.text:0047F9E5                 xor     eax, eax
.text:0047F9E7                 jmp     loc_47FCB6
.text:0047F9EC ; ---------------------------------------------------------------------------
.text:0047F9EC
.text:0047F9EC loc_47F9EC:                             ; CODE XREF: sub_47F9C0+23j
.text:0047F9EC                 cmp     [ebp+arg_8], 0FFFFFFFFh
.text:0047F9F0                 jz      short loc_47FA1C
.text:0047F9F2                 cmp     [ebp+arg_C], 0
.text:0047F9F6                 jle     short loc_47FA0B
.text:0047F9F8                 mov     eax, [ebp+arg_8]
.text:0047F9FB                 shl     eax, 3
.text:0047F9FE                 mov     eax, ds:dword_60B7F0[eax+eax*8]
.text:0047FA05                 dec     eax
.text:0047FA06                 cmp     eax, [ebp+arg_C]
.text:0047FA09                 jge     short loc_47FA1C
.text:0047FA0B
.text:0047FA0B loc_47FA0B:                             ; CODE XREF: sub_47F9C0+36j
.text:0047FA0B                 mov     eax, [ebp+arg_8]
.text:0047FA0E                 shl     eax, 3
.text:0047FA11                 mov     eax, ds:dword_60B7F0[eax+eax*8]
.text:0047FA18                 dec     eax
.text:0047FA19                 mov     [ebp+arg_C], eax
.text:0047FA1C
.text:0047FA1C loc_47FA1C:                             ; CODE XREF: sub_47F9C0+30j
.text:0047FA1C                                         ; sub_47F9C0+49j
.text:0047FA1C                 cmp     ds:dword_60BAC8, 0
.text:0047FA23                 jnz     short loc_47FA56
.text:0047FA25                 push    offset dword_620374
.text:0047FA2A                 push    offset aSPackboosterss ; "%s\\PACKBOOSTERSsmall16.bmp"
.text:0047FA2F                 lea     eax, [ebp+FileName]
.text:0047FA35                 push    eax             ; Dest
.text:0047FA36                 call    sprintf
.text:0047FA3B                 add     esp, 0Ch
.text:0047FA3E                 push    0               ; int
.text:0047FA40                 push    0               ; Dst
.text:0047FA42                 lea     eax, [ebp+FileName]
.text:0047FA48                 push    eax             ; lpFileName
.text:0047FA49                 call    sub_466720
.text:0047FA4E                 add     esp, 0Ch
.text:0047FA51                 mov     ds:dword_60BAC8, eax
.text:0047FA56
.text:0047FA56 loc_47FA56:                             ; CODE XREF: sub_47F9C0+63j
.text:0047FA56                 cmp     ds:dword_60BAC8, 0
.text:0047FA5D                 jz      loc_47FBEC
.text:0047FA63                 lea     eax, [ebp+pv]
.text:0047FA69                 push    eax             ; pv
.text:0047FA6A                 push    18h             ; c
.text:0047FA6C                 mov     eax, ds:dword_60BAC8
.text:0047FA71                 push    eax             ; h
.text:0047FA72                 call    GetObjectA
.text:0047FA77                 mov     ecx, 0Ah
.text:0047FA7C                 mov     eax, [ebp+var_148]
.text:0047FA82                 cdq
.text:0047FA83                 idiv    ecx
.text:0047FA85                 mov     [ebp+wSrc], eax
.text:0047FA8B                 mov     eax, [ebp+var_144]
.text:0047FA91                 cdq
.text:0047FA92                 sub     eax, edx
.text:0047FA94                 sar     eax, 1
.text:0047FA96                 mov     [ebp+hSrc], eax
.text:0047FA9C                 mov     eax, [ebp+hSrc]
.text:0047FAA2                 push    eax
.text:0047FAA3                 mov     eax, [ebp+wSrc]
.text:0047FAA9                 push    eax
.text:0047FAAA                 mov     eax, [ebp+arg_4]
.text:0047FAAD                 push    eax
.text:0047FAAE                 lea     eax, [ebp+var_120]
.text:0047FAB4                 push    eax
.text:0047FAB5                 call    sub_4661F0
.text:0047FABA                 add     esp, 10h
.text:0047FABD                 cmp     [ebp+arg_8], 0FFFFFFFFh
.text:0047FAC1                 jnz     short loc_47FAE6
.text:0047FAC3                 mov     eax, [ebp+var_148]
.text:0047FAC9                 sub     eax, [ebp+wSrc]
.text:0047FACF                 mov     [ebp+var_128], eax
.text:0047FAD5                 mov     eax, [ebp+hSrc]
.text:0047FADB                 mov     [ebp+var_12C], eax
.text:0047FAE1                 jmp     loc_47FB88
.text:0047FAE6 ; ---------------------------------------------------------------------------
.text:0047FAE6
.text:0047FAE6 loc_47FAE6:                             ; CODE XREF: sub_47F9C0+101j
.text:0047FAE6                 cmp     [ebp+arg_8], 2
.text:0047FAEA                 jnz     short loc_47FAFE
.text:0047FAEC                 mov     eax, [ebp+wSrc]
.text:0047FAF2                 imul    eax, [ebp+arg_C]
.text:0047FAF6                 mov     [ebp+var_128], eax
.text:0047FAFC                 jmp     short loc_47FB6A
.text:0047FAFE ; ---------------------------------------------------------------------------
.text:0047FAFE
.text:0047FAFE loc_47FAFE:                             ; CODE XREF: sub_47F9C0+12Aj
.text:0047FAFE                 cmp     [ebp+arg_8], 4
.text:0047FB02                 jnz     short loc_47FB15
.text:0047FB04                 mov     eax, [ebp+wSrc]
.text:0047FB0A                 lea     eax, [eax+eax*4]
.text:0047FB0D                 mov     [ebp+var_128], eax
.text:0047FB13                 jmp     short loc_47FB6A
.text:0047FB15 ; ---------------------------------------------------------------------------
.text:0047FB15
.text:0047FB15 loc_47FB15:                             ; CODE XREF: sub_47F9C0+142j
.text:0047FB15                 cmp     [ebp+arg_8], 3
.text:0047FB19                 jnz     short loc_47FB2E
.text:0047FB1B                 mov     eax, [ebp+wSrc]
.text:0047FB21                 lea     eax, [eax+eax*2]
.text:0047FB24                 add     eax, eax
.text:0047FB26                 mov     [ebp+var_128], eax
.text:0047FB2C                 jmp     short loc_47FB6A
.text:0047FB2E ; ---------------------------------------------------------------------------
.text:0047FB2E
.text:0047FB2E loc_47FB2E:                             ; CODE XREF: sub_47F9C0+159j
.text:0047FB2E                 cmp     [ebp+arg_8], 0
.text:0047FB32                 jnz     short loc_47FB49
.text:0047FB34                 mov     eax, [ebp+wSrc]
.text:0047FB3A                 mov     ecx, eax
.text:0047FB3C                 shl     eax, 3
.text:0047FB3F                 sub     eax, ecx
.text:0047FB41                 mov     [ebp+var_128], eax
.text:0047FB47                 jmp     short loc_47FB6A
.text:0047FB49 ; ---------------------------------------------------------------------------
.text:0047FB49
.text:0047FB49 loc_47FB49:                             ; CODE XREF: sub_47F9C0+172j
.text:0047FB49                 cmp     [ebp+arg_8], 1
.text:0047FB4D                 jnz     short loc_47FB60
.text:0047FB4F                 mov     eax, [ebp+wSrc]
.text:0047FB55                 shl     eax, 3
.text:0047FB58                 mov     [ebp+var_128], eax
.text:0047FB5E                 jmp     short loc_47FB6A
.text:0047FB60 ; ---------------------------------------------------------------------------
.text:0047FB60
.text:0047FB60 loc_47FB60:                             ; CODE XREF: sub_47F9C0+18Dj
.text:0047FB60                 mov     [ebp+var_128], 0
.text:0047FB6A
.text:0047FB6A loc_47FB6A:                             ; CODE XREF: sub_47F9C0+13Cj
.text:0047FB6A                                         ; sub_47F9C0+153j ...
.text:0047FB6A                 cmp     [ebp+arg_10], 0
.text:0047FB6E                 jz      short loc_47FB7E
.text:0047FB70                 mov     eax, [ebp+hSrc]
.text:0047FB76                 mov     [ebp+var_12C], eax
.text:0047FB7C                 jmp     short loc_47FB88
.text:0047FB7E ; ---------------------------------------------------------------------------
.text:0047FB7E
.text:0047FB7E loc_47FB7E:                             ; CODE XREF: sub_47F9C0+1AEj
.text:0047FB7E                 mov     [ebp+var_12C], 0
.text:0047FB88
.text:0047FB88 loc_47FB88:                             ; CODE XREF: sub_47F9C0+121j
.text:0047FB88                                         ; sub_47F9C0+1BCj
.text:0047FB88                 mov     eax, [ebp+var_148]
.text:0047FB8E                 sub     eax, [ebp+wSrc]
.text:0047FB94                 mov     [ebp+xSrc], eax
.text:0047FB9A                 mov     [ebp+ySrc], 0
.text:0047FBA4                 mov     eax, [ebp+ySrc]
.text:0047FBAA                 push    eax             ; ySrc
.text:0047FBAB                 mov     eax, [ebp+xSrc]
.text:0047FBB1                 push    eax             ; xSrc
.text:0047FBB2                 mov     eax, [ebp+var_12C]
.text:0047FBB8                 push    eax             ; int
.text:0047FBB9                 mov     eax, [ebp+var_128]
.text:0047FBBF                 push    eax             ; int
.text:0047FBC0                 mov     eax, [ebp+hSrc]
.text:0047FBC6                 push    eax             ; hSrc
.text:0047FBC7                 mov     eax, [ebp+wSrc]
.text:0047FBCD                 push    eax             ; wSrc
.text:0047FBCE                 mov     eax, ds:dword_60BAC8
.text:0047FBD3                 push    eax             ; h
.text:0047FBD4                 lea     eax, [ebp+var_120]
.text:0047FBDA                 push    eax             ; int
.text:0047FBDB                 mov     eax, [ebp+hdc]
.text:0047FBDE                 push    eax             ; hdc
.text:0047FBDF                 call    sub_4665C0
.text:0047FBE4                 add     esp, 24h
.text:0047FBE7                 jmp     loc_47FCB1
.text:0047FBEC ; ---------------------------------------------------------------------------
.text:0047FBEC
.text:0047FBEC loc_47FBEC:                             ; CODE XREF: sub_47F9C0+9Dj
.text:0047FBEC                 mov     eax, [ebp+hdc]
.text:0047FBEF                 push    eax             ; hdc
.text:0047FBF0                 call    SaveDC
.text:0047FBF5                 mov     [ebp+nSavedDC], eax
.text:0047FBF8                 push    2               ; i
.text:0047FBFA                 call    GetStockObject
.text:0047FBFF                 push    eax             ; h
.text:0047FC00                 mov     eax, [ebp+hdc]
.text:0047FC03                 push    eax             ; hdc
.text:0047FC04                 call    SelectObject
.text:0047FC09                 push    10101h          ; color
.text:0047FC0E                 mov     eax, [ebp+hdc]
.text:0047FC11                 push    eax             ; hdc
.text:0047FC12                 call    SetTextColor
.text:0047FC17                 push    1               ; mode
.text:0047FC19                 mov     eax, [ebp+hdc]
.text:0047FC1C                 push    eax             ; hdc
.text:0047FC1D                 call    SetBkMode
.text:0047FC22                 push    0Dh             ; i
.text:0047FC24                 call    GetStockObject
.text:0047FC29                 push    eax             ; h
.text:0047FC2A                 mov     eax, [ebp+hdc]
.text:0047FC2D                 push    eax             ; hdc
.text:0047FC2E                 call    sub_401B90
.text:0047FC33                 mov     eax, [ebp+arg_4]
.text:0047FC36                 mov     eax, [eax+0Ch]
.text:0047FC39                 push    eax             ; bottom
.text:0047FC3A                 mov     eax, [ebp+arg_4]
.text:0047FC3D                 mov     eax, [eax+8]
.text:0047FC40                 push    eax             ; right
.text:0047FC41                 mov     eax, [ebp+arg_4]
.text:0047FC44                 mov     eax, [eax+4]
.text:0047FC47                 push    eax             ; top
.text:0047FC48                 mov     eax, [ebp+arg_4]
.text:0047FC4B                 mov     eax, [eax]
.text:0047FC4D                 push    eax             ; left
.text:0047FC4E                 mov     eax, [ebp+hdc]
.text:0047FC51                 push    eax             ; hdc
.text:0047FC52                 call    Rectangle
.text:0047FC57                 push    3               ; c
.text:0047FC59                 mov     eax, [ebp+arg_8]
.text:0047FC5C                 shl     eax, 3
.text:0047FC5F                 lea     eax, [eax+eax*8]
.text:0047FC62                 add     eax, offset dword_60B7AC
.text:0047FC67                 push    eax             ; lpString
.text:0047FC68                 mov     eax, [ebp+arg_4]
.text:0047FC6B                 mov     eax, [eax+4]
.text:0047FC6E                 push    eax             ; y
.text:0047FC6F                 mov     eax, [ebp+arg_4]
.text:0047FC72                 mov     eax, [eax]
.text:0047FC74                 push    eax             ; x
.text:0047FC75                 mov     eax, [ebp+hdc]
.text:0047FC78                 push    eax             ; hdc
.text:0047FC79                 call    TextOutA
.text:0047FC7E                 cmp     [ebp+arg_10], 0
.text:0047FC82                 jz      short loc_47FCA4
.text:0047FC84                 push    1               ; c
.text:0047FC86                 push    offset asc_4EC7C1 ; "X"
.text:0047FC8B                 mov     eax, [ebp+arg_4]
.text:0047FC8E                 mov     eax, [eax+4]
.text:0047FC91                 add     eax, 14h
.text:0047FC94                 push    eax             ; y
.text:0047FC95                 mov     eax, [ebp+arg_4]
.text:0047FC98                 mov     eax, [eax]
.text:0047FC9A                 push    eax             ; x
.text:0047FC9B                 mov     eax, [ebp+hdc]
.text:0047FC9E                 push    eax             ; hdc
.text:0047FC9F                 call    TextOutA
.text:0047FCA4
.text:0047FCA4 loc_47FCA4:                             ; CODE XREF: sub_47F9C0+2C2j
.text:0047FCA4                 mov     eax, [ebp+nSavedDC]
.text:0047FCA7                 push    eax             ; nSavedDC
.text:0047FCA8                 mov     eax, [ebp+hdc]
.text:0047FCAB                 push    eax             ; hdc
.text:0047FCAC                 call    RestoreDC
.text:0047FCB1
.text:0047FCB1 loc_47FCB1:                             ; CODE XREF: sub_47F9C0+227j
.text:0047FCB1                 mov     eax, 1
.text:0047FCB6
.text:0047FCB6 loc_47FCB6:                             ; CODE XREF: sub_47F9C0+1Aj
.text:0047FCB6                                         ; sub_47F9C0+27j
.text:0047FCB6                 pop     edi
.text:0047FCB7                 pop     esi
.text:0047FCB8                 pop     ebx
.text:0047FCB9                 leave
.text:0047FCBA                 retn
.text:0047FCBA sub_47F9C0      endp
.text:0047FCBA
.text:0047FCBA ; ---------------------------------------------------------------------------
.text:0047FCBB                 align 10h
.text:0047FCC0
.text:0047FCC0 ; =============== S U B R O U T I N E =======================================
.text:0047FCC0
.text:0047FCC0 ; Attributes: bp-based frame
.text:0047FCC0
.text:0047FCC0 ; int __cdecl sub_47FCC0(HDC hdc, int, int, int, int, int)
.text:0047FCC0 sub_47FCC0      proc near               ; CODE XREF: sub_484200+91p
.text:0047FCC0
.text:0047FCC0 var_164         = dword ptr -164h
.text:0047FCC0 var_160         = dword ptr -160h
.text:0047FCC0 var_15C         = dword ptr -15Ch
.text:0047FCC0 var_158         = dword ptr -158h
.text:0047FCC0 var_154         = dword ptr -154h
.text:0047FCC0 var_150         = dword ptr -150h
.text:0047FCC0 pv              = byte ptr -14Ch
.text:0047FCC0 var_148         = dword ptr -148h
.text:0047FCC0 var_144         = dword ptr -144h
.text:0047FCC0 hSrc            = dword ptr -134h
.text:0047FCC0 wSrc            = dword ptr -130h
.text:0047FCC0 var_12C         = dword ptr -12Ch
.text:0047FCC0 var_128         = dword ptr -128h
.text:0047FCC0 ySrc            = dword ptr -124h
.text:0047FCC0 var_120         = dword ptr -120h
.text:0047FCC0 var_11C         = dword ptr -11Ch
.text:0047FCC0 var_118         = dword ptr -118h
.text:0047FCC0 var_114         = dword ptr -114h
.text:0047FCC0 xSrc            = dword ptr -110h
.text:0047FCC0 FileName        = byte ptr -10Ch
.text:0047FCC0 nSavedDC        = dword ptr -4
.text:0047FCC0 hdc             = dword ptr  8
.text:0047FCC0 arg_4           = dword ptr  0Ch
.text:0047FCC0 arg_8           = dword ptr  10h
.text:0047FCC0 arg_C           = dword ptr  14h
.text:0047FCC0 arg_10          = dword ptr  18h
.text:0047FCC0 arg_14          = dword ptr  1Ch
.text:0047FCC0
.text:0047FCC0                 push    ebp
.text:0047FCC1                 mov     ebp, esp
.text:0047FCC3                 sub     esp, 164h
.text:0047FCC9                 push    ebx
.text:0047FCCA                 push    esi
.text:0047FCCB                 push    edi
.text:0047FCCC                 cmp     [ebp+hdc], 0
.text:0047FCD0                 jz      short loc_47FCD8
.text:0047FCD2                 cmp     [ebp+arg_4], 0
.text:0047FCD6                 jnz     short loc_47FCDF
.text:0047FCD8
.text:0047FCD8 loc_47FCD8:                             ; CODE XREF: sub_47FCC0+10j
.text:0047FCD8                 xor     eax, eax
.text:0047FCDA                 jmp     loc_480186
.text:0047FCDF ; ---------------------------------------------------------------------------
.text:0047FCDF
.text:0047FCDF loc_47FCDF:                             ; CODE XREF: sub_47FCC0+16j
.text:0047FCDF                 cmp     [ebp+arg_8], 0
.text:0047FCE3                 jl      short loc_47FCEB
.text:0047FCE5                 cmp     [ebp+arg_8], 9
.text:0047FCE9                 jle     short loc_47FCF2
.text:0047FCEB
.text:0047FCEB loc_47FCEB:                             ; CODE XREF: sub_47FCC0+23j
.text:0047FCEB                 xor     eax, eax
.text:0047FCED                 jmp     loc_480186
.text:0047FCF2 ; ---------------------------------------------------------------------------
.text:0047FCF2
.text:0047FCF2 loc_47FCF2:                             ; CODE XREF: sub_47FCC0+29j
.text:0047FCF2                 cmp     [ebp+arg_C], 0
.text:0047FCF6                 jle     short loc_47FD0B
.text:0047FCF8                 mov     eax, [ebp+arg_8]
.text:0047FCFB                 shl     eax, 3
.text:0047FCFE                 mov     eax, ds:dword_60B7F0[eax+eax*8]
.text:0047FD05                 dec     eax
.text:0047FD06                 cmp     eax, [ebp+arg_C]
.text:0047FD09                 jge     short loc_47FD1C
.text:0047FD0B
.text:0047FD0B loc_47FD0B:                             ; CODE XREF: sub_47FCC0+36j
.text:0047FD0B                 mov     eax, [ebp+arg_8]
.text:0047FD0E                 shl     eax, 3
.text:0047FD11                 mov     eax, ds:dword_60B7F0[eax+eax*8]
.text:0047FD18                 dec     eax
.text:0047FD19                 mov     [ebp+arg_C], eax
.text:0047FD1C
.text:0047FD1C loc_47FD1C:                             ; CODE XREF: sub_47FCC0+49j
.text:0047FD1C                 cmp     ds:dword_60BAC4, 0
.text:0047FD23                 jnz     short loc_47FD56
.text:0047FD25                 push    offset dword_620374
.text:0047FD2A                 push    offset aSPackboostersl ; "%s\\PACKBOOSTERSlarge16.bmp"
.text:0047FD2F                 lea     eax, [ebp+FileName]
.text:0047FD35                 push    eax             ; Dest
.text:0047FD36                 call    sprintf
.text:0047FD3B                 add     esp, 0Ch
.text:0047FD3E                 push    0               ; int
.text:0047FD40                 push    0               ; Dst
.text:0047FD42                 lea     eax, [ebp+FileName]
.text:0047FD48                 push    eax             ; lpFileName
.text:0047FD49                 call    sub_466720
.text:0047FD4E                 add     esp, 0Ch
.text:0047FD51                 mov     ds:dword_60BAC4, eax
.text:0047FD56
.text:0047FD56 loc_47FD56:                             ; CODE XREF: sub_47FCC0+63j
.text:0047FD56                 cmp     [ebp+arg_10], 0
.text:0047FD5A                 jz      short loc_47FD96
.text:0047FD5C                 cmp     ds:dword_60BA7C, 0
.text:0047FD63                 jnz     short loc_47FD96
.text:0047FD65                 push    offset dword_620374
.text:0047FD6A                 push    offset aSPackbooster_0 ; "%s\\PACKBOOSTERSlargeopened16.bmp"
.text:0047FD6F                 lea     eax, [ebp+FileName]
.text:0047FD75                 push    eax             ; Dest
.text:0047FD76                 call    sprintf
.text:0047FD7B                 add     esp, 0Ch
.text:0047FD7E                 push    0               ; int
.text:0047FD80                 push    0               ; Dst
.text:0047FD82                 lea     eax, [ebp+FileName]
.text:0047FD88                 push    eax             ; lpFileName
.text:0047FD89                 call    sub_466720
.text:0047FD8E                 add     esp, 0Ch
.text:0047FD91                 mov     ds:dword_60BA7C, eax
.text:0047FD96
.text:0047FD96 loc_47FD96:                             ; CODE XREF: sub_47FCC0+9Aj
.text:0047FD96                                         ; sub_47FCC0+A3j
.text:0047FD96                 cmp     ds:dword_60BAC4, 0
.text:0047FD9D                 jz      loc_4800BC
.text:0047FDA3                 lea     eax, [ebp+pv]
.text:0047FDA9                 push    eax             ; pv
.text:0047FDAA                 push    18h             ; c
.text:0047FDAC                 mov     eax, ds:dword_60BAC4
.text:0047FDB1                 push    eax             ; h
.text:0047FDB2                 call    GetObjectA
.text:0047FDB7                 mov     ecx, 5
.text:0047FDBC                 mov     eax, [ebp+var_148]
.text:0047FDC2                 cdq
.text:0047FDC3                 idiv    ecx
.text:0047FDC5                 mov     [ebp+wSrc], eax
.text:0047FDCB                 mov     eax, [ebp+var_144]
.text:0047FDD1                 cdq
.text:0047FDD2                 sub     eax, edx
.text:0047FDD4                 sar     eax, 1
.text:0047FDD6                 mov     [ebp+hSrc], eax
.text:0047FDDC                 mov     eax, [ebp+hSrc]
.text:0047FDE2                 push    eax
.text:0047FDE3                 mov     eax, [ebp+wSrc]
.text:0047FDE9                 push    eax
.text:0047FDEA                 mov     eax, [ebp+arg_4]
.text:0047FDED                 push    eax
.text:0047FDEE                 lea     eax, [ebp+var_120]
.text:0047FDF4                 push    eax
.text:0047FDF5                 call    sub_4661F0
.text:0047FDFA                 add     esp, 10h
.text:0047FDFD                 cmp     [ebp+arg_8], 2
.text:0047FE01                 jnz     short loc_47FE22
.text:0047FE03                 mov     eax, [ebp+wSrc]
.text:0047FE09                 imul    eax, [ebp+arg_C]
.text:0047FE0D                 mov     [ebp+var_128], eax
.text:0047FE13                 mov     [ebp+var_12C], 0
.text:0047FE1D                 jmp     loc_47FEB9
.text:0047FE22 ; ---------------------------------------------------------------------------
.text:0047FE22
.text:0047FE22 loc_47FE22:                             ; CODE XREF: sub_47FCC0+141j
.text:0047FE22                 cmp     [ebp+arg_8], 0
.text:0047FE26                 jnz     short loc_47FE40
.text:0047FE28                 mov     [ebp+var_128], 0
.text:0047FE32                 mov     eax, [ebp+hSrc]
.text:0047FE38                 mov     [ebp+var_12C], eax
.text:0047FE3E                 jmp     short loc_47FEB9
.text:0047FE40 ; ---------------------------------------------------------------------------
.text:0047FE40
.text:0047FE40 loc_47FE40:                             ; CODE XREF: sub_47FCC0+166j
.text:0047FE40                 cmp     [ebp+arg_8], 1
.text:0047FE44                 jnz     short loc_47FE60
.text:0047FE46                 mov     eax, [ebp+wSrc]
.text:0047FE4C                 mov     [ebp+var_128], eax
.text:0047FE52                 mov     eax, [ebp+hSrc]
.text:0047FE58                 mov     [ebp+var_12C], eax
.text:0047FE5E                 jmp     short loc_47FEB9
.text:0047FE60 ; ---------------------------------------------------------------------------
.text:0047FE60
.text:0047FE60 loc_47FE60:                             ; CODE XREF: sub_47FCC0+184j
.text:0047FE60                 cmp     [ebp+arg_8], 3
.text:0047FE64                 jnz     short loc_47FE82
.text:0047FE66                 mov     eax, [ebp+wSrc]
.text:0047FE6C                 add     eax, eax
.text:0047FE6E                 mov     [ebp+var_128], eax
.text:0047FE74                 mov     eax, [ebp+hSrc]
.text:0047FE7A                 mov     [ebp+var_12C], eax
.text:0047FE80                 jmp     short loc_47FEB9
.text:0047FE82 ; ---------------------------------------------------------------------------
.text:0047FE82
.text:0047FE82 loc_47FE82:                             ; CODE XREF: sub_47FCC0+1A4j
.text:0047FE82                 cmp     [ebp+arg_8], 4
.text:0047FE86                 jnz     short loc_47FEA5
.text:0047FE88                 mov     eax, [ebp+wSrc]
.text:0047FE8E                 lea     eax, [eax+eax*2]
.text:0047FE91                 mov     [ebp+var_128], eax
.text:0047FE97                 mov     eax, [ebp+hSrc]
.text:0047FE9D                 mov     [ebp+var_12C], eax
.text:0047FEA3                 jmp     short loc_47FEB9
.text:0047FEA5 ; ---------------------------------------------------------------------------
.text:0047FEA5
.text:0047FEA5 loc_47FEA5:                             ; CODE XREF: sub_47FCC0+1C6j
.text:0047FEA5                 mov     [ebp+var_128], 0
.text:0047FEAF                 mov     [ebp+var_12C], 0
.text:0047FEB9
.text:0047FEB9 loc_47FEB9:                             ; CODE XREF: sub_47FCC0+15Dj
.text:0047FEB9                                         ; sub_47FCC0+17Ej ...
.text:0047FEB9                 mov     eax, [ebp+var_148]
.text:0047FEBF                 sub     eax, [ebp+wSrc]
.text:0047FEC5                 mov     [ebp+xSrc], eax
.text:0047FECB                 mov     eax, [ebp+var_144]
.text:0047FED1                 sub     eax, [ebp+hSrc]
.text:0047FED7                 mov     [ebp+ySrc], eax
.text:0047FEDD                 mov     eax, [ebp+ySrc]
.text:0047FEE3                 push    eax             ; ySrc
.text:0047FEE4                 mov     eax, [ebp+xSrc]
.text:0047FEEA                 push    eax             ; xSrc
.text:0047FEEB                 mov     eax, [ebp+var_12C]
.text:0047FEF1                 push    eax             ; int
.text:0047FEF2                 mov     eax, [ebp+var_128]
.text:0047FEF8                 push    eax             ; int
.text:0047FEF9                 mov     eax, [ebp+hSrc]
.text:0047FEFF                 push    eax             ; hSrc
.text:0047FF00                 mov     eax, [ebp+wSrc]
.text:0047FF06                 push    eax             ; wSrc
.text:0047FF07                 mov     eax, ds:dword_60BAC4
.text:0047FF0C                 push    eax             ; h
.text:0047FF0D                 lea     eax, [ebp+var_120]
.text:0047FF13                 push    eax             ; int
.text:0047FF14                 mov     eax, [ebp+hdc]
.text:0047FF17                 push    eax             ; hdc
.text:0047FF18                 call    sub_4665C0
.text:0047FF1D                 add     esp, 24h
.text:0047FF20                 cmp     [ebp+arg_10], 0
.text:0047FF24                 jz      loc_4800B7
.text:0047FF2A                 cmp     ds:dword_60BA7C, 0
.text:0047FF31                 jz      loc_4800B7
.text:0047FF37                 lea     eax, [ebp+pv]
.text:0047FF3D                 push    eax             ; pv
.text:0047FF3E                 push    18h             ; c
.text:0047FF40                 mov     eax, ds:dword_60BA7C
.text:0047FF45                 push    eax             ; h
.text:0047FF46                 call    GetObjectA
.text:0047FF4B                 mov     ecx, 6
.text:0047FF50                 mov     eax, [ebp+var_148]
.text:0047FF56                 cdq
.text:0047FF57                 idiv    ecx
.text:0047FF59                 mov     [ebp+var_160], eax
.text:0047FF5F                 mov     eax, [ebp+var_144]
.text:0047FF65                 cdq
.text:0047FF66                 sub     eax, edx
.text:0047FF68                 sar     eax, 1
.text:0047FF6A                 mov     [ebp+var_164], eax
.text:0047FF70                 cmp     [ebp+arg_8], 2
.text:0047FF74                 jnz     short loc_47FF84
.text:0047FF76                 mov     eax, [ebp+var_164]
.text:0047FF7C                 mov     [ebp+var_12C], eax
.text:0047FF82                 jmp     short loc_47FF8E
.text:0047FF84 ; ---------------------------------------------------------------------------
.text:0047FF84
.text:0047FF84 loc_47FF84:                             ; CODE XREF: sub_47FCC0+2B4j
.text:0047FF84                 mov     [ebp+var_12C], 0
.text:0047FF8E
.text:0047FF8E loc_47FF8E:                             ; CODE XREF: sub_47FCC0+2C2j
.text:0047FF8E                 cmp     [ebp+arg_14], 0
.text:0047FF92                 jg      short loc_47FFA5
.text:0047FF94                 mov     eax, [ebp+var_160]
.text:0047FF9A                 shl     eax, 2
.text:0047FF9D                 mov     [ebp+var_128], eax
.text:0047FFA3                 jmp     short loc_47FFF0
.text:0047FFA5 ; ---------------------------------------------------------------------------
.text:0047FFA5
.text:0047FFA5 loc_47FFA5:                             ; CODE XREF: sub_47FCC0+2D2j
.text:0047FFA5                 cmp     [ebp+arg_14], 1
.text:0047FFA9                 jnz     short loc_47FFBC
.text:0047FFAB                 mov     eax, [ebp+var_160]
.text:0047FFB1                 lea     eax, [eax+eax*2]
.text:0047FFB4                 mov     [ebp+var_128], eax
.text:0047FFBA                 jmp     short loc_47FFF0
.text:0047FFBC ; ---------------------------------------------------------------------------
.text:0047FFBC
.text:0047FFBC loc_47FFBC:                             ; CODE XREF: sub_47FCC0+2E9j
.text:0047FFBC                 cmp     [ebp+arg_14], 2
.text:0047FFC0                 jnz     short loc_47FFD2
.text:0047FFC2                 mov     eax, [ebp+var_160]
.text:0047FFC8                 add     eax, eax
.text:0047FFCA                 mov     [ebp+var_128], eax
.text:0047FFD0                 jmp     short loc_47FFF0
.text:0047FFD2 ; ---------------------------------------------------------------------------
.text:0047FFD2
.text:0047FFD2 loc_47FFD2:                             ; CODE XREF: sub_47FCC0+300j
.text:0047FFD2                 cmp     [ebp+arg_14], 3
.text:0047FFD6                 jnz     short loc_47FFE6
.text:0047FFD8                 mov     eax, [ebp+var_160]
.text:0047FFDE                 mov     [ebp+var_128], eax
.text:0047FFE4                 jmp     short loc_47FFF0
.text:0047FFE6 ; ---------------------------------------------------------------------------
.text:0047FFE6
.text:0047FFE6 loc_47FFE6:                             ; CODE XREF: sub_47FCC0+316j
.text:0047FFE6                 mov     [ebp+var_128], 0
.text:0047FFF0
.text:0047FFF0 loc_47FFF0:                             ; CODE XREF: sub_47FCC0+2E3j
.text:0047FFF0                                         ; sub_47FCC0+2FAj ...
.text:0047FFF0                 mov     eax, [ebp+var_148]
.text:0047FFF6                 sub     eax, [ebp+var_160]
.text:0047FFFC                 mov     [ebp+xSrc], eax
.text:00480002
.text:00480002 loc_480002:                             ; DATA XREF: .data:007BC7A8o
.text:00480002                 mov     [ebp+ySrc], 0
.text:0048000C                 mov     eax, [ebp+var_118]
.text:00480012                 mov     [ebp+var_154], eax
.text:00480018                 mov     ecx, [ebp+var_154]
.text:0048001E                 mov     eax, [ebp+var_118]
.text:00480024                 sub     eax, [ebp+var_120]
.text:0048002A                 imul    eax, [ebp+var_160]
.text:00480031                 cdq
.text:00480032                 idiv    [ebp+wSrc]
.text:00480038                 sub     ecx, eax
.text:0048003A                 mov     [ebp+var_15C], ecx
.text:00480040                 mov     eax, [ebp+var_11C]
.text:00480046                 mov     [ebp+var_158], eax
.text:0048004C                 mov     eax, [ebp+var_114]
.text:00480052                 sub     eax, [ebp+var_11C]
.text:00480058                 imul    eax, [ebp+var_164]
.text:0048005F                 cdq
.text:00480060                 idiv    [ebp+hSrc]
.text:00480066                 mov     ecx, [ebp+var_158]
.text:0048006C                 add     ecx, eax
.text:0048006E                 mov     [ebp+var_150], ecx
.text:00480074                 mov     eax, [ebp+ySrc]
.text:0048007A                 push    eax             ; ySrc
.text:0048007B                 mov     eax, [ebp+xSrc]
.text:00480081                 push    eax             ; xSrc
.text:00480082                 mov     eax, [ebp+var_12C]
.text:00480088                 push    eax             ; int
.text:00480089                 mov     eax, [ebp+var_128]
.text:0048008F                 push    eax             ; int
.text:00480090                 mov     eax, [ebp+var_164]
.text:00480096                 push    eax             ; hSrc
.text:00480097                 mov     eax, [ebp+var_160]
.text:0048009D                 push    eax             ; wSrc
.text:0048009E                 mov     eax, ds:dword_60BA7C
.text:004800A3                 push    eax             ; h
.text:004800A4                 lea     eax, [ebp+var_15C]
.text:004800AA                 push    eax             ; int
.text:004800AB                 mov     eax, [ebp+hdc]
.text:004800AE                 push    eax             ; hdc
.text:004800AF                 call    sub_4665C0
.text:004800B4                 add     esp, 24h
.text:004800B7
.text:004800B7 loc_4800B7:                             ; CODE XREF: sub_47FCC0+264j
.text:004800B7                                         ; sub_47FCC0+271j
.text:004800B7                 jmp     loc_480181
.text:004800BC ; ---------------------------------------------------------------------------
.text:004800BC
.text:004800BC loc_4800BC:                             ; CODE XREF: sub_47FCC0+DDj
.text:004800BC                                         ; DATA XREF: .data:007BC920o
.text:004800BC                 mov     eax, [ebp+hdc]
.text:004800BF                 push    eax             ; hdc
.text:004800C0                 call    SaveDC
.text:004800C5                 mov     [ebp+nSavedDC], eax
.text:004800C8                 push    2               ; i
.text:004800CA                 call    GetStockObject
.text:004800CF                 push    eax             ; h
.text:004800D0
.text:004800D0 loc_4800D0:                             ; DATA XREF: .data:007BD644o
.text:004800D0                 mov     eax, [ebp+hdc]
.text:004800D3                 push    eax             ; hdc
.text:004800D4                 call    SelectObject
.text:004800D9
.text:004800D9 loc_4800D9:                             ; DATA XREF: .data:007BC894o
.text:004800D9                 push    10101h          ; color
.text:004800DE                 mov     eax, [ebp+hdc]
.text:004800E1                 push    eax             ; hdc
.text:004800E2                 call    SetTextColor
.text:004800E7                 push    1               ; mode
.text:004800E9                 mov     eax, [ebp+hdc]
.text:004800EC                 push    eax             ; hdc
.text:004800ED                 call    SetBkMode
.text:004800F2                 push    0Dh             ; i
.text:004800F4                 call    GetStockObject
.text:004800F9                 push    eax             ; h
.text:004800FA                 mov     eax, [ebp+hdc]
.text:004800FD                 push    eax             ; hdc
.text:004800FE                 call    sub_401B90
.text:00480103                 mov     eax, [ebp+arg_4]
.text:00480106                 mov     eax, [eax+0Ch]
.text:00480109                 push    eax             ; bottom
.text:0048010A
.text:0048010A loc_48010A:                             ; DATA XREF: .data:007BD7A4o
.text:0048010A                 mov     eax, [ebp+arg_4]
.text:0048010D                 mov     eax, [eax+8]
.text:00480110                 push    eax             ; right
.text:00480111                 mov     eax, [ebp+arg_4]
.text:00480114                 mov     eax, [eax+4]
.text:00480117                 push    eax             ; top
.text:00480118                 mov     eax, [ebp+arg_4]
.text:0048011B                 mov     eax, [eax]
.text:0048011D                 push    eax             ; left
.text:0048011E                 mov     eax, [ebp+hdc]
.text:00480121                 push    eax             ; hdc
.text:00480122                 call    Rectangle
.text:00480127                 push    3               ; c
.text:00480129                 mov     eax, [ebp+arg_8]
.text:0048012C                 shl     eax, 3
.text:0048012F                 lea     eax, [eax+eax*8]
.text:00480132                 add     eax, offset dword_60B7AC
.text:00480137                 push    eax             ; lpString
.text:00480138                 mov     eax, [ebp+arg_4]
.text:0048013B                 mov     eax, [eax+4]
.text:0048013E                 push    eax             ; y
.text:0048013F                 mov     eax, [ebp+arg_4]
.text:00480142                 mov     eax, [eax]
.text:00480144                 push    eax             ; x
.text:00480145                 mov     eax, [ebp+hdc]
.text:00480148                 push    eax             ; hdc
.text:00480149                 call    TextOutA
.text:0048014E                 cmp     [ebp+arg_10], 0
.text:00480152                 jz      short loc_480174
.text:00480154                 push    1               ; c
.text:00480156                 push    offset asc_4EC7C1 ; "X"
.text:0048015B                 mov     eax, [ebp+arg_4]
.text:0048015E                 mov     eax, [eax+4]
.text:00480161                 add     eax, 14h
.text:00480164                 push    eax             ; y
.text:00480165                 mov     eax, [ebp+arg_4]
.text:00480168                 mov     eax, [eax]
.text:0048016A                 push    eax             ; x
.text:0048016B                 mov     eax, [ebp+hdc]
.text:0048016E                 push    eax             ; hdc
.text:0048016F                 call    TextOutA
.text:00480174
.text:00480174 loc_480174:                             ; CODE XREF: sub_47FCC0+492j
.text:00480174                 mov     eax, [ebp+nSavedDC]
.text:00480177                 push    eax             ; nSavedDC
.text:00480178                 mov     eax, [ebp+hdc]
.text:0048017B                 push    eax             ; hdc
.text:0048017C                 call    RestoreDC
.text:00480181
.text:00480181 loc_480181:                             ; CODE XREF: sub_47FCC0:loc_4800B7j
.text:00480181                 mov     eax, 1
.text:00480186
.text:00480186 loc_480186:                             ; CODE XREF: sub_47FCC0+1Aj
.text:00480186                                         ; sub_47FCC0+2Dj
.text:00480186                 pop     edi
.text:00480187                 pop     esi
.text:00480188                 pop     ebx
.text:00480189                 leave
.text:0048018A                 retn
.text:0048018A sub_47FCC0      endp
.text:0048018A
.text:0048018A ; ---------------------------------------------------------------------------
.text:0048018B                 align 10h
I would like to see a simpler version if possible to add whatever starter deck and booster pics and sets available...you know what i mean..i know this is off topic kinda but i am finding out some code that wont need to be checked again..
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: Manalink C/ASM Dll

Postby foolosopher » 11 Feb 2011, 15:52

Hi, if check you 'll see that ClientToScreen
is a win32 API call that
"The ClientToScreen API converts the client-area coordinates of a specified point to screen coordinates."
which is related to what you said but not related to the 2000 limit.
I 've been trying to produce an 2000 error but the csvtodat won't produce a card.dat if it sees an ID of 2000 anywhere in the manalink.csv even if you have emptied a couple of slots. Skymagic.editor will let you pass an ID of 2000 in the manalink.csv and magic.exe though. This is what I 've been trying to track down so far. Anyway, I need to familiarize a bit more with ollydbg.
I might need a couple versions (normal & disassembled) from your archive, once I figure out when the 1400 -> 2000 was achieved according to the history lesson of manalink. :?
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby Ghost » 11 Feb 2011, 17:06

I have no idea.

I'm starting to learn to code cards, it will hopefully also allow me to identify and isolate card code better.

Ghost.
Ghost
 
Posts: 33
Joined: 28 Jan 2011, 22:04
Has thanked: 0 time
Been thanked: 0 time

Re: Manalink C/ASM Dll

Postby Ghost » 11 Feb 2011, 17:11

BTW, I just installed Mok's version and it seems that part1 and part2 are exactly the same thing! Same files, folders, file sizes, creation and modification dates, and most importantly the exact same data. Whoever is responsible for the archive and tutorials/wiki is safe to remove part2 from here: http://www.slightlymagic.net/wiki/Installation

Ghost
Ghost
 
Posts: 33
Joined: 28 Jan 2011, 22:04
Has thanked: 0 time
Been thanked: 0 time

Re: Manalink C/ASM Dll

Postby foolosopher » 12 Feb 2011, 00:41

hey, I 've been searching my archives and in
mok 2.01 there exist some .csv files but no manalink.csv. num of card images 1300
then the earlier that I have is 2009-06-08 which has manalink.csv. and IDs up to 1999.
Could you check your archives and post the update where manalink.csv first appears.

Thx,

foolosopher
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby gmzombie » 12 Feb 2011, 02:25

there is skymarshals first mod with manalink.csv
Attachments
SkyMarshal.zip
skymarshal's first mod i believe..
(3.25 MiB) Downloaded 505 times
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: Manalink C/ASM Dll

Postby CirothUngol » 12 Feb 2011, 18:35

I asked jatill about the manalink.csv file in This Thread. He had this to say about the lack of a .csv file in Mok's final version:
jatill wrote:The reason the CSV isn't included in the distribution is that it's not needed to run the game. It gets turned into cards.dat via csv2dat.exe.
The earliest update I currently have is 20090427 and the .csv has CardIDs up to 1849... you can grab it HERE.
If you'd like any earlier updates, BogWraith is the self-proclaimed PackRat of the Manalink community. I'm sure he could provide the earliest possible updates for you to look at.
If you glean any additional useful info from manalink.csv, or if you can make corrections, please consider contributing to the Manalink.csv Definition Wiki
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


Shandalar 2012 Revisited
Magic: The Gathering Abandonware
User avatar
CirothUngol
Programmer
 
Posts: 431
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 108 times

Re: Manalink C/ASM Dll

Postby foolosopher » 14 Feb 2011, 01:27

Thanks for the info and update postings, for the time being I am looking into the max IDs of manalink.csv to try to find when the card table limit was changed, but if I find something more about it, I 'll be sure to post. BTW maybe you can find more info about it by looking at the disassembled magic.exe in asm or c. You can check functions with card names to see how the various fields were used, or at least determine their sizes.
Below some update history for manalink.csv I compiled.
Mok2: 1300 images,
skymarshal: 1549, "patched Magic.exe to load ManalinkEx.dll, this dll adds about 2mb of free space to code new cards", therefore in this patch the tables that limit max card NUM were probably not altered
20090427: 1849,
20090608: 1999,

Maybe deckbuilder.csv also gives us some info on card limit, but i'll check it some more.
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby gmzombie » 14 Feb 2011, 03:48

deckbuilder.csv is from the older pre mok and wont tell you a thing. and anything after skymarshal will have up to 2000 cards...the limit was never changed after this.i would be looking in the 1st skymarshal files and moks 2.0 original mod to see where the differences are for the 2k limit. i think moks was originally setup for 1300 or so as i dont think he changed it but i could be wrong
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: Manalink C/ASM Dll

Postby foolosopher » 15 Feb 2011, 19:44

OK, then, could you post the patch from skymarshal that you are referring.

THX
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby gmzombie » 15 Feb 2011, 22:39

foolosopher wrote:OK, then, could you post the patch from skymarshal that you are referring.
look 2 of my posts back and you will have it.
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: Manalink C/ASM Dll

Postby Salbei » 16 Feb 2011, 00:30

Gonna move this topic to "Development" soon. Should have been there a long time ago :oops:

/done
Been cleaning up the "Manalink 2.0" forum a little bit.Hope you don´t mind.
Retired a long time ago. I will not reply.
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: Manalink C/ASM Dll

Postby foolosopher » 17 Feb 2011, 21:24

My latest findings:
Made some experiments with skymagic editor by creating magic.exes (including manalink.csv and cards.dat) with 1999 (filled emtpy slot) and 2000 cards. The 2000 crashes while loading, so although only the first menu is loaded it seems that the card table is loaded also when the game starts and it crashes. I tried to debug this with ollydbg and so far found that there is an access violation at 006906(does this ring any bells?), couldn't read that line of code yet though.
I believe that the most technically "correct" approach is to try and track down the card tables through ollydbg, but I lack the skill :oops: , for the time being at least, so if you have any good tutorials, I would be delighted =D> .
For the "compare" approach that we discussed, what I found is that up to mok2.01 update the size of magic.exe is about 300KB, but after Harrypitfall and skymarshal update the size gets significantly bigger (about 4,5MB) in comparison. This has an impact on the size of the disassembled code which from 8MBs of pure text (which is a LOT of lines) goes up to 50MBs of pure text :shock: . Surely there exists a lot of clutter-card code that we can omit, but still we are talking about a lot of code and probably more differences that harry and skymarshal made than just changing the sizes of some tables.
Unfortunately, if we are to achieve what we want, we probably have to do a little bit of everything.
Anyway I still have the c code (with bits of asm), which needs a lot of debugging, that I have left off since we started discussing the above solutions, which, concerning size at least, is a lot less to tackle with(about 4,5MB) and will become even less if card code is removed.
So my question to the more advanced developers of our community is which approach would be more efficient according to your opinion and if you have something else to propose please do.

foolosopher
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Manalink C/ASM Dll

Postby Ghost » 18 Feb 2011, 12:20

Hi, Im afraid i dont have the skillz either. I propose we try doing that same simple analysis on the original Microprose MTG, because DoTP added Legends and The Dark, while SoTA added Arabian Nights and Antiquities. This leaves MMTG with very few card clutter, probably only Alpha core cards.

I tried downloading it from here: viewtopic.php?f=55&t=898

but part 4 is down, Huggybaby said dariusii dude could re-upload it but nothing yet. Perhaps if you guys ask to contact him.

Ghost.
Ghost
 
Posts: 33
Joined: 28 Jan 2011, 22:04
Has thanked: 0 time
Been thanked: 0 time

Re: Manalink C/ASM Dll

Postby Snacko » 18 Feb 2011, 19:25

The size difference you see is because all files changed by mok are upx packed, which means you have to unpack it to get to the actual code.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 2 guests

Login Form