Commit 539575d7 authored by Sergio Costas's avatar Sergio Costas

Ahora permite saltar a los menus desde el menu de ayuda

Modificado el Makefile
parent f98e39fb
CC = gcc -O2 -Wall -Wno-pointer-sign `pkg-config --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
CCo = gcc
#CC = gcc -O2 -Wall -Wno-pointer-sign `pkg-config --cflags sdl libpulse-simple alsa` -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
#CCo = gcc
CFLAGS += `pkg-config --cflags sdl libpulse-simple alsa` -O2 -Wno-pointer-sign -Wall -D D_SOUND_PULSE -D D_SOUND_ALSA -D D_SOUND_OSS
LDFLAGS += `pkg-config --libs sdl libpulse-simple alsa`
fbzx: computer.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o emulator.o cargador.o characters.o menus.o sound.o tape.o spk_ay.o microdrive.o
$(CCo) -o fbzx computer.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o emulator.o cargador.o characters.o menus.o sound.o tape.o spk_ay.o microdrive.o `pkg-config --libs sdl libpulse-simple alsa`
$(CC) -o fbzx computer.o Z80free.o Z80free_codes.o Z80free_codesCB.o Z80free_codesED.o Z80free_codesDD.o Z80free_codesFD.o Z80free_codesDDCB.o Z80free_codesFDCB.o emulator.o cargador.o characters.o menus.o sound.o tape.o spk_ay.o microdrive.o `pkg-config --libs sdl libpulse-simple alsa`
clean:
rm fbzx *.o *~
......@@ -31,53 +34,53 @@ uninstall:
rm -rf /usr/local/share/spectrum-roms
spk_ay.o: spk_ay.c spk_ay.h emulator.h sound.h computer.h z80free/Z80free.h
$(CC) -c -o spk_ay.o spk_ay.c
$(CC) $(CFLAGS) -c -o spk_ay.o spk_ay.c
microdrive.o: microdrive.c microdrive.h z80free/Z80free.h computer.h emulator.h z80free/Z80free.h
$(CC) -c -o microdrive.o microdrive.c
$(CC) $(CFLAGS) -c -o microdrive.o microdrive.c
sound.o: sound.c sound.h computer.h emulator.h z80free/Z80free.h
$(CC) -c -o sound.o sound.c
$(CC) $(CFLAGS) -c -o sound.o sound.c
emulator.o: emulator.c z80free/Z80free.h computer.h emulator.h characters.h menus.h cargador.h sound.h tape.h microdrive.h
$(CC) -c -o emulator.o emulator.c
$(CC) $(CFLAGS) -c -o emulator.o emulator.c
computer.o: computer.c z80free/Z80free.h computer.h emulator.h characters.h menus.h cargador.h sound.h tape.h spk_ay.h microdrive.h
$(CC) -c -o computer.o computer.c
$(CC) $(CFLAGS) -c -o computer.o computer.c
tape.o: tape.c z80free/Z80free.h computer.h emulator.h menus.h tape.h computer.h
$(CC) -c -o tape.o tape.c
$(CC) $(CFLAGS) -c -o tape.o tape.c
cargador.o: cargador.c cargador.h computer.h emulator.h z80free/Z80free.h characters.h menus.h computer.h
$(CC) -c -o cargador.o cargador.c
$(CC) $(CFLAGS) -c -o cargador.o cargador.c
characters.o: characters.c characters.h emulator.h computer.h
$(CC) -c -o characters.o characters.c
$(CC) $(CFLAGS) -c -o characters.o characters.c
menus.o: menus.c menus.h characters.h computer.h emulator.h z80free/Z80free.h cargador.h tape.h
$(CC) -c -o menus.o menus.c
$(CC) $(CFLAGS) -c -o menus.o menus.c
Z80free.o: z80free/Z80free.c z80free/Z80free.h
$(CC) -c -o Z80free.o z80free/Z80free.c
$(CC) $(CFLAGS) -c -o Z80free.o z80free/Z80free.c
Z80free_codes.o: z80free/Z80free_codes.c z80free/Z80free.h
$(CC) -c -o Z80free_codes.o z80free/Z80free_codes.c
$(CC) $(CFLAGS) -c -o Z80free_codes.o z80free/Z80free_codes.c
Z80free_codesCB.o: z80free/Z80free_codesCB.c z80free/Z80free.h
$(CC) -c -o Z80free_codesCB.o z80free/Z80free_codesCB.c
$(CC) $(CFLAGS) -c -o Z80free_codesCB.o z80free/Z80free_codesCB.c
Z80free_codesED.o: z80free/Z80free_codesED.c z80free/Z80free.h
$(CC) -c -o Z80free_codesED.o z80free/Z80free_codesED.c
$(CC) $(CFLAGS) -c -o Z80free_codesED.o z80free/Z80free_codesED.c
Z80free_codesDD.o: z80free/Z80free_codesDD.c z80free/Z80free.h
$(CC) -c -o Z80free_codesDD.o z80free/Z80free_codesDD.c
$(CC) $(CFLAGS) -c -o Z80free_codesDD.o z80free/Z80free_codesDD.c
Z80free_codesFD.o: z80free/Z80free_codesFD.c z80free/Z80free.h
$(CC) -c -o Z80free_codesFD.o z80free/Z80free_codesFD.c
$(CC) $(CFLAGS) -c -o Z80free_codesFD.o z80free/Z80free_codesFD.c
Z80free_codesDDCB.o: z80free/Z80free_codesDDCB.c z80free/Z80free.h
$(CC) -c -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
$(CC) $(CFLAGS) -c -o Z80free_codesDDCB.o z80free/Z80free_codesDDCB.c
Z80free_codesFDCB.o: z80free/Z80free_codesFDCB.c z80free/Z80free.h
$(CC) -c -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
$(CC) $(CFLAGS) -c -o Z80free_codesFDCB.o z80free/Z80free_codesFDCB.c
......@@ -2,6 +2,7 @@
*ULAPlus support
*Fixed a little bug in the ROM loading
*Allows to go to TAP/Snapshots/etc menus from HELP menu
2.5.0
......
......@@ -812,15 +812,11 @@ inline void read_keyboard (SDL_Event *pevento2) {
break;
case SDLK_F2:
snapshots_menu (); // manage snapshot files
break;
case SDLK_F3:
taps_menu (); // manage TAP files
break;
case SDLK_F4: // settings
settings_menu ();
case SDLK_F4:
case SDLK_F7:
case SDLK_F8:
launch_menu(temporal_io);
break;
case SDLK_F5: // STOP tape
......@@ -833,14 +829,6 @@ inline void read_keyboard (SDL_Event *pevento2) {
ordenador.pause = 0;
break;
case SDLK_F7:
microdrive_menu (); // shows the microdrive menu
break;
case SDLK_F8:
tools_menu();
break;
case SDLK_F9:
SDL_Fullscreen_Switch();
break;
......
......@@ -42,6 +42,39 @@ void print_copy(unsigned char *fbuffer,int ancho) {
}
int launch_menu(unsigned int key_pressed) {
int retval=0;
switch(key_pressed) {
case SDLK_F2:
snapshots_menu (); // manage snapshot files
retval=1;
break;
case SDLK_F3:
taps_menu (); // manage TAP files
retval=1;
break;
case SDLK_F4: // settings
settings_menu ();
retval=1;
break;
case SDLK_F7:
microdrive_menu (); // shows the microdrive menu
retval=1;
break;
case SDLK_F8:
tools_menu();
retval=1;
break;
}
return (retval);
}
void settings_menu() {
unsigned char *fbuffer,fin;
......@@ -319,12 +352,15 @@ void help_menu() {
fin=1;
do {
switch(wait_key()) {
unsigned int key = wait_key();
switch(key) {
case SDLK_ESCAPE: // to exit the help
fin=0;
break;
default:
if (launch_menu(key)) {
fin=0;
}
break;
}
} while(fin);
......
......@@ -50,3 +50,4 @@ void create_scrfile();
void do_poke();
int ask_value(int *final_value,int y_coord,int max_value);
void tools_menu();
int launch_menu(unsigned int key_pressed);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment