Skip to content

Commit

Permalink
Updating README and making diagonal scrolling a compile-time option
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed May 26, 2024
1 parent 5a33f43 commit c49630e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ collection.
4. **Disc Colors**:
- 10 different stone colors to choose from

5. **Input controls**
- Keyboard
- Joystick
- Mouse

## Othello Rules

Othello, also known as Reversi, is a two-player strategy board game played on an
Expand Down
Binary file modified img/cx16-othello.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@

#define RAMBANK (*(uint8_t*)0)

#define SCROLL_BACKGROUND 1

#endif // _CONSTANTS_H
2 changes: 2 additions & 0 deletions src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,15 @@ void clear_foreground() {
*
*/
void update_background_diagonal() {
#if SCROLL_BACKGROUND == 1
clock_t curtick = clock();

if(((curtick - prevtick) * 1000 / CLOCKS_PER_SEC) > 30) {
prevtick = curtick;
VERA.layer0.hscroll = (VERA.layer0.hscroll - 1) % 16;
VERA.layer0.vscroll = (VERA.layer0.vscroll - 1) % 16;
}
#endif
}

/**
Expand Down

0 comments on commit c49630e

Please sign in to comment.