From daf231a2e9e2ef3edaf1038938cc03025d6af12d Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Mon, 6 Oct 2014 19:41:43 +0100 Subject: [PATCH] organisation: move peep and staff to sub directory of its own --- CMakeLists.txt | 8 ++++---- projects/openrct2.vcxproj | 8 ++++---- projects/openrct2.vcxproj.filters | 27 +++++++++++++++------------ src/editor.c | 2 +- src/game.c | 4 ++-- src/interface/window.h | 2 +- src/management/award.c | 2 +- src/management/finance.c | 2 +- src/management/marketing.h | 2 +- src/{world => peep}/peep.c | 2 +- src/{world => peep}/peep.h | 0 src/{world => peep}/staff.c | 2 +- src/{world => peep}/staff.h | 0 src/ride/ride.c | 4 ++-- src/ride/ride.h | 2 +- src/windows/cheats.c | 2 +- src/windows/game_bottom_toolbar.c | 2 +- src/windows/guest_list.c | 10 +++++----- src/windows/park.c | 2 +- src/windows/peep.c | 4 ++-- src/windows/ride.c | 14 +++++++------- src/windows/scenery.c | 12 ++++++------ src/windows/staff.c | 8 ++++---- src/windows/staff_peep.c | 10 +++++----- src/world/park.c | 2 +- src/world/sprite.h | 2 +- 26 files changed, 69 insertions(+), 66 deletions(-) rename src/{world => peep}/peep.c (99%) rename src/{world => peep}/peep.h (100%) rename src/{world => peep}/staff.c (99%) rename src/{world => peep}/staff.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index c73f950a7c..32be94c0cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,12 +26,12 @@ project(${PROJECT}) add_definitions(-DORCT2_RESOURCE_DIR="${ORCT2_RESOURCE_DIR}") add_definitions(-DHAVE_CONFIG_H) -# include lodepng header -include_directories("lodepng/") +# include lib +include_directories("lib/") # include speex header -include_directories("libspeex/") +include_directories("lib/libspeex/") # add source files -file(GLOB_RECURSE ORCT2_SOURCES "src/*.c" "src/*.cpp" "libspeex/*.c" "lodepng/*.c") +file(GLOB_RECURSE ORCT2_SOURCES "src/*.c" "src/*.cpp" "lib/*.c") if (UNIX) # force 32bit build for now and set necessary flags to compile code as is diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj index db01c91c99..81c820220d 100644 --- a/projects/openrct2.vcxproj +++ b/projects/openrct2.vcxproj @@ -59,6 +59,8 @@ + + @@ -117,9 +119,7 @@ - - @@ -157,6 +157,8 @@ + + @@ -178,10 +180,8 @@ - - {D24D94F6-2A74-480C-B512-629C306CE92F} diff --git a/projects/openrct2.vcxproj.filters b/projects/openrct2.vcxproj.filters index 128d9c6948..af26e1f8ea 100644 --- a/projects/openrct2.vcxproj.filters +++ b/projects/openrct2.vcxproj.filters @@ -56,6 +56,9 @@ {209155b8-2f61-4e25-ab86-c8aa36357abd} + + {51e38783-5334-464c-8f90-61d725dc8013} + @@ -131,15 +134,9 @@ Source\World - - Source\World - Source\World - - Source\World - Source\Windows @@ -365,6 +362,12 @@ Libraries\libspeex + + Source\Peep + + + Source\Peep + @@ -409,18 +412,12 @@ Source\World - - Source\World - Source\World Source\World - - Source\World - Source\Windows @@ -547,5 +544,11 @@ Libraries\libspeex\speex + + Source\Peep + + + Source\Peep + \ No newline at end of file diff --git a/src/editor.c b/src/editor.c index 1d57704561..c70a94d59a 100644 --- a/src/editor.c +++ b/src/editor.c @@ -30,11 +30,11 @@ #include "management/finance.h" #include "management/news_item.h" #include "object.h" +#include "peep/staff.h" #include "ride/ride.h" #include "world/map.h" #include "world/park.h" #include "world/sprite.h" -#include "world/staff.h" static void set_all_land_owned(); diff --git a/src/game.c b/src/game.c index 3453f23ec3..adbd7a0243 100644 --- a/src/game.c +++ b/src/game.c @@ -31,6 +31,8 @@ #include "management/finance.h" #include "management/news_item.h" #include "object.h" +#include "peep/peep.h" +#include "peep/staff.h" #include "platform/osinterface.h" #include "ride/ride.h" #include "ride/vehicle.h" @@ -42,9 +44,7 @@ #include "windows/tooltip.h" #include "world/climate.h" #include "world/park.h" -#include "world/peep.h" #include "world/sprite.h" -#include "world/staff.h" int gGameSpeed = 1; diff --git a/src/interface/window.h b/src/interface/window.h index c5fc9a328a..fed1a9aec9 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -23,9 +23,9 @@ #include "../common.h" #include "../drawing/drawing.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../world/park.h" -#include "../world/peep.h" struct rct_window; union rct_window_event; diff --git a/src/management/award.c b/src/management/award.c index f7fb2466fc..185e025498 100644 --- a/src/management/award.c +++ b/src/management/award.c @@ -21,9 +21,9 @@ #include "../addresses.h" #include "../interface/window.h" #include "../localisation/localisation.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../scenario.h" -#include "../world/peep.h" #include "../world/sprite.h" #include "award.h" #include "news_item.h" diff --git a/src/management/finance.c b/src/management/finance.c index fc95483950..32a10767e4 100644 --- a/src/management/finance.c +++ b/src/management/finance.c @@ -20,9 +20,9 @@ #include "../addresses.h" #include "../interface/window.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../world/park.h" -#include "../world/peep.h" #include "../world/sprite.h" #include "finance.h" diff --git a/src/management/marketing.h b/src/management/marketing.h index 6dc42a7b64..6435256cb4 100644 --- a/src/management/marketing.h +++ b/src/management/marketing.h @@ -22,7 +22,7 @@ #define _MARKETING_H_ #include "../common.h" -#include "../world/peep.h" +#include "../peep/peep.h" enum { ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE, diff --git a/src/world/peep.c b/src/peep/peep.c similarity index 99% rename from src/world/peep.c rename to src/peep/peep.c index 67ee0f3479..1b80055efd 100644 --- a/src/world/peep.c +++ b/src/peep/peep.c @@ -26,8 +26,8 @@ #include "../management/news_item.h" #include "../ride/ride.h" #include "../sprites.h" +#include "../world/sprite.h" #include "peep.h" -#include "sprite.h" #include "staff.h" static void peep_update(rct_peep *peep); diff --git a/src/world/peep.h b/src/peep/peep.h similarity index 100% rename from src/world/peep.h rename to src/peep/peep.h diff --git a/src/world/staff.c b/src/peep/staff.c similarity index 99% rename from src/world/staff.c rename to src/peep/staff.c index aa688c8895..4bbcf64275 100644 --- a/src/world/staff.c +++ b/src/peep/staff.c @@ -23,8 +23,8 @@ #include "../interface/viewport.h" #include "../localisation/string_ids.h" #include "../management/finance.h" +#include "../world/sprite.h" #include "peep.h" -#include "sprite.h" #include "staff.h" /** diff --git a/src/world/staff.h b/src/peep/staff.h similarity index 100% rename from src/world/staff.h rename to src/peep/staff.h diff --git a/src/ride/ride.c b/src/ride/ride.c index e3c54396d7..e7931aee4b 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -24,11 +24,11 @@ #include "../interface/window.h" #include "../localisation/localisation.h" #include "../management/news_item.h" +#include "../peep/peep.h" +#include "../peep/staff.h" #include "../scenario.h" #include "../world/map.h" -#include "../world/peep.h" #include "../world/sprite.h" -#include "../world/staff.h" #include "ride.h" #include "ride_data.h" diff --git a/src/ride/ride.h b/src/ride/ride.h index 065c108f6a..32a65946a1 100644 --- a/src/ride/ride.h +++ b/src/ride/ride.h @@ -22,8 +22,8 @@ #define _RIDE_H_ #include "../common.h" +#include "../peep/peep.h" #include "../world/map.h" -#include "../world/peep.h" typedef fixed16_2dp ride_rating; diff --git a/src/windows/cheats.c b/src/windows/cheats.c index 354e63bc2f..e20bdf1a3f 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -26,12 +26,12 @@ #include "../interface/widget.h" #include "../interface/window.h" #include "../localisation/localisation.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../scenario.h" #include "../sprites.h" #include "../world/climate.h" #include "../world/park.h" -#include "../world/peep.h" #include "../world/sprite.h" //#define WW 200 diff --git a/src/windows/game_bottom_toolbar.c b/src/windows/game_bottom_toolbar.c index 26fd02d15b..0fc569aa68 100644 --- a/src/windows/game_bottom_toolbar.c +++ b/src/windows/game_bottom_toolbar.c @@ -26,10 +26,10 @@ #include "../interface/widget.h" #include "../interface/window.h" #include "../management/news_item.h" +#include "../peep/peep.h" #include "../sprites.h" #include "../world/climate.h" #include "../world/park.h" -#include "../world/peep.h" #include "../world/sprite.h" enum WINDOW_GAME_BOTTOM_TOOLBAR_WIDGET_IDX { diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index b9669c0ad8..d7fc4a1c7a 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -22,13 +22,13 @@ #include #include "../addresses.h" #include "../game.h" -#include "../world/peep.h" -#include "../localisation/localisation.h" -#include "../world/sprite.h" -#include "../sprites.h" -#include "../ride/ride.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../peep/peep.h" +#include "../ride/ride.h" +#include "../sprites.h" +#include "../world/sprite.h" #include "dropdown.h" enum { diff --git a/src/windows/park.c b/src/windows/park.c index df7b9931cf..816bff17b7 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -29,12 +29,12 @@ #include "../interface/widget.h" #include "../interface/window.h" #include "../management/award.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../scenario.h" #include "../sprites.h" #include "../util/util.h" #include "../world/park.h" -#include "../world/peep.h" #include "../world/sprite.h" #include "dropdown.h" diff --git a/src/windows/peep.c b/src/windows/peep.c index eeb1804a10..651cc9d572 100644 --- a/src/windows/peep.c +++ b/src/windows/peep.c @@ -22,11 +22,11 @@ #include "../game.h" #include "../world/map.h" #include "../management/marketing.h" +#include "../peep/peep.h" +#include "../peep/staff.h" #include "../ride/ride.h" -#include "../world/peep.h" #include "../scenario.h" #include "../localisation/localisation.h" -#include "../world/staff.h" #include "../world/sprite.h" #include "../sprites.h" #include "../interface/viewport.h" diff --git a/src/windows/ride.c b/src/windows/ride.c index 7497f71701..d7569bee17 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -21,16 +21,16 @@ #include #include "../addresses.h" #include "../game.h" -#include "../world/map.h" -#include "../ride/ride.h" -#include "../ride/ride_data.h" -#include "../world/staff.h" -#include "../localisation/localisation.h" -#include "../world/sprite.h" -#include "../sprites.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../peep/staff.h" +#include "../ride/ride.h" +#include "../ride/ride_data.h" +#include "../sprites.h" +#include "../world/map.h" +#include "../world/sprite.h" #include "dropdown.h" #define var_496(w) RCT2_GLOBAL((int)w + 0x496, uint16) diff --git a/src/windows/scenery.c b/src/windows/scenery.c index 45a3620c3b..253fc9284b 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -22,16 +22,16 @@ #include #include "../addresses.h" #include "../audio/audio.h" -#include "../game.h" -#include "../world/map.h" #include "../drawing/drawing.h" -#include "../world/peep.h" -#include "../world/sprite.h" -#include "../world/scenery.h" -#include "../localisation/localisation.h" +#include "../game.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../peep/peep.h" +#include "../world/map.h" +#include "../world/scenery.h" +#include "../world/sprite.h" #include "dropdown.h" #include "scenery.h" diff --git a/src/windows/staff.c b/src/windows/staff.c index 6d99cdf59a..13d5b3510c 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -22,13 +22,13 @@ #include "../addresses.h" #include "../game.h" #include "../drawing/drawing.h" -#include "../world/peep.h" -#include "../world/staff.h" -#include "../world/sprite.h" -#include "../localisation/localisation.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../peep/peep.h" +#include "../peep/staff.h" +#include "../world/sprite.h" #include "dropdown.h" enum { diff --git a/src/windows/staff_peep.c b/src/windows/staff_peep.c index 5b58fa8223..8de2cfa822 100644 --- a/src/windows/staff_peep.c +++ b/src/windows/staff_peep.c @@ -20,15 +20,15 @@ #include "../addresses.h" #include "../game.h" -#include "../world/peep.h" -#include "../localisation/localisation.h" -#include "../world/sprite.h" -#include "../sprites.h" #include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../peep/peep.h" +#include "../peep/staff.h" +#include "../sprites.h" +#include "../world/sprite.h" #include "dropdown.h" -#include "../world/staff.h" enum WINDOW_STAFF_PEEP_PAGE { WINDOW_STAFF_PEEP_OVERVIEW, diff --git a/src/world/park.c b/src/world/park.c index 2b516bec82..43317c2cd3 100644 --- a/src/world/park.c +++ b/src/world/park.c @@ -26,11 +26,11 @@ #include "../management/finance.h" #include "../management/marketing.h" #include "../management/news_item.h" +#include "../peep/peep.h" #include "../ride/ride.h" #include "../scenario.h" #include "../world/map.h" #include "park.h" -#include "peep.h" #include "sprite.h" /** diff --git a/src/world/sprite.h b/src/world/sprite.h index 4941c38874..28d658371a 100644 --- a/src/world/sprite.h +++ b/src/world/sprite.h @@ -22,8 +22,8 @@ #define _SPRITE_H_ #include "../common.h" +#include "../peep/peep.h" #include "../ride/vehicle.h" -#include "peep.h" #define SPRITE_INDEX_NULL 0xFFFF #define SPRITE_LOCATION_NULL 0x8000