From 149020464517ff3d021eef5ccd50d3939ad463e6 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 24 Oct 2023 17:40:19 +0200 Subject: Lay out a proper structure for the project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's divide things by topic instead of a broad "examples" directory. This will allow for simple files to co-exist together with full-blown projects. Signed-off-by: Miquel Sabaté Solà --- space/src/states/game.s | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 space/src/states/game.s (limited to 'space/src/states/game.s') diff --git a/space/src/states/game.s b/space/src/states/game.s new file mode 100644 index 0000000..ca8a49b --- /dev/null +++ b/space/src/states/game.s @@ -0,0 +1,21 @@ +.scope Game + ;; Contains relevant flags for the execution of the game: + ;; - 7: set to 1 whenever the game logic is over and we can start + ;; rendering; set to 0 when rendering is done. + ;; - 6-0: unused. + flags = $20 +.endscope + +;; SET_RENDER_FLAG sets the render bit on Game::flags to 1. +.macro SET_RENDER_FLAG + lda #%10000000 + ora Game::flags + sta Game::flags +.endmacro + +;; UNSET_RENDER_FLAG sets the render bit on Game::flags to 0. +.macro UNSET_RENDER_FLAG + lda #%01111111 + and Game::flags + sta Game::flags +.endmacro -- cgit v1.2.3