It is currently 27 Apr 2024, 03:34
   
Text Size

DrawCardLib

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

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

Re: DrawCardLib

Postby foolosopher » 17 Oct 2011, 14:38

HI,

I am giving up on the cygwin enviroment.
Set up MINGW-Msys-Gtk+ according to

http://modulatum.wordpress.com/2008/06/ ... ing-mingw/

seems OK but got the below results,
didn't check it thoroughly but the mistakes are wrong I think
ssize_t is declared from what I saw.
Could it be from not recognizing some library?
Will check it again later

esfak@TENEKES /d/MagicC-DrawCardLib-dist
$ make
gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -std=c99 -Wall -Wextra -Wpoint
er-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -
W -Wstrict-prototypes -Wnested-externs -Winline -Wno-unused-parameter -Werror -I
.. -I. -I`pkg-config --cflags glib-2.0` -I`pkg-config --cflags pangocairo` -c -o
src/helper_functions.o src/helper_functions.c
src/helper_functions.c: In function 'vscnprintf':
src/helper_functions.c:5:5: error: unknown type name 'ssize_t'
src/helper_functions.c: In function 'scnprintf':
src/helper_functions.c:14:5: error: unknown type name 'ssize_t'
make: *** [src/helper_functions.o] Error 1

esfak@TENEKES /d/MagicC-DrawCardLib-dist
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: DrawCardLib

Postby Snacko » 18 Oct 2011, 10:13

First what version of gcc ; gcc -v
Second that guide has old links you get gtk bundle from http://www.gtk.org/download/win32.php and gcc from http://mingw.org/wiki/HOWTO_Install_the ... iler_Suite
Then depending where you got your gcc you might need to include sys/types.h for ssize_t (this is where it lives), however a stdlib.h import should include stddef.h which includes sys/types.h and it worked for you under cygwin.

You can redownload http://www.mediafire.com/?bhp6dioa91zj2a9 , I've made some changes so it should work for you under mingw and probably cygwin.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: DrawCardLib

Postby foolosopher » 18 Oct 2011, 13:57

These are the links that I also found but thanks anyway. The new version works like a charm for Mingw, my cygwin still complains, but I 'll check it again later. So... what's next?
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: DrawCardLib

Postby Snacko » 18 Oct 2011, 14:34

I don't use cygwin so I assumed it would work without any changes, I guessed wrong then.

Now you can test if it works :) you can copy DrawCardLib.dll to you manalink directory. You will need all the dependencies in your path (you can check what dll depends on with ex. dependecy walker)
This are most likely all the dependencies:
Code: Select all
freetype6.dll
libcairo-2.dll
libcairo-gobject-2.dll
libexpat-1.dll
libfontconfig-1.dll
libglib-2.0-0.dll
libgmodule-2.0-0.dll
libgobject-2.0-0.dll
libgthread-2.0-0.dll
libpango-1.0-0.dll
libpangocairo-1.0-0.dll
libpangoft2-1.0-0.dll
libpangowin32-1.0-0.dll
libpng14-14.dll
zlib1.dll
You can then read the code and start hacking :). All the bare bones to interact with Magic.exe are pretty much written.
I was also wondering if CardArtLib.dll shouldn't be made too as it's needed for Shandalar (rendering card artwork somewhere). CardArtLib is an image cache it was used both in this dll and Shandalar. It has some not that useful methods and could be coded in C++ (collections in stl).
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: DrawCardLib

Postby foolosopher » 26 Oct 2011, 10:09

OK seems that you have included most of the libraries already.
You 'll see how it looks in the attached pic.
Dunno why some pics are missing from main screen, will check
One other thing when you try to concede the program breaks.

That's from me. Any other news?
Attachments
drawCardLib-1.jpg
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: DrawCardLib

Postby Snacko » 26 Oct 2011, 10:48

You have to have CardRes folder in your Manalink directory. It contains the new resources used for generating card images. All the symbols / mana strips are rendered by Manalink.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 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 27 guests

Login Form