Skip to content

Commit

Permalink
Slowd down screen scale/offset.
Browse files Browse the repository at this point in the history
  • Loading branch information
wavemotion-dave committed Jun 5, 2021
1 parent bd51642 commit 02cfa1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Binary file modified A7800DS.nds
Binary file not shown.
23 changes: 14 additions & 9 deletions arm9/source/a7800utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ void dsMainLoop(void)
unsigned int keys_pressed,keys_touch=0, romSel;
int iTx,iTy;
static int dampen = 0;
static int scale_screen_dampen=0;

// Timers are fed with 33.513982 MHz clock.
// With DIV_1024 the clock is 32,728.5 ticks per sec...
Expand Down Expand Up @@ -906,15 +907,19 @@ void dsMainLoop(void)
if (keys_pressed & KEY_A) lcdSwap();
}
}
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_UP)) { cartridge_yOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_DOWN)) { cartridge_yOffset--; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_LEFT)) { cartridge_xOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_RIGHT)) { cartridge_xOffset--; bRefreshXY = true; }

if ((keys_pressed & KEY_L) && (keys_pressed & KEY_UP)) if (cartridge_yScale <= 256) { cartridge_yScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_DOWN)) if (cartridge_yScale >= 192) { cartridge_yScale--; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_RIGHT)) if (cartridge_xScale < 320) { cartridge_xScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_LEFT)) if (cartridge_xScale >= 192) { cartridge_xScale--; bRefreshXY = true; }
if (scale_screen_dampen > 5)
{
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_UP)) { cartridge_yOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_DOWN)) { cartridge_yOffset--; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_LEFT)) { cartridge_xOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_RIGHT)) { cartridge_xOffset--; bRefreshXY = true; }

if ((keys_pressed & KEY_L) && (keys_pressed & KEY_UP)) if (cartridge_yScale <= 256) { cartridge_yScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_DOWN)) if (cartridge_yScale > 192) { cartridge_yScale--; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_RIGHT)) if (cartridge_xScale < 320) { cartridge_xScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_LEFT)) if (cartridge_xScale > 192) { cartridge_xScale--; bRefreshXY = true; }
scale_screen_dampen=0;
} else scale_screen_dampen++;
} else lcd_swap_counter=0;

// -------------------------------------------------------------
Expand Down

0 comments on commit 02cfa1c

Please sign in to comment.