constants.asm
ReinUsesLisp_celeste-nes/constants.asm
;;; Registers
PPUCTRL = $2000
PPUMASK = $2001
PPUSTATUS = $2002
OAMADDR = $2003
OAMDATA = $2004
PPUSCROLL = $2005
PPUADDR = $2006
PPUDATA = $2007
OAMDMA = $4014
	
APU_SQUARE1 = $4000
APU_SQUARE2 = $4004
APU_TRIANGLE = $4008
APU_NOISE = $400C
APU_DMC = $4010
APU_STATUS = $4015
APU_FRAME_COUNTER = $4017	

;; Enable NMI, sprites from Pattern Table 0, background from Pattern Table 1
PPU_CONTROL_FLAGS = %10001000

;; Enable sprites, enable background, no clipping on left side
PPU_MASK_FLAGS = %00011110

;;; Player
PLAYER_SPEED_PLUS  = $1A
PLAYER_SPEED_MINUS = $E6
MAX_DJUMP          = $01

;;; Tiles
TILE_SOLIDS = $25
TILE_SPIKES_BOT = 37
TILE_BREAKABLE = $20

;;; Object IDs
STRAWBERRY = $01
FLY_STRAWBERRY = $02
CHEST = $03
KEY = $04
JEWEL = $05
	
;;; Draw
DRAW_Y = $00
DRAW_TILE = $01
DRAW_ATTR = $02
DRAW_X = $03
	
SLOT_BODY = $0200		; 4
SLOT_BACK_HAIR = $0210		; 1
SLOT_HAIR = $0214		; 4
SLOT_SMOKE = $0224		; 4
SLOT_SNOWFLAKES = $0234		; 16
SLOT_STRAWBERRY = $0274		; 12

SLOT_BODY_TL = SLOT_BODY
SLOT_BODY_TR = SLOT_BODY+4
SLOT_BODY_BL = SLOT_BODY+8
SLOT_BODY_BR = SLOT_BODY+12

SLOT_HAIR0 = SLOT_HAIR+$00
SLOT_HAIR1 = SLOT_HAIR+$04
SLOT_HAIR2 = SLOT_HAIR+$08
SLOT_HAIR3 = SLOT_HAIR+$0C
	
SLOT_KEY = SLOT_STRAWBERRY	 ; 4
SLOT_CHEST = SLOT_STRAWBERRY+$10 ; 4

;;; Physics
MAX_RUN           = $0120
NORMAL_ACCEL      = $30
AIR_ACCEL         = $18
NORMAL_DEACCEL    = $1D
MAXFALL           = $0180
GLIDE_MAXFALL     = $0080
GRAVITY           = $0020
HALF_GRAVITY      = $0010
SLOW_SPEED        = $40	
JUMP_SPEED        = $01E0
WALL_JUMP_SPEED_X = $0200
WALL_JUMP_SPEED_Y = $01E0
FULL_DASH         = $0400
HALF_DASH         = $02D4
FULL_TARGET       = $0200
HALF_TARGET       = $016A	
FULL_TARGET_UP    = $0160
HALF_TARGET_UP    = $0120
DASH_ACCEL        = $0060
HALF_DASH_ACCEL   = $0040
