mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Fix GCC building (#702)
This commit is contained in:
@@ -36,15 +36,15 @@ lldiv_t lldiv(long long num, long long denom) {
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
u64 __lshrdi3(u64 u, unsigned int b) {
|
||||
__attribute__((optimize("O2"))) u64 __lshrdi3(u64 u, unsigned int b) {
|
||||
return u >> b;
|
||||
}
|
||||
|
||||
u64 __ashldi3(u64 u, unsigned int b) {
|
||||
__attribute__((optimize("O2"))) u64 __ashldi3(u64 u, unsigned int b) {
|
||||
return u << b;
|
||||
}
|
||||
|
||||
s64 __ashrdi3(s64 u, unsigned int b) {
|
||||
__attribute__((optimize("O2"))) s64 __ashrdi3(s64 u, unsigned int b) {
|
||||
return u >> b;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -10554,7 +10554,11 @@ void postrace_load(void) {
|
||||
gPostRace.unk0_s32++;
|
||||
return;
|
||||
}
|
||||
#ifdef AVOID_UB
|
||||
temp_a0 = gRaceResultsObjectIndices[gPostRace.unk0_s32 - 10];
|
||||
#else // This relies on the data laid out as is in memory, since the var itself is only 2 entries big.
|
||||
temp_a0 = D_800E0A10[gPostRace.unk0_s32];
|
||||
#endif
|
||||
if (temp_a0 == -1) {
|
||||
menu_imagegroup_load(gRaceResultsImageIndices);
|
||||
menu_racer_portraits();
|
||||
|
||||
Reference in New Issue
Block a user