asarium
4c5b1c679b
Add support for accessing default files with CFile
...
This allows to use more complex file structures in the executable
without requiring that those exist as real files. The rest of the code
does not need to handle the difference between a default file and a real
file anymore which means that it's now possible to embed image files
into the executable since bmpman only needs to use the standard CFile
API.
I added two tests which check if the default file can be found and
opened and if a mod file overrides the default file which should always
be possible.
2018-02-14 11:02:59 +01:00
asarium
206ce536ec
Search for fred docs using cfile
...
This will allow to put the FRED docs somewhere else instead of into the
root directory of a TC.
2017-11-14 23:15:58 +01:00
Cliff Gordon
d3480f70f2
Fix for log printing creating directory lines for directories that already exist.
2017-02-08 10:35:36 -06:00
X3N0-Life-Form
20a22e6a31
add .tbl, .tbm, .xml and .csv to the list of supported /config file types
2016-10-21 20:21:53 +02:00
asarium
1bcb937fe3
Add improved video player
...
Uses FFmpeg for video decoding and multiple threads for reading and
decoding files. Can handle 1080p with no stuttering.
2016-09-26 22:43:19 +02:00
MageKing17
bce17561ed
Change pointless .size() calls into .empty() calls.
...
The codebase had quite a few instances of .size() being called and then checked to see if it was 0 or not (or less than 1, or greater-than-or-equal-to 1, which are basically equivalent), when .empty() could be called instead (negated or not, depending on what the original condition was).
2016-09-07 18:36:12 -07:00
asarium
4274a6da76
Add unit test setup
2016-08-15 11:40:08 +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
Fabian Woltermann
4b2c2d6ef2
Fix for cf_create_directory ( #687 )
...
Changes cf_create_directory so that it can actually do what its comment says it does, namely create directories recursively.
2016-07-24 09:24:59 -07:00
asarium
cd2a692150
Merge branch 'master' into antipodes_/sync
2016-07-04 11:15:40 +02:00
asarium
88ffa54ae0
Fix crash in cfile.cpp
2016-04-03 22:12:13 +02:00
Peter Mitsis
04dc9f28cc
cfile: Fix minor issues found during code review
...
Signed-off-by: Peter Mitsis <[email protected] >
2016-04-01 20:03:00 -04:00
Peter Mitsis
8924aa06e9
cfile: Simplify cf_delete()
...
Removes the unnecessary attempt at opening the specified prior to
calling _unlink().
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
Peter Mitsis
673b8f61eb
cfile: Remove superfluous memset() in cfile_flush_dir()
...
There is no need to zero the 'stat' structure before using in stat().
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
Peter Mitsis
f75f6af43a
cfile: Refactor cfile_chdir() and cfile_push_chdir()
...
Reworks cfile_chdir() and cfile_push_chdir() to extract common and
reduce code duplication.
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
Peter Mitsis
71a61143bf
cfile: Simplify cfile_init() and cfile_in_root_dir()
...
Removes unnecessary error checking and simplifies the logic.
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
Peter Mitsis
cca2a776e1
cfile: Only define cfile_chdrive() for _WIN32
...
Not only was the use of of cfile_chdrive() already conditional on _WIN32
being defined, so too was its extern declaration.
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
Peter Mitsis
8e21aa6c88
cfile: Apply 'static' keyword
...
Signed-off-by: Peter Mitsis <[email protected] >
2016-03-31 21:50:37 -04:00
asarium
54cb475d30
Unify config handling on all platforms
...
This will use SDL_GetPrefPath to determine a suitable config directory which will be used for all runtime writing. Additionally all platforms will now use the configuration ini files, the Windows registry will be deprecated. For better compatibility with current installs there is a "legacy mode" which will work like the current install. It will be used as long as the launcher doesn't write the configuration file to the new location. Migrating old installs requires copying the existing pilot files to the new location and copying any existing configuration data.
2016-03-16 19:42:52 +01:00
asarium
2d4d0081cd
Merge branch 'master' into antipodes_/sync
...
Conflicts:
code/cmdline/cmdline.cpp
code/io/timer.cpp
code/network/multi.cpp
configure.ac
projects/MSVC_2005/Fred2.vcproj
projects/MSVC_2005/Freespace2.sln
projects/MSVC_2005/Freespace2.vcproj
projects/MSVC_2005/code.vcproj
projects/MSVC_2008/Fred2.vcproj
projects/MSVC_2008/Freespace2.doxproj
projects/MSVC_2008/Freespace2.vcproj
projects/MSVC_2008/code.vcproj
projects/MSVC_2010/Fred2.vcxproj
projects/MSVC_2012/Fred2.vcxproj
projects/MSVC_2012/Freespace2.vcxproj
projects/MSVC_2012/code.vcxproj
projects/MSVC_2012/code.vcxproj.filters
projects/Xcode4/FS2_Open.xcodeproj/project.pbxproj
projects/Xcode4/Frameworks.tgz
projects/Xcode4/Info.plist
2016-03-11 12:36:52 +01:00
asarium
688c514352
Actually dump opened files to log file
2016-02-22 12:10:46 +01:00
asarium
58575399f5
Add source tracking for cfiles
2016-02-21 22:34:37 +01:00
asarium
95c88cd62d
Fix compilation errors in FRED
2016-01-24 23:17:19 +01:00
asarium
451d451417
Replace Win32 MessageBox with os::dialogs version
...
Also moved SCP_MessageBox into os::dialogs namespace
2015-08-28 16:24:35 +02:00
Goober5000
bd3cd7eb18
Merge pull request #195 from Echelon9/fix/sort-uniq-includes
...
Review and refactor #include's
2015-08-19 00:05:02 -04:00
Echelon9
9487688edb
Document cfile_init() function.
2015-08-17 01:41:37 +10:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
MageKing17
be9990f6a5
Fix cf_file_exists().
...
Was passing the pointer to *size instead of *offset, so instead of seeing if the file didn't have an offset, we were checking if it didn't have a size.
2015-04-29 23:21:49 -07:00
The_E
1199555321
Adds a new debug output filter, "CFileDebug", which if enabled via debug_filter.cfg will print the absolute path to any file requested by the engine.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11289 387891d4-d844-0410-90c0-e4c51a9137d3
2015-03-22 13:04:55 +10:00
chief1983
ec758aa108
Fix for Mantis 3036: This unifies the cf_exists function to behave like the other functions in the cf_exists* family, and simultaneously addresses the bug.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11222 387891d4-d844-0410-90c0-e4c51a9137d3
2015-01-23 18:35:55 +10:00
Goober5000
138e6b853f
yeesh... a veritable cascade of const-correctness
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9783 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-13 20:18:32 +10:00
IssMneur
fa00353c9d
Name the packfile with the odd header
2012-10-20 03:41:25 +00:00
niffiwan
ee0358ee79
cfile: change Assert to Assertion
2011-11-14 03:55:01 +00:00
The_E
531a7c71bb
Revert 7791. Something went wrong there.
2011-09-24 18:31:20 +00:00
The_E
a982eb153d
Remove more useless encryption stuff. NOTE FOR PROJECT FILE MAINTAINERS: parse/encrypt.(cpp|h) should no longer be part of the project.
2011-09-24 17:37:12 +00:00
Zacam
83045f7d4c
Some more Parity/drift correction between Antipodes and Trunk: cfile update for better handling.
2011-09-09 14:06:29 +00:00
The_E
fb21bc4272
Patch for Mantis 2050: Renaming the log file may cause crashes
2011-06-27 13:45:19 +00:00
Zacam
75043ff5b1
go_faster from Antipodes 6. Everybody, say "Thank you, taylor!"
2010-10-18 18:32:37 +00:00
The_E
5d625a2473
More cleanup
2010-09-03 22:45:18 +00:00
chief1983
2d43f0b847
Per IssMneur, fix the root directory detection on *nix systems.
2010-07-19 15:50:50 +00:00
Zacam
7096cd3d11
From Antipodes #5 : PNG File Format support.
...
Adds PNG to Maps (should only be used for Nameplates), Interface, Effects, HUD (still needs HUD Rewrite to implement), Player/Squad Images, Multi Players, Multi Cache, CB Anims and Intel Anims.
LIBPNG: Version 1.2.42, current and highest usable version (MAX_VERSION), Linux can use any 1.2.2x-1.2.42, but should NOT use 1.4.0 under any platform for ANY reason (will require rewriting pngutils)
ZLIB: Version 1.2.3.
2010-02-06 02:35:41 +00:00
portej05
0383415a3b
Antipodes 3 from Flaming_Sword
2009-09-26 05:52:17 +00:00
portej05
98f337f701
safe_strings - from Antipodes build #1
2009-07-27 16:06:24 +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
Goober5000
6e4021888d
add apostrophes to contractions, lol
2009-04-10 07:49:12 +00:00
chief1983
5c12c0ef48
Redo that fix again - tolower wins, but don't chdrive on non-Windows platforms
...
Made a variable more semantically correct
2008-12-04 20:17:51 +00:00
chief1983
61891ed5ec
Fix the cause of the problem in Mantis #1748 in both chdir functions in case it becomes a problem elsewhere down the line
2008-12-04 17:56:53 +00:00
phreak
3736999bdc
Possible fix for mantis #1748 (FRED2 Crashes when squad logo button is pressed).
2008-12-03 05:40:35 +00:00
phreak
42b5c942f5
Allow .jpg files to be loaded out of VPs when in the "interface" subdirectory.
2008-09-26 04:59:12 +00:00
taylor
9231692e48
basic commit of a few Xt tree changes
...
- updated OpenGL code (basic shader support, etc.)
- new ships lab code
- scripting RTT fixes
- don't let FRED hog CPU time
2008-07-16 02:49:19 +00:00