warzone2100:mainline.git
4 years agoFix off-by-one memory error master
per [Thu, 2 May 2013 18:20:47 +0000 (20:20 +0200)]
Fix off-by-one memory error

4 years agoFix skirmish victory conditions in fixed alliance no-sharing mode
haonoq [Wed, 1 May 2013 09:12:29 +0000 (09:12 +0000)]
Fix skirmish victory conditions in fixed alliance no-sharing mode

4 years agoMake sure AIs do not disregard a research topic an ally is researching
per [Tue, 30 Apr 2013 18:07:24 +0000 (20:07 +0200)]
Make sure AIs do not disregard a research topic an ally is researching
in fixed alliance no-sharing mode.

4 years agoAdd teams mode without shared research.
Cyp [Mon, 29 Apr 2013 19:20:34 +0000 (21:20 +0200)]
Add teams mode without shared research.

4 years agoRemove unused file multiplay/maps/4c-rush/templ.bjo.
Cyp [Mon, 1 Apr 2013 20:11:49 +0000 (21:11 +0100)]
Remove unused file multiplay/maps/4c-rush/templ.bjo.

4 years agoMove number of building modules (its "capacity") to parent class,
per [Tue, 16 Apr 2013 22:15:04 +0000 (00:15 +0200)]
Move number of building modules (its "capacity") to parent class,
simplifying a great deal of code.

4 years agoMove max extra travel distance from missed projectiles to stats loading code.
per [Mon, 8 Apr 2013 19:32:43 +0000 (21:32 +0200)]
Move max extra travel distance from missed projectiles to stats loading code.

4 years agoRemove broken counter-missile weapon type (probably never worked).
per [Mon, 8 Apr 2013 19:23:07 +0000 (21:23 +0200)]
Remove broken counter-missile weapon type (probably never worked).

4 years agoMisc cleanup, mostly forward ported from uncommitted qtscript patches.
per [Sun, 7 Apr 2013 14:55:22 +0000 (16:55 +0200)]
Misc cleanup, mostly forward ported from uncommitted qtscript patches.

4 years agoMerge branch 'bugfixes'
vexed [Sun, 31 Mar 2013 02:53:09 +0000 (22:53 -0400)]
Merge branch 'bugfixes'

4 years agoTry to filter out bad maps
vexed [Sun, 31 Mar 2013 02:44:37 +0000 (22:44 -0400)]
Try to filter out bad maps

fixes ticket:3982

4 years agoThis change made it rather difficult, if not impossible to fine tune where you are...
vexed [Sun, 31 Mar 2013 02:09:19 +0000 (22:09 -0400)]
This change made it rather difficult, if not impossible to fine tune where you are trying
to build/place things.

fixes ticket #3918

Revert "Change locate mouse in 3D function to not rely on static global. Finally remove tileScreenInfo."

This reverts commit 0d91966f5489e72086bcb7fcc930238ee6231a05.

Conflicts:
src/display3d.cpp

4 years agoUpdate solution files for the required MOC(ing) of widgets broken in 64c2fde0dd0e5016...
vexed [Sun, 24 Feb 2013 19:50:37 +0000 (14:50 -0500)]
Update solution files for the required MOC(ing) of widgets broken in 64c2fde0dd0e501604ea910308049612bcf37c4f

4 years agoEliminate bison/flex dependencies from the mac builds.
dak180 [Fri, 22 Mar 2013 22:04:01 +0000 (18:04 -0400)]
Eliminate bison/flex dependencies from the mac builds.

References work done in 372eff669.

Refs #3887, #3538, #3950.

4 years agoqtscript: Change eventResearched() to always have 3 parameters, where the
per [Mon, 25 Mar 2013 23:45:16 +0000 (00:45 +0100)]
qtscript: Change eventResearched() to always have 3 parameters, where the
new third parameter is player called. Second parameter may be null.

Remove unused power parameter for ECM. Remove some dead code.

4 years agoMisc cleanup
per [Sun, 24 Mar 2013 16:45:09 +0000 (17:45 +0100)]
Misc cleanup

4 years agoRemove unused SWEEP and ERRATIC-DIRECT weapon movement types. Cleanup weapon loading.
per [Sat, 23 Mar 2013 16:33:37 +0000 (17:33 +0100)]
Remove unused SWEEP and ERRATIC-DIRECT weapon movement types. Cleanup weapon loading.

4 years agoTiny cleanup for button rendering.
per [Tue, 19 Mar 2013 20:04:50 +0000 (21:04 +0100)]
Tiny cleanup for button rendering.

4 years agoUpdate the mac build for Cyp's widget branch.
dak180 [Tue, 19 Mar 2013 01:18:02 +0000 (21:18 -0400)]
Update the mac build for Cyp's widget branch.

4 years agoclang build warning fixes
per [Sun, 17 Mar 2013 16:25:56 +0000 (17:25 +0100)]
clang build warning fixes

4 years agowidget: Don't clear stats of null pointers.
Cyp [Sat, 16 Mar 2013 07:37:56 +0000 (08:37 +0100)]
widget: Don't clear stats of null pointers.

Fixes ticket:3981.

4 years agowidget: Process widget callbacks before widget display.
Cyp [Fri, 15 Mar 2013 20:12:34 +0000 (21:12 +0100)]
widget: Process widget callbacks before widget display.

Previously, widget callbacks were not always called, even when displayed.

Fixes ticket:3844, "Drag select freezes build progress bar".

4 years agowidget: Fix copy/paste error in geometry of in-game quit screen.
Cyp [Fri, 15 Mar 2013 15:19:52 +0000 (16:19 +0100)]
widget: Fix copy/paste error in geometry of in-game quit screen.

Fixes ticket:3980.

4 years agoAdd/correct various compiler annotations for optimization and static analysis.
Per Inge Mathisen [Fri, 15 Mar 2013 10:06:11 +0000 (11:06 +0100)]
Add/correct various compiler annotations for optimization and static analysis.

4 years agoRemove unused functions
Per Inge Mathisen [Fri, 15 Mar 2013 10:05:33 +0000 (11:05 +0100)]
Remove unused functions

4 years agoqtscript: Add check that callback function exists for setTimer() and queue().
Per Inge Mathisen [Fri, 15 Mar 2013 08:52:06 +0000 (09:52 +0100)]
qtscript: Add check that callback function exists for setTimer() and queue().

4 years agoFix clang warnings. Remove support for "campaign" multiplayer maps (never used).
Per Inge Mathisen [Fri, 15 Mar 2013 08:42:12 +0000 (09:42 +0100)]
Fix clang warnings. Remove support for "campaign" multiplayer maps (never used).

4 years agoFix clang warning
Per Inge Mathisen [Fri, 15 Mar 2013 08:41:50 +0000 (09:41 +0100)]
Fix clang warning

4 years agoClean up super sensor handling. The WSS is not a counter-battery sensor
Per Inge Mathisen [Fri, 15 Mar 2013 08:40:36 +0000 (09:40 +0100)]
Clean up super sensor handling. The WSS is not a counter-battery sensor
since a while ago, so remove superfluous and bad checks.

4 years agoClean up and correct comments in addon.lev
Per Inge Mathisen [Fri, 15 Mar 2013 08:39:22 +0000 (09:39 +0100)]
Clean up and correct comments in addon.lev

4 years agoMerge branches 'bugfixes' and 'widget'
Cyp [Fri, 15 Mar 2013 07:50:10 +0000 (08:50 +0100)]
Merge branches 'bugfixes' and 'widget'

Conflicts:
src/ingameop.cpp
src/intelmap.cpp

4 years agoRemove lop-sided oil barrels from 4c-pyramidal.
Cyp [Thu, 14 Mar 2013 21:51:24 +0000 (22:51 +0100)]
Remove lop-sided oil barrels from 4c-pyramidal.

4 years agowidget: Fix click coordinates.
Cyp [Thu, 14 Mar 2013 17:32:49 +0000 (18:32 +0100)]
widget: Fix click coordinates.

4 years agowidget: Simplify some more of the game option interface code.
Cyp [Thu, 14 Mar 2013 16:57:43 +0000 (17:57 +0100)]
widget: Simplify some more of the game option interface code.

4 years agowidget: Convert power level choice to a MultichoiceWidget.
Cyp [Thu, 14 Mar 2013 10:01:51 +0000 (11:01 +0100)]
widget: Convert power level choice to a MultichoiceWidget.

4 years agowidget: Simplify fancy button display and highlight code.
Cyp [Wed, 13 Mar 2013 17:45:14 +0000 (18:45 +0100)]
widget: Simplify fancy button display and highlight code.

4 years agowidget: Simplify button rendering interface.
Cyp [Wed, 13 Mar 2013 17:24:30 +0000 (18:24 +0100)]
widget: Simplify button rendering interface.

Converted some functions to member functions.

4 years agowidget: Centralise button rotation management.
Cyp [Wed, 13 Mar 2013 08:08:19 +0000 (09:08 +0100)]
widget: Centralise button rotation management.

4 years agowidget: Move lots of complicated buffer management into a few member variables.
Cyp [Wed, 13 Mar 2013 07:57:13 +0000 (08:57 +0100)]
widget: Move lots of complicated buffer management into a few member variables.

4 years agowidget: Remove CurrentStatsTemplate.
Cyp [Tue, 12 Mar 2013 09:22:42 +0000 (10:22 +0100)]
widget: Remove CurrentStatsTemplate.

4 years agowidget: Remove write-only RENDERED_BUTTON::Initialised and RENDERED_BUTTON::State...
Cyp [Tue, 12 Mar 2013 08:54:53 +0000 (09:54 +0100)]
widget: Remove write-only RENDERED_BUTTON::Initialised and RENDERED_BUTTON::State, and related dead code.

4 years agowidget: Remove unused and useless W_TABFORM.
Cyp [Tue, 12 Mar 2013 08:32:55 +0000 (09:32 +0100)]
widget: Remove unused and useless W_TABFORM.

4 years agowidget: Convert the intelmap stuff from W_TABFORMs to ListTabWidgets.
Cyp [Tue, 12 Mar 2013 08:12:55 +0000 (09:12 +0100)]
widget: Convert the intelmap stuff from W_TABFORMs to ListTabWidgets.

4 years agowidget: Convert the transport menus from W_TABFORMs to ListTabWidgets.
Cyp [Mon, 11 Mar 2013 23:27:15 +0000 (00:27 +0100)]
widget: Convert the transport menus from W_TABFORMs to ListTabWidgets.

4 years agoAdd missing research items causing crashes in campaign. Closes ticket:3977 and closes...
per [Mon, 11 Mar 2013 22:30:18 +0000 (23:30 +0100)]
Add missing research items causing crashes in campaign. Closes ticket:3977 and closes ticket:3974.

4 years agoAdd colour rendering mode to GFX class. Convert radar viewing frustum from glBegin...
per [Mon, 11 Mar 2013 22:20:04 +0000 (23:20 +0100)]
Add colour rendering mode to GFX class. Convert radar viewing frustum from glBegin to VBOs.

4 years agoConvert structure loading from csv to ini format. Based on patch by crabster / Reg312.
per [Sun, 10 Mar 2013 20:26:15 +0000 (21:26 +0100)]
Convert structure loading from csv to ini format. Based on patch by crabster / Reg312.

4 years agowidget: Convert the design menu from W_TABFORMs to ListTabWidgets.
Cyp [Sun, 10 Mar 2013 13:29:28 +0000 (14:29 +0100)]
widget: Convert the design menu from W_TABFORMs to ListTabWidgets.

4 years agowidget: Convert the limits menu from W_TABFORM to ListTabWidget.
Cyp [Sat, 9 Mar 2013 23:37:43 +0000 (00:37 +0100)]
widget: Convert the limits menu from W_TABFORM to ListTabWidget.

4 years agowidget: Convert the keymap menu from W_TABFORM to ListTabWidget.
Cyp [Sat, 9 Mar 2013 23:14:11 +0000 (00:14 +0100)]
widget: Convert the keymap menu from W_TABFORM to ListTabWidget.

Removed a sort-of bubble sort.

4 years agowidget: Convert the object menu from W_TABFORM to ListTabWidget.
Cyp [Sat, 9 Mar 2013 17:52:28 +0000 (18:52 +0100)]
widget: Convert the object menu from W_TABFORM to ListTabWidget.

4 years agowidget: Append cost to item name tip.
Cyp [Fri, 8 Mar 2013 20:37:56 +0000 (21:37 +0100)]
widget: Append cost to item name tip.

4 years agowidget: Convert the build/research menu from W_TABFORM to ListTabWidget.
Cyp [Fri, 8 Mar 2013 19:46:19 +0000 (20:46 +0100)]
widget: Convert the build/research menu from W_TABFORM to ListTabWidget.

4 years agowidget: Implement ListTabWidget, and replace a W_TABFORM with a ListTabWidget.
Cyp [Thu, 7 Mar 2013 16:05:37 +0000 (17:05 +0100)]
widget: Implement ListTabWidget, and replace a W_TABFORM with a ListTabWidget.

4 years agoMake mouseTarget() readable.
per [Tue, 5 Mar 2013 22:59:02 +0000 (23:59 +0100)]
Make mouseTarget() readable.

4 years agoMerge branch 'bugfixes'
automerge [Mon, 4 Mar 2013 07:00:27 +0000 (08:00 +0100)]
Merge branch 'bugfixes'

4 years agoMake sure that template designs contain only designable components. This closes ticke...
per [Sun, 3 Mar 2013 21:57:16 +0000 (22:57 +0100)]
Make sure that template designs contain only designable components. This closes ticket:3971.

4 years agoRemove unused cluster iteration code.
per [Sun, 3 Mar 2013 12:50:05 +0000 (13:50 +0100)]
Remove unused cluster iteration code.

4 years agoMore astyle preparation for display3d.cpp, reducing the depth of some deeply nested...
per [Fri, 1 Mar 2013 20:15:59 +0000 (21:15 +0100)]
More astyle preparation for display3d.cpp, reducing the depth of some deeply nested scopes.

4 years agowidget: Remove displayLoadSaveEdit() in favour of a plain W_EDITBOX.
Cyp [Sat, 2 Mar 2013 20:00:22 +0000 (21:00 +0100)]
widget: Remove displayLoadSaveEdit() in favour of a plain W_EDITBOX.

4 years agoFix division by zero in generating seabed for maps with only one tile of water. Fixes...
haonoq [Sat, 2 Mar 2013 18:48:32 +0000 (18:48 +0000)]
Fix division by zero in generating seabed for maps with only one tile of water. Fixes ticket:3972

4 years agowidget: Remove displayText() in favour of plain W_LABELs.
Cyp [Sat, 2 Mar 2013 08:51:32 +0000 (09:51 +0100)]
widget: Remove displayText() in favour of plain W_LABELs.

4 years agowidget: Allow displaying bounding boxes.
Cyp [Thu, 28 Feb 2013 17:59:26 +0000 (18:59 +0100)]
widget: Allow displaying bounding boxes.

To toggle bounding boxes:
 Press:
  Left Shift   --  --  --------------
  Left Ctrl  ------------  --  --  ----

4 years agowidget: Modify closed form dimensions.
Cyp [Thu, 28 Feb 2013 09:12:54 +0000 (10:12 +0100)]
widget: Modify closed form dimensions.

4 years agowidget: Make IntFormAnimate self-delete after closing.
Cyp [Thu, 28 Feb 2013 09:07:36 +0000 (10:07 +0100)]
widget: Make IntFormAnimate self-delete after closing.

This eliminates boilerplate code growing in src/hci.cpp for each animated form.

4 years agowidget: Replace intOpenPlainForm, intDisplayPlainForm and intClosePlainForm with...
Cyp [Thu, 28 Feb 2013 07:29:08 +0000 (08:29 +0100)]
widget: Replace intOpenPlainForm, intDisplayPlainForm and intClosePlainForm with IntFormAnimated class.

Animation variables are no longer part of W_FORM.

4 years agowidget: Move widgSetReturn, screenSetFocus and screenClearFocus into W_SCREEN.
Cyp [Wed, 27 Feb 2013 09:59:22 +0000 (10:59 +0100)]
widget: Move widgSetReturn, screenSetFocus and screenClearFocus into W_SCREEN.

4 years agowidget: Simplify recursive widget logic and W_FORM/W_TABFORM special cases, remove...
Cyp [Tue, 26 Feb 2013 23:06:35 +0000 (00:06 +0100)]
widget: Simplify recursive widget logic and W_FORM/W_TABFORM special cases, remove unused variables.

Restore black background on ally research bars, missing from second-last commit.

4 years agoInclude GLM in the tarball.
cybersphinx [Tue, 26 Feb 2013 13:06:20 +0000 (14:06 +0100)]
Include GLM in the tarball.

4 years agowidget: Remove W_FORM::aColours and associated WZ_DECL_UNUSED PIELIGHT *pColours...
Cyp [Tue, 26 Feb 2013 09:45:50 +0000 (10:45 +0100)]
widget: Remove W_FORM::aColours and associated WZ_DECL_UNUSED PIELIGHT *pColours spam throughout the code.

4 years agowidget: Factor out usage of widgSetColour(), and remove it.
Cyp [Mon, 25 Feb 2013 23:24:53 +0000 (00:24 +0100)]
widget: Factor out usage of widgSetColour(), and remove it.

4 years agowidget: Allow W_BUTTON to show images, without needing special display functions.
Cyp [Mon, 25 Feb 2013 18:25:05 +0000 (19:25 +0100)]
widget: Allow W_BUTTON to show images, without needing special display functions.

Also, clean up password form.

4 years agoCleanup of display code, preparing for the astyle.
Per Inge Mathisen [Sun, 24 Feb 2013 10:36:14 +0000 (11:36 +0100)]
Cleanup of display code, preparing for the astyle.

4 years agoMerge branch 'bugfixes'
automerge [Mon, 25 Feb 2013 07:00:28 +0000 (08:00 +0100)]
Merge branch 'bugfixes'

4 years agoUpdate translations.
cybersphinx [Sun, 24 Feb 2013 21:22:18 +0000 (22:22 +0100)]
Update translations.

4 years agoPolish translation update by Emdek.
cybersphinx [Sun, 24 Feb 2013 21:21:11 +0000 (22:21 +0100)]
Polish translation update by Emdek.

Closes #1347.

4 years agoHungarian translation update by mtomi78.
cybersphinx [Sun, 24 Feb 2013 21:19:59 +0000 (22:19 +0100)]
Hungarian translation update by mtomi78.

Closes #3934.

4 years agowidget: Make widgAddBlah() return the new object.
Cyp [Sun, 24 Feb 2013 09:28:04 +0000 (10:28 +0100)]
widget: Make widgAddBlah() return the new object.

Also, do #define nullptr NULL on pre-C++11 compilers.

4 years agowidget: Remove no-longer-meaningful WIDG_MAXSTR.
Cyp [Sun, 24 Feb 2013 09:06:51 +0000 (10:06 +0100)]
widget: Remove no-longer-meaningful WIDG_MAXSTR.

A QString generally isn't limited to 80 bytes.

4 years agoqtscript: Add new event 'eventObjectRecycled(object)' for demolish and recycle actions.
per [Wed, 20 Feb 2013 17:31:17 +0000 (18:31 +0100)]
qtscript: Add new event 'eventObjectRecycled(object)' for demolish and recycle actions.

4 years agowidget: Replace displayMultiBut() with WzMultiButton class.
Cyp [Wed, 20 Feb 2013 08:50:21 +0000 (09:50 +0100)]
widget: Replace displayMultiBut() with WzMultiButton class.

4 years agowidget: Remove unused WIDGET::formID.
Cyp [Tue, 19 Feb 2013 21:58:58 +0000 (22:58 +0100)]
widget: Remove unused WIDGET::formID.

4 years agowidget: Unduplicate more W_TABWIDGET code.
Cyp [Tue, 19 Feb 2013 18:33:33 +0000 (19:33 +0100)]
widget: Unduplicate more W_TABWIDGET code.

4 years agowidget: Make W_TABFORMs less special.
Cyp [Tue, 19 Feb 2013 01:42:48 +0000 (02:42 +0100)]
widget: Make W_TABFORMs less special.

4 years agoUse GLM for shadow calculations.
per [Mon, 18 Feb 2013 20:43:07 +0000 (21:43 +0100)]
Use GLM for shadow calculations.

4 years agowidget: Replace WCLICK_GREY, WCLICK_LOCKED, WCLICK_CLICKLOCK with WBUT_DISABLE, WBUT_...
Cyp [Mon, 18 Feb 2013 19:50:37 +0000 (20:50 +0100)]
widget: Replace WCLICK_GREY, WCLICK_LOCKED, WCLICK_CLICKLOCK with WBUT_DISABLE, WBUT_LOCK, WBUT_CLICKLOCK.

This makes more sense than translating between them.

4 years agoSet shadows on/off only once each time setting is changed, not each frame.
per [Mon, 18 Feb 2013 19:39:25 +0000 (20:39 +0100)]
Set shadows on/off only once each time setting is changed, not each frame.
Turn lights off when no longer drawing with lighting on.

4 years agoAdd GLM support for MacOSX, from dak180.
per [Mon, 18 Feb 2013 19:29:15 +0000 (20:29 +0100)]
Add GLM support for MacOSX, from dak180.

4 years agoFix crash bug in radar VBO code when saving/loading the game. Ooops. Closes ticket...
per [Mon, 18 Feb 2013 19:00:57 +0000 (20:00 +0100)]
Fix crash bug in radar VBO code when saving/loading the game. Ooops. Closes ticket:3954.

4 years agoUse the GLM math library to keep a copy of the OpenGL matrix state. This saves us...
per [Mon, 18 Feb 2013 19:00:25 +0000 (20:00 +0100)]
Use the GLM math library to keep a copy of the OpenGL matrix state. This saves us a ton
of GPU requests fetching matrix states all the time, since we keep track of it too.

4 years agoAdd the GLM math library (which is just a bunch of header files).
per [Mon, 18 Feb 2013 19:00:09 +0000 (20:00 +0100)]
Add the GLM math library (which is just a bunch of header files).

4 years agowidget: Replace WBUTS_GREY, WBUTS_LOCKED, WBUTS_CLICKLOCK with WBUT_DISABLE, WBUT_LOC...
Cyp [Mon, 18 Feb 2013 17:35:07 +0000 (18:35 +0100)]
widget: Replace WBUTS_GREY, WBUTS_LOCKED, WBUTS_CLICKLOCK with WBUT_DISABLE, WBUT_LOCK, WBUT_CLICKLOCK.

This makes more sense than translating between them.

4 years agoDo not set light parameters every frame (except Sun position). Fix bug
per [Mon, 18 Feb 2013 16:19:48 +0000 (17:19 +0100)]
Do not set light parameters every frame (except Sun position). Fix bug
with light parameters not being reset between games. Closes ticket:3952

4 years agoSplit radar frustum coordinate calculation from drawing operation.
per [Sun, 17 Feb 2013 22:51:56 +0000 (23:51 +0100)]
Split radar frustum coordinate calculation from drawing operation.

4 years agoClean up unused code and parameters in radar drawing code.
per [Sun, 17 Feb 2013 21:48:10 +0000 (22:48 +0100)]
Clean up unused code and parameters in radar drawing code.

4 years agowidget: Convert WIDGET::x,y,width,height to member functions.
Cyp [Mon, 18 Feb 2013 08:05:01 +0000 (09:05 +0100)]
widget: Convert WIDGET::x,y,width,height to member functions.

4 years agoOut of tree builds ? Who needs them. :P
vexed [Mon, 18 Feb 2013 01:50:09 +0000 (20:50 -0500)]
Out of tree builds ?  Who needs them. :P

refs: 372eff6693e633e8d0d1d0b8a9ceb996a5c3f49f

4 years agoForgot to push these changes for commit 372eff6693e633e8d0d1d0b8a9ceb996a5c3f49f
vexed [Mon, 18 Feb 2013 01:38:49 +0000 (20:38 -0500)]
Forgot to push these changes for commit 372eff6693e633e8d0d1d0b8a9ceb996a5c3f49f

4 years agoSimplify build process by getting rid of bison/flex dependencies.
vexed [Mon, 18 Feb 2013 01:15:15 +0000 (20:15 -0500)]
Simplify build process by getting rid of bison/flex dependencies.

Fixes both MSVC and autotools (automake 1.12+).

Revert "Abort autogen.sh when automake 1.12+ is found."

This reverts commit 978ed8f1f90544162c327f334bd590cd7b944ce1.
Should now work with automake 1.11+

fixes ticket:3887
fixes ticket:3538
closes ticket:3950

4 years agosemperfi-js: Tweak research path a bit more.
haoNoQ [Sun, 17 Feb 2013 15:58:52 +0000 (19:58 +0400)]
semperfi-js: Tweak research path a bit more.