Commit Graph

24 Commits (72123da59d81e8d11d12c5776eb767693bdfebf4)

Author SHA1 Message Date
Buginator 0aff0b46cf Add a new debug flag type, LOG_FATAL.
This is used to differentiate LOG_ERROR (which is a *non* fatal error, but a error none the less) and fatal errors which result in program termination with no *visible* output (on windows/macs) on our end because of the crappy GUI functions so we usually dump it to stderr.txt and there is no clue that the program had to exit for whatever reason.

Hopefully, this will be helpful to windows people so they can differentiate between *our* exit/abort routines, and crashes that occur in drivers which look exactly the same since they get dumped back to the desktop with no visible clue why.

LOG_FATAL is *always* on in both debug & release builds.

On LOG_FATAL debug lines, on windows, we now throw up a modal dialog box with the current error message.  At this time, this only happens when we have a error, and we use abort() right after the error, which makes it fatal.

That explains why this touches ~60 files :)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8320 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:51 +01:00
Per Inge Mathisen ae9bc582be As seen in http://forums.wz2100.net/viewtopic.php?f=30&t=3922 there is a
fake limitation on the cost of a droid in the design screen. This patch
fixes it by an ugly hack in the widget code. Closes ticket:994
Patch reviewed and approved by Buginator.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8275 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:44 +01: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
Per Inge Mathisen 81c88dbf38 Purely cosmetic cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4731 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:02:46 +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 8138e1b0d8 Turn some file-level comments in lib/widgets into Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4209 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 21:36:39 +00:00
Giel van Schijndel a4987cfefb Clean up barGraphCreate and widgAddBarGraph:
* Make barGraphCreate and widgAddBarGraph take their psInit parameters as const
 * Make barGraphCreate return the bar it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4195 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:05 +00:00
Per Inge Mathisen da7b96315c Final PIELIGHT changes to the widget code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3021 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:40:26 +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
Giel van Schijndel 6c8702a915 * Replace a lot of array indexing code of this form *(array + index) with this form array[index]
* This should be a syntactical change only!
  * I.e. even the generated assembly should be the same, but behaviour should __definitly__ be the same!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2892 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 21:04:42 +00:00
Per Inge Mathisen ad5900b2ed Fix crash in design screen if we draw a weapon component that is really really big.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2194 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 22:17:04 +00:00
Giel van Schijndel 5839fb21ea Revert r1810 since it somehow results in undefined behaviour (can't find the cause right now, so this revert is to leave the trunk in a stable state while I work on finding the cause)
PS: "Dang! That GUI code really is borked stuff!"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1814 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 19:52:07 +00:00
Giel van Schijndel 85ecafd1de * Widget functions now copy the different strings they're passed into their widget's object-struct (This takes the memory management burden of these strings from the client code into the widget-library code)
* Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1810 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 18:06:07 +00:00
Giel van Schijndel c5cb9608d1 Leave the memory management up to the memory management functions!
That is:
 * Don't use a custom memory heap implementation anymore
 * Remove all usages of HEAP code for string allocation (wasn't being used anyway due to conditional compilation)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1805 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 16:34:17 +00:00
Giel van Schijndel a381013dc6 Leave the memory management up to the memory management functions!
That is:
 * Don't use a custom memory heap implementation anymore
 * Use malloc & free for memory management

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1804 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 12:30:06 +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
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
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde d889ce9da7 Patch by Christian Ohm: "g++ fixes"
Mainly explicit casts, some type changes, a few fixes.

We need to have a look if this line creates any problems:
lib/script/interp.c @@ -329,7 +329,7 @@
- if(!RetStackRemember(CurEvent, (ip + 2)))       //Remember where to jump back later
+ if(!RetStackRemember(CurEvent, *(ip + 2)))      //Remember where to jump back later


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@719 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-17 20:39:25 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Per Inge Mathisen 8adf85a21b Remove obsolete file lib/ivis_opengl/vid.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@556 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-11 22:08:48 +00:00
Per Inge Mathisen 5b84a97015 Remove remains of a previous iteration of the graphics layer.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@551 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-08 20:58:32 +00:00
Dennis Schridde 5175535d9d Full pathname includes
Same as in r431, but now for lib/
- converted the sources in lib/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.

Should improve the understanding of interfaces and code organization.

(Also fixed a double slash (//) include in src/multimenu.c)



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@432 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-02 19:34:58 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00