Commit Graph

109 Commits (9bd8b2492169d9a1eae263d8acb24b492d9b5f55)

Author SHA1 Message Date
Dennis Schridde 9bd8b24921 Boost raw Makefiles
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
   When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Dennis Schridde 4f77bdc8e6 Fix: warning: 'static' is not at beginning of declaration
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5280 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-20 14:04:10 +00:00
Giel van Schijndel c0296aa371 * Apparently the %destructor feature of Bison is implemented differently for 2.1 than it is for 2.3 (or it is broken in 2.1); so don't use it when compiling with Bison 2.1 (leak memory instead)
* Assume __all__ windows builds use Bison 2.1 (this isn't correct, but it's the best I can currently do, as Bison provides no version macros aside from a string macro)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-27 21:37:54 +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
Giel van Schijndel 0118573321 Work around Flex 2.5.33 implicitly defining yyget_extra() (rather than forward declaring it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5130 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 10:49:33 +00:00
Giel van Schijndel 5d0e816aa7 * Put textual tokens as found by audp_lexer.l in heap memory rather than a static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5097 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:55:29 +00:00
Giel van Schijndel e8f9fb9ae5 * ONESHOT and LOOP are __not__ value tokens (they're just regular tokens), so don't mark them as such
* Add a new subrule `looping` and use that in rule audio_track instead of duplicating two code paths for audio_track


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5096 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:51:46 +00:00
Giel van Schijndel 8529559e7c * Parse quoted text in audp_lexer.l similar to most other parsers/lexers we use (is also less error prone)
* Add single line comments (using '//') to audp_lexer.l


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5095 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:42:55 +00:00
Giel van Schijndel d53aa02117 * Use the lexer_input framework instead of a custom YY_INPUT implementation for audp_lexer.l
* Get rid of lexer function parseGetErrorData and use audp_get_lineno() and audp_get_text() instead
 * Add a WZ_DECL_FORMAT declaration to audp_error to enable GCC's printf format checking
 * In audp_error allocate the buffer on the stack using alloca() instead of an auto 1kB text buffer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5094 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:29:13 +00:00
Giel van Schijndel 640ee1f653 * Get rid of never initialised variables g_bParsingSubFile and g_fpOld (the compiler probably set them to false & NULL respectively everytime, if not then this code should have crashed consistently)
* Remove now useless yywrap() function


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5093 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:09:10 +00:00
Giel van Schijndel 1799f473c0 Rename some audp_(.*) stuff to yy$1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5092 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:06:19 +00:00
Giel van Schijndel 12d2e20f47 Use the correct function prototype
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4739 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 23:33:59 +00:00
Giel van Schijndel e8ff8255a9 Some const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4692 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:01:52 +00:00
Roman C 49903f9593 Get rid of unnecessary warnings when compiling release build using MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4462 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 15:56:39 +00:00
Dennis Schridde e28cf1ce77 Using the kludge for GNU Flex < 2.5.30 was slightly incorrect. Correct way is present in 2.5.9 already.
Additionaly use the kludge found on http://flex.sourceforge.net/manual/faq_002dmemory_002dleak.html


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4384 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 11:05:19 +00:00
Dennis Schridde 89d1ea6a3d Old versions of GNU Flex (i.e. 2.5.4) dont provide yylex_destroy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4376 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-27 17:09:16 +00:00
Dennis Schridde 65b9f9b204 r4351: Port memleak fixes from 2.1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 12:49:51 +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
Roman C a1008c093d Reduce amount of junk in the MSVC compilation output by about 70%.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +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
Dennis Schridde cb2f0a30df Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Giel van Schijndel 33216b2e9d Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00
Dennis Schridde d8409c9819 - Don't define CFLAGS anymore, export WZ_CFLAGS instead, which can be overridden by make commandlines
- Set -DYY_NO_INPUT only in those places where needed
- Add some previously forgotten CFLAGS where needed
- Remove extranous -lintl from WIN32_LIBS
- Remove apparently unnecessary directory from Mac include (png_util doesn't need it either)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 02:01:46 +00:00
Dennis Schridde 9f44219b1c Move addition of CFLAGS from configure.ac to the places they are actually needed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 20:08:42 +00:00
Dennis Schridde 3858daf4a1 Reset MSVC version from 9 to 8, since otherwise MSVC8 will refuse to load the project files. (bug #11219)
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 11:28:40 +00:00
Dennis Schridde d3455b699a Properly set include/library directories for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 01:45:45 +00:00
Dennis Schridde 1c979f5fd9 Make lex/yacc rules terminals, since lexer/parser files cannot be autogenerated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3847 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-20 12:06:26 +00:00
Dennis Schridde b7e36a5b77 Require devpkg to be in ./devpkg/ for msvc.
This saves the trouble of having to edit the paths for lib/include dirs and enables us to have the FlexBison.rules there, too.
Thus FlexBison.rules is removed and to be found in the msvc devpkg from now on.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 18:17:58 +00:00
Dennis Schridde 31a863a90b Setup eol-style CRLF for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 20:49:48 +00:00
Dennis Schridde d7bbab46af Set eol-style and mime-type for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:55:59 +00:00
Per Inge Mathisen 2cd496d9c7 Remove unused defines, prettify animation code a bit, and use same electronic
warfare effect code for all objects - the one which does not modify individual vertices.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3429 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-10 22:18:20 +00:00
Per Inge Mathisen f7fbf845c0 Small cleanup to animation code, and fix copy&paste typo in 3ds2pie.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3412 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-08 21:58:05 +00:00
Per Inge Mathisen eecbccbfb4 Encapsulate time adjustment of value increments in the code and try to
document the time code better.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3282 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 18:37:20 +00:00
Per Inge Mathisen 72281bab96 Document and clean up game timer code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3246 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 18:06:40 +00:00
Dennis Schridde c64b565f14 Patch #872 by Buginator. Untested by me since in Bugs we trust. ;)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3020 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 19:10:34 +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 a980ac2ffe Clean up gamelib, removing nearly empty maxpidef.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2850 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-21 23:06:31 +00:00
Dennis Schridde cc7840e866 change_int64_t_to_intptr_t.patch from patch #837 by <cybersphinx> Christian Ohm.
(Make WZ compile with the Tiny-C-Compiler by using the correct type for storing pointers as ints)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2757 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-08 23:11:59 +00:00
Per Inge Mathisen 81ccff31f7 Convert hash table to use 64 bit keys instead of 32 bit keys, since they are used
to store pointers.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2661 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 19:28:02 +00:00
Per Inge Mathisen c086e3c529 Clean up hash table code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2660 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 19:16:16 +00:00
Giel van Schijndel f5602b4778 * Replace a large amount of strncpy() calls with the safer strlcpy()
* Fix an error in src/game.c where we would use the wrong size as parameter to strlcpy()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2640 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 16:18:52 +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
Dennis Schridde 20fe87c0f4 AM: Add lexers to BUILT_SOURCES and CLEAN_FILES as well.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2427 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-21 13:16:09 +00:00
Dennis Schridde e232e9a6b5 Yacc warning fixes by Pseudonym404 (http://forums.wz2100.net/index.php?topic=148.msg7837#msg7837):
- adding *.tab.c to BUILD_SOURCES and CLEANFILES before *.tab.h in applicable Makefile.am files causes *.tab.c to be the file that triggers the %.tab.h %.tab.c: %.y rule, resulting in the command run being "bison -y  -d -o[...].tab.c [...].y", not "bison -y  -d -o[...].tab.h [...].y", which (aside from being correct syntax Wink ) stops "warning: conflicting outputs to file `[...].tab.h'"
- chat_parser.y had %token _T_A declared twice, second instance removed
- audp_parser.y had trailing | signs (presumably from when NULL wasn't commented out)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2426 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-21 13:03:09 +00:00
Giel van Schijndel 83ef0a6e3c * Make audio_SetTrackVals return the track ID number rather than write it into a pointer given as parameter (failure is now indicated by a zero value instead; non-zero indicates success)
* Move a large portion of code from audio_SetTrackVals into sound_SetTrackVals (audio_SetTrackVals only checks whether sound is enabled now, the rest of the job is entirely delegated to sound_SetTrackVals)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2084 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 23:39:40 +00:00
Per Inge Mathisen 2063d578c3 Make sure hash table is re-initialized properly after closed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2052 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-10 21:23:43 +00:00
Giel van Schijndel 7ae1b1bee7 Some more heap abolishing:
* Replace a lot of heap usage with malloc/free usage

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1816 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 22:02:05 +00:00
Dennis Schridde 68e56823e1 - Constification
- POINT -> Vector2i
- changed internalformat = getPixelFormat() to GL_RGBA in one place
- removed unused variables/functions
- proper intialisation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1792 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-02 23:01:29 +00:00
Dennis Schridde 009b61447c - Remove unused code
- Remove duplicated code/macros
- VECTOR3D->Vector3i
- Create float variants of normal functions to simplify Watermelon's float-PIE patch


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1661 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 11:05:28 +00:00
Dennis Schridde 7812d1635a main.c : Unused variables
gamelib/ : FRACT->float and simplifications
frame.c : Indent


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1657 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 19:49:54 +00:00