Giel van Schijndel
e766b2f605
Allow Lua event handlers to remove themselves (i.e. don't segfault in that case)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6010 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:32:59 +00:00
Giel van Schijndel
41e74888ef
Make sure to use "destroy" as the method name in lua_widget_destroy for error message generation
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:48:29 +00:00
Giel van Schijndel
ee7cfc1ac5
* Add enum spacerDirection and its contents to the Lua betawidget module
...
* Add method `destroy` to the Lua class `widget` and its children in the betawidget module
* Add some code that demonstrates the usage of widget:destroy() and its current flaws (i.e. segfaults ''will'' occur when using widget after calling the destroy() method on it, garbage collection is included in "using")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:37:20 +00:00
Giel van Schijndel
c661cb9bc4
* Don't use a single cairo_pattern to store the window gradient for ''all'' windows
...
* Use a separate cairo_pattern for each window to store the window gradient in
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6007 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 23:15:44 +00:00
Giel van Schijndel
a2a22b3804
Check both the `lua5.1` and `lua` pkg-config package in betawidget's ./configure script
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6006 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 22:36:47 +00:00
Giel van Schijndel
123551b6b6
Initialise the network buffer to send GAMESTRUCTs from across to zero
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6004 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 20:39:26 +00:00
Giel van Schijndel
07e8a802f9
Remove the last remnants from platform selection in betawidget/Makefile.am
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6003 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:36:33 +00:00
Giel van Schijndel
ea446b8653
* Use recursive make (through SUBDIRS) to build the `platform` portion of betawidget
...
* Compile the utility part we use from Warzone (framework/utf.c and ivis_opengl/GLee.c) separately
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6002 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:35:26 +00:00
Freddie Witherden
92c13785fa
Commit patch #63 which cleanly shuts down the path finding thread on exit. This closes ticks #63 and #42 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6001 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 12:27:57 +00:00
Elio Gubser
2395064bc8
outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:58:18 +00:00
Elio Gubser
413cc540a9
outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5997 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:52:23 +00:00
Elio Gubser
426f09cf9b
nicer window design implemented
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5996 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:05:28 +00:00
Giel van Schijndel
5daf3d8035
Simplify the automake processed makefiles in data/
...
* Getting rid of the custom crafted installation rules
* Replace them with a single automake primary build rule: nodist_<instdir>_DATA
This closes ticket:62
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5995 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 08:19:57 +00:00
Giel van Schijndel
77f3599ada
Update POTFILES.in fixing a build error when generating translation files
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5994 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 07:47:15 +00:00
Per Inge Mathisen
64d1a576db
patch #1103 : Cleanup of buildStructure
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5993 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 19:14:03 +00:00
Per Inge Mathisen
704117f85c
Fix various doxygen errors and warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Per Inge Mathisen
be263e0b8c
Fix missing define of WZ_DECL_THREAD on windows
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5991 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:16:06 +00:00
Per Inge Mathisen
b5295af792
Doxygenize actions
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5990 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:03:30 +00:00
Giel van Schijndel
c2f0855e00
NTW is a multiplay mod, not a global mod. So move it to data/mods/multiplay.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5989 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 09:12:38 +00:00
Giel van Schijndel
50c974f74b
Install all betawidget headers into $(pkgincludedir)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 07:56:28 +00:00
Giel van Schijndel
937c19a9a6
Include the scripting manual in the distributed documentation
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5987 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 05:41:46 +00:00
Giel van Schijndel
6a6ac6cad6
Remove unused m4 macros
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 05:41:41 +00:00
Freddie Witherden
7fc3b92682
Simplify the structWallScan function; patch by Zarel. This closes ticket #55 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5985 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-10 11:30:19 +00:00
Giel van Schijndel
6088fca5af
* Make xGetTempname (from the PhysicsFS VFS for SQLite) return a bogus filename to keep SQLite happy
...
- We can safely catch the only one case where this filename is used (see comment in diff for an explanation)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5984 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 20:07:16 +00:00
Freddie Witherden
4bb879d64c
Make sure we fill out the event structure for EVT_DESTRUCT events.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 18:10:06 +00:00
Giel van Schijndel
d1e5303b45
Ahum, don't include the autogenerated files from my WIP in POTFILES.in
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5982 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 17:14:00 +00:00
Giel van Schijndel
9107d52405
Update POTFILES.in
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5981 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 17:10:55 +00:00
Giel van Schijndel
6061eb40d9
Add an example of window/widget destruction by means of employing the garbage collector (this should be improved to something like widget:destroy())
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5980 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:33:40 +00:00
Giel van Schijndel
9177d9cf2f
* Register widgetGetTime() as betawidget.getTime() in Lua
...
* In the Lua test app use betawidget.getTime() to determine the *true* amount of time passed since registering of the timer event
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5979 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:17:38 +00:00
Giel van Schijndel
0d3b868de7
* After calling the Lua event handler function make sure to pop the return value from the stack
...
* If the Lua event handler function didn't return a value, assume it was successful (and leave the stack as is)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5978 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:04:56 +00:00
Freddie Witherden
75d615d134
Update the Doxygen documentation for clipboardX11.c.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5977 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 10:18:15 +00:00
Giel van Schijndel
ce8d315645
Fix a bug where we would fire timer events `interval` milli-seconds since program start up instead of `interval` milli-seconds since registering the event
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5976 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 09:35:59 +00:00
Steven Koenig
1bed910d23
* Completed/Updated/Fixed German translation of .nsi-files
...
* Converted warzone2100.nsi to ISO-8859-15 (NSIS requires this)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5975 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 09:35:22 +00:00
Buginator
420fbeca2d
Phase 1 for the multiplayer scoreboard enhancements.
...
Color codes entries based on friend/foe colors.
(Your always white, team players = yellow, enemy = red, dead = gray.)
We also show unit count for your player, and structure count (on skirmish games) which is replaced by 'ping' on MP games.
Follow up thread about next phase is here:
http://developer.wz2100.net/ticket/12
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5974 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 04:13:09 +00:00
Giel van Schijndel
4ca3f73cbb
Print an empty string when the clipboard contains nothing (i.e. betawidget.getClipboardText() returned nil)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5973 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 21:34:31 +00:00
Giel van Schijndel
5184c015e4
* Don't store a Lua reference to the widget itself in the callback struct
...
- This struct is only destroyed when the callback is destroyed, which (by default) only happens when the widget is destroyed.
- Keeping a reference to the widget prevents Lua's garbage collector from ever destroying the widget
- Thus store a reference to the widget in a Lua "weak table"
- Also store the callback function in this table
* Thus we now only keep a reference to a Lua table referring to the widget (weakly) and the function (normally/strongly)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5972 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 21:34:17 +00:00
Giel van Schijndel
a1d7f9bfa1
* Include the NTW mod in the NSIS installer
...
NOTE: Still requires a German translation string for the description
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5971 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 19:43:59 +00:00
Freddie Witherden
5bdf883268
Add GPLv2 or above licensing cruft to the SDL betawidget test application; remove the erroneous call to SDL_Quit which was added in r5964.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5970 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 17:45:51 +00:00
Giel van Schijndel
c5c4025eb1
Fix a syntax error in the part of html2trac that deals with <u> tags
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5969 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 08:43:37 +00:00
Giel van Schijndel
574a74ab35
Extend the betawidget Lua testapp:
...
* Be more interesting when clicking the first window
* Add a timer event handler
* Add a clipboard usage example
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5968 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 00:32:22 +00:00
Giel van Schijndel
1eefcb27c9
In r5961 the prototype for resetRadarRedraw() got removed causing compilation problems: fixed
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5967 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 00:16:15 +00:00
Giel van Schijndel
966e1bfedc
Add an example of how to use a closure in Lua in order to bind user data to an event handler
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5966 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 00:06:04 +00:00
Giel van Schijndel
f81ac77f91
Rewrite the SDL betawidget testapp to set up its GUI using Lua and betawidget's Lua bindings
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5965 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:56:00 +00:00
Giel van Schijndel
75b4e523bd
Fix a memory leak which resulted from neglecting to call SDL_Quit()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5964 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:51:21 +00:00
Giel van Schijndel
b033817fc4
* Add a Lua interface to (parts of) betawidget
...
* Partially generated by SWIG
* Partially handcrafted
* Already supports registering Lua functions as event handlers of `widget` derivatives
* Slight change in betawidget headers because the struct typedef's somehow confused the compiler
* Use libtool for linking with Lua
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5963 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:47:53 +00:00
Giel van Schijndel
5802bba3ae
Add a small SDL test application for betawidget (committed for EvilGuru)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5962 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 22:50:25 +00:00
Per Inge Mathisen
e26af6f48b
Improve doxygen documentation for path and minimap subsystems.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5961 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:44:06 +00:00
Per Inge Mathisen
4def288387
Remove requirement on texture rectangle extension for minimap code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5960 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:41:50 +00:00
Freddie Witherden
c174efd0c7
Fix a typo in the doxygen documentation for widget.h.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5959 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:10:31 +00:00
Buginator
21fdab0117
Modify debug output to specify the 'real' directory that physfs is using for the file in question.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5958 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 20:00:54 +00:00