It is currently 16 Jun 2019, 14:35
   
Text Size

Draft Development in ML 3.0

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

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

Re: Draft Development in ML 3.0

Postby Sonic » 20 May 2013, 00:16

foolosopher wrote:@Sonic: Maybe you should try one of the open source office platforms like libre office, open office etc.
I used to with the old manalink2 csv files, as Excel2003 had a big problem corrupting the rules text entries importing the csv files.
The problem is now the Manalink3 file is massive in comparison to its predecessor and Libre Office all but grinds to a halt when trying to process this much data.

As Mok originally created the Manalink3 files in xls, Gargaroz and I tend to work and exchange the files in this format as Excel handles spreadsheet files this size with no problem and it avoids corrupting the text entries.
Working On: Life, the Universe, and Everything.
User avatar
Sonic
Apprentice
 
Posts: 827
Joined: 27 Feb 2010, 00:37
Has thanked: 3 times
Been thanked: 160 times

Re: Draft Development in ML 3.0

Postby stassy » 20 May 2013, 05:35

Unfortunately, LibreOffice also don't have some features that were available in Excel2k3, like color filter or an easier search engine...
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Draft Development in ML 3.0

Postby Aswan jaguar » 22 May 2013, 04:27

Together with putting info in the Manalink3.0 wiki pages for the challenges I have inserted info for the Draft,too.
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 6302
Joined: 13 May 2010, 12:17
Has thanked: 532 times
Been thanked: 274 times

Re: Draft Development in ML 3.0

Postby foolosopher » 02 Jun 2013, 22:21

Hello guys, it seems you have your work and tools cut out for you.
AJ, thanks for filling in the wiki, I was planning like forever to do it sometime.
Ok, on the draft subject now, I checked the expansions.h from the January and May updates and they have the same expansions, hence no need of update for draft on that matter, (unless I missed something). Not that an update is not needed, but.
Anyway, things that are in my list, apart from adding new expansions to draft when added in Manalink are:
- A bug in singleton, when choosing the same expansion, cards reappear once per draft circle.
- Make a new GUI for the expansion selection in draft, using gdk
- Repair the support for custom sets
- Add the other forms of draft (rotiserrie etc.)

If only, I had some time...
"patience is a virtue" :lol:
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: Draft Development in ML 3.0

Postby foolosopher » 05 Oct 2013, 19:36

Hey guys,
I see you been busy and new faces came along, so we 're gaining momentum.
Anyway, I finally found some spare time and 've been trying to fix up a new GUI for the expansion selection in draft, but I 've stumbled upon the makefile. I 've made a few things with gtk but can't add the damn lib properly in the makefile that we 're using.
The error that I get is

cards/draft.c:13:25: gtk-2.0/gtk.h: No such file or directory
make: *** [cards/draft.o] Error 1

In order to use the gtk library I am supposed to add `pkg-config --cflags --libs gtk+-2.0` or the proper library, but I can't make it work.
Anyway I know that the libs exist because if I type this at the shell I get

C:\camelbox\bin>pkg-config --cflags --libs gtk+-2.0
-mms-bitfields -IC:/camelbox/include/gtk-2.0 -IC:/camelbox/lib/gtk-2.0/include -
IC:/camelbox/include/atk-1.0 -IC:/camelbox/include/cairo -IC:/camelbox/include/p
ango-1.0 -IC:/camelbox/include/glib-2.0 -IC:/camelbox/lib/glib-2.0/include -IC:/
camelbox/include/libpng12 -LC:/camelbox/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -la
tk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpa
ngo-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl

When I add the `pkg-config --cflags --libs gtk+-2.0` in the makefile, I get
abnormal program termination
C:\Users\5BAC~1\AppData\Local\Temp\make51282.sh: fork failed: no error [1]
make: *** [cards/draft.o] Error 1

and a message that sh.exe has stopped working.
Anyone got any ideas, would be very useful.
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: Draft Development in ML 3.0

Postby foolosopher » 06 Oct 2013, 20:13

About latest updates,
Checked the lists of expansions (expansions.h) of the last three patches, and they remain the same, hence no need of patching draft on that matter. So GUI gets the priority.
Correction:
As I was checking the latest patches, I saw that new expansions have been added, which were not appearing in expansions.h. For some reason I thought that expansions.h was also autogenerated from the updater according to manalink.csv, which it seems is not the case. Because of this draft has fallen behind seven expansions. These can be added the old way but since I have already started fixing up a new GUI for this, I 'll continue this way, we just need to overcome the makefile problem.
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: Draft Development in ML 3.0

Postby Gargaroz » 07 Oct 2013, 15:10

Sorry, It's my duty to update the "expansions.h" file.
As for the other problem, I'm not experienced enough to understand the problem, we'll have to wait until Korath returns :(

Edit : here's the updated "expansions.h" file :
Code: Select all
#ifndef EXPANSIONS_H
#define EXPANSIONS_H

typedef enum
{
   EXPANSION_PROMO   =   1,
   EXPANSION_LIMITED_EDITION_ALPHA   =   2,
   EXPANSION_LIMITED_EDITION_BETA   =   3,
   EXPANSION_UNLIMITED_EDITION   =   4,
   EXPANSION_ARABIAN_NIGHTS   =   5,
   EXPANSION_ANTIQUITIES   =   6,
   EXPANSION_REVISED_EDITION   =   7,
   EXPANSION_LEGENDS   =   8,
   EXPANSION_THE_DARK   =   9,
   EXPANSION_FALLEN_EMPIRES   =   10,
   EXPANSION_FOURTH_EDITION   =   11,
   EXPANSION_ICE_AGE   =   12,
   EXPANSION_CHRONICLES   =   13,
   EXPANSION_HOMELANDS   =   14,
   EXPANSION_ALLIANCES   =   15,
   EXPANSION_MIRAGE   =   16,
   EXPANSION_VISIONS   =   17,
   EXPANSION_FIFTH_EDITION   =   18,
   EXPANSION_ASTRAL   =   19,
   EXPANSION_PORTAL   =   20,
   EXPANSION_WEATHERLIGHT   =   21,
   EXPANSION_TEMPEST   =   22,
   EXPANSION_STRONGHOLD   =   23,
   EXPANSION_EXODUS   =   24,
   EXPANSION_PORTAL_SECOND_AGE   =   25,
   EXPANSION_URZAS_SAGA   =   26,
   EXPANSION_URZAS_LEGACY   =   27,
   EXPANSION_CLASSIC_SIXTH_EDITION   =   28,
   EXPANSION_URZAS_DESTINY   =   29,
   EXPANSION_PORTAL_THREE_KINGDOMS   =   30,
   EXPANSION_STARTER_1999   =   31,
   EXPANSION_MERCADIAN_MASQUES   =   32,
   EXPANSION_BATTLE_ROYALE_BOX_SET   =   33,
   EXPANSION_NEMESIS   =   34,
   EXPANSION_STARTER_2000   =   35,
   EXPANSION_PROPHECY   =   36,
   EXPANSION_INVASION   =   37,
   EXPANSION_BEATDOWN_BOX_SET   =   38,
   EXPANSION_PLANESHIFT   =   39,
   EXPANSION_SEVENTH_EDITION   =   40,
   EXPANSION_APOCALYPSE   =   41,
   EXPANSION_ODYSSEY   =   42,
   EXPANSION_TORMENT   =   43,
   EXPANSION_JUDGMENT   =   44,
   EXPANSION_ONSLAUGHT   =   45,
   EXPANSION_LEGIONS   =   46,
   EXPANSION_SCOURGE   =   47,
   EXPANSION_EIGHTH_EDITION   =   48,
   EXPANSION_MIRRODIN   =   49,
   EXPANSION_DARKSTEEL   =   50,
   EXPANSION_FIFTH_DAWN   =   51,
   EXPANSION_CHAMPIONS_OF_KAMIGAWA   =   52,
   EXPANSION_BETRAYERS_OF_KAMIGAWA   =   53,
   EXPANSION_SAVIORS_OF_KAMIGAWA   =   54,
   EXPANSION_NINTH_EDITION   =   55,
   EXPANSION_RAVNICA_CITY_OF_GUILDS   =   56,
   EXPANSION_GUILDPACT   =   57,
   EXPANSION_DISSENSION   =   58,
   EXPANSION_COLDSNAP   =   59,
   EXPANSION_TIME_SPIRAL   =   60,
   EXPANSION_PLANAR_CHAOS   =   61,
   EXPANSION_FUTURE_SIGHT   =   62,
   EXPANSION_TENTH_EDITION   =   63,
   EXPANSION_MASTERS_EDITION   =   64,
   EXPANSION_LORWYN   =   65,
   EXPANSION_DUEL_DECKS_ELVES_VS_GOBLINS   =   66,
   EXPANSION_MORNINGTIDE   =   67,
   EXPANSION_SHADOWMOOR   =   68,
   EXPANSION_EVENTIDE   =   69,
   EXPANSION_FROM_THE_VAULT_DRAGONS   =   70,
   EXPANSION_MASTERS_EDITION_II   =   71,
   EXPANSION_SHARDS_OF_ALARA   =   72,
   EXPANSION_DUEL_DECKS_JACE_VS_CHANDRA   =   73,
   EXPANSION_CONFLUX   =   74,
   EXPANSION_DUEL_DECKS_DIVINE_VS_DEMONIC   =   75,
   EXPANSION_ALARA_REBORN   =   76,
   EXPANSION_MAGIC_2010   =   77,
   EXPANSION_FROM_THE_VAULT_EXILED   =   78,
   EXPANSION_PLANECHASE   =   79,
   EXPANSION_MASTERS_EDITION_III   =   80,
   EXPANSION_ZENDIKAR   =   81,
   EXPANSION_DUEL_DECKS_GARRUK_VS_LILIANA   =   82,
   EXPANSION_PREMIUM_DECK_SERIES_SLIVERS   =   83,
   EXPANSION_WORLDWAKE   =   84,
   EXPANSION_DUEL_DECKS_PHYREXIA_VS_THE_COALITION   =   85,
   EXPANSION_RISE_OF_THE_ELDRAZI   =   86,
   EXPANSION_ARCHENEMY   =   87,
   EXPANSION_MAGIC_2011   =   88,
   EXPANSION_FROM_THE_VAULT_RELICS   =   89,
   EXPANSION_DUEL_DECKS_ELSPETH_VS_TEZZERET   =   90,
   EXPANSION_SCARS_OF_MIRRODIN   =   91,
   EXPANSION_PREMIUM_DECK_SERIES_FIRE_AND_LIGHTNING   =   92,
   EXPANSION_MASTERS_EDITION_IV   =   93,
   EXPANSION_MIRRODIN_BESIEGED   =   94,
   EXPANSION_DUEL_DECKS_KNIGHTS_VS_DRAGONS   =   95,
   EXPANSION_NEW_PHYREXIA   =   96,
   EXPANSION_MAGIC_THE_GATHERINGCOMMANDER   =   97,
   EXPANSION_MAGIC_2012   =   98,
   EXPANSION_FROM_THE_VAULT_LEGENDS   =   99,
   EXPANSION_DUEL_DECKS_AJANI_VS_NICOL_BOLAS   =   100,
   EXPANSION_INNISTRAD   =   101,
   EXPANSION_PREMIUM_DECK_SERIES_GRAVEBORN   =   102,
   EXPANSION_DARK_ASCENSION   =   103,
   EXPANSION_DUEL_DECKS_VENSER_VS_KOTH   =   104,
   EXPANSION_AVACYN_RESTORED   =   105,
   EXPANSION_PLANECHASE_2012   =   106,
   EXPANSION_MAGIC_2013   =   107,
   EXPANSION_FROM_THE_VAULT_REALMS   =   108,
   EXPANSION_DUEL_DECKS_IZZET_VS_GOLGARI   = 109,
   EXPANSION_RETURN_TO_RAVNICA      = 110,
   EXPANSION_COMMANDERS_ARSENAL   = 111,
   EXPANSION_GATECRASH            = 112,
   EXPANSION_DUEL_DECKS_SORIN_VS_TIBALT   = 113,
   EXPANSION_DRAGONS_MAZE         = 114,
   EXPANSION_MODERN_MASTERS      = 115,
   EXPANSION_MAGIC_2014         = 116,
   EXPANSION_FROM_THE_VAULT_TWENTY   = 117,
   EXPANSION_DUEL_DECKS_HEROES_VS_MONSTERS   = 118,   
   EXPANSION_THEROS            = 119,
} EXPANSION_t;

#endif
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: Draft Development in ML 3.0

Postby gmzombie » 07 Oct 2013, 17:34

Cant wait to see your progess foolosopher.
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: 855
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 199 times
Been thanked: 50 times

Re: Draft Development in ML 3.0

Postby Korath » 08 Oct 2013, 18:28

foolosopher wrote:In order to use the gtk library I am supposed to add `pkg-config --cflags --libs gtk+-2.0` or the proper library, but I can't make it work.
Anyway I know that the libs exist because if I type this at the shell I get

C:\camelbox\bin>pkg-config --cflags --libs gtk+-2.0
-mms-bitfields -IC:/camelbox/include/gtk-2.0 -IC:/camelbox/lib/gtk-2.0/include -
IC:/camelbox/include/atk-1.0 -IC:/camelbox/include/cairo -IC:/camelbox/include/p
ango-1.0 -IC:/camelbox/include/glib-2.0 -IC:/camelbox/lib/glib-2.0/include -IC:/
camelbox/include/libpng12 -LC:/camelbox/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -la
tk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpa
ngo-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl

When I add the `pkg-config --cflags --libs gtk+-2.0` in the makefile, I get
abnormal program termination
C:\Users\5BAC~1\AppData\Local\Temp\make51282.sh: fork failed: no error [1]
make: *** [cards/draft.o] Error 1

and a message that sh.exe has stopped working.
That should work, assuming camelbox's make and sh are sane. Apparently they're not.

Possible workaround:
Code: Select all
GTKFLAGS=$(shell pkg-config --cflags --libs gtk+-2.0)
#...
cards/draft.o: cards/drafts.c manalink.h subtypes.h
   $(COMPILE) $(GTKFLAGS) -o $@ $<
If it still dies trying to fork for the subshell, then you can put the pkg-config output directly into $(GTKFLAGS):
Code: Select all
GTKFLAGS=-mms-bitfields -IC:/camelbox/include/gtk-2.0 (etc.)

cards/draft.o: cards/drafts.c manalink.h subtypes.h
   $(COMPILE) $(GTKFLAGS) -o $@ $<
but that'll break the Makefile for anyone without that exact setup.
User avatar
Korath
DEVELOPER
 
Posts: 3384
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 937 times

Re: Draft Development in ML 3.0

Postby foolosopher » 10 Oct 2013, 23:04

Hello Korath,
thanx for the help but it seems that the problem is vista #-o . I tried various solutions over the net but to no avail. Anyway, here's my environment in case someone has came up the same "environmental" problem.
Win vista home premium x32 SP2
Using the latest camelbox that has come out so far camelbox_2009.167.2132Z-tahi, with the included mingw 3.4.5
worked compiling and building our sources so far, until I included gtk...
Has anyone used something else than camelbox to compile magic sources?

@gmzombie: Basic stuff just to do the job, nothing fancy.

I think my Vista installation nears its end...
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: Draft Development in ML 3.0

Postby Korath » 10 Oct 2013, 23:26

The problem is much more likely camelbox than vista. Mingw 3.4.5, for example, is almost a decade old.

I've been compiling Manalink just fine with almost up-to-date (4.6.2; the latest is 4.8.1) mingw under cygwin. I see no reason why it shouldn't also work with mingw under msys, which is much less of a pain to install.

What's your output when you compile directly from the command-line, not through make?

gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -I.. -I. `pkg-config --cflags --libs gtk+-2.0` -o cards/draft.o cards/draft.c
User avatar
Korath
DEVELOPER
 
Posts: 3384
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 937 times

Re: Draft Development in ML 3.0

Postby foolosopher » 11 Oct 2013, 14:33

OK, here it is

C:\camelbox\bin>gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -I.. -I. `pkg-config --cflags --libs gtk+-2.0` -o cards/draft.o cards/draft.c
gcc: `pkg-config: No such file or directory
gcc: gtk+-2.0`: No such file or directory
cc1.exe: error: unrecognized command line option "-fcflags"
cc1.exe: error: unrecognized command line option "-flibs"

also only env variable existing is in my user PATH C:\camelbox\bin
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: Draft Development in ML 3.0

Postby Korath » 11 Oct 2013, 21:28

It has to be run from camelbox's sh, not directly out of cmd.exe (which doesn't understand `` substitution). Sorry, I should've been more clear.

Alternately, you could paste all of pkg-config's output into the command line, for
gcc -O2 -march=i586 -mpreferred-stack-boundary=2 -I.. -I. -mms-bitfields -IC:/camelbox/include/gtk-2.0 -IC:/camelbox/lib/gtk-2.0/include -IC:/camelbox/include/atk-1.0 -IC:/camelbox/include/cairo -IC:/camelbox/include/pango-1.0 -IC:/camelbox/include/glib-2.0 -IC:/camelbox/lib/glib-2.0/include -IC:/camelbox/include/libpng12 -LC:/camelbox/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -o cards/draft.o cards/draft.c
but I suspect cmd.exe would choke on that long a command.
User avatar
Korath
DEVELOPER
 
Posts: 3384
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 937 times

Re: Draft Development in ML 3.0

Postby foolosopher » 14 Oct 2013, 23:09

Finally managed to compile, but with latest stable tdm-gcc and GTK+ in win 8, may also apply to vista (haven't tried yet).
Had to ditch -Werror and probably strict-prototypes is giving me a

"C:/gtk/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]"

just by only adding the #include <gtk/gtk.h> in draft.c .
Bad thing is that I did this by adding the result of pkg-config --cflags --libs gtk+-2.0 into GTKFLAGS as you proposed but I guess this breaks the makefile for others like you mentioned.
Anyway here's my makefile in case you manage to shape it up a bit.
Attachments
Makefile-v1.txt
(1.57 KiB) Downloaded 148 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: Draft Development in ML 3.0

Postby foolosopher » 30 Oct 2013, 22:57

OK guys,
takes longer than expected, but here's what is so far. I am also working on creating the rows from a text file where the expansion names will exist and be drawn, but the two are not connected so far.
I am using a separate file "draftgui.c" for the gui code and haven't managed to connect this, with the manalink makefile.
The previous compilation that I mentioned was with the gui code residing inside draft.c, but I believe a separate file should be used for tidiness of the code.

Oh, almost forgot writing something in the text box and pressing add, will add rows in the attached exe
Attachments
draftgui-v1c.rar
(10.48 KiB) Downloaded 171 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

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 1 guest

Login Form