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

Change types from int to int32_t where necessary for liblcf compat #1326

Merged
merged 1 commit into from Jan 24, 2018

Conversation

Projects
None yet
3 participants
@Ghabry
Member

Ghabry commented Jan 1, 2018

Required for EasyRPG/liblcf#222

Only required on Wii, Vita and 3DS.

Didn't break Color, tone change still works.

@@ -108,12 +108,12 @@ int Game_Party::GetItemCount(int item_id, bool get_equipped) {
void Game_Party::GainGold(int n) {
data.gold = data.gold + n;
data.gold = std::min(std::max(data.gold, 0), 999999);
data.gold = std::min(std::max(data.gold, (int32_t)0), (int32_t)999999);

This comment has been minimized.

@carstene1ns

carstene1ns Jan 18, 2018

Member

These casts look ugly. min/max can use the common type of the arguments, but needs explicit type then, i.e. max<int32_t>(some, value);, maybe that is better.

This comment has been minimized.

@Ghabry

Ghabry Jan 24, 2018

Member

Thanks, changed this.

Change types from int to int32_t in some cases of accessing liblcf to…
… prevent compiler errors when a newlib version is used where int32_t is not int.

@carstene1ns carstene1ns merged commit ef31b10 into EasyRPG:master Jan 24, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GCW0 Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details

@carstene1ns carstene1ns added this to the 0.5.4 milestone Mar 9, 2018

@Ghabry Ghabry deleted the Ghabry:newlib-int-type branch May 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment