Commit Graph

203 Commits

Author SHA1 Message Date
yexo 6371e6c4db (svn r20307) -Fix (r20305): the palette for baseset extra grfs was never set so it defaulted to dos 2010-08-02 16:04:24 +00:00
rubidium d1787d884c (svn r20287) -Fix: GCC 4.1 warning 2010-08-01 19:52:51 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
rubidium ac280af8bc (svn r20259) -Add: allow NewGRFs to specify their version and use that to hide old NewGRFs / to choose the newest when loading compatible NewGRFs 2010-07-31 14:40:50 +00:00
yexo 5a2862814a (svn r20258) -Feature: more user-friendly gui to change NewGRF parameters 2010-07-31 12:15:12 +00:00
yexo d6eab96a22 (svn r20255) -Add: allow NewGRFs to specify static info about their user-changeable parameters 2010-07-31 09:51:04 +00:00
rubidium 4a4f02dc81 (svn r20254) -Add: allow NewGRFs to specify their palette 2010-07-31 09:44:38 +00:00
rubidium e469a94a2d (svn r20253) -Codechange: change GRFConfig::windows_paletted into a bitmask/bitset 2010-07-31 09:40:43 +00:00
rubidium f7794e313f (svn r20252) -Codechange: deduplicate logic for setting a suitable (initial) palette for NewGRFs 2010-07-31 09:36:09 +00:00
yexo 75c4a2d2fb (svn r20251) -Add: [NewGRF] allow grfs to specify the number of valid parameters 2010-07-31 09:35:49 +00:00
yexo d3c1be9abd (svn r20249) -Codechange: change the newgrf name/description from a char* to a GRFText* to make translations possible 2010-07-31 09:33:39 +00:00
yexo 1ca16aa979 (svn r20248) -Codechange: use a copy-constructor instead of a separate function co clone GRFConfig/GRFError 2010-07-31 09:32:44 +00:00
frosch 56fbbdeafd (svn r19972) -Change: Use the md5sum from the previous save of the game for BaNaNaS instead of the initial (when the grf was added) md5sum from the gamelog. Neither method is 'better', but this way it is independent from the gamelog. 2010-06-13 14:11:32 +00:00
frosch 641fc68aa8 (svn r19971) -Codechange: Make IsGoodGRFConfigList() operate on any given GRFConfig and move the GameLog operations directly to AfterLoad(). 2010-06-13 14:07:49 +00:00
alberth 3271362413 (svn r19835) -Codechange: Extract grfident equality check to its own method. 2010-05-16 18:50:37 +00:00
alberth 4415841ce1 (svn r19553) -Doc: Added/converted explanation to some GRFConfig functions. 2010-04-03 20:02:08 +00:00
yexo 4d5125f0c4 (svn r19315) -Fix (r19295): Show the filename in the newgrf windows if the newgrf name is not empty 2010-03-04 20:07:39 +00:00
yexo 404df87b1f (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 2010-02-28 20:28:08 +00:00
yexo 7ff55502f0 (svn r19256) -Codechange: use a constructor/destructor for GRFConfig to make sure all members are properly initialized 2010-02-25 20:06:11 +00:00
yexo a9c8dbc0a0 (svn r19255) -Codechange: encapsulate GRFIdentifier in GRFConfig instead of subclassing it 2010-02-25 20:05:31 +00:00
yexo 4377b5fd44 (svn r19254) -Codechange: simplify newgrf text code by introducing a few helper functions 2010-02-25 20:00:11 +00:00
yexo 2c1b7410f3 (svn r19251) -Codechange: add a contructor to GRFError and use it to allocating errors more uniform.
-Fix: some grf error messages didn't free the previous error messages, creating a memory leak
2010-02-25 15:54:40 +00:00
yexo bd102b78ee (svn r18813) -Codechange: deduplicate copying a newgrf config 2010-01-15 18:28:30 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium 5557d2a224 (svn r17563) -Fix: memory leak when viewing the NewGRF settings of a server 2009-09-17 21:45:47 +00:00
rubidium 55c0109ee0 (svn r17562) -Fix [FS#2972]: the NewGRF settings of (remote) network games did not get properly updated when the NewGRFs were rescanned causing reading of freed data 2009-09-17 21:14:16 +00:00
rubidium 53cc397607 (svn r17524) -Codechange: use QSortT instead of qsort for sorting NewGRFs 2009-09-13 17:36:50 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 60a3bc9034 (svn r17247) -Change: move '3rd party' MD5 implementation also to the 3rdparty directory. 2009-08-21 20:15:17 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
peter1138 f8d65b4865 (svn r15114) -Codechange: Add support for 8 byte action7/9 data, used as a mask for GRFID checks. 2009-01-16 19:53:52 +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
skidd13 706dd0f86c (svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible 2008-11-02 11:20:15 +00:00
rubidium 0d254e8914 (svn r14540) -Codechange: introduce [v]seprintf which are like [v]snprintf but do return the number of characters written instead of the number of characters that would be written; as size_t is unsigned substraction can cause integer underflows quite quickly. 2008-10-28 14:42:31 +00:00
rubidium 72b72bb368 (svn r14245) -Fix: NewGRF configs loaded from the config file would always default to the DOS palette instead of the "default" palette. 2008-09-04 19:43:20 +00:00
rubidium a4cd12274c (svn r14233) -Feature/Fix [FS#2172]: save the palette of the loaded NewGRFs in the savegame, so joining with a server using Windows palette will make a client with the DOS palette do palette conversion and (thus) not cause a desync due to the different palettes disabling different NewGRFs. 2008-09-03 07:51:07 +00:00
rubidium ea1f180a55 (svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too. 2008-08-31 10:50:05 +00:00
rubidium 1afa473d0f (svn r14196) -Codechange: make the searching for files with a specific extension extendable. 2008-08-31 08:38:30 +00:00
peter1138 b49814c537 (svn r13865) -Codechange: Use case-insensitive sort for NewGRF list. 2008-07-29 07:51:55 +00:00
smatz fee2adb299 (svn r13618) -Codechange: move tar-specific declarations to separate file
Removes indirect dependency on <string> and <map> for over 40 files
2008-06-24 09:05:24 +00:00
smatz c7a9637834 (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details 2008-06-03 18:35:58 +00:00
rubidium 2f3b88ef9a (svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers. 2008-05-30 18:20:26 +00:00
glx e48a351f8e (svn r13008) -Fix [FS#1997]: silence some MSVC x64 warnings 2008-05-08 13:20:54 +00:00
smatz c3822e3a90 (svn r12993) -Fix (r11175): list used for sorting GRFs wasn't freed 2008-05-07 17:36:28 +00:00
glx c2c9121307 (svn r12991) -Codechange: removed some unneeded includes 2008-05-07 14:12:20 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
peter1138 06de1215c1 (svn r12173) -Cleanup: Minor codestyle fixes. 2008-02-18 11:47:53 +00:00
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 2008-01-07 14:23:25 +00:00
rubidium 38115acf5a (svn r11776) -Codechange: more header splittings to reduce the dependencies. 2008-01-07 14:02:26 +00:00
skidd13 7963963d98 (svn r11695) -Codechange: Converted the md5 algorithm to OOP
-Codechange: Adapt the md5 algorithm to the OpenTTD source
2007-12-25 13:59:21 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 2007-12-25 09:48:53 +00:00
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 2007-12-21 19:21:21 +00:00
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13 5c31a973a1 (svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style 2007-11-19 21:32:20 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
rubidium f546de602b (svn r11433) -Fix: starting OpenTTD with DOS files made it look weird out of the box.
-Change: make extra sprites (the ones not in the TTD GRFs) replaceable using Action 5.
-Feature: make replacing contiguous subsets of sprites in for some types possible in Action 5.
Note to GRF authors: when you replaced OpenTTD sprites that are not from the TTD GRF files using Action A, your GRF will not have the intended result anymore as the sprite numbers have changed. You should replace the Action A with an Action 5 from now on.
2007-11-15 07:42:25 +00:00
rubidium b14c94867a (svn r11355) -Fix [FS#1377]: loading too many GRFs was not handled gracefully causing crashes and such. 2007-10-29 23:02:31 +00:00
rubidium 08fd0030d2 (svn r11180) -Fix (r11175): crash on load when you don't have any NewGRFs. More interesting is: who plays without them ;) 2007-09-28 17:04:52 +00:00
glx 9f552ae0b3 (svn r11179) -Fix [FS#1262] (r11175): compilation with MSVC was broken 2007-09-28 16:05:40 +00:00
rubidium 02d23c2776 (svn r11175) -Codechange: sort the NewGRFs by name, making searching a specific NewGRF a lot easier. 2007-09-27 20:39:46 +00:00
truelight 631dc06212 (svn r11119) -Codechange: analyze .tar files upon loading, remembering their files and offsets, which speeds up .tar handling with a big factor
-Fix: several win32 .tar support problems
-Fix: better checking of .tar versions and other minor things
-Codechange: don't call fclose() but FioFClose to close a file
2007-09-16 18:10:52 +00:00
glx 1c998c6d92 (svn r11111) -Fix (r11106): missing const broke compilation with MSVC 2007-09-15 00:49:44 +00:00
truelight 5647bd5157 (svn r11106) -Add: added .tar support; you can pack all files in your data/ dir in how ever many .tar files you like, keeping the dir-structure equal to the unpacked version, and OpenTTD can handle them just like the files were unpacked
-Note: useful for GRF-packs and 32bpp PNGs. Don't forget to keep the dir-structure alive for 32bpp PNGs!
  -Note: file-loading-order: search-paths, .tar-files in the order found on disk (can be anything at all, don't depend on it.. use 'openttd -d1' to see which order they are added)
2007-09-14 22:25:00 +00:00
truelight 3d0ac92267 (svn r11099) -Codechange: allow on opening of a file via FioFOpenFile to request the size of the file, so we can keep that in mind 2007-09-13 18:46:29 +00:00
truelight c0c12bca3d (svn r11098) -Fix r11096: forgot spaces before comments 2007-09-13 18:35:29 +00:00
truelight 70772e9cc9 (svn r11097) -Codechange: for easy future extension of NewGRF Scanning, split up the functions a bit 2007-09-13 18:28:56 +00:00
truelight bf17a96b63 (svn r11096) -Fix: when 2 different GRF-files had the same name (e.g.: ""), the double-entry checker didn't always work correctly, resulting in multiple entries of the same grf in the list 2007-09-13 18:26:18 +00:00
rubidium 6402d00190 (svn r10298) -Fix [FS#903]: show the subdirectory below the default data directory in this filename in the newgrf list. The directory was removed in r9560 because then it used to full path instead of the path relative to the data directory, but since the inclusion of "search paths" that is not necessary anymore. 2007-06-23 21:12:09 +00:00
glx 9e2e73f30b (svn r10223) -Fix r10211: GCF_INIT_ONLY flag was never cleared 2007-06-19 17:13:25 +00:00
glx 23af871615 (svn r10211) -Feature: [NewGRF] Add support for action 0F 2007-06-18 23:00:55 +00:00
rubidium 347c28b71a (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
-Codechange: add support for personal directories on Windows.
-Fix [FS#153, FS#193, FS#502, FS#816, FS#854]: fix issues related to fixed names, fixed places of files/directories and application bundles.
2007-06-17 15:48:57 +00:00
maedhros 109dd33c4a (svn r10114) -Fix: Only load newgrf error messages if the language matches the current
language. Since only one error can be loaded anyway, if the language didn't
match you'd get "Undefined string". Also since we're only loading one language
there's no need to use AddGRFString any more.
2007-06-12 13:22:14 +00:00
rubidium 142f2aba15 (svn r10073) -Codechange: make the NewGRF paths in the config file without any full paths (again). 2007-06-08 21:16:17 +00:00
belugas 607a55f4ec (svn r9662) -Documentation: Doxygen corrections and @file omissions 2007-04-17 20:23:13 +00:00
rubidium 3b8dd00bae (svn r9561) -Fix (r9561): loading the newgrfs in openttd.cfg was broken.
Note: as the 'full' path is stored of the newgrfs, the newgrfs in the old cfgs are not made default (you have to set them again).
2007-04-04 12:43:43 +00:00
rubidium db91588845 (svn r9560) -Codechange: add support for multiple 'base' directories for newgrf searching.
-Codechange: do not add duplicate files to the newgrf list.
2007-04-04 12:03:10 +00:00
belugas d58f9ef7b4 (svn r9545) -Documentation: Some corrections to previous doxygen work 2007-04-02 14:20:31 +00:00
belugas dcd510c81f (svn r9385) -Cleanup: doxygen changes. Today, we are exploring the letter N. 2007-03-21 03:06:21 +00:00
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
maedhros 1c7df202c6 (svn r9031) -Codechange: Introduce grfconfig->status, and use it for states that are
mutually exclusive. At the same time, add an INITIALISED state which makes it
possible to check if a grf is not yet active but will be later on during the
GLS_ACTIVATION loading stage.
2007-03-06 19:33:28 +00:00
rubidium c8faa6bee2 (svn r8955) -Fix: crash on loading savegames with GRFs that do not have their GRF info/name set. 2007-03-01 18:28:55 +00:00
maedhros 8b6350d3a3 (svn r8881) -Feature: Allow built-in newgrf error messages to be translated, and load custom error messages properly. 2007-02-24 16:34:37 +00:00
Darkvater 31be3c6fac (svn r8844) -Revert partly (r8820, r8806): Change AppendToGRFConfigList to add the allocated GRFConfig to its list and not copy it. 2007-02-22 16:16:44 +00:00
maedhros f2d63dcecf (svn r8838) -Feature: Show newgrf error messages loaded in Action B in the newgrf gui
window. GRFs with an error have a warning symbol shown before the name.
2007-02-21 23:18:08 +00:00
Darkvater 6d25481221 (svn r8823) -Fix (r8821): wrapping opendir to ottd-specific function failed on non-windows because this wrapper was only active for win32 (thx Rubidium) 2007-02-20 09:46:10 +00:00
Darkvater 92bbe45dd0 (svn r8821) -Regression: Unable to browse directories on *nix if the filesystem is not in UTF-8 charset and special characters are used. The string passed to opendir() which is UTF-8 was not parsed back to the filesystem format. Use a wrapper called ttd_opendir() instead of redefining opendir itself. 2007-02-20 00:09:23 +00:00
Darkvater 5b237758aa (svn r8820) -Codechange (r8807, r8806): Remove the unneeded calloc/free allocation of GRFConfig and turn it into a simple variable (it's supposed to be data-only). Thanks Tron. 2007-02-20 00:01:54 +00:00
Darkvater 6d4d072023 (svn r8806) -Codechange (r7582): Remove a duplicate append of static GRF's when loading the game and hide the intrinsics of adding elements to the GRFConfig list by using an AppendToGRFConfigList function. 2007-02-18 22:37:33 +00:00
rubidium cf83a9f065 (svn r8316) -Codechange: move the GRF ID and MD5 checksum from GRFConfig to GRFIdentifier so it can be reused. 2007-01-21 17:29:38 +00:00
Darkvater 0c9e65d8cc (svn r8165) -Revert r8107 and show the MD5SUM of the *REPLACEMENT* grf file, NOT the original one. Reason for this is that this md5sum is saved, and otherwise a wrong md5sum would be stored in a savegame. 2007-01-16 21:34:51 +00:00
Darkvater de10e911cb (svn r8135) -Fix (r7582): Don't assert on duplicate non-static grfs when removing duplicates as the PEBKAC effect can result in the user adding the same grf's in the config file. 2007-01-14 22:43:19 +00:00
glx f833de284f (svn r8111) -Fix r8106: silence warnings 2007-01-13 21:28:46 +00:00
Darkvater a5cc170ab0 (svn r8107) -Codechange (r8106): Show the MD5SUM of the original GRF (saved in savegame) instead of that of the replacement so a user can still go hunt for the original GRF if needed. 2007-01-13 17:44:11 +00:00
Darkvater 66c5cde981 (svn r8106) -Feature/Fix: Add the ability to load savegames when you don't have the exact GRF files in your list. GRF files that are found based on GRFID (but not on matching md5sum) are used instead of disabling them. This does not affect MP games, there you still need an exact match.
-GRF Window colour-codes changed a bit: Static is now grey, and compatible GRF (found locally only based on GRFID) are shown in orange. Compatible GRF's also have an orange status/warning text saying they're not the original the game was saved with.
-Loaded games with something amiss regarding GRF's will show an appropiate warning message.
2007-01-13 17:42:50 +00:00
Darkvater 3f168daee1 (svn r8105) -Codechange: Change FindGRFConfig so that if md5sum parameter is omitted (or NULL)
only a check for GRFID is done and not on md5sum as well. Remove blanksum in the function as it's obsoleted
2007-01-13 17:23:02 +00:00
Darkvater 5ed33e549e (svn r8093) -Codechange: Add a function to get a string representation of an MD5SUM and use it. 2007-01-13 13:47:57 +00:00
KUDr 33be1ecfb1 (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 2007-01-11 17:29:39 +00:00
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 2007-01-10 18:56:51 +00:00
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 2007-01-10 18:12:09 +00:00
Renamed from src/newgrf_config.c (Browse further)