PLEASE DO NOT REPORT BUGS HERE!
by Mok » 24 Nov 2011, 02:02
- Main struct loaded from cards.dat (entries are card_ptr_t in your includes, in the past I called it CDAT) needs to be moved and expanded, all references pointing to it must be changed. Currently it's at 0x73BAE0 in your exe (size is 0x98 * 2000 but looks like it was partially overwritten by some of the new code? as it even spans the sections of the new exe file... I have no idea about the changes you made so I'll ignore it). A few references are not pointing to the start of the struct (ie. seems like the code of whimsy accesses some entry directly etc).
- There's another struct that simply contains addresses of each card in the above struct (mostly used originally by my asm macros). It's at 0x55D0E0 (size 4 * 2000). The code filling it is at 0x4022CC and of course needs to be changed from 2000 entries to whatever. This one will have a lot of references that need to be changed of course (after moving it and expanding).
- A small struct that contains addresses of DamageText, EffectTitle, EffectText, LegacyTitle and LegacyText (so 20 bytes per entry * 2000) needs to be moved and expanded and all references to it must be changed. Currently it's at 0x60EFDC with about ~20 places referencing it in the code.
- Another small struct contains the info if the cards are legal ("coded" field in the csv). Each card takes 1 bit so the size is currently 2000/8. This needs to be moved, expanded and references changed. This also requires a small change in my old csv2dat.exe program as it always writes 2000 cards in there. The struct is currently at 0x4EB7F8. The code at 0x4681B4 "cmp eax, 2000" needs to be changed to whatever.
That's all I see at the moment.
Similar changes will most likely be needed in deckdll.dll (as it loads cards.dat and checks if the cards are coded) and DrawCardLib.dll (that one has CDAT on stack, yeah whole 304kb of it O.o) I can probably help fixing these if anyone will attempt it at all.
by Aswan jaguar » 24 Nov 2011, 12:54
by Gargaroz » 24 Nov 2011, 17:28
As the main Manalink mantainer now, I want to thank you for you past and present work, we all owe you a lot for making the updating of Manalink possible.
I hope that our ASM crew will make good use of your suggesions.
by Mok » 28 Nov 2011, 20:17
by Mok » 29 Nov 2011, 00:09
by 0rion79 » 29 Nov 2011, 09:46
by Dave » 29 Nov 2011, 12:41
Mok, you mean something like this ?I can try to fix the additional files (deckbuilder, other dlls) but I will need someone with the knowledge about the changes as some hacks are hard to spot
i found this here : http://www.slightlymagic.net/forum/viewtopic.php?f=56&t=911by HarryPitfall » 01 Mar 2009, 03:43
ManalinkEx.dll => for hand made code, 2 mb of size, load at $1001000
ManalinkEh.dll => compiled by code, no size restriction, load at $2001000
by gmzombie » 29 Nov 2011, 12:59
http://home.comcast.net/~gmzombie/index.html for all my things to upload for now on.
by 0rion79 » 29 Nov 2011, 13:06
by jatill » 29 Nov 2011, 13:42
by Gargaroz » 29 Nov 2011, 14:17
by Mok » 29 Nov 2011, 17:45
That's not the problem, the bmp hack is easy to remove (I have added some code that loads images in db from different types of files and it seems to work, I just wanted deck.exe to work again to test db with more cards that magic.exe can accept), but the problem is: if I replace deckdll.dll with a new version, the avatar cards don't show up when the db is started from magic.exe. It seems the new code (manalinkeh.dll? no idea) is modifying something directly and I don't know where to look for the hack. It does not seem to be done inside deckdll.dll, so it must be somewhere else.gmzombie wrote:As for the ugly hook on the .pic to .bmp i would say that I helped locate that exact problem and did a lot to get the game to accept bmps in the deckdll due to the fact that we wanted to update the graphics of the game. I couldn't quite figure out how to add the bmp code from magic.exe to the dll and make it work right..Also the avatars in the current game are recreated through the csv and are probably in the C side of the manalinkeh.dll.
by Mok » 29 Nov 2011, 17:52
What editor? If by secret byte you mean the 'secret' entry in your card_data_t then no, in my old files it was also marked as unknown. Mostly because AFAIK it's used 1 time in the whole magic.exe (in some mana pools cleaning code and only checked for -1 value). Some data was used only in Shandalar and I never bothered with it.Gargaroz wrote:I got too a question for Mok, but it's unrelated to the 2000 card limit : have you decrypted the "Reserved Infos" field of the editor ? And what is the "Secret byte" ?
Who is online
Users browsing this forum: No registered users and 0 guests