DrawCardLib
Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!
PLEASE DO NOT REPORT BUGS HERE!
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
DrawCardLib
by Snacko » 01 Jul 2011, 15:29
I've started recoding the card drawing library and the results are pretty good. So far I've got the cardback and text rendering working.
This also seems to have fixed the random crashes in deckbuilder which were quite common.
This is done in c with cairo and pango libraries. If anyone would like to help (code) feel free to message me and we can set up some source code repository.
This also seems to have fixed the random crashes in deckbuilder which were quite common.
This is done in c with cairo and pango libraries. If anyone would like to help (code) feel free to message me and we can set up some source code repository.
Re: DrawCardLib
by gmzombie » 01 Jul 2011, 18:51
this is awesome. by the way when i got to looking at the n paladin code after we chatted i thought that the program was routing the jmps to the same line they were at before but you were right they are not. olly dosent support NASM either just MASM, HLA, IDEAL. unless you know of a plugin to support nasm
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.
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: DrawCardLib
by Snacko » 03 Jul 2011, 19:15
Haven't had much time to work on this but so far the card titles and small card frames are rendered.
Re: DrawCardLib
by gmzombie » 08 Jul 2011, 18:04
your doing a great job as always. i just can hope that if there is time to recode deckdll when this one is done. ive been working with an older mok deckdll and it gives us more room for buttons. if you would like to see it ill send it to you.
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.
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: DrawCardLib
by Snacko » 08 Jul 2011, 20:54
I just checked deckdll and it's the whole deckbuilder in the shared library. Main executable pretty much only calls one function which creates deck builder and handles everything.gmzombie wrote:your doing a great job as always. i just can hope that if there is time to recode deckdll when this one is done. ive been working with an older mok deckdll and it gives us more room for buttons. if you would like to see it ill send it to you.
Re: DrawCardLib
by gmzombie » 09 Jul 2011, 00:10
i dont have a reference pic right now but if you check out this deckdll you will see what i mean by more room.if the deckdll gets recoded at least there would be a source code for it given we actually have to add more buttons or whatnot. im curious since you checked it out is this where the sets are coded to? like the 800h for unlimited..basically for the organization of cards, or is that actually in the magic.exe?
- Attachments
-
- DeckDLl.rar
- (40.94 KiB) Downloaded 384 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.
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: DrawCardLib
by foolosopher » 24 Aug 2011, 13:30
Hi, it's been a while since you post this, so I don' t know at what status you 're in, but I 'm back and willing to do some coding. I am not familiar with pango and cairo but I 've started looking at it and waiting for your instructions. I am also interested in (re)coding the deckdll, but I was hoping that maybe we could do it an .h or some other library than dll so it would be easier to port it to linux, but haven't looked into this further yet.
I believe this will also give us some more ground to overcome the 2k limit, but we 'll see when we get there.
Oh, could you also give some info on development environment pls.
Keep up the good work
I believe this will also give us some more ground to overcome the 2k limit, but we 'll see when we get there.
Oh, could you also give some info on development environment pls.
Keep up the good work
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
by Snacko » 24 Aug 2011, 15:10
It's still very bare bone, so you can still switch the image/text rendering library if you want to.
http://www.mediafire.com/?bhp6dioa91zj2a9
All you need is to have gcc with glib + pango + cairo + win32 support. You can get all of the binary / source packages at http://www.gtk.org/download/index.php
If you want the DrawCardLib to interact with shalandar correctly then you need to rewrite CardArtLib (which is image cache and is called directly by shandalar but not manalink).
DeckDll at least at it's core has to be a windows shared library (dll), however you can make the deck editor stand alone with a protocol to interact with the dll.
http://www.mediafire.com/?bhp6dioa91zj2a9
All you need is to have gcc with glib + pango + cairo + win32 support. You can get all of the binary / source packages at http://www.gtk.org/download/index.php
If you want the DrawCardLib to interact with shalandar correctly then you need to rewrite CardArtLib (which is image cache and is called directly by shandalar but not manalink).
DeckDll at least at it's core has to be a windows shared library (dll), however you can make the deck editor stand alone with a protocol to interact with the dll.
Re: DrawCardLib
by foolosopher » 24 Sep 2011, 23:46
Hi, been busy but finally managed to take a quick look at the files. I see that you include manalink.h to the main.c but there is no main func to test anything. Do I have to install yasm also, I saw that you include it, in the makefile. While trying to compile the images_t struct could not load the images, I think it's the path or some problem with me having greek fonts also.
Anyway what's the status and what would you have me do, do you have something specific in mind, a flow/high level diagramm or something?
I attach my make results in case I am missing something major for the environment still.
Anyway what's the status and what would you have me do, do you have something specific in mind, a flow/high level diagramm or something?
I attach my make results in case I am missing something major for the environment still.
- Attachments
-
- make-results.txt
- (3.77 KiB) Downloaded 346 times
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
by foolosopher » 25 Sep 2011, 22:38
OK tried to re-setup the devenv with cygwin so...
Dev environment
win7x32, cygwin
installed mingw,yasm 0.8, pango and cairo
also used
$ pkg-config --cflags pangocairo
-mms-bitfields -IC:/opt/gtk/include/pango-1.0 -IC:/opt/gtk/include/cairo -IC:/op
t/gtk/include/glib-2.0 -IC:/opt/gtk/lib/glib-2.0/include -IC:/opt/gtk/include -I
C:/opt/gtk/include/freetype2 -IC:/opt/gtk/include/libpng14
and getting this:
$ make
gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -Wall -Wextra -Wpointer-arith
-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -W -Wstric
t-prototypes -Wnested-externs -Winline -Wno-unused-parameter -Werror -I.. -I. -I
C:\MinGW\include\glib-2.0 -IC:\MinGW\include\cairo -c -o src/cairo_renderer.o src/cairo_renderer.c
In file included from src/cairo_renderer.c:1:0:
src/cairo_renderer.h:4:30: fatal error: pango/pangocairo.h: No such file or directory
compilation terminated.
make: *** [src/cairo_renderer.o] Error 1
so it seems that it can't see pangocairo.
Any help appreciated
Dev environment
win7x32, cygwin
installed mingw,yasm 0.8, pango and cairo
also used
$ pkg-config --cflags pangocairo
-mms-bitfields -IC:/opt/gtk/include/pango-1.0 -IC:/opt/gtk/include/cairo -IC:/op
t/gtk/include/glib-2.0 -IC:/opt/gtk/lib/glib-2.0/include -IC:/opt/gtk/include -I
C:/opt/gtk/include/freetype2 -IC:/opt/gtk/include/libpng14
and getting this:
$ make
gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -Wall -Wextra -Wpointer-arith
-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wshadow -W -Wstric
t-prototypes -Wnested-externs -Winline -Wno-unused-parameter -Werror -I.. -I. -I
C:\MinGW\include\glib-2.0 -IC:\MinGW\include\cairo -c -o src/cairo_renderer.o src/cairo_renderer.c
In file included from src/cairo_renderer.c:1:0:
src/cairo_renderer.h:4:30: fatal error: pango/pangocairo.h: No such file or directory
compilation terminated.
make: *** [src/cairo_renderer.o] Error 1
so it seems that it can't see pangocairo.
Any help appreciated
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
by Snacko » 27 Sep 2011, 20:06
Edit makefile as the path are hardcoded, because it's a pain under windows to extract other program's output.
Change the includes -IC:\... to a single
`pkg-config --cflags pangocairo`
as this will fill all the needed paths for include files. You will need to do the same for linking
`pkg-config --libs pangocairo`
You don't need yasm for this.
There is no main function in main.c, because this is a shared library (dll)
Change the includes -IC:\... to a single
`pkg-config --cflags pangocairo`
as this will fill all the needed paths for include files. You will need to do the same for linking
`pkg-config --libs pangocairo`
You don't need yasm for this.
There is no main function in main.c, because this is a shared library (dll)
Re: DrawCardLib
by foolosopher » 03 Oct 2011, 23:04
OK makefile updated, pango installed but seems It can't see a file. I checked declarations of libraries and files (I am keeping your file structure from the package on mediafire)and I think they 're OK (only tried "../drawcardlib.h" in cairo_renderer.h but still no luck.
Here's make results:
thx
Here's make results:
thx
- Attachments
-
- make-results.txt
- (1.21 KiB) Downloaded 330 times
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
by Snacko » 05 Oct 2011, 15:12
Just read the errors:
src/cairo_renderer.c:124:2: note: use option -std=c99 or -std=gnu99 to compile your code
add -std=c99 and it should compile
src/cairo_renderer.c:124:2: note: use option -std=c99 or -std=gnu99 to compile your code
add -std=c99 and it should compile
Re: DrawCardLib
by foolosopher » 09 Oct 2011, 00:17
sorry to bug you again but ...
vagos@MPRIKI /cygdrive/d/MagicC-DrawCardLib-dist
$ make
gcc -shared -o DrawCardLib.dll src/cairo_renderer.o src/helper_functions.o src/m
ain.o DrawCardLib.def --entry _DllEntry -lgdi32 -lpangocairo-1.0 -lpango-1.0 -l
cairo.dll -lgobject-2.0.dll -lglib-2.0.dll -lgdk-win32-2.0.dll
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find
-lgdk-win32-2.0.dll
collect2: ld returned 1 exit status
make: *** [manalink] Error 1
-------------------
Now from what I found this may be caused due to:
1.bad installation-I have reinstalled cygwin several times already.
2. I have installed gtk+,pango-cairo, gdk, glib, but couldn't find gdk-win32-2.0.dll anywhere in my cygwin directory
3. could be due to missing main
4. Missinterpatation of library link (mostly in linux)
5. Read that it might be a good idea to use MinGW-MSYS instead
Another question, should I pm you for such questions, or post them here instead?
p.s. uploaded my makefile for a quick look
vagos@MPRIKI /cygdrive/d/MagicC-DrawCardLib-dist
$ make
gcc -shared -o DrawCardLib.dll src/cairo_renderer.o src/helper_functions.o src/m
ain.o DrawCardLib.def --entry _DllEntry -lgdi32 -lpangocairo-1.0 -lpango-1.0 -l
cairo.dll -lgobject-2.0.dll -lglib-2.0.dll -lgdk-win32-2.0.dll
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot find
-lgdk-win32-2.0.dll
collect2: ld returned 1 exit status
make: *** [manalink] Error 1
-------------------
Now from what I found this may be caused due to:
1.bad installation-I have reinstalled cygwin several times already.
2. I have installed gtk+,pango-cairo, gdk, glib, but couldn't find gdk-win32-2.0.dll anywhere in my cygwin directory
3. could be due to missing main
4. Missinterpatation of library link (mostly in linux)
5. Read that it might be a good idea to use MinGW-MSYS instead
Another question, should I pm you for such questions, or post them here instead?
p.s. uploaded my makefile for a quick look
- Attachments
-
- Makefile.txt
- (1.33 KiB) Downloaded 339 times
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
by Snacko » 09 Oct 2011, 19:33
first try
pkg-config --cflags glib-2.0
if this works change
GLIB_PATH = `pkg-config --cflags glib-2.0`
Then need
LDFLAGS = `pkg-config --libs pangocairo` `pkg-config --libs glib-2.0`
and
CAIRO_PATH = `pkg-config --cflags pangocairo`
will be enough
it should be enough
If you get it working under cygwin it will work under
pkg-config --cflags glib-2.0
if this works change
GLIB_PATH = `pkg-config --cflags glib-2.0`
Then need
LDFLAGS = `pkg-config --libs pangocairo` `pkg-config --libs glib-2.0`
and
CAIRO_PATH = `pkg-config --cflags pangocairo`
will be enough
it should be enough
If you get it working under cygwin it will work under
21 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 34 guests