Commit Graph

805 Commits (57674e35456f2add5c236429db20e5e06deff7b4)

Author SHA1 Message Date
Stefan Huehner 57674e3545 Minor cleanup.
Remove some unsused vars,function,prototypes



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1253 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 20:08:23 +00:00
Dennis Schridde ca3b5909c8 Fix indention and some minor cleanup...
Fixing type-punned pointers is difficult, especially with that HEAP_ALLOC function...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1252 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 19:31:15 +00:00
Per Inge Mathisen cfea4b4b3e Remove strange usage of hash names in soundtrack code. I am not sure
why it worked, or, perhaps, why it still works. Take care ;-)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1251 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 19:03:53 +00:00
Per Inge Mathisen 6e21dbe859 Remove unused HASH_NAMES code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1250 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 18:47:07 +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
Per Inge Mathisen 5b503205ac Fix the strange case of a strresGetString call which is given a hash
string, but does not use hashes. I could not see that it is ever used,
but it must be wrong, so fixing it anyway. Adding the first case of 
gettext markup in the code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1248 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 18:11:47 +00:00
Gerard Krol 81507a85f6 Minor warning fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1247 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 18:10:22 +00:00
Per Inge Mathisen e3e1267e7d Fix bug #8730, where we would crash because the game did not find
a texture to replace during game play. The problem is that the 
texture counter is reset several times during a campaign, so we
cannot trust it. This should be fixed more thoroughly later, for 
now we just check all textures irrespective of the texture counter.
Also improves logging, and fixes a problem that should have made
texture replacements simply not work previously. Thanks to
Gernot Kohlhaas <mr_maniac> for reporting the bug.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1246 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 17:33:20 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 16:20:16 +00:00
Dennis Schridde fb2b443b9a Fix r1242
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1244 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 13:18:37 +00:00
Gerard Krol 4465a061c1 Fix warnings, and revert r1241 for effects.c (validatePie really needs a prototype at the top)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1242 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 23:17:09 +00:00
Dennis Schridde b7ccc234b3 - Remove unused type from pietypes.h
- Replace iBool with BOOL where it was used
- Fix a warning in src/effects.c about validatePie being declared but not defined


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1241 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 22:49:54 +00:00
Giel van Schijndel 4532534a82 * update raw Makefiles to comply with r1239 (removal of lib/framework/mono.[ch])
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1240 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 22:33:18 +00:00
Gerard Krol 9cc26ea719 Remove the unreferenced mono.[ch] files from lib/framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1239 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 22:10:52 +00:00
Dennis Schridde e293bf97a3 Fix broken --enable-xxx
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1238 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 20:18:28 +00:00
Dennis Schridde 63838c8b2a Documentation for the exceptionhandlers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1236 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 19:12:33 +00:00
Dennis Schridde 9f7b5488e5 Temporary workaround for the NULLDROID issue (bug#8723). Incl. asserts so debug builds can investigate.
Slightly modified wscript. config.h was probably not included in all sourcefiles: I got an assert in release build.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1235 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 18:55:31 +00:00
Dennis Schridde 332aae2402 Enhance gdmp with pointer size info.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1233 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 12:28:28 +00:00
Dennis Schridde 5f98bde6d6 Readability of code and usage examples for TILE_UNITS/TILE_SHIFT
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1232 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-14 14:41:46 +00:00
Dennis Schridde 7e12df4e35 - Backport r1228 (lib/script/script_parser.y, not initializing ppsLocalVarVal leads to segfault)
- Change some idention and whitespaces


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1229 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-13 20:49:03 +00:00
Gerard Krol 33936df7d9 Removed a strange __APPLE__ ifdef from stencil_one_pass(), and rewrote
the logic in there. 
Hopefully this will fix the crash reported by Richie on the forums.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1227 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-13 19:34:06 +00:00
Dennis Schridde 792cfe8bfa Enhanced POSIX signal handling using sigaction:
- Examine si_code where non default (SI_*) value are possible
- Output signal in style: "SIGNAL: Problem: Reason"
- Handle more signals (all which are marked "A - Abnormal termination of the process" by the POSIX manual)
- Check for XSI extension (_XOPEN_UNIX) instead of presence of every single signal. Hope this works on all systems


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1226 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-13 13:48:59 +00:00
Dennis Schridde ce55d9b457 - Tab-police
- Use Autoconf's internal variables for --with and --enable options
- Use AC_CANONICAL instead of `uname` for Darwin/MacOS detection


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1223 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-10 21:18:09 +00:00
Dennis Schridde 62341e6aa4 - New macro: WZ_OS_POSIX (if _XOPEN_SOURCE >= 500)
- Added a bit more safety to WZ_DECL_UNUSED (not sure since which GCC version this exists, so choose >=3.2)
- Encapsulate GLibC extensions and use rest of errorHandler for all POSIX systems (thus renamed to posixErrorHandler)
- A little bit more verbosity in the gdmp


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1222 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-10 19:43:02 +00:00
Gerard Krol feff0ef74d Fix the skybox corners moving downwards when rotating the camera with a
factory or research menu open.
menu.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1221 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-08 19:39:00 +00:00
Dennis Schridde d11f5c3665 configure.ac:
- Whitespace changes to sync with branches/2.0
- Fix confusing --disable-data
ChangeLog:
- Import 2.0.6 changes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1217 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-07 12:33:13 +00:00
Dennis Schridde b6fe2eb42b Patch by Jessica: Fix compilation without MP3 support
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1209 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-06 20:35:15 +00:00
Dennis Schridde 25aa89b723 - Force usage of ANSI string functions where possible
- Dismiss buffer and instead output directly


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1207 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-06 00:46:34 +00:00
Dennis Schridde 2c18790798 - Move uname() out of signal handler
- Move programCommand into the Linux section as it is not needed on Windows
- Add some comments


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1206 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-06 00:30:07 +00:00
Dennis Schridde fd452e7b62 - Indent formating of #if a little
- Don't call GDB if not available
- Use fork/pipe/exec properly (subprocess ends after exec, so don't call other functions after it, close files correctly)
- sizeof(char) is guaranteed to be 1 by C
- Use execve instead of execle, because execle might perhaps cause problems


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1205 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-05 00:24:23 +00:00
Per Inge Mathisen 717a34c77f Fix dangerous assumption that signals have the same number and
definition on all platforms by using a switch and some ifdefs.
Looks ugly but should be safer.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1204 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 22:50:41 +00:00
Per Inge Mathisen 60555b640c Reorder the CFLAGS assembly. Most flags are now added first
so that they can be overridden by the user, except -O0 for
some build types, which has to go last. Also add autogen.sh
check for flex, and do not make an assumption about default
optimization level (I think this is correct, correct me if
I am wrong).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1203 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 22:28:20 +00:00
Dennis Schridde 749586b43e Custom implementation of strsignal, which is a GNU extension.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1202 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 13:52:41 +00:00
Dennis Schridde 66c65552e5 Remove now unneeded binary blob reader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1201 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 13:04:36 +00:00
Per Inge Mathisen 1c9eee7f17 Fix includes to make it compile again on my box.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1200 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 12:35:51 +00:00
Per Inge Mathisen ff4dd8ed3d If ${WZ_FLAGS} are to be able to override the default flags
(for example, -O2), it has to be *after* ${CFLAGS} when we
sum up compiler flags. Otherwise the setting of some flags
from within configure will be rather pointless.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1199 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 12:32:02 +00:00
Dennis Schridde 6042e4031d Use defines instead of hardcoded numbers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1198 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 12:14:43 +00:00
Dennis Schridde 44ee73eff2 Minor naming clarification.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1197 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 12:09:56 +00:00
Dennis Schridde db53487043 Highly experimental GDB dump code.
Additional to the useless GLibC backtrace also try to attach GDB to the process and dump a backtrace.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1196 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-04 12:05:53 +00:00
Dennis Schridde da62d665ab Fix exceptionhandler:
- Handle OS differences better
- Clarify which headers in the Linux handler belong to which standards
- Use GNU backtrace() libc-extension only on Linux
- programVersion -> VERSION on Windows


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1194 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-03 18:23:06 +00:00
Gerard Krol 2ba3e85686 Added a working CLEAR_BLACK to pie_ScreenFlip, and modified the videoLoop to always use CLEAR_BLACK. This fixes the fog coloured
(orange) backgrounds for the briefing "video's".


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1193 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-03 16:35:56 +00:00
Dennis Schridde 330fa3b3e5 Remove now unneeded binary blob reader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1191 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 01:34:33 +00:00
Dennis Schridde bc50d5185d POSIX signal handler now outputs a plaintext file.
It uses strlen(), which is not required to be signal safe, but I can't imagine it to be not reentrant and suffering from heap/stack corruption...
It uses strsignal(), which is a GNU extension. strsignal is implemented using the signum as an index into an array of signal descriptions, which should be easily cloneable for non GNU systems if needed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1190 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 01:29:07 +00:00
Dennis Schridde 8cdad4a810 - Change signalHandler to use POSIX signal safe file functions
- Reorder read_gdmp output
- Added compilation date to gdmp
- Reordered gdmp values: sysInfo now after programVersion/compileDate instead of before, to match read_gdmp display order

Still not implemented: Custom (signal safe) sprintf replacement, so we can output textfiles instead of binary blobs.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 00:15:50 +00:00
Giel van Schijndel 1278d71894 Apply patch #687 by Gerard Krol ( from file #2014 )
* prevents ${LIBS} variable from being overridden rather than appended to in the autoconf script

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1188 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-27 20:58:27 +00:00
Dennis Schridde ae34883ec2 Allow overriding CFLAGS via commandline parameters.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1186 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-26 20:40:11 +00:00
Dennis Schridde ccbaba79ca Add --icondir and --applicationdir switches for finer control over installation.
Optimization needs to be taken care of. We currently overwrite whatever switch (-gX/-OX) is given to configure on the commandline.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1184 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-26 20:10:51 +00:00
Dennis Schridde b0a422c1ea Tool to read .gdmp files created on crashes of the Linux version.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1183 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-26 15:12:20 +00:00
Per Inge Mathisen ea50a9249c Replace hard-coded map preview size of 512 with
BACKDROP_HACK_WIDTH and BACKDROP_HACK_HEIGHT for now.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1182 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-25 12:57:04 +00:00
Per Inge Mathisen b8deb3acdc Remove the unset, unused default backdrop.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1181 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-25 12:45:35 +00:00