Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (pauseCtx->stickAdjX < -30) {
- if (sStickXRepeatState == -1) {
- sStickXRepeatTimer--;
- if (sStickXRepeatTimer < 0) {
- sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY; // 2 frames
- } else {
- pauseCtx->stickAdjX = 0;
- }
- } else {
- sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST; // 10 frames
- sStickXRepeatState = -1;
- }
- } else if (pauseCtx->stickAdjX > 30) {
- if (sStickXRepeatState == 1) {
- sStickXRepeatTimer--;
- if (sStickXRepeatTimer < 0) {
- sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
- } else {
- pauseCtx->stickAdjX = 0;
- }
- } else {
- sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
- sStickXRepeatState = 1;
- }
- } else {
- sStickXRepeatState = 0;
- }
- if (pauseCtx->stickAdjY < -30) {
- if (sStickYRepeatState == -1) {
- sStickYRepeatTimer--;
- if (sStickYRepeatTimer < 0) {
- sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
- } else {
- pauseCtx->stickAdjY = 0;
- }
- } else {
- sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
- sStickYRepeatState = -1;
- }
- } else if (pauseCtx->stickAdjY > 30) {
- if (sStickYRepeatState == 1) {
- sStickYRepeatTimer--;
- if (sStickYRepeatTimer < 0) {
- sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
- } else {
- pauseCtx->stickAdjY = 0;
- }
- } else {
- sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
- sStickYRepeatState = 1;
- }
- } else {
- sStickYRepeatState = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement