Commit Graph

2227 Commits (a57b33f800b50b0d992095c6bea3c32ca492dbcf)

Author SHA1 Message Date
Per Inge Mathisen 35bd80b426 Add missing braces after conditionals. Please follow proper coding style :-)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2632 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-26 23:29:45 +00:00
Per Inge Mathisen 8885cb207c Try to work around QuesoGLC bug that makes Warzone hang on chat output. Fixes bug #10202.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2631 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-26 23:25:32 +00:00
Per Inge Mathisen 27fe14629b Fix use of uninitialized variables.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2629 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-26 22:33:55 +00:00
Per Inge Mathisen 3ebaa02dea Fix bad printf parameter. Do not cast to short when telling printf you are using int!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2628 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-26 22:33:18 +00:00
Giel van Schijndel 673812b2a4 * Add file strlfuncs.h; this file contains an inline implementation of strlcpy and strlcat (safer variants of strncpy and strncat respectively)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2627 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-26 17:05:29 +00:00
Dennis Schridde 20bc25c107 Windows MiniDumper: resultMessage is always null-terminated and MessageBox is always shown. => Move out of ifs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2626 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 23:32:20 +00:00
Dennis Schridde a923b6a000 Dump used compiler and version, too.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2625 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 23:23:21 +00:00
Giel van Schijndel ac60bfc81f * Modify function QuerySvn such that we take advantage of std::string's interface rather than using low-level (i.e. character-level) string manipulations (e.g. remove a whole chunk at the end of a string rather than a separate character every time)
* Allow the #definition of SVN_AUTOREVISION_STATIC before #include AutoRevision's output file
   * When #defined to "static" it will mark all variables created in AutoRevision as static
 * Additionally detect the "base-uri" of a working copy (e.g. "trunk", "branches/2.0", etc.) and dump it in the output header file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 20:42:03 +00:00
Dennis Schridde e8f6c5a90f - Use AC_SUBST to define pkg-config style xxx_LIBS variables
- Don't define LIBS anymore, use LDADD instead to add the required xxx_LIBS (useful for tools which don't depend on all the libs WZ needs)
- Cleanup (safer variable expansion, mostly)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2623 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 18:13:30 +00:00
Giel van Schijndel 5707e8ed99 * Enable NLS (Native Language Support) when compiling with Code::Blocks
* Link against libintl
   * #define ENABLE_NLS

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2622 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 17:41:44 +00:00
Giel van Schijndel b26a610760 * Add AutoRevision to Code::Blocks project file
* Utilize AutoRevision to create src/autorevision.h when building (pre-build step)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2621 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 17:39:30 +00:00
Per Inge Mathisen 820d572696 Change user config directory to ~/.warzone2100-2.1 on linux and "Warzone 2100 2.1" on Mac/Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2619 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:37:32 +00:00
Per Inge Mathisen 40170a90ce Clean up component.c and remove two unused key mappings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2618 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:15:54 +00:00
Giel van Schijndel e06c186bd6 * Replace a _lot_ of strcpy(), strcat() and sprintf() calls with the safer strncpy(), strncat() and snprintf() respectively
* Refactor NETlogEntry() to use the array of strings (packetname[]) instead of a large switch-statement with a lot of copy & pasted code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:11:29 +00:00
Giel van Schijndel 3446fb2b87 * Remove __FILE__ prefix in debug() call as debug() apparently adds __FILE__ already (noted by Per)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2616 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 19:40:39 +00:00
Giel van Schijndel 329c6637d8 * Check malloc's return value
* Don't perform assertions on the content of uninitialized memory, it's useless and annoying when they fail


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2615 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 17:20:29 +00:00
Giel van Schijndel e6827605e2 * Fix a rather large memory leak as reported in bug #10190
* In this bug-report calling free() twice (once on psRes->aID then on psRes) was proposed
   * Instead just ''over allocate'' the memory for psRes so that a single free() call on psRes will suffice

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2614 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 16:54:53 +00:00
Giel van Schijndel 870a536646 * Initialize PhysicsFS before using it
NOTE: PieToaster ''should'' compile, link and run on GNU/Linux systems right now (it does for me)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2613 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 14:26:26 +00:00
Giel van Schijndel 498959f9bb * #include <stdint.h> where we need it
* Use proper constness in main() to shut up gcc warning about wrong constness


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2612 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 14:23:59 +00:00
Giel van Schijndel 5a91f73056 * Replace usage of SDL types Uint* and Sint* for usage of standard C types uint*_t and int*_t respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2611 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 14:17:37 +00:00
Giel van Schijndel 62f1be11f1 * Use "rm -f" to shut up the darn warning messages if several of the to-delete files don't exist while cleaning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2610 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 14:14:18 +00:00
Giel van Schijndel 579e952cb8 * Lets use the built-in bool-type instead of a dirty macro!
* replace [Bb][Oo][Oo][Ll] with bool
   * replace TRUE with true
   * replace FALSE with false

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2609 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 14:04:25 +00:00
Giel van Schijndel 8cd7f8fd5b * Replace all instances of ''_snprintf'' with ''snprintf''
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2608 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 13:43:01 +00:00
Giel van Schijndel 3344b5b01c * Fix #include directives so compiling becomes yet a bit closer to possible
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2607 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 13:34:44 +00:00
Giel van Schijndel 0bb24b12c2 * Add a ''very'' simple Makefile for compiling PieToaster
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2606 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 13:29:35 +00:00
Giel van Schijndel b2a7dd1347 * set svn:keywords
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2605 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 13:16:52 +00:00
Giel van Schijndel c6392febca * Link PieToaster's sources to the repository history
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2604 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 13:12:10 +00:00
Giel van Schijndel 26a1f19cfe * Add initial version of PieToaster
* Developed by Carl Hee <Watermelon>
   * Licensed under the conditions of the GPLv3


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2603 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 12:29:36 +00:00
Per Inge Mathisen dd4898fe2f Beginnings of a new savegame format. Each time you save, a new file with the
extension .wzs is added to your savegame directory. This is the new world.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2602 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 20:52:51 +00:00
Giel van Schijndel 6f0ebde13e * Add lib/framework/tagfile.[ch] to MSVC project file ( this addresses part of bug #10190 )
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2601 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 20:48:15 +00:00
Per Inge Mathisen 45988bd322 Also add definition used in unit test for tagfile bools.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2600 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 20:22:00 +00:00
Per Inge Mathisen 6cf0e01f0b Add write and read methods for bools to tagfile framework. Remove enum write macro.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2599 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 20:21:18 +00:00
Per Inge Mathisen 76031cd173 Dump dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2598 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 18:41:02 +00:00
Per Inge Mathisen 9ec705bd9c Add new debug tag LOG_MAP
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2597 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 18:18:48 +00:00
Per Inge Mathisen 4b3f1a4850 Remove dead code in warcam.c and make camera global static.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2596 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 15:07:44 +00:00
Giel van Schijndel 95caee7a1f * Don't (re)initialize the text render module upon calling iV_Reset() anymore
* Remove iV_Reset() call from src/levels.c which is there only to prevent a crash caused by the *OLD* font rendering code
 * Make sure to initalize the font rendering module (by calling iv_TextInit()) in init.c:systemInitialize()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2593 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 22:51:44 +00:00
Dennis Schridde d5601ebc91 Found a version of the STATIC_ASSERT which also works in global scope.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2592 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 20:53:27 +00:00
Per Inge Mathisen 3e04847d4d No longer any need to call iV_Reset() every time a MP game is load to avoid
a crash bug in the old font code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2590 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 20:10:42 +00:00
Per Inge Mathisen ffc1f75aac Silence asserts going off on working separator tags in tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2589 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 20:09:55 +00:00
Giel van Schijndel ec353ec182 * Add lib/framework/tagfile.[ch] to Code::Blocks projectfile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2588 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 20:07:39 +00:00
Per Inge Mathisen 3bd357ed08 Fix some mistakes and remove debug printfs from tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2587 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 19:33:47 +00:00
Per Inge Mathisen c9b25c5738 Add the tagfile framework that we will use for our new savegame format, and related
unit tests. First sketch of new defined savegame format in tagfile_map.def.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2586 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 18:40:34 +00:00
Giel van Schijndel 09fbe980c0 * Set svn:eol-style to native
* Set svn:mime-type to text/x-rst to get Wiki-like markup in Python-powered viewers
 * Make the TODO file be valid reStructured Text

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2584 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 11:08:49 +00:00
Giel van Schijndel eef217fc4a * Make some EditWorld documents be valid reStructured Text
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2583 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 00:38:08 +00:00
Giel van Schijndel e2b59e8dc1 * Revert r2581, as aparently r2580 _did_ work well (I just needed python-docutils installed)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2582 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 00:12:54 +00:00
Giel van Schijndel f76a7bbcb6 * Set svn:mime-type to text/x-trac-wiki to get Wiki-like markup in Trac (r2580 didn't work very well)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2581 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 23:22:12 +00:00
Giel van Schijndel 03629c04ab * Set svn:mime-type to text/x-rst to get Wiki-like markup in Python-powered viewers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2580 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 22:29:03 +00:00
Giel van Schijndel 9c3db2f6e6 * Add building of Autorevision to the automake build-system
* Make the automake build-system use Autorevision to produce src/autorevision.h
   * Add it to the clean-local target as well!
 * Ignore src/autorevision.h (in "svn status")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2579 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 18:53:24 +00:00
Giel van Schijndel ae8c4b6d2f Autorevision:
* Make function WriteOutput const-correct
 * Mark global variables static
 * Add commandline option "+cstr" which results in Autorevision adding a C-style string into the produced header file
 * When no revision information could be extracted from a working copy give an error message
 * Add some comments
 * Move some variables into a more local scope
 * Don't use member function .close() on iostreams just before leaving scope (the destructor will take care of that!)
 * Don't write the header file in binary mode
 * Fix handling of do_translate
 * Now DO dump revision date as well
 * Add double-quotes around strings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2578 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 17:02:16 +00:00
Giel van Schijndel 355c7a6b0b Autorevision:
* Use C++ iostreams for output as well as input (which was already being used)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2577 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 15:50:50 +00:00