ChocolateBird/globals.gd

72 lines
1.8 KiB
GDScript

extends Node
const INDEX_FORMAT := Image.FORMAT_L8
enum Menu {
LOADER,
MAIN,
LOAD_SAVE,
WORLD_MAP,
FIELD_MAP,
PARTY,
SHOP,
BATTLE,
DEBUG,
DEBUG_AUDIO_SYSTEM,
DEBUG_BATTLE_SPRITES,
DEBUG_WORLD_MAP_BLOCKS,
}
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'],
Menu.DEBUG_WORLD_MAP_BLOCKS: ['res://test/worldmap_blocks.tscn', 'Worldmap Blocks'],
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,
Menu.DEBUG_WORLD_MAP_BLOCKS,
]
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'
}
var time = 0.0
var time_mult = 1.0
func _ready():
set_process(true)
func _process(delta):
time += delta * time_mult