Commit Graph

198 Commits (45ecc06514a8e9f1bc99a0966d78f3ae6335b496)

Author SHA1 Message Date
cybersphinx 4c68d121d6 Don't uselessly include static libraries in other static libraries.
Saves ~40 MB of diskspace when building.
2011-04-25 21:33:53 +02:00
Buginator 1f5d94a564 Fix VS2k10 for Qt.
NOTE: All Qt headers *MUST* be before of the other headers, or else we get tons of conflicts
***
DO NOT CHANGE HEADER ORDER, unless you know what you are doing, it will fubar
other build systems!
****
close ticket:2570
2011-03-24 20:06:59 -04:00
Cyp 23f318fe39 Merge branch 'master' into qt
Conflicts:
	lib/exceptionhandler/exceptionhandler.vcproj
	lib/framework/frame.h
	lib/framework/framework.vcproj
	lib/framework/input.h
	lib/gamelib/gamelib.vcproj
	lib/iniparser/iniparser.vcproj
	lib/ivis_opengl/ivis_opengl.vcproj
	lib/netplay/netplay.vcproj
	lib/script/script.vcproj
	lib/sequence/sequence.vcproj
	lib/sound/sound.vcproj
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj (resolved in favour of qt)
	src/Makefile.am
	win32/Warzone2100.vcproj
2011-03-22 00:01:28 +01:00
Buginator 5cfd2e9dbe Initial VS2k10 changes.
VS2k5 (no longer supported with platform SDK)& VS2k8 are NOT supported anymore.
Redo other aspects as well in preparation of moving libs out of the main codebase.
NOTE: You *must* have msysgit installed, and it should be in your system path,
or you can modify the local property sheet to point to it.
This is needed to generate the autorevision.h file, (that fix is next)
2011-03-17 21:35:00 -04:00
Cyp e689ad51d5 Merge remote branch 'origin/master' into qt
Conflicts:
	configure.ac
	lib/exceptionhandler/exceptionhandler.h
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/input.cpp
	lib/framework/input.h
	lib/ivis_opengl/pieclip.h
	lib/ivis_opengl/screen.cpp
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/console.cpp
	src/console.h
	src/frontend.cpp
	win32/libs/Makefile
and src/Makefile.am (resolved by Safety0ff)
2011-03-13 22:31:19 +01:00
abomination a72c41aeec fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|
[Edit by Cyp: Removed a "typedef int bool;" when building on non-windows.]
2011-03-13 12:32:24 +01:00
Cyp 4a1b5fb543 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:50:54 +01:00
Cyp ae2ce18314 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:45:27 +01:00
Cyp 28f9830a63 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/input.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/piestate.cpp
	lib/ivis_common/pietypes.h
	lib/ivis_opengl/imd.h
	lib/ivis_opengl/piestate.cpp
	lib/ivis_opengl/piestate.h
	lib/ivis_opengl/pietypes.h
	lib/sound/audio.h
	lib/sound/sound.vcproj
	lib/sound/track.h
	lib/widget/editbox.cpp
	lib/widget/scrap.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	src/Makefile.am
2011-01-14 19:26:55 +01:00
cybersphinx 96376b088e Fix compilation with g++ 4.6.
Most of this just removes unused variables. Closes #2437.
2011-01-08 18:23:01 +01:00
Cyp 4a34b821ad Fix parts of UI that break if increasing MAX_FACTORY. 2011-01-04 22:32:52 +01:00
cybersphinx d2499aa9cc Die, ivis_common, die\! 2011-01-01 14:51:53 +01:00
Per Inge Mathisen 67e9635f9f Merge the ivis_common and ivis_opengl directories, only five years and two months after I originally split them apart. 2010-12-31 22:37:14 +01:00
Cyp 76430c583f Use default constructors instead of memset for W_INIT (widget init) derivatives.
Accidentally fixed 5 memsets of W_FORMINIT, which were incorrectly using sizeof(W_BUTINIT). (The sizeof() was smaller than the object, so it didn't overflow, at least.)

And removed an ugly memset of a DROID.
2010-12-22 17:26:39 +01:00
Cyp 23d5dcd5dd Remove extern "C" {} from most places, due to longer being needed. 2010-12-21 17:20:48 +01:00
Per Inge Mathisen 94a4e92b7e qt branch: Inline the now superfluous wzGetClipboard() cpp-wrapper. 2010-12-21 16:57:38 +01:00
Cyp 8b4318dd23 Fix usage of QString::remove which something completely different when given one parameter. 2010-12-21 04:04:15 +01:00
Cyp 91ee0f7655 Merge branch 'master' into qt
Conflicts:
	lib/framework/frame.h
	lib/framework/types.h
	lib/widget/editbox.cpp
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-Debug.xcconfig
2010-12-21 03:59:22 +01:00
Cyp 4963dfd1bb Simplify lib/widget/editbox.cpp, using QString.
This shortens editbox.cpp by 23.5%, and allows setting the cursor position by clicking in the edit box.
2010-12-21 01:10:57 +01:00
Cyp bd6b96315b Merge branch 'cpp' into qtcpp
Conflicts:
	lib/framework/Makefile.am
	lib/framework/frame.cpp
	lib/framework/framework.vcproj
	lib/framework/input.cpp
	lib/ivis_opengl/piestate.cpp
	lib/ivis_opengl/screen.cpp
	lib/ivis_opengl/textdraw.cpp
	lib/widget/Makefile.am
	lib/widget/editbox.cpp
	lib/widget/scrap.cpp
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj
	src/Makefile.am
	src/main.cpp
	src/makefile.win32
2010-12-19 16:51:27 +01:00
Cyp 0d2e373456 Merge branch 'master' into cpp
Conflicts:
	lib/widget/bar.cpp
	lib/widget/editbox.cpp
2010-12-19 16:24:38 +01:00
Cyp bd2f6fb7ce Use constructors/destructors for WIDGETs, unduplicating a tonne of probable copy/paste abuse in the process. 2010-12-19 16:16:17 +01:00
Cyp 7a49623b7f Use new/delete for allocating/deallocating WIDGETs. 2010-12-19 00:35:15 +01:00
Cyp 9f43c1f681 Make WIDGET and W_INIT inheritance explicit. 2010-12-18 23:13:27 +01:00
Cyp 0fe13d055a Print distances and speeds in terms of tiles, not in 1/128ths of tiles.
Changelog: Print distances and speeds in terms of tiles.
2010-12-18 20:01:09 +01:00
Cyp c465f161bf Fix keyboard input being swallowed due to missing events such as SDL_KEYUP.
This is due to a seemingly undocumented bug and/or feature in SDL, where SDL_EventState and SDL_SetEventFilter mysteriously discard all pending events.

The following SDL code in SDL_EventState and SDL_SetEventFilter discards all pending events, with a comment saying it does so:
    while ( SDL_PollEvent(&bitbucket) > 0 )
        ;
There appears to be no documentation of this fact anywhere outside the comment in the SDL code.

I am not aware of any logical reason why enabling events with SDL_EventState should cause less events to be received than otherwise.
2010-12-18 03:07:52 +01:00
Cyp 80cc971b61 Merge remote branch 'origin/master' into qt
Fixed gameTime → realTime in lib/framework/wzapp.cpp, since the menus were messed up due to interpreting everything as a double-click.

Conflicts:
	lib/framework/debug.c
	lib/framework/input.c (became wzapp.cpp)
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/ivis_opengl/textdraw.c
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/display.c
	src/main.cpp
	src/terrain.c
2010-12-17 00:36:10 +01:00
Cyp 0646b37603 Rename *.c to *.cpp. 2010-12-16 23:28:56 +01:00
Cyp a2cd7b0592 Make everything compile successfully with g++, without -fpermissive. 2010-12-16 23:24:40 +01:00
Cyp 2bcb709cf4 Move broken dependency hack out of most Makefile.am's, except the for the root. 2010-12-16 23:14:38 +01:00
Cyp 0fe191778b Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.

Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.

If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.

Changelog: Try to improve UI responsiveness under low framerates.
2010-12-16 22:20:09 +01:00
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01:00
Cyp 60d7cb6127 Merge remote branch 'origin/master' into qt
Conflicts:
	.hgignore (manual merge)
	lib/framework/wzapp_c.h (used qt)
	macosx/Warzone.xcodeproj/project.pbxproj (used qt)
	po/*.po (used master)
2010-11-21 21:46:08 +01:00
buginator 5a35eb9f89 CHANGELOG: Correctly handle unicode strings for edit boxes.
fixes ticket:2209
(cherry picked from commit 3012fde61ef92151e0ec5125551a7b3481f05fb8)

Conflicts:

	lib/widget/editbox.c
2010-11-06 15:59:57 -04:00
Cyp 6e1771e319 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/ivis_common/piemode.h
	lib/ivis_common/rendmode.h
	lib/ivis_common/textdraw.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Project-All.xcconfig
2010-10-30 20:04:42 +02:00
buginator d0217d5d4e Commit patch from ticket:2110 "Mousewheel menu patch"
Author: noccy
Thanks for the patch!

Format and additional changes by me.

Close ticket:2110
(cherry picked from commit e979b6ad620f27e746f119fefd1f613bbb61b8a4)

Conflicts:

	src/keybind.c
	src/keybind.h
2010-10-21 00:55:55 -04:00
Buginator 58c0ceec95 Fix edit boxes so they correctly calculate the string's pixel borders.
Motivation of this patch was because of some whiny guy on IRC. ;)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11668 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 81f07188a3693007621496ac9fa0c0e2e8b24b87)
2010-10-18 22:23:59 -04:00
Giel van Schijndel 6e509622c2 move global rendSurface to piemode.c
rendSurface isn't used by rendmode.c, so define it in piemode.c where it
is both used and its contents are defined.

Additionally remove unnecessary #includes from rendmode.h and include
the correct headers at places where rendmode.h was included.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:04 +02:00
Cyp 0794c5a674 Merge remote branch 'origin/master' into qt-trunk
Conflicts:
	.hgignore
	configure.ac
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/endian_hack.h
	lib/framework/frame.c
	lib/framework/input.c
	lib/framework/input.h
	lib/framework/opengl.h
	lib/framework/wzapp_c.h
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/ivispatch.h
	lib/ivis_common/png_util.h
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/netplay/netlog.c
	lib/netplay/netlog.h
	lib/netplay/netplay.c
	lib/netplay/netplay.vcproj
	lib/netplay/netsocket.cpp
	lib/netplay/nettypes.c
	lib/sequence/sequence.c
	lib/sound/oggvorbis.c
	lib/widget/scrap.c
	macosx/Resources/wzlocal/lt.lproj/InfoPlist.strings
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Bison-Debug.xcconfig
	macosx/configs/Bison-Release.xcconfig
	macosx/configs/FetchPrebuilt.sh
	macosx/configs/FetchSource.sh
	macosx/configs/Project-All.xcconfig
	macosx/configs/SDLmain-All.xcconfig
	macosx/configs/SDLmain-Debug.xcconfig
	macosx/configs/SDLmain-Release.xcconfig
	macosx/configs/Warzone-All.xcconfig
	macosx/configs/Warzone-Debug.xcconfig
	po/cs.po
	po/da.po
	po/de.po
	po/en_GB.po
	po/es.po
	po/et_EE.po
	po/fi.po
	po/fr.po
	po/fy.po
	po/ga.po
	po/hr.po
	po/it.po
	po/ko.po
	po/la.po
	po/lt.po
	po/nb.po
	po/nl.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/sk.po
	po/sl.po
	po/uk_UA.po
	po/zh_CN.po
	po/zh_TW.po
	src/astar.c
	src/data.c
	src/fpath.c
	src/frontend.c
	src/hci.c
	src/main.cpp
	src/move.c
	src/move.h
	src/multibot.c
	src/multiint.c
	src/multijoin.c
	src/multiplay.c
	src/multisync.c
	src/terrain.c
2010-10-09 14:44:15 +02:00
Cyp b59b089ca5 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/nettypes.c
	src/multibot.c
2010-07-30 22:51:33 +02:00
Buginator 803b52125e fix / add headers. merge sync: r11298
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11300 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:59:26 +02:00
Guangcong Luo da445cd536 Make some text alignment fixes that got left out of r11230.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11301 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Cyp 23cbd537f7 Merge remote branch 'origin/master' into newnet
Conflicts:
	configure.ac
2010-07-16 18:01:22 +02:00
Guangcong Luo f367bc1d4f Make text line up better - most text now fits in the text box containing it.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11204 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-14 19:58:33 +02:00
Buginator 0064e7151b Get rid of scrap.c/h, no longer needed.
Noticed by dak180


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10834 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Buginator 0cf96267e6 MSVC fixes.
*NOTE* You *must* get the Qt: Framework, or Qt SDK, and set it up correctly!


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10824 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator e65f2688e7 Stage two merge.
Add new files for Qt.
Remove old files
Update build system (linux).
Remove SDL.
Remove QuesoGLC.
Remove Fontconfig & other all dependencies it had.  

CC & mingw (windows) & MSVC build systems are *NOT* updated / working yet.

**NOTE** MSVC people check types.h, "bool" != "BOOL" ! "bool" is a byte, "BOOL" is a int.

r8503 - r10787 (from  Qt branch)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10813 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Cyp d7db005f71 Merge remote branch 'origin/master' into newnet
Conflicts:
	.gitignore
	configure.ac
	data/base/images/intfac.img
	data/base/images/intfac5.png
	lib/netplay/makefile.win32
	lib/netplay/netlog.c
	lib/netplay/netplay.c
	lib/netplay/netplay.h
	lib/netplay/netplay.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	po/POTFILES.in
	src/hci.c
	src/intfac.h
	src/keybind.c
	src/multibot.c
	src/multiint.c
	src/multijoin.c
	src/multiplay.c
	src/multistruct.c
	src/multisync.c
	src/scriptai.c
2010-06-15 08:35:52 +02:00
Per Inge Mathisen 338bc9e322 Move all hard-coded colours (except map preview ones) into the palette file. Pass a PIELIGHT to widgSetColour() instead of RGB.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10466 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00