Taylor Richards
039880491a
port to SDL3 ( #7220 )
...
Basic port from SDL2 to SDL3. Also updates imgui to 1.92.5.
2026-07-23 15:52:27 +02:00
Goober5000
5c737a5bf9
improve campaign file extension handling ( #6443 )
...
As discovered by WouterSmits, campaigns with periods in their filenames caused issues with FSO's campaign handling. Specifically, in The Babylon Project, the EA-Minbari war v1.0.fc2 campaign would not save progress because FSO expected EA-Minbari war v1.fc2 in certain places. This is because the `_splitpath()` function attempted to remove an extension from a filename that already had it removed. For most campaigns this did not matter, but WouterSmits found a campaign where it did.
To solve this, there is now a new `util::get_file_part()` function to remove the path without removing the extension. This replaces `_splitpath()` for campaign files, as well as the similar `clean_filename()` and `GetFilePart()` functions in other places. All code paths were inspected for any chance of inadvertent extension adding, and Assertions were added to verify future code. The only potential problem area was `player:loadCampaignSavefile()` which now pre-removes the campaign extension if needed.
2024-12-22 22:31:58 +01:00
Goober5000
dc458964c1
turn insertion_sort into a templated function that uses assignment, so that it can be used with non-POD types
2022-04-08 23:15:49 -04:00
asarium
deff6c9ec1
Remove now unused lua.h file
2016-12-30 12:33:32 +01:00
asarium
5535311087
Move ade functions into own files
2016-10-03 22:24:09 +02:00
asarium
76c220251b
Remove unused code in windebug.cpp
2016-08-11 22:10:43 +02:00
m!m
22c0255277
Fix a bunch of 64-bit MSVC warnings ( #709 )
...
* Fix a bunch of 64-bit warnings
* Fix Linux compilation error
* Fix Mac error
* Fix some issues
* Fix more GCC warnings
* Remote unwanted change
* Remove accidentally readded file
* Fix wrong limit check
* Use BEAM_INDEX macro for getting beam object index
* Fix 32-bit warning
* Use BEAM_INDEX instead of pointer arithmetic
2016-08-09 11:08:54 -07:00
asarium
7b352e511c
Add new memory tracking subsystem
...
This expands the existing system which only worked on Windows to all
supported platforms.
If the MSVC debug runtime is not present then its behavior is emulated
by adding a header to each allocated memory block.
2016-07-29 11:02:45 +02:00
asarium
575091aea4
Add unified dialog handling
...
This also changes the lables on the dialog to make sense and also unifies Int3 behavior by using a function provided by SDL.
2015-06-06 14:53:26 +02:00
Goober5000
4f06fd2435
additional string safety
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11140 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-15 18:22:57 +10:00
Goober5000
e9f5c531e0
heh... Microsoft's implementation of snprintf doesn't conform to the standard!
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11139 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-15 06:23:18 +10:00
Goober5000
aee1305841
according to the C standard... "The functions snprintf() and vsnprintf() write at most size bytes (including the trailing null byte ('\0')) to str." ...so we have that going for us, which is nice
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11132 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-13 18:23:33 +10:00
Goober5000
b8a05e30a0
xt: sprintf length safety
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11123 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-12 18:22:14 +10:00
z64555
8d5fbab768
z64555's debug console. Take 2. Includes changes to most (not Xcode) project files to include the added files of r10621
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10622 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:37 +10:00
The_E
98355da7d5
Revert 10619: Missing files
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10620 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
z64555
2b2ba832f8
z64555's debug console.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10619 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
Zacam
8959ecdc07
Follow up to r9536: re-instate -no_warn, but put it behind a compiler level #ifdef flag to enable the ability to use it. And if you don't know how to do that, you have no business using it.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk@9539 387891d4-d844-0410-90c0-e4c51a9137d3
2013-03-18 20:24:46 +10:00
The_E
129d02eb0d
Removing the -nowarn commandline argument. The encouragement of bad habits is a serious bug.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk@9536 387891d4-d844-0410-90c0-e4c51a9137d3
2013-03-18 20:24:45 +10:00
Echelon9
35d9af7e5f
Commit contribution from community for Lua debug as preference, while preserving old behaviour. Sorry I don't have the name of the contributor or can find the original thread containing this patch.
2012-07-15 15:53:51 +00:00
Goober5000
fdd685fb8a
we want to truncate based on number of lines, not number of characters
...
also, we want to truncate the FRED error message boxes too
(this is a better fix for Mantis #2658 )
2012-07-14 06:23:45 +00:00
Goober5000
fae70dbb8d
truncate assert strings, warnings, errors, and dump buffers if they are too long
...
(this should fix Mantis #2658 )
2012-05-28 22:24:53 +00:00
Echelon9
77c852e15a
A few further changes for Windows support under the new jump_nodes STL refactor
2011-10-03 13:26:03 +00:00
Echelon9
6d4f266e52
Use SCP_* types to access STL types wherever possible. This allows more complete memory monitoring
2011-10-03 09:06:56 +00:00
Zacam
a63dbe572c
Part Two: Synchronization pass of Trunk and Antipodes Differences.
...
Removes all extraneous ifdefs (Demo, E3, Multi Beta, etc).
Leaves Debug and Inferno.
2011-09-09 10:23:53 +00:00
Echelon9
08eeeedff3
A further two spots where the MSVC 2008 compiler doesn't like SAFE_STRINGS changes
2010-12-20 07:50:23 +00:00
Echelon9
eb129200a1
Fix: Convert a further subset of strcpy() to the SAFE_STRINGS strcpy_s() version
2010-12-20 04:28:01 +00:00
Goober5000
b7acaf9177
remove the mprintf per discussion with taylor
2010-11-14 05:42:47 +00:00
karajorma
c07d555346
Genghis' fix for Mantis 2159 (Certain parsing errors are never reported)
2010-05-02 10:24:48 +00:00
Wanderer
c2a1ff57c9
Commit of lua debug patch.
2010-02-10 21:50:15 +00:00
portej05
7b730af602
Remove NEW_MALLOC code
...
Add strcpy_s where needed in vm_strdup
2009-12-26 07:59:01 +00:00
portej05
7445380789
Commit to update PDB_DEBUGGING in preparation for new allocator system
2009-12-02 17:16:33 +00:00
portej05
3aaf81208b
Fix for memory debugging functions.
...
Totals are now more accurate!
2009-11-04 13:03:02 +00:00
portej05
25e3fe0f80
Fix stupid VC6 variable scoping for for loop in memory debugging routines
2009-11-02 08:00:58 +00:00
portej05
44f8eab341
Change to make safe_strings show asserts in release.
...
safe_strings is now used regardless of whether the CRT supports it (except if you're using VC6).
2009-09-10 07:44:08 +00:00
Wanderer
9eb42469a9
fix for debugging CTD in clean_filename function
2009-09-02 05:17:30 +00:00
portej05
98f337f701
safe_strings - from Antipodes build #1
2009-07-27 16:06:24 +00:00
portej05
6a8d45c93d
Replace most instances of std::vector with SCP_vector. Memory is now all run through vm_malloc and vm_free.
...
Watch it go up AND down in mission.
2009-07-11 07:07:57 +00:00
portej05
aebae0185a
Warning now makes sense when it is displayed.
2009-07-01 14:31:32 +00:00
portej05
b91be33343
Just->Error in windebug
2009-06-22 06:37:32 +00:00
portej05
5b4c5f388c
Fixed up some indentation in pstypes.h - the assert section is now readable
...
Added a space after the ! in the stack tracing using DbgHelp
Added the str*_s basic functions. Note the licence in the top. (also, this only updates the VC2008 project)
2009-06-21 17:08:18 +00:00
portej05
cb51bf1eb5
Callstacks now work under VC2008 - define PDB_DEBUGGING to use. (you need the PSDK to make this work)
...
See the post in SCP for what/why.
2009-06-21 15:39:13 +00:00
portej05
719825f80d
The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
...
I've tested this through compiling and through hand checking.
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
karajorma
0cb0206db2
Add the Assertion Macro as an alternative to Assert.
...
Switch a couple of Asserts to Assertions.
2009-05-10 08:53:57 +00:00
Goober5000
47060c5c9b
add warning system for mods with bad data files
2009-04-08 04:58:12 +00:00
taylor
71e948278b
don't call gr_activate() in Assert macro
...
log asserts properly when using the -no_warn flag
(though asserts aren't really warnings and should not be turned off, it could be argued that many of our asserts don't belong)
2008-10-07 20:31:04 +00:00
karajorma
90e30ee37e
Fix a problem with the assertion logging fix I added earlier if the stack trace was too long. Will now log errors too.
2008-07-29 19:25:34 +00:00
karajorma
0a9903f48d
Print the stacktrace to the debug log on hitting an assertion.
2008-07-24 20:25:42 +00:00
WMCoolmon
7e7d77c8d7
*Drumroll* The official scripting system commit to the stable branch!
2008-03-15 08:56:43 +00:00
taylor
21cc3ce5ab
make sure that Warning()'s are sent to the debug log too, regardless of whether warning popup is enabled
2007-10-28 16:36:34 +00:00
taylor
3768baeb3f
change Warning() and Error() to use const format variables (can't remember who said to do this)
...
fix memory error when zero'ing buffers for error messages on non-Windows platforms
2007-10-17 21:03:06 +00:00