create repository with functional basic implementation
This commit is contained in:
9
src/consts/colors.asm
Normal file
9
src/consts/colors.asm
Normal file
@@ -0,0 +1,9 @@
|
||||
pub const colors.black = 0b000_000_00
|
||||
pub const colors.blue = 0b000_000_11
|
||||
pub const colors.green = 0b000_111_00
|
||||
pub const colors.gray = 0b010_011_10
|
||||
pub const colors.red = 0b111_000_00
|
||||
pub const colors.pink = 0b111_000_11
|
||||
pub const colors.orange = 0b111_100_00
|
||||
pub const colors.yellow = 0b111_110_00
|
||||
pub const colors.white = 0b111_111_11
|
||||
17
src/consts/game.asm
Normal file
17
src/consts/game.asm
Normal file
@@ -0,0 +1,17 @@
|
||||
pub const game.direction_up = 0
|
||||
pub const game.direction_right = 1
|
||||
pub const game.direction_down = 2
|
||||
pub const game.direction_left = 3
|
||||
pub const game.direction_still = 4
|
||||
|
||||
; 1_000_000_000 nano second = 0x0000_0000_3B9A_CA00
|
||||
; pub const game.tick_duration_0 = 0xCA00
|
||||
; pub const game.tick_duration_1 = 0x3B9A
|
||||
; pub const game.tick_duration_2 = 0x0000
|
||||
; pub const game.tick_duration_3 = 0x0000
|
||||
|
||||
; 0.5 second = 500_000_000 nano second = 0x0000_0000_1DCD_6500
|
||||
pub const game.tick_duration_0 = 0x6500
|
||||
pub const game.tick_duration_1 = 0x1DCD
|
||||
pub const game.tick_duration_2 = 0x0000
|
||||
pub const game.tick_duration_3 = 0x0000
|
||||
12
src/consts/keyboard.asm
Normal file
12
src/consts/keyboard.asm
Normal file
@@ -0,0 +1,12 @@
|
||||
pub const keyboard.mask_key = 0x00FF
|
||||
pub const keyboard.mask_event = 0x0100
|
||||
|
||||
pub const keyboard.event_released = 0x0000
|
||||
pub const keyboard.event_pressed = 0x0100
|
||||
|
||||
pub const keyboard.key_min = 1
|
||||
pub const keyboard.key_up = 1
|
||||
pub const keyboard.key_right = 2
|
||||
pub const keyboard.key_down = 3
|
||||
pub const keyboard.key_left = 4
|
||||
pub const keyboard.key_max = 4
|
||||
10
src/consts/map.asm
Normal file
10
src/consts/map.asm
Normal file
@@ -0,0 +1,10 @@
|
||||
; map size 16x12 (or 15x11 with margins)
|
||||
pub const map.width = 15
|
||||
pub const map.height = 11
|
||||
pub const map.size = 165 ; 11*15
|
||||
pub const map.max_x = 14
|
||||
pub const map.max_y = 10
|
||||
|
||||
pub const map.tiles.empty = 0
|
||||
pub const map.tiles.wall = 1
|
||||
pub const map.tiles.coin = 2
|
||||
16
src/consts/offsets.asm
Normal file
16
src/consts/offsets.asm
Normal file
@@ -0,0 +1,16 @@
|
||||
;const free_ram_start = 8000
|
||||
|
||||
pub const offsets.screen = 8000 ; screen size: 80x60 = 4800
|
||||
|
||||
pub const offsets.tick_duration_high = 12800
|
||||
pub const offsets.tick_duration_low = 12804
|
||||
pub const offsets.next_tick_high = 12808
|
||||
pub const offsets.next_tick_low = 128012
|
||||
|
||||
|
||||
; State:
|
||||
; U8 x coord
|
||||
; U8 y coord
|
||||
; U8 direction
|
||||
pub const offsets.state_robot = 12816
|
||||
pub const offsets.state_ghost = 12819
|
||||
8
src/consts/scene.asm
Normal file
8
src/consts/scene.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
; given:
|
||||
; - 16x12 tiles map
|
||||
; - 5x5 pixels tile
|
||||
|
||||
pub const scene.margin_top = 2
|
||||
pub const scene.margin_bottom = 3
|
||||
pub const scene.margin_left = 2
|
||||
pub const scene.margin_right = 3
|
||||
26
src/consts/screen.asm
Normal file
26
src/consts/screen.asm
Normal file
@@ -0,0 +1,26 @@
|
||||
; Screen pixel mode (settings #0)
|
||||
; 0: ASCII 8
|
||||
; 1: ASCII 24
|
||||
; 2: Pixel 8
|
||||
; 3: Pixel 24
|
||||
|
||||
; While in mode #2 (Pixel 8)
|
||||
; Screen memory offset (settings #1)
|
||||
; Screen resolutions (settings #2)
|
||||
; 0. 80x60
|
||||
; 1. 160x120
|
||||
; 2. 256x192
|
||||
; 3. 320x240
|
||||
; 4. 640x480
|
||||
; 5. 800x600
|
||||
; 6. 920x720
|
||||
; 7. 1024x768
|
||||
|
||||
pub const screen.mode_index = 0
|
||||
pub const screen.mode_value = 2
|
||||
pub const screen.offset_index = 1
|
||||
pub const screen.resolution_index = 2
|
||||
pub const screen.resolution_value = 0
|
||||
|
||||
pub const screen.width = 80
|
||||
pub const screen.height = 60
|
||||
18
src/consts/sprites.asm
Normal file
18
src/consts/sprites.asm
Normal file
@@ -0,0 +1,18 @@
|
||||
pub const sprites.width = 5
|
||||
pub const sprites.height = 5 ; unused as sprite are all square
|
||||
pub const sprites.size = 25 ; height x width
|
||||
|
||||
pub const sprites.rotation_0 = 0
|
||||
pub const sprites.rotation_90 = 1
|
||||
pub const sprites.rotation_180 = 2
|
||||
pub const sprites.rotation_270 = 3
|
||||
|
||||
pub const sprites.empty = 0
|
||||
pub const sprites.unimplemented = 1
|
||||
pub const sprites.wall_end = 2
|
||||
pub const sprites.wall_straight = 3
|
||||
pub const sprites.wall_corner = 4
|
||||
pub const sprites.robot = 5
|
||||
pub const sprites.ghost = 6
|
||||
pub const sprites.coin = 7
|
||||
pub const sprites.max = 7 ; for lookup table
|
||||
Reference in New Issue
Block a user