Skip to content

Commit b9cd797

Browse files
committed
Fix build errors for 3DS platform, the 2nd
1 parent f17442a commit b9cd797

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/game_runtime_patches.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ namespace RuntimePatches::MonSca {
217217
return var_id;
218218
}
219219

220-
void ApplyScaling(Game_Enemy const& enemy, int& val, int var_id) {
220+
template<typename T>
221+
void ApplyScaling(Game_Enemy const& enemy, T& val, int var_id) {
221222
int mod = Main_Data::game_variables->Get(GetVariableId(enemy, var_id));
222223
if (mod == 0) {
223224
return;
@@ -230,7 +231,7 @@ namespace RuntimePatches::MonSca {
230231
}
231232
}
232233

233-
void RuntimePatches::MonSca::ModifyMaxHp(Game_Enemy const& enemy, int& val) {
234+
void RuntimePatches::MonSca::ModifyMaxHp(Game_Enemy const& enemy, int32_t& val) {
234235
#ifdef NO_RUNTIME_PATCHES
235236
// no-op
236237
(void)val;
@@ -241,7 +242,7 @@ void RuntimePatches::MonSca::ModifyMaxHp(Game_Enemy const& enemy, int& val) {
241242
}
242243
}
243244

244-
void RuntimePatches::MonSca::ModifyMaxSp(Game_Enemy const& enemy, int& val) {
245+
void RuntimePatches::MonSca::ModifyMaxSp(Game_Enemy const& enemy, int32_t& val) {
245246
#ifdef NO_RUNTIME_PATCHES
246247
// no-op
247248
(void)val;
@@ -252,7 +253,7 @@ void RuntimePatches::MonSca::ModifyMaxSp(Game_Enemy const& enemy, int& val) {
252253
}
253254
}
254255

255-
void RuntimePatches::MonSca::ModifyAtk(Game_Enemy const& enemy, int& val) {
256+
void RuntimePatches::MonSca::ModifyAtk(Game_Enemy const& enemy, int32_t& val) {
256257
#ifdef NO_RUNTIME_PATCHES
257258
// no-op
258259
(void)val;
@@ -263,7 +264,7 @@ void RuntimePatches::MonSca::ModifyAtk(Game_Enemy const& enemy, int& val) {
263264
}
264265
}
265266

266-
void RuntimePatches::MonSca::ModifyDef(Game_Enemy const& enemy, int& val) {
267+
void RuntimePatches::MonSca::ModifyDef(Game_Enemy const& enemy, int32_t& val) {
267268
#ifdef NO_RUNTIME_PATCHES
268269
// no-op
269270
(void)val;
@@ -274,7 +275,7 @@ void RuntimePatches::MonSca::ModifyDef(Game_Enemy const& enemy, int& val) {
274275
}
275276
}
276277

277-
void RuntimePatches::MonSca::ModifySpi(Game_Enemy const& enemy, int& val) {
278+
void RuntimePatches::MonSca::ModifySpi(Game_Enemy const& enemy, int32_t& val) {
278279
#ifdef NO_RUNTIME_PATCHES
279280
// no-op
280281
(void)val;
@@ -285,7 +286,7 @@ void RuntimePatches::MonSca::ModifySpi(Game_Enemy const& enemy, int& val) {
285286
}
286287
}
287288

288-
void RuntimePatches::MonSca::ModifyAgi(Game_Enemy const& enemy, int& val) {
289+
void RuntimePatches::MonSca::ModifyAgi(Game_Enemy const& enemy, int32_t& val) {
289290
#ifdef NO_RUNTIME_PATCHES
290291
// no-op
291292
(void)val;

src/game_runtime_patches.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ namespace RuntimePatches {
106106
} };
107107

108108
/** Scales an enemies's maximum HP stat, based on the value of variable V[1001] */
109-
void ModifyMaxHp(Game_Enemy const& enemy, int& val);
109+
void ModifyMaxHp(Game_Enemy const& enemy, int32_t& val);
110110
/** Scales an enemies's maximum SP stat, based on the value of variable V[1002] */
111-
void ModifyMaxSp(Game_Enemy const& enemy, int& val);
111+
void ModifyMaxSp(Game_Enemy const& enemy, int32_t& val);
112112
/** Scales an enemies's attack stat, based on the value of variable V[1003] */
113-
void ModifyAtk(Game_Enemy const& enemy, int& val);
113+
void ModifyAtk(Game_Enemy const& enemy, int32_t& val);
114114
/** Scales an enemies's defense stat, based on the value of variable V[1004] */
115-
void ModifyDef(Game_Enemy const& enemy, int& val);
115+
void ModifyDef(Game_Enemy const& enemy, int32_t& val);
116116
/** Scales an enemies's spirit stat, based on the value of variable V[1005] */
117-
void ModifySpi(Game_Enemy const& enemy, int& val);
117+
void ModifySpi(Game_Enemy const& enemy, int32_t& val);
118118
/** Scales an enemies's agility stat, based on the value of variable V[1006] */
119-
void ModifyAgi(Game_Enemy const& enemy, int& val);
119+
void ModifyAgi(Game_Enemy const& enemy, int32_t& val);
120120
/** Scales the experience points gained by defating an enemy, based on the value of variable V[1007] */
121121
void ModifyExpGained(Game_Enemy const& enemy, int& val);
122122
/** Scales the money gained by defating an enemy, based on the value of variable V[1008] */

0 commit comments

Comments
 (0)