Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-detect RCT1 files location #7882

Merged
merged 2 commits into from
Aug 13, 2018
Merged

Conversation

Gymnasiast
Copy link
Member

This needs testing on Windows.

It works on Linux with the RCT1 files downloaded using the Steam console and download_depot.

@@ -596,6 +596,49 @@ namespace Config
}
}

/**
* Attempts to find the RCT1 installation directory.
* @returns Path to RCT2, if found. Empty string otherwise.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This comment needs adjusting.)

@Gymnasiast Gymnasiast force-pushed the rct1-steam branch 3 times, most recently from a9c9105 to eaec630 Compare August 12, 2018 17:45
std::string rct1Path = Config::FindRCT1Path();
if (!rct1Path.empty())
{
Memory::Free(gConfigGeneral.rct1_path);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Memory class is deprecated. Please use free instead.

(I really wish we were at a point where we could leave memory management to C++ intrinsics…)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not so long ago, it was the other way round. Are you sure about this?
@IntelOrca ?

Copy link
Contributor

@IntelOrca IntelOrca Aug 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I didn't get round to removing the remaining ones because there are lots of them. We should move towards using std::string though for config.

@Umdlye
Copy link
Contributor

Umdlye commented Aug 12, 2018

Works here (Windows 10 x64, Steam version of RCT1). The RCT1 scenarios aren't visible until the second time the game starts though. The other stuff (RCT1 edge textures) appears right away.

@Gymnasiast
Copy link
Member Author

I should perhaps trigger a rebuild of the scenario cache if it finds an RCT1 directory,

@Umdlye
Copy link
Contributor

Umdlye commented Aug 12, 2018

It can't find the RCT1 title screen music until the second boot either by the way ;o

@Gymnasiast Gymnasiast merged commit 0a1b53e into OpenRCT2:develop Aug 13, 2018
@Gymnasiast Gymnasiast deleted the rct1-steam branch August 13, 2018 13:50
Gymnasiast added a commit that referenced this pull request Aug 13, 2018
qqkookie added a commit to qqkookie/OpenRCT2 that referenced this pull request Aug 13, 2018
…to cookie

* 'develop' of https://github.com/OpenRCT2/OpenRCT2.git: (39 commits)
  Fix part of OpenRCT2#7415: Korean scenario descriptions are mangled
  Add OpenRCT2#7882 to changelog [ci skip]
  Auto-detect RCT1 files location (OpenRCT2#7882)
  Tweak staff list name columns a little (OpenRCT2#7890)
  Merge Localisation/master into OpenRCT2/develop.
  Add Turkish translation
  Implement platform_get_locale_date_format for Linux
  Add OpenRCT2#7440 to changelog [ci skip]
  Remove the last usage of Math.hpp
  Remove Math::Clamp in favour of std::clamp
  Add OpenRCT2#7204 to changelog [ci skip]
  Remove some more strings
  Fix whitespace [ci skip]
  Remove more strings, fix error
  Remove many unused strings
  Scale mouse delta by zoom when using shift. (OpenRCT2#7868)
  Release memory from json_dumps and decrement references (OpenRCT2#7836)
  Fix OpenRCT2#7870: Tiny typo in console message (OpenRCT2#7879) [ci skip]
  Implement FootpathRemoveAction as a GameAction (OpenRCT2#7867)
  Fix OpenRCT2#7462: Guest window goes beyond the map edge on a spiral slide. (OpenRCT2#7752)
  ...

# Conflicts:
#	data/language/en-GB.txt
#	distribution/changelog.txt
#	src/openrct2/GameState.cpp
#	src/openrct2/localisation/StringIds.h
janisozaur added a commit that referenced this pull request Aug 26, 2018
- Feature: [#5993] Ride window prices can now be set via text input.
- Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks.
- Feature: [#7658] Add option to always use system file browsing window.
- Feature: [#7694] Debug option to visualize paths that the game detects as wide.
- Feature: [#7713] The virtual floor now takes land ownership rights into account.
- Feature: [#7771] Danish translation.
- Feature: [#7797, #7802, #7821, #7830] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish, Catalan and Romanian.
- Feature: [#7848] Add a master volume slider to audio options screen.
- Feature: [#7868] Placing scenery while holding shift now scales appropriately with zoom levels.
- Feature: [#7882] Auto-detect Steam and GOG installations of RCT1.
- Feature: [#7885] Turkish translation.
- Fix: [#3177] Wrong keys displayed in shortcut menu.
- Fix: [#4039] No sprite font glyph for German opening quotation mark.
- Fix: [#5548] platform_get_locale_date_format is not implemented for Linux.
- Fix: [#7204] Object source filters do not work for RCT1, AA and LL.
- Fix: [#7440] Memory leak. All system memory used.
- Fix: [#7462] Guest window goes beyond the map edge on a spiral slide.
- Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language.
- Fix: [#7628] Always-researched items can be modified in the inventory list.
- Fix: [#7643] No Money scenarios with funding set to zero.
- Fix: [#7653] Finances money spinner is too narrow for big loans.
- Fix: [#7673] Vehicle names are cut off in invention list.
- Fix: [#7674] Rides show up as random numbers in guest's ride list.
- Fix: [#7678] Crash when loading or starting a new game while having object selection window open.
- Fix: [#7683] 'Arbitrary ride type' dropdown state is shared between windows.
- Fix: [#7697] Some scenery groups in RCT1 saves are never invented.
- Fix: [#7711] Inverted Hairpin Coaster allows building invisible banked pieces.
- Fix: [#7734] Title sequence not included in macOS builds as of 0.2.0 release.
- Fix: [#7756] Steam RCT2 path not correctly checked on macOS and Linux.
- Fix: [#7765] Crash when opening ride list window on Windows Vista.
- Fix: [#7773] Once research has been completed, player is still charged for research.
- Fix: [#7786] Crash when importing a track design.
- Fix: [#7793] Duplicate private keys generated.
- Fix: [#7817] No sprite font glyph for interpunct.
- Fix: [#7823] You can build mazes in pause mode.
- Fix: [#7804] Russian ride descriptions are cut off.
- Fix: [#7872] CJK tooltips are often cut off.
- Fix: [#7895] Import of Mega Park and the RCT1 title music do not work on some RCT1 sources.
- Improved: [#7899] Timestamps in the load/save screen are now displayed using local timezone instead of GMT.
- Improved: [#7918] Better RCT2 detection if both disc and GOG/Steam versions are installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants