ETAGS = etags
RM = rm -f
-BMP2ICO = bmp2ico
+CONVERT = convert
WINDRES = windres
+CONVERT_ICON_ARGS = -transparent black -background transparent
+
PROGBASE = rocksndiamonds
ifdef SPECIAL_EDITION # create special edition
AUTOCONF = conf_gfx.h conf_snd.h conf_mus.h
ICONBASE = windows_icon
+ICON_BASEPATH = ../Special/Icons/windows_icons
ifeq ($(PLATFORM),cross-win32)
ifdef SPECIAL_EDITION
-ICONSUFFIX = 32x32_$(SPECIAL_EDITION)
+# ICONSUFFIX = 32x32_$(SPECIAL_EDITION)
+ICON_PATH = $(ICON_BASEPATH)/$(SPECIAL_EDITION)
else
-ICONSUFFIX = 32x32
+# ICONSUFFIX = 32x32
+ICON_PATH = $(ICON_BASEPATH)/default
endif
-ICON32X32 = ../graphics/$(ICONBASE)_$(ICONSUFFIX).bmp
+# ICON32X32 = ../graphics/$(ICONBASE)_$(ICONSUFFIX).bmp
ICON = $(ICONBASE).o
endif
> $(TIMESTAMP_FILE)
$(ICON):
- $(BMP2ICO) -transparent $(ICONBASE).ico $(ICON32X32)
+# $(CONVERT) $(ICON32X32) $(CONVERT_ICON_ARGS) $(ICONBASE).ico
+ $(CONVERT) $(ICON_PATH)/*.png $(CONVERT_ICON_ARGS) $(ICONBASE).ico
echo "$(ICONBASE) ICON $(ICONBASE).ico" | $(WINDRES) -o $(ICON)
.c.o:
-#define COMPILE_DATE_STRING "2013-09-05 09:51"
+#define COMPILE_DATE_STRING "2013-09-16 20:53"
static int DrawLevelText(int sx, int sy, char letter, int mode)
{
static short delete_buffer[MAX_LEV_FIELDX];
- static int start_sx, start_sy;
+ static int start_sx;
+#if 0
+ static int start_sy;
+#endif
static int last_sx, last_sy;
static boolean typing = FALSE;
int letter_element = EL_CHAR_ASCII0 + letter;
DrawLevelText(0, 0, 0, TEXT_END);
typing = TRUE;
- start_sx = last_sx = sx;
- start_sy = last_sy = sy;
+ start_sx = sx;
+#if 0
+ start_sy = sy;
+#endif
+ last_sx = sx;
+ last_sy = sy;
DrawLevelText(sx, sy, 0, TEXT_SETCURSOR);
break;
{
int i, x, y;
int element;
- int num_contents, content_xsize, content_ysize;
+ int num_contents;
+#if 0
+ int content_xsize, content_ysize;
+#endif
int content_array[MAX_ELEMENT_CONTENTS][3][3];
element = getMappedElement(getFile16BitBE(file));
num_contents = getFile8Bit(file);
+#if 1
+ getFile8Bit(file); /* content x size (unused) */
+ getFile8Bit(file); /* content y size (unused) */
+#else
content_xsize = getFile8Bit(file);
content_ysize = getFile8Bit(file);
+#endif
ReadUnusedBytesFromFile(file, LEVEL_CHUNK_CNT2_UNUSED);
void LoadLevelInfoOnly(int nr)
{
+#if 0
char *filename;
+#endif
setLevelFileInfo(&level.file_info, nr);
+#if 0
filename = level.file_info.filename;
+#endif
LoadLevelFromFileInfo(&level, &level.file_info, TRUE);
}
static byte PlayerActions(struct PlayerInfo *player, byte player_action)
{
- boolean moved = FALSE, snapped = FALSE, dropped = FALSE;
int left = player_action & JOY_LEFT;
int right = player_action & JOY_RIGHT;
int up = player_action & JOY_UP;
if (player_action)
{
if (button1)
- snapped = SnapField(player, dx, dy);
+ SnapField(player, dx, dy);
else
{
if (button2)
- dropped = DropElement(player);
+ DropElement(player);
- moved = MovePlayer(player, dx, dy);
+ MovePlayer(player, dx, dy);
}
CheckSingleStepMode(player);
if (IS_CUSTOM_ELEMENT(new_element) && CAN_MOVE(new_element) &&
element_info[new_element].move_pattern == MV_WHEN_DROPPED)
{
- int move_direction, nextx, nexty;
+#if 0
+ int move_direction;
+ int nextx, nexty;
+#endif
if (element_info[new_element].move_direction_initial == MV_START_AUTOMATIC)
MovDir[dropx][dropy] = drop_direction;
+#if 0
move_direction = MovDir[dropx][dropy];
nextx = dropx + GET_DX_FROM_DIR(move_direction);
nexty = dropy + GET_DY_FROM_DIR(move_direction);
+#endif
ChangeCount[dropx][dropy] = 0; /* allow at least one more change */
boolean half_shifted_y = (EVEN(SCR_FIELDY) && screen_y % TILEY != 0);
#endif
- int sx, sy, sxsize, sysize;
+ int sx, sy;
+#if 0
+ int sxsize, sysize;
+#endif
int xsize = SXSIZE;
int ysize = SYSIZE;
int full_xsize = lev.width * TILEX;
int full_ysize = lev.height * TILEY;
+#if 0
sxsize = (full_xsize < xsize ? full_xsize : xsize);
sysize = (full_ysize < ysize ? full_ysize : ysize);
+#endif
sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0);
sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0);
int oldy = ply->y;
int x = oldx;
int y = oldy;
- int anim = 0;
int dx = 0, dy = 0;
game_em.last_player_direction[ply->num] = MV_NONE;
{
x--;
dx = -1;
- anim = 3;
}
else if (ply->joy_e) /* east */
{
x++;
dx = 1;
- anim = 1;
}
if (ply->joy_n) /* north */
{
y--;
dy = -1;
- anim = 0;
}
else if (ply->joy_s) /* south */
{
y++;
dy = 1;
- anim = 2;
}
#else
{
y--;
dy = -1;
- anim = 0;
}
else if (ply->joy_e) /* east */
{
x++;
dx = 1;
- anim = 1;
}
else if (ply->joy_s) /* south */
{
y++;
dy = 1;
- anim = 2;
}
else if (ply->joy_w) /* west */
{
x--;
dx = -1;
- anim = 3;
}
}
else
{
x--;
dx = -1;
- anim = 3;
}
else if (ply->joy_s) /* south */
{
y++;
dy = 1;
- anim = 2;
}
else if (ply->joy_e) /* east */
{
x++;
dx = 1;
- anim = 1;
}
else if (ply->joy_n) /* north */
{
y--;
dy = -1;
- anim = 0;
}
}
#endif
void DDScrollBuffer_SoftScrollTo(int X, int Y, int TimeMS, int FPS)
{
double dx, dY;
- int dT, StepCount;
+#if 0
+ int dT;
+#endif
+ int StepCount;
double T, tStep;
int oldX, oldY, maxD;
static boolean AlreadyRunning = False;
if (StepCount == 0)
StepCount = 1;
+#if 0
dT = 1000 / FPS;
+#endif
tStep = (double)1 / StepCount;
oldX = mScrollX;
oldY = mScrollY;
extern void InitScrollPlayfield();
-extern void UpdatePlayfield();
+extern void UpdatePlayfield(boolean);
extern void RestorePlayfield();
extern void DDScrollBuffer_ScrollTo(int X, int Y);
void subAnimateExplosion(int si)
{
- int ax, bl, X, Y;
+ int ax, bl;
+#if 0
+ int X, Y;
+#endif
if (LowByte(PlayField16[si]) != fiExplosion)
return;
MovHighByte(&PlayField16[si], bl);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if 0
X = GetStretchX(si);
Y = GetStretchY(si);
+#endif
GfxGraphic[GetX(si)][GetY(si)] = aniDefaultExplosion;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MovHighByte(&PlayField16[si], bl);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if 0
X = GetStretchX(si);
Y = GetStretchY(si);
+#endif
GfxGraphic[GetX(si)][GetY(si)] = aniElectronExplosion;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
void subClearFieldDueToExplosion(int si)
{
+#if 0
int X, Y;
+#endif
if (LowByte(PlayField16[si]) == fiExplosion)
return;
PlayField16[si] = 0;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if 0
X = GetStretchX(si);
Y = GetStretchY(si);
+#endif
GfxGraphic[GetX(si)][GetY(si)] = aniSpace;
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}
#define CONFIG_TOKEN_GLOBAL_BUSY "global.busy"
#define DEBUG_PRINT_INIT_TIMESTAMPS TRUE
-#define DEBUG_PRINT_INIT_TIMESTAMPS_DEPTH 1
+#define DEBUG_PRINT_INIT_TIMESTAMPS_DEPTH 0
static struct FontBitmapInfo font_initial[NUM_INITIAL_FONTS];
static boolean insideSelectboxLine(struct GadgetInfo *gi, int mx, int my)
{
- return(gi != NULL &&
- gi->type & GD_TYPE_SELECTBOX &&
- mx >= gi->x && mx < gi->x + gi->width &&
- my >= gi->y && my < gi->y + gi->height);
+ return (gi != NULL &&
+ gi->type & GD_TYPE_SELECTBOX &&
+ mx >= gi->x && mx < gi->x + gi->width &&
+ my >= gi->y && my < gi->y + gi->height);
}
static boolean insideSelectboxArea(struct GadgetInfo *gi, int mx, int my)
{
- return(gi != NULL &&
- gi->type & GD_TYPE_SELECTBOX &&
- mx >= gi->selectbox.x && mx < gi->selectbox.x + gi->selectbox.width &&
- my >= gi->selectbox.y && my < gi->selectbox.y + gi->selectbox.height);
+ return (gi != NULL &&
+ gi->type & GD_TYPE_SELECTBOX &&
+ mx >= gi->selectbox.x && mx < gi->selectbox.x + gi->selectbox.width &&
+ my >= gi->selectbox.y && my < gi->selectbox.y + gi->selectbox.height);
}
void ClickOnGadget(struct GadgetInfo *gi, int button)
boolean gadget_dragging;
boolean gadget_released;
boolean gadget_released_inside;
+#if 0
boolean gadget_released_inside_select_line;
+#endif
boolean gadget_released_inside_select_area;
boolean gadget_released_off_borders;
boolean changed_position = FALSE;
/* when handling selectbox, set additional state values */
if (gadget_released_inside && (last_gi->type & GD_TYPE_SELECTBOX))
{
+#if 0
gadget_released_inside_select_line = insideSelectboxLine(last_gi, mx, my);
+#endif
gadget_released_inside_select_area = insideSelectboxArea(last_gi, mx, my);
}
else
{
+#if 0
gadget_released_inside_select_line = FALSE;
+#endif
gadget_released_inside_select_area = FALSE;
}
#if defined(PLATFORM_WIN32)
if (login_name == NULL)
{
- unsigned int buffer_size = MAX_USERNAME_LEN + 1;
+ unsigned long buffer_size = MAX_USERNAME_LEN + 1;
login_name = checked_malloc(buffer_size);
if (GetUserName(login_name, &buffer_size) == 0)
if (real_name == NULL)
{
static char buffer[MAX_USERNAME_LEN + 1];
- unsigned int buffer_size = MAX_USERNAME_LEN + 1;
+ unsigned long buffer_size = MAX_USERNAME_LEN + 1;
if (GetUserName(buffer, &buffer_size) != 0)
real_name = get_corrected_real_name(buffer);
{
int x, y;
tColorRGBA *sp, *csp, *dp;
- int sgap, dgap;
+#if 0
+ int sgap;
+#endif
+ int dgap;
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
+#if 0
sgap = src->pitch - src->w * 4;
+#endif
dgap = dst->pitch - dst->w * 4;
for (y = 0; y < dst->h; y++)
{
int x, y, sx, sy, *sax, *say, *csax, *csay, csx, csy;
tColorRGBA *sp, *csp, *dp;
- int sgap, dgap;
+#if 0
+ int sgap;
+#endif
+ int dgap;
/* use specialized zoom function when scaling down to exactly half size */
if (src->w == 2 * dst->w &&
/* pointer setup */
sp = csp = (tColorRGBA *) src->pixels;
dp = (tColorRGBA *) dst->pixels;
+#if 0
sgap = src->pitch - src->w * 4;
+#endif
dgap = dst->pitch - dst->w * 4;
csay = say;
{
static char *level_directory = NULL;
DIR *dir;
+#if 0
struct dirent *dir_entry;
+#endif
/* check for more levels besides the 'levels' field of 'levelinfo.conf' */
if ((dir = opendir(level_directory)) == NULL)
{
Error(ERR_WARN, "cannot read level directory '%s'", level_directory);
+
return;
}
+#if 0
while ((dir_entry = readdir(dir)) != NULL) /* last directory entry */
{
if (strlen(dir_entry->d_name) > 4 &&
levelnum_value = atoi(levelnum_str);
-#if 0
if (levelnum_value < leveldir_current->first_level)
{
Error(ERR_WARN, "additional level %d found", levelnum_value);
Error(ERR_WARN, "additional level %d found", levelnum_value);
leveldir_current->last_level = levelnum_value;
}
-#endif
}
}
+#endif
closedir(dir);
}
int width_4, height_4;
int width_8, height_8;
int width_16, height_16;
+#if 0
int width_32, height_32;
+#endif
int new_width, new_height;
/* calculate new image dimensions for normal sized image */
height_8 = height_1 / 8;
width_16 = width_1 / 16;
height_16 = height_1 / 16;
+#if 0
width_32 = width_1 / 32;
height_32 = height_1 / 32;
+#endif
UPDATE_BUSY_STATE();
{
LevelDirTree *new_leveldir;
int new_level_nr;
- int dummy;
unsigned int new_random_seed;
char *new_leveldir_identifier;
new_level_nr = (buffer[2] << 8) + buffer[3];
- dummy = (buffer[4] << 8) + buffer[5]; /* (obsolete) */
new_random_seed =
(buffer[6] << 24) | (buffer[7] << 16) | (buffer[8] << 8) | (buffer[9]);
new_leveldir_identifier = (char *)&buffer[10];
int ypos = MENU_SCREEN_START_YPOS + pos;
int startx = mSX + xpos * 32;
int starty = mSY + ypos * 32;
- int font_nr, font_width, font_height;
+ int font_nr, font_width;
+#if 0
+ int font_height;
+#endif
int type = setup_info[pos].type;
void *value = setup_info[pos].value;
char *value_string = getSetupValue(type, value);
starty = mSY + ypos * 32;
font_nr = getSetupValueFont(type, value);
font_width = getFontWidth(font_nr);
+#if 0
font_height = getFontHeight(font_nr);
+#endif
/* downward compatibility correction for Juergen Bonhagen's menu settings */
if (setup_mode != SETUP_MODE_INPUT)
static int num_levels_solved = 0;
static int num_tape_missing = 0;
static boolean level_failed[MAX_TAPES_PER_SET];
+#if 0
static boolean tape_missing[MAX_TAPES_PER_SET];
+#endif
int i;
if (autoplay_initialized)
for (i = 0; i < MAX_TAPES_PER_SET; i++)
{
level_failed[i] = FALSE;
+#if 0
tape_missing[i] = FALSE;
+#endif
}
autoplay_initialized = TRUE;
if (tape.no_valid_file)
{
num_tape_missing++;
+#if 0
if (level_nr >= 0 && level_nr < MAX_TAPES_PER_SET)
tape_missing[level_nr] = TRUE;
+#endif
printf("(no tape)\n");
continue;
boolean any_player_moving,
boolean player_is_dropping)
{
- int i;
-
if (tape.single_step && tape.recording && !tape.pausing)
{
+#if 0
boolean active_players = FALSE;
+ int i;
for (i = 0; i < MAX_PLAYERS; i++)
if (action[i] != JOY_NO_ACTION)
active_players = TRUE;
+#endif
// if (frame == 0)
if (frame == 0 && !player_is_dropping)