forked from Ports/perfect_dark
fix whitespace issues
This commit is contained in:
1 parent
272b28b6a9
commit
1a7458a290
3 files changed
+22
-22
No files matched your search
+1
-1
@@ -480,7 +480,7 @@ static inline s32 inputAxisScale(s32 x, const s32 deadzone, const f32 scale)
|
||||
if (abs(x) < deadzone) {
|
||||
return 0;
|
||||
} else {
|
||||
// rescale to fit the non-deadzone range
|
||||
// rescale to fit the non-deadzone range
|
||||
if (x < 0) {
|
||||
x += deadzone;
|
||||
} else {
|
||||
|
||||
+19
-19
@@ -68,21 +68,21 @@ void amTick(void)
|
||||
g_AmMenus[g_AmIndex].allbots = false;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
if (j == 0 && g_Vars.currentplayernum == 0 && inputMouseIsLocked()) {
|
||||
f32 mdx, mdy;
|
||||
struct activemenu *am = &g_AmMenus[g_AmIndex];
|
||||
inputMouseGetScaledDelta(&mdx, &mdy);
|
||||
if (mdx || mdy) {
|
||||
am->mousex += mdx * 4.f;
|
||||
am->mousey += mdy * 4.f;
|
||||
am->mousex = (am->mousex > 127.f) ? 127.f : (am->mousex < -128.f) ? -128.f : am->mousex;
|
||||
am->mousey = (am->mousey > 127.f) ? 127.f : (am->mousey < -128.f) ? -128.f : am->mousey;
|
||||
}
|
||||
const s32 newstickx = (s32)cstickx + (s32)am->mousex;
|
||||
const s32 newsticky = (s32)csticky - (s32)am->mousey;
|
||||
cstickx = (newstickx < -128) ? -128 : (newstickx > 127) ? 127 : newstickx;
|
||||
csticky = (newsticky < -128) ? -128 : (newsticky > 127) ? 127 : newsticky;
|
||||
}
|
||||
if (j == 0 && g_Vars.currentplayernum == 0 && inputMouseIsLocked()) {
|
||||
f32 mdx, mdy;
|
||||
struct activemenu *am = &g_AmMenus[g_AmIndex];
|
||||
inputMouseGetScaledDelta(&mdx, &mdy);
|
||||
if (mdx || mdy) {
|
||||
am->mousex += mdx * 4.f;
|
||||
am->mousey += mdy * 4.f;
|
||||
am->mousex = (am->mousex > 127.f) ? 127.f : (am->mousex < -128.f) ? -128.f : am->mousex;
|
||||
am->mousey = (am->mousey > 127.f) ? 127.f : (am->mousey < -128.f) ? -128.f : am->mousey;
|
||||
}
|
||||
const s32 newstickx = (s32)cstickx + (s32)am->mousex;
|
||||
const s32 newsticky = (s32)csticky - (s32)am->mousey;
|
||||
cstickx = (newstickx < -128) ? -128 : (newstickx > 127) ? 127 : newstickx;
|
||||
csticky = (newsticky < -128) ? -128 : (newsticky > 127) ? 127 : newsticky;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->activemenumode == AMMODE_EDIT) {
|
||||
@@ -360,10 +360,10 @@ void amTick(void)
|
||||
}
|
||||
}
|
||||
#ifndef PLATFORM_N64
|
||||
else {
|
||||
g_AmMenus[g_AmIndex].mousex = 0.f;
|
||||
g_AmMenus[g_AmIndex].mousey = 0.f;
|
||||
}
|
||||
else {
|
||||
g_AmMenus[g_AmIndex].mousex = 0.f;
|
||||
g_AmMenus[g_AmIndex].mousey = 0.f;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->activemenumode != AMMODE_EDIT) {
|
||||
|
||||
+2
-2
@@ -4308,8 +4308,8 @@ struct activemenu {
|
||||
/*0x34*/ s8 origscreennum; // original screen number before using allbots
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
/* */ f32 mousex;
|
||||
/* */ f32 mousey;
|
||||
/* */ f32 mousex;
|
||||
/* */ f32 mousey;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user