forked from snesrev/zelda3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autosave/load state, Zoom window, Proper fullscreen aspect ratio, Sav…
…e settings to file Merges PR snesrev#7 and some of PR snesrev#21 (without the move from C/C++ to C99): * Get SDL from Nuget * Makefile * Add F11 as Fullscreen toggle * Handle gamepad and keyconf.yaml mapping * Convert *.py to unix (LF, shebang, +x) Additionally: * Optional autosave on quit, autoload on start * Autozoom to best size for screen, or change zoom manually * Keep proper ratio in fullscreen * Save settings to config.yaml * In addition to key changes from PR snesrev#21 , also: Esc to quit Ctrl+P or Pause/Break to pause +/- to change zoom F11 or Alt+Enter to toggle fullscreen PgUp/PgDn/Home to navigate stages in saves/ref/
- Loading branch information
Showing
16 changed files
with
584 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TARGET_EXEC:=zelda3 | ||
ROM:=tables/zelda3.sfc | ||
SRCS:=$(wildcard *.c snes/*.c) | ||
OBJS:=$(SRCS:%.c=%.o) | ||
GEN:=$(shell grep -hor tables/generated.*.h --include \*.c) | ||
CFLAGS:=${CFLAGS} $(shell sdl2-config --cflags) | ||
LDFLAGS:=${LDFLAGS} $(shell sdl2-config --libs) | ||
|
||
# first target is the default one | ||
$(TARGET_EXEC): tables/generated_dialogue.h $(OBJS) | ||
$(CC) $(OBJS) -o $@ $(LDFLAGS) | ||
$(GEN): tables/dialogue.txt | ||
cd tables; ./compile_resources.py ../$(ROM) | ||
tables/dialogue.txt: | ||
cd tables; ./extract_resources.py ../$(ROM) | ||
|
||
clean: clean_obj clean_gen | ||
clean_obj: | ||
$(RM) $(OBJS) $(TARGET_EXEC) | ||
clean_gen: | ||
$(RM) $(GEN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Zelda3 user configuration file | ||
|
||
# default (same as removing this file) | ||
#dungeon: 1 # dungeon in "saves/ref/" to load/replay; 1 to 13 | ||
#zoom: -1 # zoom 512x480 window; -1 to 20, where -1=autosize, 0=50%, 1=100%, 2=200%, 3=300%, etc. | ||
#fullscreen: 0 # launch in fullscreen; 0=false, 1=true | ||
#autosave: 1 # automatically save state on quit, and load on start; 0=false, 1=true | ||
#hide_wincmd: 1 # hide debug window (Windows only); 0=false, 1=true | ||
|
||
|
||
dungeon: 1 | ||
zoom: -1 | ||
fullscreen: 0 | ||
autosave: 1 | ||
hide_wincmd: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SNES to Key config file | ||
# SDL list at https://github.com/libsdl-org/SDL/blob/main/include/SDL_keycode.h | ||
# Symbols need a 0x40000000 mask over their value | ||
|
||
# AZERTY example | ||
#A: 120 # 'x' | ||
#B: 119 # 'w' | ||
#X: 115 # 's' | ||
#Y: 113 # 'q' | ||
#Up: 0x40000052 | ||
#Down: 0x40000051 | ||
#Left: 0x40000050 | ||
#Right: 0x4000004F | ||
#Select: 0x400000e5 | ||
#Start: 13 # ENTER | ||
#L: 100 # 'd' | ||
#R: 99 # 'c' | ||
|
||
|
||
# default (same as removing this file) | ||
A: 120 # 'x' | ||
B: 122 # 'z' | ||
X: 115 # 's' | ||
Y: 97 # 'a' | ||
Up: 0x40000052 # UP | ||
Down: 0x40000051 # DOWN | ||
Left: 0x40000050 # LEFT | ||
Right: 0x4000004F # RIGHT | ||
Select: 0x400000e5 # RSHIFT | ||
Start: 13 # ENTER | ||
L: 100 # 'd' | ||
R: 99 # 'c' |
Oops, something went wrong.