Commit Graph

50 Commits

Author SHA1 Message Date
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
2021-05-29 11:21:38 +02:00
Michael Lutz 9c9292949f Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader.
Many of the member variables that are used in the oldloader are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.
2021-02-13 20:08:53 +01:00
Michael Lutz b408fe77f7 Codechange: Use std::string in file scanners. 2020-12-27 13:19:25 +01:00
Michael Lutz 5cbb2da794 Codechange: Even more std::string usage in file IO. 2020-12-27 13:19:25 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott 327ff89808 Codechange: Remove PauseModeByte 2019-04-29 17:40:22 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Charles Pigott e0c0394e37 Fix: Remove various dead or unnecessary assignments 2018-10-31 12:41:49 +01:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium d9ee35006d (svn r26064) -Fix: possible uninitialised array when loading a broken TT-ish savegame 2013-11-23 18:06:00 +00:00
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 2013-11-23 13:15:07 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
rubidium b4edc30c64 (svn r22827) -Codechange: pass the/a more proper sub directory when opening (some) files instead of the default one 2011-08-24 13:53:34 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
rubidium 24df43633c (svn r20247) -Fix: when it is known the loading an old savegame is going to fail, bail out immediately (using an exception) instead of going on until e.g. the expected number of byte is read 2010-07-30 22:57:46 +00:00
rubidium 398418b8fa (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int 2010-05-13 09:44:44 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 93c5300fc5 (svn r16715) -Codechange: add attribute to assert_compile(), so it doesn't warn when used inside function 2009-07-01 21:29:03 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-05-06 15:06:57 +00:00
rubidium 86ca408d46 (svn r15626) -Fix [FS#2698]: UTF8 string handling could cause buffer overruns. 2009-03-06 01:23:25 +00:00
rubidium 0d8da02ec1 (svn r15610) -Change: allow loading of heightmaps and savegames (any form) that are in .tar files 2009-03-04 09:53:31 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz 562299d809 (svn r15274) -Fix (r8705): oldloader wasn't updated to use 64bit airport_flags 2009-01-25 22:50:00 +00:00
rubidium 67a2dd12e8 (svn r15220) -Fix (r15216): signedness warning 2009-01-23 09:47:46 +00:00
smatz 6dffd8ae82 (svn r15216) -Feature: native support for Transport Tycoon (Original) savegames. Based on SVXConverter's source code and documentation by Roman Vetter 2009-01-23 02:35:17 +00:00
smatz 3852ae1264 (svn r15211) -Fix (r15190): loading of TTD savegames was broken 2009-01-22 22:02:05 +00:00
smatz 5e7669b539 (svn r15189) -Cleanup: remove unused includes 2009-01-21 02:07:56 +00:00
smatz 49c5c71348 (svn r15174) -Codechange: split oldloader.cpp 2009-01-20 16:47:42 +00:00
smatz c8e26be649 (svn r15173) -Codechange: shuffle a few lines of code in oldloader.cpp 2009-01-20 16:40:19 +00:00
smatz 38afe1fe3f (svn r15170) -Fix: vehicle value is 64bit now, oldloader was reading it as 32bit 2009-01-20 15:43:17 +00:00
smatz 091d82470b (svn r15169) -Revert (r11271): it was broken by r12924, and the issue is fixed again in r12948 in a cleaner way 2009-01-20 15:23:58 +00:00
smatz 7a13ade405 (svn r15168) -Codechange: use only really basic map accessors in oldloader.cpp, shuffle the code a bit 2009-01-20 14:47:17 +00:00
Yexo 8fabd3982d (svn r15148) -Cleanup: Remove the options "competitor start time" and "competitor intelligence" from the difficulty options because they already were unused. 2009-01-19 01:16:50 +00:00
glx ee1331bb46 (svn r15147) -Fix (r15146): compile before commit 2009-01-19 00:53:31 +00:00
smatz 0e83fb37c0 (svn r15146) -Fix: show savegame name even when opening it failed 2009-01-18 23:33:57 +00:00
smatz a337c47d4f (svn r15145) -Fix: crash when one tried to load a TTO savegame
-Fix (r15144): it wasn't safe at all, but the code broken code isn't needed anymore
2009-01-18 23:26:38 +00:00
smatz 3bceaf41b4 (svn r15144) -Codechange: make sure we don't run out of bounds while determining old savegame name
Note this can't happen in current code
2009-01-18 22:44:53 +00:00
smatz 52e0c6fd35 (svn r15137) -Fix (r11822)(r14340): signs with sign 'Sign' were lost when converting from TTD savegames 2009-01-18 16:20:04 +00:00
smatz e77462a866 (svn r15116) -Fix (r1): company money weren't correctly converted from TTD(P) savegames 2009-01-16 21:50:55 +00:00
smatz e00cf92f47 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
Renamed from src/oldloader.cpp (Browse further)