-
Notifications
You must be signed in to change notification settings - Fork 1
/
const.inc
52 lines (42 loc) · 1.28 KB
/
const.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
;*************************************************
; Game constants and templates *
;*************************************************
;=================================================
; Constants
;=================================================
SCREEN_WIDTH = 320
SCREEN_HEIGHT = 200
SCREEN_RESOLUTION = SCREEN_WIDTH * SCREEN_HEIGHT
CELL_SIZE = 10 ; Width and height of one draw cell
VELOCITY_X = 10
VELOCITY_Y = 10
COLOR_CYAN = 00000011b
COLOR_RED = 00000100b
COLOR_GREEN = 00001010b
COLOR_PINK = 00111110b
VIDEO_SERVICE = 10h
INT10_SET_MODE = 00h
INT10_SCROLL_UP = 06h
INT10_SET_COLOR_PALETTE = 0Bh
INT10_WRITE_PIXEL = 0Ch
INT10_WRITE_STRING = 13h
INT10_GET_MODE = 0Fh
KEYBOARD_SERVICE = 16h
INT16_READ_CHAR = 00h
INT16_KEY_STATUS = 01h
SYSTEM_SERVICE = 21h
INT21_GET_SYSTEM_TIME = 2Ch
INT21_EXIT_PROGRAM = 4Ch
;=================================================
; Templates
;=================================================
Cell struc
pos_x dw 0
pos_y dw 0
Cell ends
Settings struc
score dw 0
game_ended db 0
; -1 - None, 0 - left, 1 - right, 2 - top, 3 - bottom
snake_direction db -1
Settings ends