Commit Graph

88 Commits (985d2b8de275d57034bbcbcff7e33339a187a78d)

Author SHA1 Message Date
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
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
Christian Ohm 68d5713d99 Make subtitles translateable, part I.
Feed them through gettext on display, add the files to the update-po.sh script
and run that to update POTFILES.in. Refs #1728.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10656 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-21 09:32:37 +02:00
Christian Ohm 315c75870e Draw the subtitles with shadows to increase readability.
Closes #1782.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10647 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-20 10:57:32 +02:00
Christian Ohm d70c4a8de2 Initialize some possibly uninitalized variables to make optimized debug builds
easier.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Buginator 7044fb1ca2 Make sure we take xOffset into account, we don't always start at 0 for the FMV text.
fixes ticket:625

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7781 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:23 +02:00
Per Inge Mathisen 8a0a0af7c0 Remove unnecessary SDL includes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7237 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:29 +02:00
Buginator f17402ef40 excise the codebase from some C99 format specifiers.
(%zu -> %lu)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7120 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02: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
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Giel van Schijndel bc5396e8ed * Turn several constants into "static const <type>" variables
* Move these constants in the smallest scope where they're used
 * Fix a "comparison between signed and unsigned" warning
 * Move a variable into a more local scope

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6169 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 17:48:46 +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 ffd8c829de * We're not using piemode.h in seqdis.h so don't #include it there
* Don't #include seqdisp.h where it isn't used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6167 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 17:48:40 +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 e4db079de7 * Move the SEQ_TEXT_.* constants into an enum: SEQ_TEXT_POSITIONING
* Use this enum as parameter type instead of mixed SDWORD and BOOLs (BOOLs are serious abuse here!!!)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6165 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 15:35:26 +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 d8e0d93a5d * Initialise aHardPath at compile time to "sequences/" (the only value it was ever set to)
* Get rid of bCDPath and bHardPath which guarded the initialisation of aHardPath
 * Remove seq_SetVideoPath which performed the initialisation of aHardPath

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6113 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 19:28:41 +00:00
Buginator ba11b3444a Slight fix for non C99 compilers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6061 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 20:53:28 +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
Giel van Schijndel 6c8a33cde5 * Use sstrcpy and ssprintf instead of strcpy and snprintf respectively
* Use ssprintf's return value to determine whether string truncation has occurred rather than manually recreating the condition with strlen

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6057 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:17:01 +00:00
Giel van Schijndel 93137150eb Put braces on a line of their own (reduces diff-size of attachment🎫64:FMV5c.patch)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6056 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 14:25:58 +00:00
Giel van Schijndel 4a63c3106f Proper constness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6055 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 14:17:06 +00:00
Giel van Schijndel 032b630b22 * Make the ppTextMsg string arrays of VIEWDATA and SEQ_DISPLAY hold there strings as const references
* Don't use strdup() to assign the strings to ppTextMsg's message array
 * Make seq_AddTextForVideo const correct

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5659 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 18:42:45 +00:00
Dennis Schridde 9fffb2817a 0 -> '\0' to check the emptyness of a char[]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5297 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 17:39:00 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +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
Dennis Schridde 2537bfc61c Cleanup #includes a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Per Inge Mathisen c2de082bee More doxygen comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3797 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:12:58 +00:00
Dennis Schridde 057ee3e55e Properly disable drive mode when going into an intelligence-report.
Also some initial effort/stub for manual targeting. (Not yet enabled.)
Driving (drive.h) should go out of src/seqdisp.c if somehow possible...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3717 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 11:05:31 +00:00
Giel van Schijndel 6de5602631 * Make sound_PlayStream and audio_PlayStream return a AUDIO_STREAM* pointer instead of a bool
This pointer can later on be used to stop, pause & resume playing of the given stream


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3577 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:28:35 +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
Gerard Krol 58b82f44ad Remove all RPL cruft from the sequence code. The new sequence code can be added to sequence.c easily. Projects will need to be updated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:57:29 +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
Dennis Schridde 9cc0a628c1 Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +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 941ccb3c88 Big cleanup. Script function "attackLocation" it turns out does nothing, but
was not removed. player.c|h was removed, however. They actually did nothing.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2847 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 22:58:25 +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 33354163a9 * rename pie_DrawText and pie_DrawFromattedText to iV_DrawText and iV_DrawFormattedText respectively for consistency's sake (iV_DrawText already existed as a #define "alias")
* replace all usages of iV_DrawText270(...) with iV_DrawTextRotated(..., 270.f) and get rid of MACRO iV_DrawText270


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2333 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 13:14:34 +00:00
Dennis Schridde 714bcc5924 displayBuffer -> fileLoadBuffer, original patch by vs2k5. displayBuffer was abused to load nearly everything.
Reuse FILE_LOAD_BUFFER_SIZE macro, which was abandoned before. (That's also why fileLoadBuffer is now defined in src/init.c, even though the place is probably inappropriate.)
Make fileLoadBuffer static instead of malloced.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1992 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-01 00:28:49 +00:00
Per Inge Mathisen 1edba5809f More globals free() auditing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1852 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 18:58:14 +00:00
Dennis Schridde 50ea035570 More cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1621 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 20:39:57 +00:00
Dennis Schridde 1b66305fd3 Revert r1619, because it broke campaign
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1620 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 17:58:10 +00:00
Dennis Schridde 22a7dd9dce Event based mainloop. WARNING: Is not yet fully finished and may have some flaws. Comments are appreciated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1619 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-12 17:52:31 +00:00
Dennis Schridde ce16856887 FREE->free, MALLOC->malloc (sed+review)
This patch will create crashes where the code expects FREE to set the pointer to NULL! (Those problems should be fixed anyway.)
The only occassion where I saw this is when quiting a game, so it is not too much of an issue.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1459 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 10:43:05 +00:00
Stefan Huehner 34fd2afd1f Make some more char* -> const char*
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1455 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-13 15:11:03 +00:00
Giel van Schijndel 6671750da0 * move some pieces of gettext.h into the conditional `#if ENABLE_NLS` and provide dummies for them if NLS is disabled (the #else part of the definition), without this compiling with NLS disabled is impossible
* remove ptrlist.c from lib/gamelib/Makefile.raw
 * some modifications of char* -> const char*
 * modify typedef of audio callback function to take a parameter of `void *psObj` rather than `AUDIO_SAMPLE *psSample` to minimize exposure (psSample->psObj was the only thing used by all callback functions anyway)
 * modify all callback functions to match the new typedef's signature
 * modify all functions calling callbacks to match the new signature (I think I've got them all, but since passing a pointer to a void* parameter doesn't generate any compiler errors/warnings I might have missed one, which would lead to undefined behaviour)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1442 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-12 10:31:11 +00:00