diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2023-11-23 09:38:46 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-02-04 21:02:11 +0100 |
| commit | 0e1839f48ada69b81f5879449d0e0fe435f851c5 (patch) | |
| tree | ef287b4539e2f066b509a467d19b0590048ba00e /space/src/space.s | |
| parent | c131ed635342a724687755844a54031e026700ac (diff) | |
| download | code.nes-0e1839f48ada69b81f5879449d0e0fe435f851c5.tar.gz code.nes-0e1839f48ada69b81f5879449d0e0fe435f851c5.zip | |
space: Improve comments and documentation
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'space/src/space.s')
| -rw-r--r-- | space/src/space.s | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/space/src/space.s b/space/src/space.s index f2c5dbe..c6d431f 100644 --- a/space/src/space.s +++ b/space/src/space.s @@ -5,7 +5,7 @@ ;; - The movement is done through subpixels for a smoother experience. ;; - The ship's sprites are updated accordingly: resting, acceleration, full ;; speed. -;; - The ship can shoot +;; - The ship can shoot bullets. ;; ;; The subpixel movement is largely based on: ;; https://github.com/NesHacker/PlatformerMovement. @@ -45,8 +45,8 @@ .include "vectors/irq.s" ;;; -;; This is our main subroutine, the reset procedure will call at the very end of -;; initializing the hardware. +;; This is our main subroutine, the reset procedure will call it at the very end +;; of initializing the hardware. ;;; .proc main ;; Before starting the game loop proper we initialize all our assets: load @@ -69,6 +69,10 @@ sta PPU::MASK @main_game_loop: + ;; The main game loop leverages the logic to different subroutines. In + ;; short: first of all update the values on the joypad, then update the + ;; player's movement and sprites, and finally update the bullets' + ;; creation/movement. jsr Joypad::read jsr Player::Movement::update jsr Player::Sprite::update |
