nolist

IFNDEF	pass 
	LET pass=1
ENDIF

;R-TYPE 128K version header 
;
;


;do keyboard recording ?
MMI_IsRecordMode	EQU 0

;pix'n'love preview , if L>4 return to menu
PNL_Preview	EQU 0

;do we output files ?
output_files	EQU 1
debug		EQU 0

;unlock bonuses ?
unlock_bonus	EQU 0

;debug sound BP ?
debug_soundBP	EQU 0

;debug casual draw ?
debug_casualBP	EQU 0

;file system locations - required !
FS_Dir_Location		EQU 	#C000
FS_DeexoBuffer		EQU	#C400+2
FS_Minimal_System	EQU	0


;cheats
cheat_IsActive		EQU 0
cheat_moduleA		EQU 0
cheat_moduleB		EQU 0
cheat_moduleC		EQU 0
cheat_pillA		EQU 0
cheat_pillB		EQU 0
cheat_missile		EQU 0
cheat_DefaultWeapon	EQU 1
cheat_PlyInv		EQU 0

save_snap		EQU 0

life_count		EQU 1 ;1 ;(0=1 1=3 2=5 3=7)
continues		EQU 2 ;2 


perf_show	EQU 0
perf_cap	EQU 1

no_checksum	EQU 1


level_start	EQU #9000
himem_start	EQU #A400

SND_DEFAULT_MODE	EQU 0	;0 mixed - 1 music - 2 SFX
GAME_MODE		EQU 0	;0 arcade - 1 casual - 2 master

test_level	EQU 1
new_fdc		EQU 1

amsdos_version	EQU 1

org 0
run 0

;save if need
IF output_files
	write "bin/main.bin"
ENDIF


;globals
read "globals.asm"

;sfx
read "sfx_names.asm"



charset_on

;code
read "main.asm" ;always first , contain entry point
read "font.asm"
read "gfx_setup.asm"

IF new_fdc
	read "fs_code.asm"
ELSE 
	read "fdc_tools.asm"
ENDIF

;read "menu_data.asm"
read "game.asm"
read "game_loop.asm"
read "game_init.asm"
read "game_over.asm"
read "get_sync.asm"
;read "keyboard.asm"
read "l3_external.asm"




read "music.asm"
read "renderer.asm"
read "rend_spr.asm"
read "key.asm"
read "player.asm" ;serious things
read "player_bullets.asm"	;base weapons + beam
read "modules.asm"		;player modules
read "them.asm"			;enemies
read "alien.asm"		;enemies bullets
read "laser.asm"		;blue laser
read "circular.asm"		;circular laser
read "fire.asm"			;fire
read "wave.asm"			;circular low power
read "missiles.asm"		;missiles
read "jewels.asm"		;bonuses

read "gauge.asm"

;read "hi_score.asm"
read "extra_life.asm"
read "explosions.asm"
read "collisions.asm"
;read "endlvl.asm"
;read "fatal_error.asm"
read "fatal_error_new.asm"
;read "end_lvl_low.asm"
;common stuff
read "common.asm"
read "pause.asm"


codesize	EQU $

;data
;all beyond this point is lost after init

read "data.asm"
read "trash_code.asm"

modsize EQU $

IF test_level=0
read "level0.asm"
ENDIF

IF test_level=1
read "level1.asm"
ENDIF

IF test_level=2
read "level2.asm"
ENDIF

IF test_level=3
read "level3.asm"
ENDIF

IF test_level=4
read "level4.asm"
ENDIF

IF test_level=5
read "level5.asm"
ENDIF

IF test_level=6
read "level6.asm"
ENDIF

IF test_level=7
read "level7.asm"
ENDIF

IF test_level=8
read "level8.asm"
ENDIF

IF test_level=9
read "level9.asm"
ENDIF

IF test_level=10
read "levelA.asm"
ENDIF

IF test_level=11
read "levelB.asm"
ENDIF

;read "test_level.asm"

level_end EQU $


read "himem.asm"

;background effects	
read "bgman.asm"		;background manager
;read "starfield.asm"		;l1 starfield
;read "l1bg.asm"			;l1 background
;sprites autogeneration
read "autogeneration.asm"

;read "key.asm"
read "endlvl.asm"


menusize EQU $


;add title stuff

org #4010

IF output_files
	write "bin/titledat.bin"
else
	write direct -1,-1,#C4
endif
	read "title_new.asm"
	read "menu.asm"
	read "menu_strings.asm"
	read "menu_callbacks.asm"
	read "credits.asm"
	read "options_save.asm"

menustuff_size	EQU $

IF pass=1
	PRINT "===BUILD OPTIONS==="
	PRINT "Compiling level $test_level"

	IF debug
		PRINT "Debug mode"
	ENDIF

	IF output_files
		PRINT "Output files"
	ENDIF

	IF perf_cap
		PRINT "Framerate regulation ON"
	ELSE
		PRINT "Framerate regulation OFF"	
	ENDIF


	PRINT "===MEMORY USAGE==="
	PRINT "main size     : 0x$codesize bytes"
	PRINT "module size   : 0x$modsize bytes"
	PRINT "level end     : 0x$level_start -> 0x$level_end"
	PRINT "himem         : 0x$himem_start -> 0x$menusize"
	PRINT "add menu      : 0x$menustuff_size"
ENDIF


LET pass=2

