Mouse support in SVN

If you have a question about the git repository and the code, or if you have code to propose then please post in this forum.
Do not post request here.
Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Mouse support in SVN

Post by Djardin »

Currently, I have implemented in the SVN the beginning of a real mouse support in wagic.
By "real" mouse support, I mean that the position of the mouse is actually used by the wagic core to perform some actions. Previously was implemented a "basic" mouse support in which I simulated key pressed events with the mouse.

This support is currently activated only from the Qt project of Wagic (projects/mtg/wagic.pro). This Qt project is compilable and usable on Windows and Linux with Visual C++ or QtCreator and of course depends of Qt.

How to try it on Windows ?
- get a fresh SVN
- get Qt libs compiled for Visual C++ here http://get.qt.nokia.com/qt/source/qt-wi ... vs2008.exe
- open the "QT 4.7 command prompt" from the Qt start menu
- go into projects/mtg and type "qmake -tp vc -r", this will transform wagic.pro into wagic.vcproj
- launch "Visual studio with Qt 4.7" from the Qt start menu
- open wagic.vcproj with visual c++ and compile it
- done

How to try it on Linux ?
- get a fresh SVN
- install Qt dev package for your distrib, or download Nokia Linux Qt SDK
- open directly projects/mtg/wagic.pro with QtCreator and compile it or type "qmake" into projects/mtg, it will replace the Makefile file and type "make"
- done

What's new ?
- selection of menu, cards in duels, shop and deck editor by mouse hovering
- double left click = JGE_BTN_OK, used to activate or use anything
- right click = JGE_BTN_PREV, used to go the next game phase
- middle click = JGE_BTN_SEC, used to interrupt something in the stack

What's not working ?
- deck editor mouse support is not really finished
abrasax
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: Mouse support in SVN

Post by abrasax »

Hi,

So I've only VC express so I had to take the SDK for window.... now opening wagic.pro in QT creator and trying to compile as is... I got the following error message:
:: error: La version de Qt est invalide : Impossible de déterminer le chemin vers les programmes de Qt, peut-être que le chemin vers qmake est faux ?
:: error: La commande qmake "<non trouvé>" n'a pas été trouvée ou n'est pas exécutable.
help where is qmake ?

L.
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Re: Mouse support in SVN

Post by Djardin »

It should be where you installed the Qt SDK, in a bin subdirectory I guess...
abrasax
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: Mouse support in SVN

Post by abrasax »

You know what ?

I'm just plain silly... was tired when I tried... I installed QtCreator but not the SDK ... ahahaha --> I'm stupid !

Will give it a go tonight when at home...

Grü

Abra.
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
abrasax
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: Mouse support in SVN

Post by abrasax »

Hi,

Ok I tryed yesterday with latest SVN and got an error that sprintf has not been declared in cstdio, any advice ?

Grü

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
amoult
Posts: 1
Joined: Fri Oct 15, 2010 6:53 am

Re: Mouse support in SVN

Post by amoult »

I Can confirm that qt project does not compile in Windows environment. I downloaded latest revision from SVN (2425).
I have latest version of QT sdk (2010.05) and tried to compile the game with qt Creator ide from wagic.pro

Here is the result:
In file included from c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/fstream:43,

from ..\mtg\src\/../include/../include/../include/utils.h:28,

from ..\mtg\src\/../include/../include/ManaCost.h:4,

from ..\mtg\src\/../include/../include/CardPrimitive.h:9,

from ..\mtg\src\/../include/../include/MTGCardInstance.h:5,

from ..\mtg\src\/../include/../include/MTGGameZones.h:8,

from ..\mtg\src\/../include/../include/Player.h:5,

from ..\mtg\src\/../include/../include/GameObserver.h:4,

from ..\mtg\src\/../include/MTGAbility.h:17,

from ..\mtg\src\/../include/ActionLayer.h:13,

from ..\mtg\src\ActionLayer.cpp:3:

c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cstdio:165: error: '::snprintf' has not been declared

c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cstdio:176: error: '__gnu_cxx::snprintf' has not been declared

mingw32-make[1]: Leaving directory `C:/temppa/wagic/projects/wagic-build-desktop'

mingw32-make: Leaving directory `C:/temppa/wagic/projects/wagic-build-desktop'

mingw32-make[1]: *** [objs/ActionLayer.o] Error 1

mingw32-make: *** [debug] Error 2

The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project wagic (target: Desktop)
When executing build step 'Make'

I think the issue is the mingw version rather than the source code. Djardin could you check what are QT and Mingw versions on your Windows system?
Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Re: Mouse support in SVN

Post by Djardin »

Yeah, it's confirmed, there is an issue with the Qt SDK using mingwin. I'll try to look at it in details this weekend. During this time, you could try with either, the Qt SDK using Visual C++ if you have it on your windows PC (I have and all the dev I did on windows were actually with it). Or you can try on Linux, here it's working fine and it's my main dev platform.
Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Re: Mouse support in SVN

Post by Djardin »

I've managed to fix the mingwin compilation problems but at the end there are linking problems because the external lib we depend on (libjpeg, freetype, ...) are not in the mingwin format ... So, we would need to recompile them =(

So, I changed my mind and managed to compile the Qt project using Visual C++ without the Qt VS plugin. To do that you need to:
- get a fresh SVN
- get Qt libs compiled for Visual C++ here http://get.qt.nokia.com/qt/source/qt-wi ... vs2008.exe
- open the "QT 4.7 command prompt" from the Qt start menu
- go into projects/mtg and type "qmake -tp vc -r", this will transform wagic.pro into wagic.vcproj
- launch "Visual studio with Qt 4.7" from the Qt start menu
- open wagic.vcproj with visual c++ and compile it
- done
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: Mouse support in SVN

Post by Dr.Solomat »

- open wagic.vcproj with visual c++ and compile it
I have problems finding "wagic.vcproj" with Visual C++. What am I doing wrong?
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Djardin
Posts: 129
Joined: Sat Sep 04, 2010 11:40 am

Re: Mouse support in SVN

Post by Djardin »

Here is the Qt project of r2655 freshly compiled on Windows 32 bits, I added the 3 Qt dlls it depends on. I guess it should help to test the mouse support.
I also updated the first post of this thread.
Attachments

[The extension zip has been deactivated and can no longer be displayed.]

Locked