Page 1 of 1

Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 17:36
by Snacko
Download link: http://www.mediafire.com/download.php?jn5nyimhqy2
No new cards, only C development changes:
    * moved grouped defines to enums
    * added 2 new structures / arrays of them
    * recoded has_creature_type.asm to C using the new API, reference asm included
Other:
    *Included Mathy csv updates see topic for changes

edit v2
Contains fixes one spotted by LoneFox, one I spotted on my own. Both introduced by me sorry folks please redownload and the merfolk reejerey should work fine.

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 17:57
by mathusalem
I have to , yet again, re-upload that CSV. I had totally forgotten that Farseek had 3 images registered in the database instead of one. it's ennoying when it comes up so I corrected it. If you don't mind re-re-re download some stuff here it is. it doesn't interfere with snacko's work so you people can go ahead.

http://rapidshare.com/files/210777124/csv-update.rar

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 18:48
by jatill
mathusalem wrote:I have to , yet again, re-upload that CSV. I had totally forgotten that Farseek had 3 images registered in the database instead of one. it's ennoying when it comes up so I corrected it. If you don't mind re-re-re download some stuff here it is. it doesn't interfere with snacko's work so you people can go ahead.

http://rapidshare.com/files/210777124/csv-update.rar
Is this the only change to the csv? If so, I'll re-apply to my next update.

Snacko, assume everything works, can I sign myself up as the active developer now?

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 18:53
by jatill
No compilo:
cards/ancestors_chosen.c:3: error: syntax error before "event_t"
cards/ancestors_chosen.c: In function `card_ancestors_chosen':
cards/ancestors_chosen.c:5: error: `card' undeclared (first use in this function)
cards/ancestors_chosen.c:5: error: (Each undeclared identifier is reported only once
cards/ancestors_chosen.c:5: error: for each function it appears in.)
cards/ancestors_chosen.c:5: error: `player' undeclared (first use in this function)
cards/ancestors_chosen.c:7: error: `event' undeclared (first use in this function)
make: *** [cards/ancestors_chosen.o] Error 1

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 19:28
by mathusalem
jatill wrote:
Is this the only change to the csv? If so, I'll re-apply to my next update.

Yes it is

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 20:15
by Snacko
Compiles just fine here, are these all the errors ?
Did you try a fresh folder, not overwriting the old files as some files get removed?
Most likely it's old manalink.h as it complains about the type.
If all fails here's my MinGW contains everything you might ever need c / c++, unless it's an extra lib
I tested it before posting this time and everything works 100%.

Re: Manalink update 2009-03-18

PostPosted: 18 Mar 2009, 23:24
by jatill
Snacko wrote:Compiles just fine here, are these all the errors ?
Did you try a fresh folder, not overwriting the old files as some files get removed?
Most likely it's old manalink.h as it complains about the type.
If all fails here's my MinGW contains everything you might ever need c / c++, unless it's an extra lib
I tested it before posting this time and everything works 100%.
Maybe I had one of the files open in my editor and couldn't overwrite or something. Should I be able to compile if I blow everything away and just use your src?

Re: Manalink update 2009-03-18

PostPosted: 19 Mar 2009, 03:43
by HarryPitfall
I found some nice tricks to sucefull compile... I have dev-cpp installed at D:\Dev-Cpp... so... my build.bat is:

Set Path=D:\Dev-Cpp\bin
Set MINGDIR=D:\Dev-Cpp
Mingw32-Make

This 'set' make the make/gcc that comes with dev-cpp works correct about includes and libs, at least, on my machine...
Also, in manalink.lds, i have this:

_memcpy = 0x4D5280;

Since, -nostdlib is on makefile, these 'internal' functions aren't added from gcc library, and must use the version inside magic.exe

Also, since now he have much information... How about using lua/activescripting for card coding... just make a common codepointer, with code, that look what the 'manalink.csv' id of the card, and call a scripting function based on it. The bad part... we need to expose lots of functions to script... the good point is that most cards can be coded in high-level language without recompiling the dll... since will load a manalink.lua or manalink.js with coded cards everytime that magic.exe starts...
Code: Select all
// Example code in javascript for Bottle Gnomes
function card_1629(player, card, event) {
  switch (event) {
    case events.canActivate: return 1;
    case events.activateAbility: engine.destroyCard(player, card, destroyAction.sacrifice);
    case events.resolveAbility: engine.playerGainLife(player, 3);
  }
  return 0;
}
// "engine" is a exported object, with game functions...
// "events" and "destroyAction" is a object with constants defined...
This is just a general idea, and a example that how the cards will be code (javascript is much like C). I know that my idea isn't that good, but I use scripting on my applications since a long time, and helps a lot... :)

Re: Manalink update 2009-03-18

PostPosted: 19 Mar 2009, 12:37
by jatill
How do I open a .z7 file? Anyway, I tried a fresh build and get the same error. If I copy everything into my camelbox/bin directory, though, no errors. camelbox/bin is in my path (otherwise make couldn't work). Any ideas?

Re: Manalink update 2009-03-18

PostPosted: 19 Mar 2009, 13:11
by Snacko
http://www.7-zip.org/ or winrar should decompress it too.

Dunno why would it work in one directory and not the other, plus you don't need perl for the makefiles / c just have the mingw/bin in your path.