Commit Graph

18 Commits

Author SHA1 Message Date
Peter Gaal 90075022b1
Titlecasev files openloco (#604)
* renamed Company.h and Company.cpp

* renamed CompanyManager.h and CompanyManager.cpp

* renamed Config.h and Config.cpp

* renamed Console.h and Console.cpp

* renamed ConfigConvert.hpp

* renamed Date.h and Date.cpp

* renamed Environment.h and Environment.cpp

* renamed GameCommands.h

* renamed Gui.h and Gui.cpp

* renamed Industry.h and Industry.cpp

* renamed IndustryManager.h and IndustryManager.cpp

* renamed Input.h and Input.cpp

* renamed Intro.h and Intro.cpp

* renamed Message.h

* renamed MessageManager.h and MessageManager.cpp

* renamed MultiPlayer.h and MultiPlayer.cpp

* renamed OpenLoco.h and OpenLoco.cpp

* renamed ProgressBar.h and ProgressBar.cpp

* renamed Resource.h

* renamed Scenario.h and Scenario.cpp

* renamed ScenarioManager.h and ScenarioManager.cpp

* renamed Station.h and Station.cpp

* renamed StationManager.h and StationManager.cpp

* renamed Town.h and Town.cpp

* renamed TownManager.h and TownManager.cpp

* renamed Tutorial.h and Tutorial.cpp

* renamed Types.hpp

* Removed Types.hpp from headers

Removed Types.hpp from include section in CompanyManager.cpp which is already included in CompanyManager.h

* renamed Ui.h and Ui.cpp

* renamed Version.cpp

* renamed Viewport.hpp and Viewport.cpp

* renamed ViewportManager.h and ViewportManager.cpp

* renamed Widget.h and Widget.cpp

* renamed Win32.h

* renamed Window.h and Window.cpp

* Fix formatting

* Fix formatting 2

* Fix formatting 3

* rename types.hpp to Types.hpp in TrackData.h
2020-09-07 06:42:02 +01:00
Peter Gaal 2c06220cfc
Rename map (#601)
* rename in map/tile.h

* rename in map/tilemgr.h
2020-09-03 21:53:22 +01:00
Svelbeard be8bfa37e6
Construction Window (#493)
* Initial work on open function

* Further Setup

* Further Progress

* Fix Window crashing on open

* Implement on dropdown, on_resize and cursor for construction tab

* Implement on_mouse_down for construction tab

* Further Work on Construction Tab

* Fix track construction tool not working

* Implement disabled widgets for track selection

* Start work on 2nd Tab events

* Finish Station Tab

* Implement Events for signal Tab

* Implement 4th Tab events

* Fix window not displaying track and crash on selecting road bridge

* Minor Formatting

* Progress on construction on_tool_down

* Fix crash on construction _on_tool_down

* Implement on_tool_down

* Refactor construction_draw

* Fixes for CI

* Fix Station Catchment being permanently displayed

* Run clang format

* Split tabs into seperate files

* Fix for CI

* Fix Window not drawing on open

* Fix for CI

* Fix window crashing due to incorrect station type

* Replace while loops with for loops in Station and Signal Tabs

* Refactor Station Dropdown loops into Templated function

* Refactor ConstructionTab.cpp

* Fixes for CI

* Fix crash to desktop when constructing underground

* Fix incorrect tiles highlighting on tool update

* Fix for Xcode

* Fix crash to desktop when opening tram track construction window
2020-07-03 13:35:56 +01:00
Peter Gaal d8ade6e5bd
map_invalidate_map_selection_tiles (#450)
* map_invalidate_map_selection_tiles

implementation of:
  void map_invalidate_map_selection_tiles();
from assembly code

* Fix formatting problem.

* - removed comment
- new constants defined and used:
  - MAP_SELECT_FLAG_ENABLE
  - MAP_SELECT_FLAG_ENABLE_CONSTRUCT

* Removed assert and changed for loop

* constants changed to enum

Introduced enum MapSelectFlag with 1 << N logic instead of constants

* Removed <cassert> header
2020-05-03 23:12:01 +01:00
Peter Gaal f264759950
Map invalidate tile full implementation (#447)
* Fix problem in map_invalidate_selection_rect

- Fix problem which happened around the map edges,
  some values are negative that time. Switching
  to signed values (coord_t) solved the problem.

* Implement map_invalidate_tile_full()

Implement map_invalidate_tile_full at 0x004CBE5F
- The same code is used which is used in the hook
  for 0x004CBE5F. Apparently that code was already
  disassembled in the past.

* Addressed review comments

Those changes are made:
- 1088 changed to 1120 as this is in the original assembly code
- function signature changed to map_invalidate_tile_full(map::map_pos pos)
- hook at 0x004CBE5F is calling directly map_invalidate_tile_full(pos)

* Added comment about registers usage

* Remove temporary variable
2020-05-03 13:23:52 +01:00
Peter Gaal 23f6fac7a8 Fix formatting issues
- remove extra spaces after function call
2020-05-01 20:56:31 +02:00
Peter Gaal 7f4d39afee Separate map_invalidate_tile_full
void map_invalidate_tile_full(uint16_t x, uint16_t y);
2020-05-01 20:56:31 +02:00
Peter Gaal 185b6ccb2e Implement 0x004610F2 map_invalidate_selection_rect
void map_invalidate_selection_rect();
2020-05-01 20:56:31 +02:00
Peter Gaal 71278ad236 Map related function moved to different file
- these function were moved to tilemgr.cpp:
   map_invalidate_selection_rect
   map_invalidate_map_selection_tiles
2020-04-26 21:10:38 +02:00
Ted John cf828b6ea0 Update formatting of files, clang-format template * bug is now fixed 2020-03-17 21:02:25 +00:00
duncanspumpkin 30f4888fef Apply clang format
Fix travis compilation
2018-02-13 21:41:53 +00:00
duncanspumpkin 7057afaaba Implement tile_get_height. Very similar to orct2 2018-02-13 21:41:53 +00:00
Justin Gottula f0095d55fc Update & move safe-string func specializations for loco_global<char[N]> 2018-02-05 11:15:26 -08:00
ZehMatt b9df2ef496 Refactor interop to use single type for data access. 2018-02-05 11:15:22 -08:00
Ted John 07b25cec93 Refactor tile loop 2018-01-28 15:02:11 +00:00
Ted John 48b63cf122 finish implementing update_industry() 2018-01-28 15:00:53 +00:00
Ted John 5bf5ed5fe5 Complete tile loop for update_industry 2018-01-28 15:00:53 +00:00
Ted John e5c653d0c0 Add map information and startings of update_industry 2018-01-28 15:00:53 +00:00