projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9f93696
)
added setup option for fast game start from level editor
author
Holger Schemel
<holger.schemel@virtion.de>
Sat, 25 May 2024 10:02:34 +0000
(12:02 +0200)
committer
Holger Schemel
<holger.schemel@virtion.de>
Sat, 25 May 2024 10:02:48 +0000
(12:02 +0200)
src/editor.c
patch
|
blob
|
history
src/editor.h
patch
|
blob
|
history
src/files.c
patch
|
blob
|
history
src/game_bd/import_bd.h
patch
|
blob
|
history
src/game_bd/main_bd.c
patch
|
blob
|
history
src/libgame/system.h
patch
|
blob
|
history
src/screens.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 0ab5722197222ae67171c807185645aeb65f146c..c105afcd10ba8776e4726b28d3269a6760b0cdae 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-7389,9
+7389,9
@@
static struct XY xy_directions[] =
// functions
// ----------------------------------------------------------------------------
// functions
// ----------------------------------------------------------------------------
-boolean isLevelEditor
TestGame
(void)
+boolean isLevelEditor
FastStart
(void)
{
{
- return
level_editor_test_game
;
+ return
(level_editor_test_game && setup.editor.fast_game_start)
;
}
static int getMaxInfoTextLength(void)
}
static int getMaxInfoTextLength(void)
diff --git
a/src/editor.h
b/src/editor.h
index 96fe6f29140077275d67e987c617f390216b2111..8dd3e390a46648c4408f6be943e7354b5e9db05d 100644
(file)
--- a/
src/editor.h
+++ b/
src/editor.h
@@
-14,7
+14,7
@@
#include "main.h"
#include "main.h"
-boolean isLevelEditor
TestGame
(void);
+boolean isLevelEditor
FastStart
(void);
void CreateLevelEditorGadgets(void);
void FreeLevelEditorGadgets(void);
void CreateLevelEditorGadgets(void);
void FreeLevelEditorGadgets(void);
diff --git
a/src/files.c
b/src/files.c
index 9779f83fb687ab119b1943c09c220d4c28fb0b27..7d4dc9d012b3e2648e2cb0d1c4f6f4094a82ba88 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-11064,6
+11064,10
@@
static struct TokenInfo editor_setup_tokens[] =
TYPE_SWITCH,
&setup.editor.show_element_token, "editor.show_element_token"
},
TYPE_SWITCH,
&setup.editor.show_element_token, "editor.show_element_token"
},
+ {
+ TYPE_SWITCH,
+ &setup.editor.fast_game_start, "editor.fast_game_start"
+ },
{
TYPE_SWITCH,
&setup.editor.show_read_only_warning, "editor.show_read_only_warning"
{
TYPE_SWITCH,
&setup.editor.show_read_only_warning, "editor.show_read_only_warning"
@@
-11826,6
+11830,7
@@
static void setSetupInfoToDefaults(struct SetupInfo *si)
si->editor.el_headlines = TRUE;
si->editor.show_element_token = FALSE;
si->editor.el_headlines = TRUE;
si->editor.show_element_token = FALSE;
+ si->editor.fast_game_start = FALSE;
si->editor.show_read_only_warning = TRUE;
si->editor.show_read_only_warning = TRUE;
diff --git
a/src/game_bd/import_bd.h
b/src/game_bd/import_bd.h
index ace426dbfdcbfcb5833fe2470297bbf8687b81ca..53af163998b55322770c390380ba043b8cddf96f 100644
(file)
--- a/
src/game_bd/import_bd.h
+++ b/
src/game_bd/import_bd.h
@@
-38,6
+38,6
@@
byte *TapePlayAction_BD(void);
byte *TapeCorrectAction_BD(byte *);
boolean TapeIsPlaying_ReplayBD(void);
byte *TapeCorrectAction_BD(byte *);
boolean TapeIsPlaying_ReplayBD(void);
-boolean isLevelEditor
TestGame
(void);
+boolean isLevelEditor
FastStart
(void);
#endif // IMPORT_BD_H
#endif // IMPORT_BD_H
diff --git
a/src/game_bd/main_bd.c
b/src/game_bd/main_bd.c
index 574edc3f3eeaef91434e3058239fd613c8caab82..333bddeae28911ade242890ab4a1265dc43a3f26 100644
(file)
--- a/
src/game_bd/main_bd.c
+++ b/
src/game_bd/main_bd.c
@@
-360,10
+360,10
@@
void InitGameEngine_BD(void)
// when skipping uncovering, continue with uncovered playfield
if (setup.bd_skip_uncovering)
game_bd.game->state_counter = GAME_INT_UNCOVER_ALL + 1;
// when skipping uncovering, continue with uncovered playfield
if (setup.bd_skip_uncovering)
game_bd.game->state_counter = GAME_INT_UNCOVER_ALL + 1;
- else if (isLevelEditor
TestGame
())
+ else if (isLevelEditor
FastStart
())
game_bd.game->state_counter = GAME_INT_UNCOVER_ALL - 8;
game_bd.game->state_counter = GAME_INT_UNCOVER_ALL - 8;
- if (setup.bd_skip_uncovering || isLevelEditor
TestGame
())
+ if (setup.bd_skip_uncovering || isLevelEditor
FastStart
())
gd_scroll(game_bd.game, TRUE, TRUE);
ClearRectangle(gd_screen_bitmap, 0, 0, SXSIZE, SYSIZE);
gd_scroll(game_bd.game, TRUE, TRUE);
ClearRectangle(gd_screen_bitmap, 0, 0, SXSIZE, SYSIZE);
diff --git
a/src/libgame/system.h
b/src/libgame/system.h
index 7669474f83ff2804993121ab44ced251cea52234..85c26a5f34fd84c1b50939b92bf603fff89972cb 100644
(file)
--- a/
src/libgame/system.h
+++ b/
src/libgame/system.h
@@
-1322,6
+1322,7
@@
struct SetupEditorInfo
boolean el_by_type;
boolean show_element_token;
boolean el_by_type;
boolean show_element_token;
+ boolean fast_game_start;
boolean show_read_only_warning;
boolean show_read_only_warning;
diff --git
a/src/screens.c
b/src/screens.c
index d518304b707e0722aa191d6fd4c7c07eb0354c10..0a891b6bb732f5520e2f2f96cb50d34550c7cb5c 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-8047,6
+8047,7
@@
static struct TokenInfo setup_info_editor[] =
{ TYPE_EMPTY, NULL, "" },
#endif
{ TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" },
{ TYPE_EMPTY, NULL, "" },
#endif
{ TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" },
+ { TYPE_SWITCH, &setup.editor.fast_game_start, "Fast game start:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_SWITCH, &setup.editor.show_read_only_warning, "Show read-only warning:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_SWITCH, &setup.editor.show_read_only_warning, "Show read-only warning:" },
{ TYPE_EMPTY, NULL, "" },