fix crash while clickmap is used in save dialog

This commit is contained in:
Ondrej Novak 2025-04-22 19:53:51 +02:00
parent af61d06130
commit b1d0f252f3
5 changed files with 86 additions and 58 deletions

View file

@ -1744,6 +1744,7 @@ void unwire_save_load(void)
send_message(E_DONE,E_KEYBOARD,saveload_keyboard); send_message(E_DONE,E_KEYBOARD,saveload_keyboard);
send_message(E_DONE,E_KEYBOARD,saveload_keyboard_menu); send_message(E_DONE,E_KEYBOARD,saveload_keyboard_menu);
free_savegame_list(&current_game_slot_list); free_savegame_list(&current_game_slot_list);
change_click_map(0,0);
} }

View file

@ -1602,6 +1602,27 @@ THAGGLERESULT smlouvat_dlg(int cena,int puvod,int pocet,int posledni, int money,
return res; return res;
} }
static void save_dialog_keyboards(EVENT_MSG *msg,OBJREC *o)
{
o;
if (msg->msg==E_KEYBOARD)
{
int c = va_arg(msg->data, int);
switch(c & 0xFF)
{
case 13:goto_control(30);terminate_gui();break;
case 27:goto_control(20);terminate_gui();break;
}
}
if (msg->msg == E_MOUSE) {
const MS_EVENT *ev = va_arg(msg->data, MS_EVENT *);
if (ev->event_type & MS_EVENT_MOUSE_RRELEASE) {
goto_control(20);terminate_gui();
}
}
}
char ask_save_dialog(char *name_buffer, size_t name_size, char allow_remove) { char ask_save_dialog(char *name_buffer, size_t name_size, char allow_remove) {
const char *str_label = texty[98]; const char *str_label = texty[98];
@ -1618,7 +1639,11 @@ char ask_save_dialog(char *name_buffer, size_t name_size, char allow_remove) {
} }
redraw_window(); redraw_window();
goto_control(10); goto_control(10);
send_message(E_ADD,E_KEYBOARD,save_dialog_keyboards);
send_message(E_ADD,E_MOUSE,save_dialog_keyboards);
escape(); escape();
send_message(E_DONE,E_KEYBOARD,save_dialog_keyboards);
send_message(E_DONE,E_MOUSE,save_dialog_keyboards);
get_value(0,10,name_buffer); get_value(0,10,name_buffer);
char ret = o_aktual->id==40?2:o_aktual->id==30?1:0; char ret = o_aktual->id==40?2:o_aktual->id==30?1:0;
close_current(); close_current();

View file

@ -7,12 +7,12 @@ Jan Virt
*head *head
Game design and Story Game design and Story
*name *name
Jinřich Rohlík Jin©ich Rohl¡k
*head *head
Program Program
*name *name
Ondřej Novák Ond©ej Nov k
*head *head
Environment concept art Environment concept art
@ -27,71 +27,71 @@ Daniel Falta
*head *head
2D Graphics 2D Graphics
*name *name
Karel Matějka Karel Matˆjka
Peter Koubek Peter Koubek
*head *head
3D Graphics 3D Graphics
*name *name
Karel Matějka Karel Matˆjka
*head *head
Animations Animations
*name *name
Daniel Falta Daniel Falta
Karel Matějka Karel Matˆjka
*head *head
Illustrations Illustrations
*name *name
Daniel Falta Daniel Falta
Karel Matějka Karel Matˆjka
*head *head
Fonts Fonts
*name *name
Ondřej Novák Ond©ej Nov k
Karel Matějka Karel Matˆjka
*head *head
Music Music
*name *name
Michal Stupka Michal Stupka
Jakub Preclík Jakub Precl¡k
Petr Třebický Petr T©ebick˜
Martin Matějka (outro) Martin Matˆjka (outro)
*head *head
Sound effects Sound effects
*name *name
Jindřich Rohlík Jind©ich Rohl¡k
*head *head
Level design Level design
*name *name
Jindřich Rohlík Jind©ich Rohl¡k
*head *head
Production Production
*name *name
Jindřich Rohlík Jind©ich Rohl¡k
*head *head
Betatesting Betatesting
*name *name
Michal Maršál Michal Mar¨ l
Tomáš Třebický Tom ¨ T©ebick˜
Jakub Motyčka Jakub Motyka
Jan Císař Jan C¡sa©
Michal Máčel Michal M ‡el
Zbyněk Pochman Zbynˆk Pochman
*head *head
Special thanks Special thanks
*name *name
Jan Virt and Václav Provazník Jan Virt and V clav Provazn¡k
for their help during level design for their help during level design
Marek Vondrák for graphics library in DOS version Marek Vondr k for graphics library in DOS version
Dalibor Strak for lending us Gravis Ultrasound Dalibor Strak for lending us Gravis Ultrasound
FTL for first real square-based dungeon FTL for first real square-based dungeon
*konec *konec

View file

@ -2,39 +2,40 @@
*line 10 *line 10
*TEXT *TEXT
*SPEED 8 *SPEED 8
You ascended to the highest floor of Skeldal, the magical You ascended to the highest floor of Skeldal, the magical tower
tower built by five fallen mages, former built by five fallen mages, former disciples of the mage Nimeth,
disciples of the mage Nimeth, to protect themselves while to protect themselves while immersed in the preparation
immersed in the preparation of their ultimate spell, which of their ultimate spell, which is to open the gates to forbidden
is to open the gates to forbidden dimensions. dimensions. Your party, with the Sword of Retribution, forged
Your party, with the Sword of Retribution, forged for them by a demon for them by a demon dwelling in the midst of the Labyrinth
dwelling in the midst of the Labyrinth of Singing Waters, stormed into of Singing Waters, stormed into the guarded chamber, on whose
the guarded chamber, on whose purple stone floor a purple stone floor a pentagram was carved, and caused
pentagram was carved, and caused a massacre among the mages, exhausted a massacre among the mages, exhausted by the preparation of
by the preparation of the demanding spell. You disrupted the demanding spell. You disrupted the circle, which had been
the circle, which had been maintained for many months by the slain mages, maintained for many months by the slain mages, and which was
and which was essential for the spell's completion. essential for the spell's completion. It was, however, at
It was, however, at the last moment. The spell was practically the last moment. The spell was practically finished at the time
finished at the time of your intrusion, and the mana-soaked ground of your intrusion, and the mana-soaked ground began to crack
began to crack under the pressure of the monsters trying under the pressure of the monsters trying to break through
to break through from the underground spaces. Your strongest warrior from the underground spaces. Your strongest warrior raised
raised the Sword of Retribution for the last time and with a mighty throw plunged it the Sword of Retribution for the last time and with a mighty
hilt-deep into the chest of the first demon that burst through from another throw plunged it hilt-deep into the chest of the first demon
dimension. that burst through from another dimension. Thus you completed
Thus you completed your mission and restored hope for the future to this world. your mission and restored hope for the future to this world.
Life began to return to Rovenland,
and this small island in the middle of the Dragon Sea once again became Life began to return to Rovenland, and this small island in
an important trading center. The three heroes who emerged the middle of the Dragon Sea once again became an important
from the Krow-Kane ritual returned to where they were summoned from. trading center. The three heroes who emerged from
Roland became a respected merchant in Caredbar, Gralt journeyed the Krow-Kane ritual returned to where they were summoned
after another obscure legend to the fire land of Hadim, and Erik returned from. Roland became a respected merchant in Caredbar, Gralt
to his father, whom he helped in the library for several years journeyed after another obscure legend to the fire land of
before departing with a merchant ship to the Hadim, and Erik returned to his father, whom he helped in
great continent. the library for several years before departing with a merchant
The great adventure, destined from the beginning of ages, ship to the great continent.
has ended. The endless battle of good and evil, the forces
of light and darkness, which creatures of all races and nations will The great adventure, destined from the beginning of ages, has
ended. The endless battle of good and evil, the forces of light
and darkness, which creatures of all races and nations will
have to wage until the very end of eternity. have to wage until the very end of eternity.
And by the way, the password for the maps is: Věk nových Bohů
*KONECSUB *KONECSUB

View file

@ -1,5 +1,6 @@
id,string id,string
0,"A connected controller has been found|To activate the controller, press any button on the controller" 0,"A connected controller has been found
To activate the controller, press any button on the controller"
1,FORWARD TRACK06.MUS TRACK07.MUS 1,FORWARD TRACK06.MUS TRACK07.MUS
2,STRENGTH: %d-%d 2,STRENGTH: %d-%d
3,MAGIC: %d-%d 3,MAGIC: %d-%d
@ -44,7 +45,7 @@ id,string
48,Start 48,Start
49,Throw 49,Throw
50,Combat in Progress 50,Combat in Progress
51,Overall Music Sounds Treble Bass XBass 51,Overall Music Sounds Treble Bass
52,Stereo Settings (Ultrasound) 52,Stereo Settings (Ultrasound)
53,Swap Sides 53,Swap Sides
54,Output Filter (SBPro) 54,Output Filter (SBPro)

1 id string
2 0 A connected controller has been found|To activate the controller, press any button on the controller A connected controller has been found To activate the controller, press any button on the controller
3 1 FORWARD TRACK06.MUS TRACK07.MUS
4 1 2 FORWARD TRACK06.MUS TRACK07.MUS STRENGTH: %d-%d
5 2 3 STRENGTH: %d-%d MAGIC: %d-%d
6 3 4 MAGIC: %d-%d SPEED: %d-%d
45 48 49 Start Throw
46 49 50 Throw Combat in Progress
47 50 51 Combat in Progress Overall Music Sounds Treble Bass
48 51 52 Overall Music Sounds Treble Bass XBass Stereo Settings (Ultrasound)
49 52 53 Stereo Settings (Ultrasound) Swap Sides
50 53 54 Swap Sides Output Filter (SBPro)
51 54 55 Output Filter (SBPro) Walking