2020-09-15 12:57:10 +00:00
|
|
|
#if VERBOSE = 1
|
|
|
|
LASTINIT SET .
|
|
|
|
#endif
|
|
|
|
|
2020-04-02 14:17:48 +00:00
|
|
|
; Initialized variables
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
; Intro counter
|
|
|
|
introCounter:
|
|
|
|
BYTE #$4
|
|
|
|
|
|
|
|
; Intro string x position, and next increment
|
|
|
|
introX:
|
|
|
|
BYTE #$0
|
|
|
|
introXinc:
|
|
|
|
BYTE #$1
|
|
|
|
|
2020-04-08 07:15:25 +00:00
|
|
|
; Delay
|
|
|
|
delay:
|
2020-04-02 14:17:48 +00:00
|
|
|
BYTE #$ff
|
|
|
|
|
2018-09-14 13:58:31 +00:00
|
|
|
; Costants
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
; Status of the game (costants pre-processor defined, sort of enum)
|
2020-04-02 14:17:48 +00:00
|
|
|
ST_INTRO0 = 0
|
|
|
|
ST_INTRO1 = 1
|
2021-04-13 21:19:47 +00:00
|
|
|
ST_INTRO2 = 2
|
|
|
|
ST_INTRO3 = 3
|
|
|
|
ST_INTRO4 = 4
|
|
|
|
ST_MENURESET = 64
|
|
|
|
ST_MENU = 65
|
|
|
|
ST_LEVEL_TITLE = 128
|
|
|
|
ST_LEVEL_LOAD = 129
|
|
|
|
ST_PLAY = 130
|
|
|
|
ST_DELAY = 131
|
|
|
|
ST_END = 132
|
2020-04-02 14:17:48 +00:00
|
|
|
ST_PAUSE = 255
|
2018-09-14 13:58:31 +00:00
|
|
|
|
|
|
|
; Screen features
|
|
|
|
SCREEN_W = 40
|
|
|
|
SCREEN_H = 24
|
2020-04-06 20:53:28 +00:00
|
|
|
|
|
|
|
; Tiles
|
|
|
|
; -----
|
2021-04-12 21:28:34 +00:00
|
|
|
EMPTY_TILE = $e0
|
|
|
|
SNAKE_TILE = $e1
|
|
|
|
FOOD_TILE = $e2
|
|
|
|
WALL_TILE = $e3
|
2020-04-06 20:53:28 +00:00
|
|
|
|
|
|
|
; Tiles colors
|
|
|
|
; Note: these colors will be picked by the level select routine
|
|
|
|
; thus their order must match those of the values assigned to tiles
|
|
|
|
tilesColors:
|
|
|
|
EMPTY_COLOR:
|
|
|
|
BYTE $0
|
|
|
|
SNAKE_COLOR:
|
|
|
|
BYTE $d
|
|
|
|
FOOD_COLOR:
|
|
|
|
BYTE $a
|
|
|
|
WALL_COLOR:
|
|
|
|
BYTE $8
|
2018-09-14 13:58:31 +00:00
|
|
|
|
|
|
|
; Strings
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
gameoverString:
|
|
|
|
BYTE "GAME IS OVER"
|
|
|
|
BYTE #0
|
|
|
|
intro0string:
|
|
|
|
#if SYSTEM = 64
|
|
|
|
BYTE " SNAKE BY GIOMBA "
|
|
|
|
#else
|
|
|
|
BYTE " SNAKE16 BY GIOMBA "
|
|
|
|
#endif
|
|
|
|
BYTE #0
|
|
|
|
intro1string:
|
|
|
|
BYTE " PRESS SPACE TO PLAY "
|
|
|
|
BYTE #0
|
|
|
|
intro2string:
|
|
|
|
BYTE "RETROFFICINA.GLGPROGRAMS.IT"
|
|
|
|
BYTE #0
|
|
|
|
intro3string:
|
|
|
|
#if DEBUG = 1
|
|
|
|
BYTE "DBG RELS"
|
|
|
|
#else
|
2021-04-13 21:19:47 +00:00
|
|
|
BYTE "2017 (C) 2021"
|
2018-09-14 13:58:31 +00:00
|
|
|
#endif
|
|
|
|
BYTE #0
|
2020-04-08 07:15:25 +00:00
|
|
|
levelIntroString:
|
|
|
|
BYTE "NEXT LEVEL"
|
|
|
|
BYTE #0
|
2018-09-14 13:58:31 +00:00
|
|
|
colorshade: ; a gradient of dark-bright-dark (40 columns)
|
|
|
|
HEX 0b 0b 0b 0b 0b 0c 0c 0c 0c 0c 05 05 05 0d 0d 0d 0d 07 07 07 07 07 07 0d 0d 0d 0d 05 05 05 0c 0c 0c 0c 0c 0b 0b 0b 0b 0b
|
|
|
|
scoreString:
|
2020-04-08 08:54:54 +00:00
|
|
|
BYTE "SCORE PART"
|
2018-09-14 13:58:31 +00:00
|
|
|
BYTE #0
|
2020-04-08 09:36:18 +00:00
|
|
|
noMoreLevelsString:
|
|
|
|
BYTE "NO MORE LEVELS"
|
|
|
|
BYTE #0
|
2021-04-13 21:19:47 +00:00
|
|
|
introStringA1:
|
|
|
|
BYTE "RETROFFICINA"
|
|
|
|
BYTE #$0
|
|
|
|
introStringA2:
|
|
|
|
BYTE "AND"
|
|
|
|
BYTE #$0
|
|
|
|
introStringA3:
|
|
|
|
BYTE "GIOMBA"
|
|
|
|
BYTE #$0
|
2018-09-14 13:58:31 +00:00
|
|
|
|
2020-04-02 14:17:48 +00:00
|
|
|
; Levels
|
|
|
|
; ----------------------------------------------------------------------
|
|
|
|
levelsList:
|
|
|
|
INCBIN "../res.bin/levels.bin"
|
|
|
|
|
2020-09-15 12:57:10 +00:00
|
|
|
#if VERBOSE = 1
|
|
|
|
ECHO "initdata.asm @ ",LASTINIT,"len:",(. - LASTINIT)
|
2021-04-12 21:28:34 +00:00
|
|
|
#endif
|