2023-07-25 14:21:10 +09:30
|
|
|
extends Node
|
|
|
|
|
2023-07-31 23:33:05 +09:30
|
|
|
const INDEX_FORMAT := Image.FORMAT_L8
|
|
|
|
|
2023-12-06 16:32:40 +10:30
|
|
|
enum Menu {
|
|
|
|
LOADER,
|
|
|
|
MAIN,
|
|
|
|
LOAD_SAVE,
|
|
|
|
WORLD_MAP,
|
|
|
|
FIELD_MAP,
|
|
|
|
PARTY,
|
|
|
|
SHOP,
|
|
|
|
BATTLE,
|
|
|
|
DEBUG,
|
|
|
|
DEBUG_AUDIO_SYSTEM,
|
|
|
|
DEBUG_BATTLE_SPRITES,
|
2024-07-06 01:23:40 +09:30
|
|
|
DEBUG_WORLD_MAP_BLOCKS,
|
2023-12-06 16:32:40 +10:30
|
|
|
}
|
|
|
|
|
|
|
|
const MENUS = {
|
|
|
|
Menu.PARTY: ['res://widgets/PartyMenu.tscn', 'Party Menu'],
|
|
|
|
Menu.BATTLE: ['res://widgets/BattleScene.tscn', 'Battle'],
|
|
|
|
Menu.LOAD_SAVE: ['res://widgets/SaveSlotSelect.tscn', 'Load Save'],
|
|
|
|
Menu.DEBUG: ['res://test/debug_menu.tscn', 'Debug Menu'],
|
|
|
|
Menu.DEBUG_BATTLE_SPRITES: ['res://test/battle_sprites.tscn', 'Battle Sprites'],
|
|
|
|
Menu.DEBUG_AUDIO_SYSTEM: ['res://test/audio_system.tscn', 'Audio'],
|
2024-07-06 01:23:40 +09:30
|
|
|
Menu.DEBUG_WORLD_MAP_BLOCKS: ['res://test/worldmap_blocks.tscn', 'Worldmap Blocks'],
|
2023-12-06 16:32:40 +10:30
|
|
|
Menu.WORLD_MAP: ['res://test/worldmap_system.tscn', 'World Map'],
|
|
|
|
}
|
|
|
|
|
|
|
|
const INITIAL_MENUS = [
|
|
|
|
Menu.LOAD_SAVE,
|
|
|
|
]
|
|
|
|
|
|
|
|
const POST_ROM_MENUS = [
|
|
|
|
Menu.DEBUG,
|
|
|
|
Menu.WORLD_MAP,
|
|
|
|
Menu.PARTY,
|
|
|
|
Menu.BATTLE,
|
|
|
|
Menu.DEBUG_BATTLE_SPRITES,
|
|
|
|
Menu.DEBUG_AUDIO_SYSTEM,
|
2024-07-06 01:23:40 +09:30
|
|
|
Menu.DEBUG_WORLD_MAP_BLOCKS,
|
2023-12-06 16:32:40 +10:30
|
|
|
]
|
|
|
|
|
2023-12-06 18:19:19 +10:30
|
|
|
const FOLDER_ICON := preload('res://theme/icons/file_folder.tres')
|
|
|
|
const ALLOWED_EXTS := PoolStringArray(['bin', 'iso', 'sfc', 'smc', 'srm', 'gba'])
|
|
|
|
const CD_EXTS := PoolStringArray(['bin', 'iso']) # If you have a weird disc image format, you can mount it yourself, leave me out of it
|
|
|
|
const EXT_ICONS := {
|
|
|
|
'bin': preload('res://theme/icons/file_binary.tres'),
|
|
|
|
'iso': preload('res://theme/icons/file_disc.tres'),
|
|
|
|
'sfc': preload('res://theme/icons/file_cart.tres'),
|
|
|
|
'smc': preload('res://theme/icons/file_cart.tres'),
|
|
|
|
'gba': preload('res://theme/icons/file_cart.tres'),
|
|
|
|
}
|
|
|
|
const TYPE_DESCS := {
|
|
|
|
'bin': 'Binary',
|
|
|
|
'iso': 'CD-ROM Image',
|
|
|
|
'sfc': 'SNES ROM',
|
|
|
|
'smc': 'SNES ROM',
|
|
|
|
'gba': 'GBA ROM',
|
|
|
|
'srm': 'SNES Savefile'
|
|
|
|
}
|
|
|
|
|
2023-07-25 14:21:10 +09:30
|
|
|
var time = 0.0
|
|
|
|
var time_mult = 1.0
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
set_process(true)
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
time += delta * time_mult
|