projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20100325-1-src
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index ea5ec18de985d667f2fccda3b504cdbc3f7c1fc5..4596e8395d4772a6b2bd282680435f20fa948b2e 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-329,6
+329,14
@@
void SetBitmaps_EM(Bitmap **em_bitmap)
}
#endif
}
#endif
+#if 0
+/* !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! */
+void SetBitmaps_SP(Bitmap **sp_bitmap)
+{
+ *sp_bitmap = graphic_info[IMG_SP_OBJECTS].bitmap;
+}
+#endif
+
static int getFontBitmapID(int font_nr)
{
int special = -1;
static int getFontBitmapID(int font_nr)
{
int special = -1;
@@
-1298,6
+1306,8
@@
static void set_graphic_parameters_ext(int graphic, int *parameter,
g->align = ALIGN_CENTER; /* default for title screens */
g->valign = VALIGN_MIDDLE; /* default for title screens */
g->sort_priority = 0; /* default for title screens */
g->align = ALIGN_CENTER; /* default for title screens */
g->valign = VALIGN_MIDDLE; /* default for title screens */
g->sort_priority = 0; /* default for title screens */
+ g->class = 0;
+ g->style = STYLE_DEFAULT;
g->bitmap = src_bitmap;
g->bitmap = src_bitmap;
@@
-1498,6
+1508,11
@@
static void set_graphic_parameters_ext(int graphic, int *parameter,
g->valign = parameter[GFX_ARG_VALIGN];
if (parameter[GFX_ARG_SORT_PRIORITY] != ARG_UNDEFINED_VALUE)
g->sort_priority = parameter[GFX_ARG_SORT_PRIORITY];
g->valign = parameter[GFX_ARG_VALIGN];
if (parameter[GFX_ARG_SORT_PRIORITY] != ARG_UNDEFINED_VALUE)
g->sort_priority = parameter[GFX_ARG_SORT_PRIORITY];
+
+ if (parameter[GFX_ARG_CLASS] != ARG_UNDEFINED_VALUE)
+ g->class = parameter[GFX_ARG_CLASS];
+ if (parameter[GFX_ARG_STYLE] != ARG_UNDEFINED_VALUE)
+ g->style = parameter[GFX_ARG_STYLE];
}
static void set_graphic_parameters(int graphic)
}
static void set_graphic_parameters(int graphic)
@@
-2829,8
+2844,12
@@
void InitElementPropertiesStatic()
EL_SIGN_FRANKIE,
EL_STEEL_EXIT_CLOSED,
EL_STEEL_EXIT_OPEN,
EL_SIGN_FRANKIE,
EL_STEEL_EXIT_CLOSED,
EL_STEEL_EXIT_OPEN,
+ EL_STEEL_EXIT_OPENING,
+ EL_STEEL_EXIT_CLOSING,
EL_EM_STEEL_EXIT_CLOSED,
EL_EM_STEEL_EXIT_OPEN,
EL_EM_STEEL_EXIT_CLOSED,
EL_EM_STEEL_EXIT_OPEN,
+ EL_EM_STEEL_EXIT_OPENING,
+ EL_EM_STEEL_EXIT_CLOSING,
EL_DC_STEELWALL_1_LEFT,
EL_DC_STEELWALL_1_RIGHT,
EL_DC_STEELWALL_1_TOP,
EL_DC_STEELWALL_1_LEFT,
EL_DC_STEELWALL_1_RIGHT,
EL_DC_STEELWALL_1_TOP,
@@
-4174,6
+4193,7
@@
void InitElementPropertiesStatic()
EL_PLAYER_2,
EL_PLAYER_3,
EL_PLAYER_4,
EL_PLAYER_2,
EL_PLAYER_3,
EL_PLAYER_4,
+ EL_SOKOBAN_FIELD_PLAYER,
EL_SP_MURPHY,
EL_YAMYAM,
EL_YAMYAM_LEFT,
EL_SP_MURPHY,
EL_YAMYAM,
EL_YAMYAM_LEFT,
@@
-5124,7
+5144,7
@@
void Execute_Command(char *command)
exit(0);
}
exit(0);
}
- else if (str
ncmp(command, "dump level ", 11) == 0
)
+ else if (str
Prefix(command, "dump level ")
)
{
char *filename = &command[11];
{
char *filename = &command[11];
@@
-5136,7
+5156,7
@@
void Execute_Command(char *command)
exit(0);
}
exit(0);
}
- else if (str
ncmp(command, "dump tape ", 10) == 0
)
+ else if (str
Prefix(command, "dump tape ")
)
{
char *filename = &command[10];
{
char *filename = &command[10];
@@
-5148,7
+5168,7
@@
void Execute_Command(char *command)
exit(0);
}
exit(0);
}
- else if (str
ncmp(command, "autoplay ", 9) == 0
)
+ else if (str
Prefix(command, "autoplay ")
)
{
char *str_ptr = getStringCopy(&command[9]); /* read command parameters */
{
char *str_ptr = getStringCopy(&command[9]); /* read command parameters */
@@
-5184,9
+5204,9
@@
void Execute_Command(char *command)
str_ptr++;
}
}
str_ptr++;
}
}
- else if (str
ncmp(command, "convert ", 8) == 0
)
+ else if (str
Prefix(command, "convert ")
)
{
{
- char *str_copy = getStringCopy(
&command[8]
);
+ char *str_copy = getStringCopy(
strchr(command, ' ') + 1
);
char *str_ptr = strchr(str_copy, ' ');
global.convert_leveldir = str_copy;
char *str_ptr = strchr(str_copy, ' ');
global.convert_leveldir = str_copy;
@@
-5198,7
+5218,7
@@
void Execute_Command(char *command)
global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
}
}
global.convert_level_nr = atoi(str_ptr); /* get level_nr value */
}
}
- else if (str
ncmp(command, "create images ", 14) == 0
)
+ else if (str
Prefix(command, "create images ")
)
{
#if defined(TARGET_SDL)
global.create_images_dir = getStringCopy(&command[14]);
{
#if defined(TARGET_SDL)
global.create_images_dir = getStringCopy(&command[14]);
@@
-6223,6
+6243,10
@@
void OpenAll()
em_open_all();
#endif
em_open_all();
#endif
+#if 1
+ sp_open_all();
+#endif
+
if (global.autoplay_leveldir)
{
AutoPlayTape();
if (global.autoplay_leveldir)
{
AutoPlayTape();
@@
-6270,6
+6294,10
@@
void CloseAllAndExit(int exit_value)
em_close_all();
#endif
em_close_all();
#endif
+#if 1
+ sp_close_all();
+#endif
+
FreeAllImages();
#if defined(TARGET_SDL)
FreeAllImages();
#if defined(TARGET_SDL)