Commit Graph

79 Commits (27534ac95a839c265942c32886ceb6e1c5533eeb)

Author SHA1 Message Date
Buginator 1a7a19ac60 frontport r8712
"Trap when psMsg is NULL so people don't crash on release builds.


Fixes ticket #1244 "


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8740 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:47 +01:00
Guangcong Luo 5d411cdd32 Add the multiplayer alliances menu to the Intelligence menu - makes it easier for players to discover it, and helps players who don't have a Num-Enter button.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8637 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Christian Ohm 279458f584 Show translations for finished research display
This fixes the not-translated strings mentioned in
http://forums.wz2100.net/viewtopic.php?&t=3152, by translating the strings on
display. Translating them on load would be preferable; I guess they are loaded
in src/message_parser.y, but I have no idea how to put the gettext stuff in
there.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7732 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:33 +02:00
Christian Ohm c7e0bea7fc Reduce line spacing in the research display.
Makes the text actually fit into the box again.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7731 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-16 22:28:33 +02:00
Gerard Krol ab549ac68d Only enable the backdrop when pausing the game for both the design screen and the intelligence screen. This fixes bug 295.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6812 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-08 12:40:42 +00:00
Gerard Krol 47f89c7fc6 Clean up the videoLoop and backdrop enabling/disabling code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6769 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-03 21:55:33 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Gerard Krol be9e1706cd Do not show the intelligence screen after playing a mission update FMV anymore. This was previously done because the
FMV's were missing. A message "New Intelligence Report" is shown to remind people who abort the movie that they can see 
it again in the intelligence screen.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6253 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 22:47:49 +00:00
Giel van Schijndel bf1e1fef77 * Get rid of some unnecessary casting
* Don't cast one operand in an expression to double only to use a float ("single") number as the other operand in the expression
 * Use sstrcpy and sstrcat's return values to determine whether string truncation occurred

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6168 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 17:48:43 +00:00
Giel van Schijndel 9ada88b531 * Pass the sequence text type to seq_AddTextForVideo and seq_AddTextFromFile by using enum constants (from SEQ_TEXT_POSITIONING) instead of magic "numbers"
- (true and false are even worse than magic numbers when they're used to represent non-boolean values, i.e. abused for the fact that they happen to be defined to 1 and 0 respectively.
 * This change *will* affect the way how FMV subtitles are displayed; this could be considered a bugfix, or not...
  - See the changes to seqdisp.c around line 680 and keep in mind that true = 1; and SEQ_TEXT_JUSTIFY = 2;
  - Looking at the commented out code I think SEQ_TEXT_JUSTIFY is intented, though due to true being 1 we've effectively been using SEQ_TEXT_FOLLOW_ON instead since r1, see browser:trunk/game/src/seqDisp.c@1#L1121

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6166 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 17:48:35 +00:00
Giel van Schijndel 0e1438c795 Cleanup:
* Remove several unused parameters
 * Fix several "comparison between signed and unsigned" warnings
 * Move variables into a more local scope where possible
 * Merge the conditions of some nested if-statements
 * Use an enum instead of some "magically defined" macros
 * Remove unused functions tooNearEdge and demoRequestStart
 * Mark function findSomethingInteresting as static
 * Use ARRAY_SIZE(array) instead of sizeof(array) / sizeof(array[0])
 * Get rid of some unnecessary casting from float to int
 * Mark several unused parameters with WZ_DECL_UNUSED for callback functions

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6161 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 22:02:35 +00:00
Buginator fd10f48279 *Changed* default FMV mode to 2x instead of full screen. (Most people play game >640x480, so FS looked pretty bad)
Fix FMV text to display correctly no matter screen size.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6134 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-12 03:05:40 +00:00
Giel van Schijndel d871a85964 Add video playback support:
* Add support for decoding and displaying of OggTheora/Vorbis videos
 * Change all references to *.rpl files to *.ogg files (and lower case them)
 * Add a new menu (and config) option for selecting the size at which to display videos (1x (native), 2x, full screen)

This closes ticket:64 and ticket:46

Code changes are ticket:64 (patch by Gerard Krol, Giel van Schijndel and Buginator)

FMVs can be found at http://download.gna.org/warzone/videos/sequences_ogg.zip (for now at least)
Videos encoded by Angus Lees


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6119 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-08 18:24:19 +00:00
Giel van Schijndel becaf21060 Revert r6058: I stupidly used "git svn dcommit" instead of "git stash pop" (yes I know they don't even look the same...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6059 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:54:41 +00:00
Giel van Schijndel 53d6990a55 Initial FMV support
patch: http://developer.wz2100.net/attachment/ticket/64/FMV5c.patch

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6058 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:52:01 +00:00
Per Inge Mathisen 4cfdec7d58 Remove some dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5822 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 20:40:38 +00:00
Giel van Schijndel 4a17aeeec7 * Delete unused and empty function StartTacticalScroll()
* Mark the parameters for several functions as WZ_DECL_UNUSED (for those functions that require the parameter as part of their interface)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 17:17:50 +00:00
Per Inge Mathisen ed6f0122c7 If software cursors are turned on, also use them for in-game menues, to avoid cursor
position wrapping in fullscreen mode due to quirks in SDL. Patch by Buginator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4556 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 20:48:50 +00:00
Giel van Schijndel e89a224b32 Add in support for coloured mouse cursors:
* Add a new configuration option "ColouredCursor", which if enabled will enable coloured cursors ingame
 * Add a new API for setting cursors with: pie_SetMouse (previously frameSetCursor was used)

Patch #956 by Buginator; pie_.*Mouse API done by me (except for the iV_DrawImage invocation)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4434 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 15:44:50 +00:00
Giel van Schijndel 9002fb5953 * Rename frameSetCursorFromRes to frameSetCursor
* Make frameSetCursor take a CURSOR (an enum) parameter instead of SWORD


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:11:33 +00:00
Giel van Schijndel 39b6c60501 * Change and clean up the cursors API
* Get rid of resource.h which duplicated code and as such was a maintenance hell/burden


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 13:23:11 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Giel van Schijndel 150f0ed209 #include fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4266 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:08:49 +00:00
Gerard Krol 0b07130da8 Fix bug #11121, "Briefings not displayed at high resolutions".
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3855 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-22 20:34:03 +00:00
Gerard Krol 2685185c33 Make sure that long lines of text are correctly drawn and wrapped for the intelligence display.
This also works for larger fonts. This fixes bug #10913, and makes patch #965 obsolete.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3712 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-07 19:19:15 +00:00
Per Inge Mathisen 3a6bfab317 Fix more problems with tabs in the GUI, patch #949 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3543 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 20:11:10 +00:00
Per Inge Mathisen 921ab82191 Clean up GUI frame drawing and port it to PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3528 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 16:57:00 +00:00
Per Inge Mathisen 08c2a06822 GUI cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3497 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 18:54:16 +00:00
Giel van Schijndel 3d245df0f9 * Provide an implementation of sound_PlayStream
* Modify audio_PlayStream's prototype to match sound_PlayStream's implementation & prototype
 * In cdspan_PlayInGameAudio use sasprintf instead of a statically sized array and snprintf
 * Add some Doxygen comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3276 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 15:16:59 +00:00
Giel van Schijndel b0909d4c18 * Get rid of some unnecessary global variables (aAudioName, aTextName, aSubtitleName) since stack allocated variables sufficed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3203 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 23:03:09 +00:00
Per Inge Mathisen 4ddd4c28af Large PIELIGHT cleanup. Please report bad colours.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3017 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 16:09:23 +00:00
Per Inge Mathisen 36c3cb1b6c Remove unused PIEVERTLIGHT. Retire iColour type in favour of PIELIGHT. Fix circular headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2861 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-23 21:51:48 +00:00
Per Inge Mathisen 86e2e6ffe0 Do not show mission timer or radar in intel screen, since they lead to excessive flickering.
Patch by Buginator in patch #846.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2810 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-12 19:08:55 +00:00
Dennis Schridde 1d3ed30822 More UI ptr<->int fixes. !!WIP!!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2763 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 21:01:23 +00:00
Dennis Schridde cd586193d3 - Use UserData instead of pUserData to store non-pointer data in GUI system.
- Replace several occurances of (void*)0 with NULL.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2762 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 20:07:12 +00:00
Stefan Huehner 3b3199b7f9 remove the text.h include from a lot of files
which dont need its declarations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2691 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 17:49:53 +00:00
Per Inge Mathisen b5e7d1149d Fix crash upon entering cam2 mission1. This fixes bug #9545.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2643 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 18:13:50 +00:00
Giel van Schijndel d075832459 * Add font rendering and UTF-8 support through usage of QuesoGLC (an OpenGLC implementation);
* This _will_ require you to install http://quesoglc.sourceforge.net/ on your system to be able to compile (windows binaries are provided on the sourceforge download page as well; just dump them in wz's devpackage directory for now)
 * Currently the font render code is hard-coded to select two fonts: DejaVu Sans Mono regular style (aka "Book") or bold style; if you're package manager doesn't provide these fonts (Debian and derivatives have "ttf-dejavu"), you can get them from http://dejavu.sourceforge.net/

This closes #1 (https://trac.mortis.eu/warzone/ticket/1 I dumped/maintained my patch there)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2521 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-01 19:45:49 +00:00
Giel van Schijndel e559915d83 * Change an assert(FALSE) into a more descriptively styled: !"text string"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2382 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-16 09:49:44 +00:00
Giel van Schijndel fc8ab2c14e * Remove CursorSnap code; it was this code that was responsible for "snapping" the mouse cursor when switching menus
* This removes csnap.[ch] (removed from automake/autoconf, Code::Blocks, MSVC)
Patch #789 by Ken Rushia (with some minor additions & changes by me)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2344 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-05 11:42:59 +00:00
Per Inge Mathisen 33e7c70cc4 Cleanup. Remove another ton of unused code. Fix error message which is not an error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2339 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 17:39:04 +00:00
Per Inge Mathisen ace17002a8 Misc cleanups from ref count work
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2056 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-12 15:22:16 +00:00
Dennis Schridde 3f2786c030 - More cleanup
- Teach for to pieblitfunc
- sed DrawTransImage to DrawImage (they were defined this way before anyway) and remove an unnecessary parameter


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1875 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 14:25:06 +00:00
Gerard Krol 6671fa934e 1. Removed the terrible memory leaks from the resource system. 2. Fixed the memory leaks for the terrain tiles. 3. Fixed a lot of uninitialised
variables. 4. Commented out some unused sound code.
I just love Valgrind :)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1390 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-07 13:23:14 +00:00
Gerard Krol b8c4065e15 1. Fix an assert when winning or losing a skirmish game. 2. Remove some debug messages 3. Now display the mission result screen on the end of a
skirmish/multiplayer game.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1359 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-04 11:17:48 +00:00
Giel van Schijndel 26f2672bfd * remove macro PTRVALID
* replace all instances of PTRVALID(ptr,size) by (ptr != NULL)
 * remove asserts of style ASSERT( x == NULL || x != NULL ) because they would evaluate to true always anyhow and as such wouldn't ever trigger
 * remove macros iV_HeapAlloc and iV_HeapFree and replaced them with MALLOC and FREE respectively (that's what they expanded to anyway)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1348 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-03 13:20:41 +00:00
Per Inge Mathisen c232641119 Copy strings back into the C code, and make them translatable by gettext.
Thanks to Huehner for writing the script that transformed calls to strres
back into C strings.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1325 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-01 20:15:46 +00:00
Gerard Krol aec9db0a8f Updated the CPU hungry radar only once in 10 frames, instead of twice per frame. Replaced a call to iV_PaletteNearestColour(255, 255, 255) with
PIE_TEXT_WHITE.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1249 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 18:26:29 +00:00
Giel van Schijndel 35de2b63f1 * get rid of lib/ivis_common/geo.h (only had one line, which effectively made it a symlink to another include file)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1110 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 20:13:31 +00:00
Roman C f4c4c48dd2 Patch by Gerard Krol:
replaces AND/OR macros with &&/||

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1089 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-10 16:39:39 +00:00