Commit Graph

2626 Commits (97f0d5b3e353670de21b6a311885d20364d5f958)

Author SHA1 Message Date
Per Inge Mathisen 1617b4c3d7 Add new keyword WZ_DECL_ALWAYS_INLINE to label functions that we always want to inline, even when compiling in debug mode.
Also manually inline map tile lookups in the danger map code for maximum performance (avoiding some checks).
2010-11-02 21:12:58 +01:00
cybersphinx 99486cb694 Add Turkish translation by Ayhan Görgülü.
Closes #2261.
2010-11-02 15:34:00 +01:00
Buginator 0702fa9eb5 Show map / game name / hosted by in the tooltip for the lobby
closes ticket:2121

This does *NOT* break GAMESTRUCT compatibility.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11546 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 1119dada6868433f6840dd1fe174a7aa3858b081)
2010-11-02 15:30:36 +01:00
Cyp 33c25602f7 Bump netcode version. 2010-10-30 22:59:27 +02:00
Cyp d41a6078d4 Bump netcode version for testing build. 2010-10-30 22:57:54 +02:00
Cyp ad4a38a1be Bump netcode version.
Also, remove unused NETCODE_HASH.
2010-10-26 10:11:04 +02:00
Cyp 25671b1083 Revert "Replace immediate-mode rendering with VA-based rendering" for now, since it makes rendering trucks very slow.
This reverts commit f363a02af7.

Please revert this revert when this is fixed.
2010-10-26 08:36:22 +02:00
Per Inge Mathisen b7c9a369d6 Add new backdrop from forum member jorzi. 2010-10-24 19:55:57 +02:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp e8ebb11d4a Remove NETnull() function, which was potentially confusing.
NETnull() was equivalent to uint32_t zero = 0; NETuint32_t(&zero);, which no longer adds/removes 4 bytes of padding as advertised.
2010-10-23 18:02:56 +02:00
Cyp fcdba754c4 Introduce ModeQueue and ModeImmediate as an alternative to playing with bMultiMessages.
Makes campaign queue some messages, and fixes cancelling production queues in campaign.
2010-10-22 18:13:04 +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
Buginator 0be5f2b6e9 Add code to look for "novideo.ogg" refs ticket:2052
but don't upload the novideo.ogg yet, since we don't have a clear winner.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11566 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 7f6ea5d1a332b7bc535a4a83768b0b90d543df1c)
2010-10-18 22:23:55 -04:00
Buginator f4c3d7ec8e Change ASCII_NEWLINE from '@' to '`'
This enables people to use "@" in chat.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11545 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 10217901eb10fc652c3c8eeb2eba2f519b1f5b0f)
2010-10-18 21:47:48 -04:00
Buginator ccd5555275 Remove a (MSVC only) debug() line that spammed way too much.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11321 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit a2a11fccd74485f76dbb098c0bb73de6cc0bd708)
2010-10-18 21:37:48 -04:00
buginator e09e8ac4fe If resource was not loaded, then don't continue on, error out.
(cherry picked from commit aa8bf289b8f4fad5d6122a43432521dbf2e2cc92)
2010-10-17 19:32:53 -04:00
buginator a11d60774e Fix MSVC builds 2010-10-17 18:46:06 -04:00
Cyp 49e9780f41 Fix spurious out-of-synch messages when pausing in single-player mode.
This was caused by forgetting to set the delta tick time to 0 when paused. Don't know whether fixing this fixes anything else.
2010-10-16 17:55:01 +02:00
Giel van Schijndel b5fb5bacf8 remove write-only variables buffer and size from iSurface
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 22:09:31 +02:00
Giel van Schijndel 0d2dbdbaef Replace rendSurface related bitshifts with divisions
These cases of bitshifting are premature optimisations ''only'',
especially since they obscure what's really going on (finding the center
of a range).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:22 +02: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
Giel van Schijndel 5ab267ab71 Remove pointer global psRendSurface
Global pointer psRendSurface only ever contains &rendSurface (another
global), provided that it isn't undefined (isn't statically NULL
initialised).  So replace the use of this pointer with using
rendSurface.

Additionally remove function iV_RenderAssign, which only wraps the
psRendSurface assignment along with a debug() call, and inline it at its
only call-site.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 681988a5d4 Remove unused constant PIE_NO_CULL
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 5a51986e65 Get rid of double pie_/iV_ names for the same functions
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel e278f01bcd remove write-only variable iSurface.flags
Remove the write only member variable `flags` from struct iSurface.

Additionally remove the macros REND_SURFACE_(UNDEFINED|SCREEN|USR) which
were only used to assign to the `flags` variable.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:29:59 +02:00
Giel van Schijndel 5923c45593 piematrix: improve mathematical description of pie_RotateTranslate3f
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-10 14:53:58 +02:00
Giel van Schijndel d6c7690f02 trig: don't #include "math_ext.h" as trig.h doens't use it
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:33:45 +02:00
Giel van Schijndel a8fdd2c068 trig: declare all trigonometric functions as pure
Mark the prototypes of all (fixed point) trigonometric functions as
pure.  This declares that these functions don't have any side-effects.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:30:53 +02:00
Giel van Schijndel 83aacc042b Get rid of unused constant TRIG_DEGREES
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 16:54:09 +02:00
Cyp 03cc107b84 Add build script fixer for when renaming files from .c → .cpp, and add branch-switching hack to lib/ivis_opengl. 2010-10-08 13:16:07 +02:00
Cyp 125e7ba9ab Convert pie_MatRot[XYZ] to use uint16_t instead of float. 2010-10-08 11:28:31 +02:00
Cyp 5fa9edc4ad Replace iv_Matrix with pie_Mat, eliminating the need for ivispatch.h. 2010-10-08 11:19:57 +02:00
Giel van Schijndel fd740148c3 piematrix: remove unused function pie_RotateTranslate3iv
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-07 16:10:34 +02:00
Giel van Schijndel 704b32b9ba piematrix: fix rotation math
In 697a97ff18, my interpretation of the
performed matrix math was wrong as a result of (wrongly) reading [xyz]^2
as [xyz]*2.  This commit fixes that error.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-06 17:03:32 +02:00
Giel van Schijndel ab9711d877 piematrix: get rid of FP12 bitshifting
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:52:54 +02:00
Giel van Schijndel 660f202a9c Fix wrong ordering of matrix cells
Wrong ordering reported by cybershpinx

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:32:42 +02:00
Giel van Schijndel 697a97ff18 piematrix: document the used math
Add descriptions of the used matrix math and the internal representation
of matrices.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 22:41:51 +02:00
Giel van Schijndel c95f0f8be3 Replace [xy]pshift with the single constant it ever contains
The variables [xy]pshift only ever contain the constant value `10`, so
instead of bothering to keep the variables around use the
STRETCHED_Z_SHIFT constant.  This constant serves the same purpose as
[xy]pshift (only for the Z coordinate) and is defined to `10` as well.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 20:14:55 +02:00
Giel van Schijndel d01a61bdc1 Remove empty function `trigShutDown`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11709 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 3390509fe7 piematrix: use floats instead of fixed point DEG degree values for rotations
Allow passing of degrees as floats to the pie_MatRot[XYZ] functions.

This commit further helps in getting rid of fixed point math.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11708 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel a6cb949c97 piematrix: prepare for removal of fixed point math
* Change some of the PIE matrix functions to accept floating point
   values in the API.
 * Rename the badly named constant `_MATRIX_ID` to `Identitymatrix`

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11707 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel dc8623a6ec DrawText: Don't be overly pedantic in restoring the previous matrix-mode
Don't retrieve the current matrix mode prior to changing it, and restore
this mode after drawing text.  Instead rely on the assumption that the
current matrix mode is GL_MODELVIEW, which currently is a valid
assumption.

Reason for this change is that OpenGL retrieving the current matrix mode
isn't possible in OpenGL implementations without fixed pipeline, which
lack a matrix mode, e.g. OpenGL ES 2.0 and OpenGL 3.0.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11699 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 0aa5d2cef8 Don't #include GLee.h where it isn't required
At places where we only need the ''regular'' OpenGL API, not any
extensions, don't #include GLee.h, #include lib/framework/opengl.h
instead.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11691 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel 27fb938877 opengl.h: get rid of the X11 macro `Status`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11690 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Per Inge Mathisen 780f186dec Fix compile warning that complained about variable being potentially clobbered by longjmp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11689 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel f363a02af7 Replace immediate-mode rendering with VA-based rendering
Almost completely (one corner case requires reading GL specs) replace
immediate-mode rendering with VA-based rendering by means of
glDrawArrays.

This, when completed, makes porting to OpenGL ES 2.0 and OpenGL 3.0
without backwards compatibility easier.

This closes #2172

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11686 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel d0e24c96cf Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11685 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel 09f6b46276 prevent redefinition of __glext_h__
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11678 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:00:58 +02:00
Giel van Schijndel 82ed96fd3b Add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11677 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 12:15:18 +02:00