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
|
|
|
]
|
|
|
|
|
2024-07-10 22:13:58 +09:30
|
|
|
const ERROR_CODE_STRINGS = PoolStringArray(['OK', 'FAILED', 'ERR_UNAVAILABLE', 'ERR_UNCONFIGURED', 'ERR_UNAUTHORIZED', 'ERR_PARAMETER_RANGE_ERROR', 'ERR_OUT_OF_MEMORY', 'ERR_FILE_NOT_FOUND', 'ERR_FILE_BAD_DRIVE', 'ERR_FILE_BAD_PATH', 'ERR_FILE_NO_PERMISSION', 'ERR_FILE_ALREADY_IN_USE', 'ERR_FILE_CANT_OPEN', 'ERR_FILE_CANT_WRITE', 'ERR_FILE_CANT_READ', 'ERR_FILE_UNRECOGNIZED', 'ERR_FILE_CORRUPT', 'ERR_FILE_MISSING_DEPENDENCIES', 'ERR_FILE_EOF', 'ERR_CANT_OPEN', 'ERR_CANT_CREATE', 'ERR_QUERY_FAILED', 'ERR_ALREADY_IN_USE', 'ERR_LOCKED', 'ERR_TIMEOUT', 'ERR_CANT_CONNECT', 'ERR_CANT_RESOLVE', 'ERR_CONNECTION_ERROR', 'ERR_CANT_ACQUIRE_RESOURCE', 'ERR_CANT_FORK', 'ERR_INVALID_DATA', 'ERR_INVALID_PARAMETER', 'ERR_ALREADY_EXISTS', 'ERR_DOES_NOT_EXIST', 'ERR_DATABASE_CANT_READ', 'ERR_DATABASE_CANT_WRITE', 'ERR_COMPILATION_FAILED', 'ERR_METHOD_NOT_FOUND', 'ERR_LINK_FAILED', 'ERR_SCRIPT_FAILED', 'ERR_CYCLIC_LINK', 'ERR_INVALID_DECLARATION', 'ERR_DUPLICATE_SYMBOL', 'ERR_PARSE_ERROR', 'ERR_BUSY', 'ERR_SKIP', 'ERR_HELP', 'ERR_BUG', 'ERR_PRINTER_ON_FIRE'])
|
|
|
|
|
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
|