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

Android #5611

Merged
merged 6 commits into from
Jun 19, 2017
Merged

Android #5611

merged 6 commits into from
Jun 19, 2017

Conversation

marijnvdwerf
Copy link
Contributor

@IntelOrca Can you go over everything that needs to be moved?

@IntelOrca
Copy link
Contributor

IntelOrca commented Jun 14, 2017

What you have done so far looks alright.

@@ -19,6 +19,7 @@ extern "C"
#include "../platform/platform.h"
}

#include <android/log.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What should we do with the console? Android doesn't have stdout/stderr. Just discard the changes and not have it in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Having them go to android logs is nice in case we need to debug something. Looks like that already is the case, so why can't it stay as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I replaced the stderr/stdout calls unconditionally.

Copy link
Member

@Gymnasiast Gymnasiast Jun 14, 2017

Choose a reason for hiding this comment

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

Revert but create an issue for it, so it can be done later on? At this point it's probably best to get this humongous thing in first, then improve stuff like this.

@@ -0,0 +1,90 @@
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
Copy link
Member

Choose a reason for hiding this comment

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

2017


int SDL_main(int argc, char *argv[]) {
return main(argc, argv);
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed for Android?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. SDL does some magic to rename the main function, but I had to disable that to get it to build as a static library iirc.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see. You will need to put the brace onto its own line, though.

@@ -195,6 +195,12 @@ uint8 platform_get_currency_value(const char *currCode) {
return CURRENCY_POUNDS;
}

#ifndef __ANDROID__
float platform_get_default_scale() {
return 1;
Copy link
Member

Choose a reason for hiding this comment

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

Should this not be return 1.0f?

Copy link
Member

Choose a reason for hiding this comment

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

this is implicit in C

@@ -38,6 +38,8 @@ typedef struct ride_group {
#ifdef __cplusplus
interface IRideGroupManager
{
virtual ~IRideGroupManager() { }
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to go in develop.

@marijnvdwerf
Copy link
Contributor Author

I don't understand why appveyor is failing

@IntelOrca
Copy link
Contributor

Guard your static_assert addition in common.h from Windows builds.

@marijnvdwerf
Copy link
Contributor Author

CIs are green. @IntelOrca and @janisozaur can you go over this and see what needs to be changed still?

@janisozaur
Copy link
Member

I will take a look over the weekend.


include(ExternalProject)
ExternalProject_Add(libs
URL https://github.com/marijnvdwerf/openrct2-dependencies-android/releases/download/v0.7/openrct2-libs-android-${ANDROID_ABI}.zip
Copy link
Member

Choose a reason for hiding this comment

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

Can you transfer ownership of this repo to OpenRCT2 organisation?

@janisozaur
Copy link
Member

janisozaur commented Jun 16, 2017

Can't you symlink src/openrct2-android/app/src/main/res/drawable-mdpi/logo_icon.png and src/openrct2-android/app/src/main/res/drawable-mdpi/logo_text.png and src/openrct2-android/app/src/main/res/mipmap-*/ic_launcher.png ?

//int mbtowc(wchar_t *__restrict pwc, const char *__restrict s, size_t n) {
// static mbstate_t mbs;
// size_t rval;
// if (s == NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove this commented out part.

@marijnvdwerf
Copy link
Contributor Author

@janisozaur Does symlinking work for Windows as well?

@Gymnasiast
Copy link
Member

@marijnvdwerf Windows supports symlinks (called junctions). Not 100% sure if Git for Windows does, but that does seem likely to me.

@IntelOrca
Copy link
Contributor

Unlikely as on Windows you need to have elevated privileges to create them.

@marijnvdwerf
Copy link
Contributor Author

I can also just remove the images for now

@IntelOrca
Copy link
Contributor

IntelOrca commented Jun 16, 2017

Could you copy them in the build script? Maybe have Gradle do it?

@marijnvdwerf
Copy link
Contributor Author

You probably can, but I find it hard to understand Gradle scripting. Once this is in, it should be easier for Android developers to help out with that.

@janisozaur
Copy link
Member

I looked into how git handles symlinks on Windows and it's all a mess. I'm fine with the images staying as they are, due to this technical restriction. I'll resume reviewing later on.

Copy link
Member

@janisozaur janisozaur left a comment

Choose a reason for hiding this comment

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

The only thing that might require fixing that I found is using spaces instead of tabs

@Gymnasiast Gymnasiast merged commit 9c3a16b into develop Jun 19, 2017
@IntelOrca IntelOrca deleted the android branch July 12, 2017 14:00
janisozaur added a commit that referenced this pull request Jul 12, 2017
- Feature: [#1399 (partial), #5177] Add window that displays any missing/corrupt objects when loading a park
- Feature: [#5056] Add cheat to own all land.
- Feature: [#5133] Add option to display guest expenditure (as seen in RCTC).
- Feature: [#5196] Add cheat to disable ride ageing.
- Feature: [#5504] Group vehicles into ride groups
- Feature: [#5576] Add a persistent 'display real names of guests' setting.
- Feature: [#5611] Add support for Android
- Feature: [#5706] Add support for OpenBSD
- Feature: OpenRCT2 now starts up on the display it was last shown on.
- Feature: Park entrance fee can now be set to amounts up to £200.
- Improved: Construction rights can now be placed on park entrances.
- Improved: Mouse can now be dragged to select scenery when saving track designs
- Fix: [#259] Money making glitch involving swamps (original bug)
- Fix: [#441] Construction rights over entrance path erased (original bug)
- Fix: [#578] Ride ghosts show up in ride list during construction (original bug)
- Fix: [#597] 'Finish 5 roller coasters' goal not properly checked (original bug)
- Fix: [#667] Incorrect banner limit calculation (original bug)
- Fix: [#739] Crocodile Ride (Log Flume) never allows more than five boats (original bug)
- Fix: [#837] Can't move windows on title screen to where the toolbar would be (original bug)
- Fix: [#1705] Time Twister's Medieval entrance has incorrect scrolling (original bug)
- Fix: [#3178, #5456] Paths with non-ASCII characters not handled properly on macOS.
- Fix: [#3346] Crash when extra long train breaks down at the back
- Fix: [#3479] Building in pause mode creates too many floating numbers, crashing the game
- Fix: [#3565] Multiplayer server crash
- Fix: [#3681] Steel Twister rollercoaster always shows all track designs
- Fix: [#3846, #5749] Crash when testing coaster with a diagonal lift in block brake mode
- Fix: [#4054] Sorting rides by track type: Misleading research messages
- Fix: [#4055] Sort rides by track type: Sorting rule is not really clear (inconsistent?)
- Fix: [#4512] Invisible map edge tiles corrupted
- Fix: [#5009] Ride rating calculations can overflow
- Fix: [#5253] RCT1 park value conversion factor too high
- Fix: [#5400] New Ride window does not focus properly on newly invented ride.
- Fix: [#5489] Sprite index crash for car view on car ride.
- Fix: [#5730] Unable to uncheck 'No money' in the Scenario Editor.
- Fix: [#5750] Game freezes when ride queue linked list is corrupted.
- Fix: [#5819] Vertical multi-dimension coaster tunnels drawn incorrectly
- Fix: Non-invented vehicles can be used via track designs in select-by-track-type mode.
- Fix: Track components added by OpenRCT2 are now usable in older scenarios.
- Technical: [#5047] Add ride ratings tests
- Technical: [#5458] Begin offering headless build with reduced compile- and run-time dependencies
- Technical: [#5755] Title sequence wait periods use milliseconds
- Technical: Fix many desync sources
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