Commit Graph

138 Commits

Author SHA1 Message Date
Michał Janiszewski 6fc8ac721c Migrate initial object list sorting to qsort() 2016-05-13 23:33:29 +02:00
Michał Janiszewski 5b639e515b Cache entries for future lookup to speedup launch
Before this change, expensive `object_get_next` had to be called
`numObjects^2` times, now it is cached so it can only be called
`numObjects` times.
2016-05-13 23:22:11 +02:00
janisozaur ca430e1b23 Drop unused variables (#3586) 2016-05-13 18:21:58 +01:00
janisozaur 658e877955 Name all the typdef-ed structs (#3581) 2016-05-12 22:57:40 +01:00
Ted John 3bb1d47813 use new S6Importer for loading saved games 2016-05-08 22:35:06 +01:00
Ted John 1908743c71 refactor track save, move into own source 2016-05-08 14:03:49 +01:00
Ted John 77e7313540 move track design related functions to new source 2016-05-08 14:03:48 +01:00
janisozaur 68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Gymnasiast b37d4804ce Integrate gErrorType and gErrorStringId, fixes 2016-05-03 07:25:19 +02:00
Gymnasiast 5d0b79227f Clean up some magic values and refactor a bit 2016-05-03 07:25:19 +02:00
Ted John 7401b5cf39 import default objects and themes 2016-04-22 18:25:22 +01:00
Michał Janiszewski 6b514d1e3a Fix possible issues highlighted at higher warn levels
Mostly possibly uninitialized values and signedness
2016-02-26 12:54:00 +01:00
Michał Janiszewski 14bff0c66f Rename rct_ride_type to rct_ride_entry 2016-02-25 13:33:19 +01:00
IntelOrca 13921111f3 remove old RCT2 cursor code and RCT2 error location variable 2016-02-16 20:30:43 +00:00
IntelOrca 62eeaaf405 fix severe regression from #2787, use object entry array instead of ride entry array 2016-01-23 12:47:04 +00:00
Marijn van der Werf 98b5ad1bf4 Replace known addresses with constants 2016-01-15 21:01:34 +01:00
Marijn van der Werf 17bc24b3a0 Use absolute constants for object entry groups 2016-01-11 13:51:42 +01:00
Marijn van der Werf 6eadf824ea Replace raw addresses of `RIDE_ENTRIES` 2016-01-11 13:34:08 +01:00
Marijn van der Werf e961cc885a Use RCT2_ADDRESS_COMMON_FORMAT_ARGS instead of raw address 2016-01-11 12:55:33 +01:00
Gymnasiast 24448f2734 Show names of missing expansion packs and use localised names; cleanup 2016-01-09 22:55:10 +01:00
IntelOrca 43a5cc92cc define STR_NONE as a rct_string_id 2016-01-07 22:14:53 +00:00
IntelOrca 053f4f4f38 fix object list memory error, rct2_malloc being used instead of malloc 2016-01-07 22:10:07 +00:00
IntelOrca 40a4bd1fa8 remove old object_paint calls, replace with new 2016-01-07 19:01:19 +00:00
IntelOrca ab38828e03 integrate object list variables:
- gInstalledObjectsCount
- gInstalledObjects
- gNumInstalledRCT2Objects
- gNumInstalledCustomObjects
- gLastLoadedObjectChunkData
2016-01-06 20:41:21 +00:00
Aaron van Geffen 2c5651614c Corrected misspellings of "substitute". 2015-12-23 00:40:36 +09:00
Kyle Kirby caf07c2064 Clean up the comments a litte
• Make comment heads be /**
• Make rct2 addresses be double spaced indented
• Make there be a space afte rct2: and the address
• Make single-line rct2 addresses be full block comments
• Move description of method to top of comment
2015-12-11 16:19:46 -06:00
Kyle Kirby 8e5355640f Convert spaces to tabs 2015-12-11 06:28:35 -06:00
Michał Janiszewski 8e45cccb7a Minor fixes
Includes (mostly) type fixes, dead code removal, signed vs unsigned
comparison fixes, memory leaks removal.
2015-10-21 08:47:09 +02:00
Michał Janiszewski ca298d5568 Remove leftover porting hack 2015-10-01 17:05:31 +02:00
Michał Janiszewski 4ce0e3a8b2 Linux platform file
Add bulk of the platform file for linux, change the compilation target
from shared library to executable for linux, provide necessary changes
to make it compile & load the stub of a process.

Make sure functions are marked as stubs where needed, and implementation
is expected.
2015-09-20 23:19:08 +02:00
IntelOrca fc65a92275 fix object override strings for scenario editor and plugin.dat 2015-09-08 21:37:24 +01:00
IntelOrca bea74ee261 make all file IO utf8 compatible, fixes #1847 2015-08-29 13:13:23 +01:00
IntelOrca 50187adc37 enable debug configuration and add optimisations to release configuration 2015-07-24 23:48:23 +01:00
zsilencer b876591543 use SDL_RWops for save games 2015-07-11 12:27:46 +01:00
Gymnasiast 2ac872dd56 Drop duplicate track names in list; use track categories when in select-by-track-type-mode 2015-06-27 13:08:29 +02:00
Duncan 2c58910f62 Merge pull request #1485 from OpenRCT2/object-selection-columns
Object selection columns
2015-06-27 09:16:57 +01:00
Duncan Frost ab7e1da84e Implemented object unload.
Refactored calls to the function. No need to pass the object type.
2015-06-26 17:45:38 +01:00
IntelOrca 210ba2a04d object-selection-columns: add ride type with sort 2015-06-25 23:35:18 +01:00
Robert Jordan 760f0853ea Fixed incorrect filter data 2015-06-25 18:15:25 -04:00
Gymnasiast 770bfa2721 Another typo 2015-06-25 14:45:33 +02:00
Gymnasiast 8ec3f60f2e Typo 2015-06-25 14:40:46 +02:00
Gymnasiast ca1b88fc53 Don't modify flags when in select_by_track_type mode; make it switchable in-game again. 2015-06-25 11:46:17 +02:00
Gymnasiast a6225ebf06 Add option to select by track type (RCT1 style); correct misspellings of 'separate' 2015-06-24 12:41:19 +02:00
Duncan Frost 15b2360e13 Implemented object_create_identifier_name and start of last func.
Note requires modification of the strings.
2015-06-19 21:34:41 +01:00
Robert Jordan aec68a72d7 Excess space no longer created in filter list 2015-06-14 14:52:24 -04:00
Robert Jordan 7f98dba63a Filters sort properly now 2015-06-14 14:41:27 -04:00
Robert Jordan 3ad9a1a74a Removed printf's 2015-06-14 12:25:41 -04:00
Robert Jordan cbf27687cb Added ride filters in object selection 2015-06-14 12:19:54 -04:00
Miso Zmiric (Mike Squinter) 628e634199 closes #1204, add log_info 2015-06-09 20:10:37 +01:00
Duncan Frost 97966ac707 Implemented scenery_set_setup for research.
I've also labelled ride_type->flags.
2015-06-07 19:19:16 +01:00
Robert Jordan ab942236d7 Added in-game object selection
New console commands:
- open (opens a window)
- windows (lists windows usable with open)
- load_object (loads the specified obj with the given filename)
- object_count (lists the number of objects in the scenary)
Console commands now have a usage variable.

Use: "open object_selection" for the object selection window.
Once the object selection window is closed, all objects will
automatically be researched whether or not they were already in the base
scenario.
The object selection window will close any other windows when selecting
an object to prevent a crash.
2015-05-23 14:56:54 -04:00
IntelOrca 509b2a1c6d implement research_populate_list_random 2015-03-31 17:09:16 +01:00
Duncan Frost a04de29bf8 Finish refactor of object_list.c 2015-03-07 12:45:13 +00:00
Duncan Frost 936f2f127f Refactor of object_list.c 2015-03-07 11:13:10 +00:00
Duncan Frost ddcf766fea More refactoring of object.c 2015-03-07 09:44:34 +00:00
Duncan Frost c0e957299f Refactored paint_path. Labelled known offsets 2015-03-01 17:45:45 +00:00
Duncan Frost 9aad65d6c7 Fix cause of #698. Vanilla object count not being reset before rebuild. 2015-02-15 18:06:43 +00:00
IntelOrca ac4cd56b63 add new load / save window, closes #580 2015-02-14 02:16:03 +00:00
IntelOrca a66b29076b move osinterface code to shared or windows 2015-02-12 20:51:40 +00:00
IntelOrca 51802aac45 fix object order and add object dat name to object selection window, closes #440 2015-02-11 18:54:31 +00:00
IntelOrca f27c63e119 add more verbose logging 2015-02-04 17:44:39 +00:00
Duncan Frost e182d19358 Changed object_read_and_load_entries to try load all objects before failing. 2015-02-03 19:51:07 +00:00
Duncan Frost fc8728aa9d Refactor of editor window. Added object_selection_close and load_selected_objects. Fix small display bugs. 2015-02-02 18:49:07 +00:00
Duncan Frost 186499c0eb Finished track_load_list. Requires refactor. 2015-02-02 18:44:19 +00:00
Duncan Frost c118b77477 Add notes about obsolete addresses 2015-01-19 18:52:25 +00:00
IntelOrca bfafc0e149 fix warnings and only allow cheats in play mode 2014-12-09 19:55:17 +00:00
Duncan Frost 68fe54cfdd refactor object loading, part 2 2014-12-07 21:58:19 +00:00
IntelOrca 1ed6e443ca refactor object loading, part 1 2014-12-07 21:45:42 +00:00
IntelOrca 325c5243e8 change plugin.dat to be saved in user directory and stop repeated load of title screen when failed 2014-11-30 22:16:42 +00:00
Duncan Frost 8354304299 Added object_load_list. Fixes various object loading related bugs 2014-11-30 21:16:36 +00:00
Duncan Frost 913adaffa0 Added error messages to loading objects 2014-11-21 19:09:20 +00:00
Duncan Frost 7252667a25 Implemented the same changes to scenario load. Error messages now copied onto cmd prompt 2014-11-20 19:02:27 +00:00
Duncan Frost 4459d127d0 Found cause of crash. Game will enter hybrid state when failed to load. 2014-11-19 21:46:32 +00:00
IntelOrca c8df6174b8 organisation: fix includes 2014-10-06 17:36:58 +01:00
Duncan Frost 2ea8d9e4b2 Added start of sawyer write chunk 2014-10-01 21:49:37 +01:00
Duncan Frost a1a3df8158 Added more of load packed 2014-10-01 18:52:57 +01:00
Duncan 44a4862466 Small refactoring of load packed 2014-10-01 18:52:57 +01:00
Duncan 760ecf1525 Switched to main version of chunk read. 2014-10-01 18:52:56 +01:00
Duncan Frost 335aca4164 Cso now partially working. 2014-10-01 18:52:53 +01:00
Duncan Frost 928a61e167 Still searching for bug 2014-10-01 18:52:48 +01:00
Duncan Frost ddc047241e Added some checks on object loading to eventualy fix #225 2014-09-24 17:47:19 +01:00
IntelOrca 7190e4c3f6 implement object_get_scenario_text 2014-05-26 17:59:42 +01:00
IntelOrca c783898b36 fix #143, incorrect object entry group addresses 2014-05-26 14:36:07 +01:00
IntelOrca d5ad84a7d1 clean up scenario loading some more 2014-05-24 22:14:42 +01:00
IntelOrca 36144b85be clean up loading of g1.dat 2014-05-24 18:41:38 +01:00
IntelOrca 27a5761499 add unload objects 2014-05-24 18:07:29 +01:00
IntelOrca 759673f9a0 add object_read_and_load_entries 2014-05-24 16:48:13 +01:00
IntelOrca 36e2cce045 add object list load 2014-05-24 01:34:17 +01:00