Showing with 8,039 additions and 7,936 deletions.
  1. +12 −0 ChangeLog
  2. +2 −2 configure.ac
  3. +2 −0 data/base/palette.txt
  4. +107 −0 data/base/wrf/cam1/cam1a/labels.ini
  5. +5 −0 doc/warzone2100.6.asciidoc
  6. +0 −1 lib/framework/Makefile.am
  7. +2 −2 lib/framework/wzapp.cpp
  8. +0 −5 lib/framework/wzapp.h.qwth
  9. +14 −1 lib/gamelib/gtime.h
  10. +1 −1 lib/ivis_opengl/piemode.cpp
  11. +3 −1 lib/ivis_opengl/piepalette.h
  12. +1 −1 lib/ivis_opengl/screen.cpp
  13. +1 −0 lib/ivis_opengl/screen.h
  14. +2 −2 lib/netplay/netplay.cpp
  15. +0 −1 lib/qtgame/Makefile.am
  16. +0 −5 lib/qtgame/qtgame.h.qwth
  17. +27 −0 lib/widget/bar.cpp
  18. +2 −0 lib/widget/bar.h
  19. +8 −12 macosx/Warzone.xcodeproj/project.pbxproj
  20. +4 −8 pkg/nsis/warzone2100.nsi
  21. +234 −226 po/ca_ES.po
  22. +234 −226 po/cs.po
  23. +234 −226 po/da.po
  24. +234 −226 po/de.po
  25. +234 −226 po/en_GB.po
  26. +281 −279 po/es.po
  27. +234 −226 po/et_EE.po
  28. +234 −226 po/fi.po
  29. +234 −226 po/fr.po
  30. +234 −226 po/fy.po
  31. +234 −226 po/ga.po
  32. +234 −226 po/hr.po
  33. +234 −226 po/hu.po
  34. +319 −341 po/it.po
  35. +234 −226 po/ko.po
  36. +234 −226 po/la.po
  37. +234 −226 po/lt.po
  38. +234 −226 po/nb.po
  39. +234 −226 po/nl.po
  40. +234 −226 po/pl.po
  41. +234 −226 po/pt.po
  42. +234 −226 po/pt_BR.po
  43. +234 −226 po/ro.po
  44. +234 −226 po/ru.po
  45. +234 −226 po/sk.po
  46. +234 −226 po/sl.po
  47. +234 −226 po/tr.po
  48. +234 −226 po/uk_UA.po
  49. +234 −226 po/zh_CN.po
  50. +234 −226 po/zh_TW.po
  51. +2 −34 src/action.cpp
  52. +2 −2 src/actiondef.h
  53. +1 −1 src/advvis.cpp
  54. +14 −0 src/clparse.cpp
  55. +1 −0 src/configuration.cpp
  56. +0 −52 src/display.cpp
  57. +1 −1 src/display.h
  58. +2 −4 src/display3d.cpp
  59. +2 −94 src/droid.cpp
  60. +0 −12 src/droid.h
  61. +3 −109 src/feature.cpp
  62. +0 −4 src/feature.h
  63. +2 −16 src/featuredef.h
  64. +3 −19 src/frontend.cpp
  65. +0 −125 src/functiondef.h
  66. +22 −30 src/game.cpp
  67. +0 −17 src/hci.cpp
  68. +135 −33 src/intdisplay.cpp
  69. +0 −2 src/loop.cpp
  70. +0 −18 src/miscimd.cpp
  71. +0 −1 src/miscimd.h
  72. +2 −2 src/multigifts.cpp
  73. +0 −17 src/multiplay.cpp
  74. +3 −0 src/objmem.cpp
  75. +2 −33 src/order.cpp
  76. +1 −1 src/orderdef.h
  77. +104 −81 src/power.cpp
  78. +10 −11 src/power.h
  79. +63 −1 src/qtscript.cpp
  80. +9 −0 src/qtscript.h
  81. +167 −0 src/qtscriptfuncs.cpp
  82. +10 −0 src/qtscriptfuncs.h
  83. +5 −95 src/research.cpp
  84. +1 −2 src/scriptai.cpp
  85. +2 −16 src/scriptfuncs.cpp
  86. +94 −92 src/structure.cpp
  87. +1 −1 src/structure.h
  88. +4 −9 src/structuredef.h
  89. +20 −5 tools/map/mapconv.cpp
  90. +4 −4 tools/map/maplib.cpp
  91. +2 −2 win32/warzone2100.rc
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
master_20111107
* General:
* Change: Power is now deducted fully at the start of production (commit:43ce2e586e15d482831ed4f9a2532b41bb599867, commit:b780ec8d25211e01659a9a7be9bbe300701d1903)
* UI:
* Change: Show ETA on production and research progress bars (commit:f4dba73b0c45711420bcd8816f1b5c2a1735f9ad)
* Change: Show power needed to start production (commit:a63604fd15f97dcf56be27e762bc00be73b899d8)
* Change: Show ETA for construction (commit:3f22dbc11132158909bb8e30a0ea41ff88b34e2a)
* Fix: Prevent random mouse clicks e.g. when saving/loading a game (ticket:2887, commit:588978ae40c969d5e6b9cbe701b8f6f452cee76b)
* Translations:
* Update: Spanish (ticket:2916, commit:cdd76ef511ff8cb0d1417c05b3f4590278a2f4b8)
* Update: Italian (ticket:2932, ticket:2935, commit:8ec5831657fb323e961b7471fb22616ccb11f7df, commit:d3ee6bfca8ac009671b6803964b957d003d8be73)

master_20111026
* General:
* Change: Show planned structure blueprints to allies (commit:86c945152515478c9982677bd1e482fbc6ff2362)
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.56])
AC_INIT([Warzone 2100],[master],[http://wz2100.net/],[warzone2100])
AC_INIT([Warzone 2100],[master_20111107],[http://wz2100.net/],[warzone2100])

AM_INIT_AUTOMAKE([1.10 tar-ustar])

Expand Down Expand Up @@ -247,7 +247,7 @@ AS_IF([test "x$enable_ssl" != "xyes"],[
# Add later for stricter checking: -Wextra -Wmissing-declarations -Wstrict-prototypes
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug[=yes/relaxed/profile/debugprofile/optimised/no]],[Compile debug version [[yes]]]),
[ enable_debug=${enableval} ], [ enable_debug=yes ])
[ enable_debug=${enableval} ], [ enable_debug=no ])
AC_MSG_CHECKING([whether to compile in debug mode])
AC_MSG_RESULT([${enable_debug}])

Expand Down
2 changes: 2 additions & 0 deletions data/base/palette.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ E0,E0,E0,ff // team11 - white
10,00,40,ff // team15 - ultraviolet
40,60,00,ff // team16 - brown
32,4b,a0,ff // blueprint planned by ally
ff,80,40,ff // construction bar text
00,ff,00,ff // power queue bar text
107 changes: 107 additions & 0 deletions data/base/wrf/cam1/cam1a/labels.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
[position_0]
pos = 5184, 2112
label = artifact1

[position_1]
pos = 2496, 4032
label = artifact2

[position_2]
pos = 1856, 1600
label = artifact3

[position_3]
pos = 3776, 4544
label = artifact4

# position of canyon with road block
[position_4]
pos = 5120, 4352
label = "roadblock"

# position of single oil patch
[position_5]
pos = 4928, 5568
label = "oilPatch"

# position of player base
[position_6]
pos = 2100, 6700
label = "playerBase"

# assembly point - enemy base1
[position_7]
pos = 5056, 2496
label = "assembly1"

# assembly point - enemy base2
[position_8]
pos = 1600, 2240
label = "assembly2"

# assembly point - enemy base3
[position_9]
pos = 2112, 3648
label = "assembly3"

[position_10]
pos = 3904, 4416
label = "retreat1"

[position_11]
pos = 5440, 2368
label = "retreat2"

[position_12]
pos = 2112, 1088
label = "retreat3"

[position_13]
pos = 2112, 4544
label = "retreat4"

[position_14]
pos = 5056,2496
label = "raidPosition"

[position_15]
pos = 1728, 6720
label = "startPosition"

[area_0]
pos1 = 128, 128
pos2 = 7744, 7744
label = "enemy1Start"

[area_1]
pos1 = 3392,576
pos2 = 3904,1088
label = "raidGroup"

[area_2]
pos1 = 4416,1600
pos2 = 5824,3008
label = "raidTrigger"

[area_3]
pos1 = 1280, 6528
pos2 = 1536, 6784
label = "landingZone"

[object_0]
id = 8
type = 1
player = 7
label = "base1factory"

[object_1]
label = "base2factory2"
type = 1
player = 6
id = 1256

[object_2]
label = "base2factory1"
type = 1
player = 6
id = 20
5 changes: 5 additions & 0 deletions doc/warzone2100.6.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ work anymore.
*--(no)sound*::
Toggle the sound.

*--(no)texturecompression*::
Toggle texture compression (default on). At least on systems where Mesa's
libtxc-dxtn handles texture compression, loading is slower with it enabled.
In-game FPS are also higher though.

The fullscreen/window, resolution, sound, and shadows settings are
stored, so they only need to be specified once, or when you want to
change them.
Expand Down
1 change: 0 additions & 1 deletion lib/framework/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ CLEANFILES = \
strres_parser.tab.hpp

EXTRA_DIST = \
wzapp.h.qwth \
resource_lexer.l resource_parser.y \
strres_lexer.l strres_parser.y \
cocoa_wrapper.h cocoa_wrapper.mm
Expand Down
4 changes: 2 additions & 2 deletions lib/framework/wzapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,11 +977,11 @@ void inputLoseFocus()
/* Lost the window focus, have to take this as a global key up */
for(i = 0; i < KEY_MAXSCAN; i++)
{
aKeyState[i].state = KEY_RELEASED;
aKeyState[i].state = KEY_UP;
}
for (i = 0; i < 6; i++)
{
aMouseState[i].state = KEY_RELEASED;
aMouseState[i].state = KEY_UP;
}
}

Expand Down
5 changes: 0 additions & 5 deletions lib/framework/wzapp.h.qwth

This file was deleted.

15 changes: 14 additions & 1 deletion lib/gamelib/gtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ extern void getTimeComponents(UDWORD time, UDWORD *hours, UDWORD *minutes, UDWOR
extern float graphicsTimeFraction; ///< Private performance calculation. Do not use.
extern float realTimeFraction; ///< Private performance calculation. Do not use.

/// Returns the value times deltaGameTime, converted to seconds.
/// Returns the value times deltaGameTime, converted to seconds. The return value is rounded down.
static inline int32_t gameTimeAdjustedIncrement(int value)
{
return value * (int)deltaGameTime / GAME_TICKS_PER_SEC;
Expand All @@ -155,6 +155,19 @@ static inline float realTimeAdjustedIncrement(float value)
return value * realTimeFraction;
}

/// Returns numerator/denominator * (newTime - oldTime). Rounds up or down such that the average return value is right, if oldTime is always the previous newTime.
static inline WZ_DECL_CONST int quantiseFraction(int numerator, int denominator, int newTime, int oldTime)
{
int64_t newValue = (int64_t)newTime * numerator/denominator;
int64_t oldValue = (int64_t)oldTime * numerator/denominator;
return newValue - oldValue;
}
/// Returns the value times deltaGameTime, converted to seconds. The return value is rounded up or down, such that it is exactly right on average.
static inline int32_t gameTimeAdjustedAverage(int value)
{
return quantiseFraction(value, GAME_TICKS_PER_SEC, gameTime + deltaGameTime, gameTime);
}

void sendPlayerGameTime(void); ///< Sends a GAME_GAME_TIME message with gameTime plus latency to our game queues.
void recvPlayerGameTime(NETQUEUE queue); ///< Processes a GAME_GAME_TIME message.
bool checkPlayerGameTime(unsigned player); ///< Checks that we are not waiting for a GAME_GAME_TIME message from this player. (player can be NET_ALL_PLAYERS.)
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/piemode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool pie_Initialise(void)
pie_TexInit();

/* Find texture compression extension */
if (GLEW_ARB_texture_compression)
if (GLEW_ARB_texture_compression && wz_texture_compression != GL_RGBA)
{
debug(LOG_TEXTURE, "Texture compression: Yes");
wz_texture_compression = GL_COMPRESSED_RGBA_ARB;
Expand Down
4 changes: 3 additions & 1 deletion lib/ivis_opengl/piepalette.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
#define WZCOL_TEAM15 psPalette[83]
#define WZCOL_TEAM16 psPalette[84]
#define WZCOL_BLUEPRINT_PLANNED_BY_ALLY psPalette[85]
#define WZCOL_CONSTRUCTION_BARTEXT psPalette[86]
#define WZCOL_POWERQUEUE_BARTEXT psPalette[87]

#define WZCOL_MAX 86
#define WZCOL_MAX 88

//*************************************************************************

Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "src/levels.h"

/* global used to indicate preferred internal OpenGL format */
int wz_texture_compression;
int wz_texture_compression = 0;

static bool bBackDrop = false;
static char screendump_filename[PATH_MAX];
Expand Down
1 change: 1 addition & 0 deletions lib/ivis_opengl/screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#endif

#include "lib/framework/types.h"
#include "lib/framework/vector.h"

/* ------------------------------------------------------------------------------------------- */

Expand Down
4 changes: 2 additions & 2 deletions lib/netplay/netplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ unsigned NET_PlayerConnectionStatus[CONNECTIONSTATUS_NORMAL][MAX_PLAYERS];
** ie ("trunk", "2.1.3", "3.0", ...)
************************************************************************************
**/
char VersionString[VersionStringSize] = "master, netcode 5.0";
char VersionString[VersionStringSize] = "master_20111107";
static int NETCODE_VERSION_MAJOR = 5;
static int NETCODE_VERSION_MINOR = 0;
static int NETCODE_VERSION_MINOR = 20111107;

// The Lobby Client - declared external in netplay.h
Lobby::Client lobbyclient;
Expand Down
1 change: 0 additions & 1 deletion lib/qtgame/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
CLEANFILES = $(MOCEDFILES)

EXTRA_DIST = \
qtgame.h.qwth \
swapinterval.mm \
macosx_screen_resolutions.h macosx_screen_resolutions.cpp

Expand Down
5 changes: 0 additions & 5 deletions lib/qtgame/qtgame.h.qwth

This file was deleted.

27 changes: 27 additions & 0 deletions lib/widget/bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ W_BARGRAPH::W_BARGRAPH(W_BARINIT const *init)
, precision(init->precision)
, majorCol(init->sCol)
, minorCol(init->sMinorCol)
, textCol(WZCOL_BLACK)
, pTip(init->pTip)
{
/* Set the display function */
Expand Down Expand Up @@ -210,6 +211,26 @@ void barGraphHiLiteLost(W_BARGRAPH *psWidget)
}


static void barGraphDisplayText(W_BARGRAPH *barGraph, int x0, int x1, int y1, PIELIGHT *pColours)
{
if (!barGraph->text.isEmpty())
{
QByteArray utf = barGraph->text.toUtf8();
iV_SetFont(font_small);
int textWidth = iV_GetTextWidth(utf.constData());
Vector2i pos((x0 + x1 - textWidth)/2, y1);
iV_SetTextColour(WZCOL_BLACK); // Add a shadow, to make it visible against any background.
for (int dx = -1; dx <= 1; ++dx)
for (int dy = -1; dy <= 1; ++dy)
{
iV_DrawText(utf.constData(), pos.x + dx*1.25f, pos.y + dy*1.25f);
}
iV_SetTextColour(barGraph->textCol);
iV_DrawText(utf.constData(), pos.x, pos.y - 0.25f);
iV_DrawText(utf.constData(), pos.x, pos.y + 0.25f); // Draw twice, to make it more visible.
}
}

/* The simple bar graph display function */
void barGraphDisplay(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours)
{
Expand Down Expand Up @@ -253,6 +274,8 @@ void barGraphDisplay(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT
iV_Line(x0,y0, x1,y0, pColours[WCOL_LIGHT]);
iV_Line(x1,y0, x1,y1, pColours[WCOL_DARK]);
iV_Line(x0,y1, x1,y1, pColours[WCOL_DARK]);

barGraphDisplayText(psBGraph, x0, x1, y1, pColours);
}


Expand Down Expand Up @@ -335,6 +358,8 @@ void barGraphDisplayDouble(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIE
iV_Line(x0,y0, x1,y0, pColours[WCOL_LIGHT]);
iV_Line(x1,y0, x1,y1, pColours[WCOL_DARK]);
iV_Line(x0,y1, x1,y1, pColours[WCOL_DARK]);

barGraphDisplayText(psBGraph, x0, x1, y1, pColours);
}


Expand Down Expand Up @@ -436,4 +461,6 @@ void barGraphDisplayTrough(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIE
iV_Line(tx1,ty0, tx1,ty1, pColours[WCOL_LIGHT]);
iV_Line(tx0,ty1, tx1,ty1, pColours[WCOL_LIGHT]);
}

barGraphDisplayText(psBGraph, x0, tx1, ty1, pColours);
}
2 changes: 2 additions & 0 deletions lib/widget/bar.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ struct W_BARGRAPH : public WIDGET
int precision; // Number of places after the decimal point to display, 0 by default.
PIELIGHT majorCol; // Colour for the major bar
PIELIGHT minorCol; // Colour for the minor bar
PIELIGHT textCol; // Colour for the text on the bar.
const char *pTip; // The tool tip for the graph
QString text; // Text on the bar.
};

/* Create a barGraph widget data structure */
Expand Down
Loading