diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-12 23:36:49 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-12 23:36:49 +0100 |
commit | a20b308cfe92a8bb47c6896e7fdb24b15c2efd59 (patch) | |
tree | 22a38850ea38dc91f02095101192061aaafbc30d /game/main.asm | |
parent | 8eec2f91339b8f06e1b80c49c976a9d9ac6e01f7 (diff) | |
download | tr8vm-a20b308cfe92a8bb47c6896e7fdb24b15c2efd59.tar.gz tr8vm-a20b308cfe92a8bb47c6896e7fdb24b15c2efd59.zip |
Add player bullets
Also a changes in the entity system:
- don't preserve the BG (always erase black)
- skip unused entities
- fix in the reserved size (and entity is 8 bytes)
- allocate new entities
Diffstat (limited to 'game/main.asm')
-rw-r--r-- | game/main.asm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/game/main.asm b/game/main.asm index 8373f37..365e381 100644 --- a/game/main.asm +++ b/game/main.asm @@ -61,7 +61,7 @@ game_loop: ; Setup the game after the menu ; init_game: - halt + call entities_init ; set player initial coordinates ld x, <player_coord @@ -75,6 +75,8 @@ init_game: ld y, 104 ld [a : x], y + halt + call clear_screen call entities_draw @@ -252,6 +254,7 @@ int_handler: .include "starfield.asm" .include "entities.asm" .include "player.asm" +.include "bullet.asm" ; ; entity data @@ -268,7 +271,7 @@ player_coord: .dw player_update ; 16 entities - .ds 112, 0 + .ds 128, 0 ; end of list .db ET_END @@ -276,6 +279,8 @@ player_coord: ; sprite data player_sprite: .incpng "assets/player.png" +pbullet_sprite: + .incpng "assets/pbullet.png" ; starfield data stars: |