Commit Graph

17 Commits (master)

Author SHA1 Message Date
Nicolas Hake e3d6486f2a Move GetRelativePath to C4Language
C4Language is the only consumer of GetRelativePath. It cannot handle
arbitrarily sized paths, so discourage new code from using it by moving
it to C4Language.cpp.

Also remove the buffer size parameter which was always defaulted anyway
and use template parameter deduction to always get the correct size.
2017-03-11 13:47:18 +01:00
Nicolas Hake e490428f29 Win32: Drastically improve load times with unpacked planet/
C4Group::SearchNextEntry would waste lots of cycles looking up file
attributes that were never inspected afterwards. Since all we want is
the file size, and we already get that for free from FindFirstFile and
FindNextFile, store it with the directory iterator instead of querying
it at every iteration.

This reduces load times on my machine by almost half, tested across
several different scenarios.
2016-06-19 17:08:50 +02:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 9b34bf2634 Remove arbitrary inline forward declarations of StdBuf (and derivatives) 2015-12-29 21:42:46 +01:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt 99992b6f47 Fix sync loss and missing landscape or objects when joining two consecutive games without restarting the engine inbetween
Caused by an outdated cache of the DirectoryIterator in the main scenario group
2012-11-17 19:44:04 +01:00
Günther Brammer b4fd8fcd15 linux: Add O_CLOEXEC to various open calls
This should prevent some file descriptor leakage from forks that
some libraries we use do.
2012-03-05 01:33:02 +01:00
Günther Brammer 91e3a0ca07 Remove unused EraseFiles and EraseItems functions 2011-11-02 21:34:04 +01:00
Günther Brammer 3bbf7c6c38 Add DirectoryIterator & DirectoryIterator::operator = (const DirectoryIterator &)
Because every class with pointer members should have one.
2011-03-30 21:04:42 +02:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Günther Brammer e30ff99d6a Remove all superflous #include <Standard.h>
Standard.h is included by C4Include.h, and every file includes that.
2010-03-04 22:11:12 +01:00
Günther Brammer a16df97a95 Various cleanups in the platform code 2010-02-16 02:54:02 +01:00
Nicolas Hake be39732a8f Implemented fixed ordering in DirectoryIterator
This should alleviate loading order differences from different
OSes somewhat. Since the iterator currently employs a lexicographic
ordering, there are probably still problems when one player has
their packages unpacked, while another one has theirs packed.

This should go away once we employ a sane format for game packages.
2010-01-25 16:54:38 +01:00
Sven Eberhardt 8098b31bce player control init: fallback to existing control sets if selected control set not found 2009-10-13 22:02:44 +02:00
Sven Eberhardt df6010a148 merge 2009-08-12 17:27:43 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00