IMG_TRIGGER_PLAYER
},
{
- EL_EM_KEY_5, -1, -1, FALSE,
- IMG_EM_KEY_5
+ EL_EMC_KEY_5, -1, -1, FALSE,
+ IMG_EMC_KEY_5
},
{
- EL_EM_KEY_6, -1, -1, FALSE,
- IMG_EM_KEY_6
+ EL_EMC_KEY_6, -1, -1, FALSE,
+ IMG_EMC_KEY_6
},
{
- EL_EM_KEY_7, -1, -1, FALSE,
- IMG_EM_KEY_7
+ EL_EMC_KEY_7, -1, -1, FALSE,
+ IMG_EMC_KEY_7
},
{
- EL_EM_KEY_8, -1, -1, FALSE,
- IMG_EM_KEY_8
+ EL_EMC_KEY_8, -1, -1, FALSE,
+ IMG_EMC_KEY_8
},
{
- EL_EM_GATE_5, -1, -1, FALSE,
- IMG_EM_GATE_5
+ EL_EMC_GATE_5, -1, -1, FALSE,
+ IMG_EMC_GATE_5
},
{
- EL_EM_GATE_5_GRAY, -1, -1, FALSE,
- IMG_EM_GATE_5_GRAY
+ EL_EMC_GATE_5_GRAY, -1, -1, FALSE,
+ IMG_EMC_GATE_5_GRAY
},
{
- EL_EM_GATE_6, -1, -1, FALSE,
- IMG_EM_GATE_6
+ EL_EMC_GATE_6, -1, -1, FALSE,
+ IMG_EMC_GATE_6
},
{
- EL_EM_GATE_6_GRAY, -1, -1, FALSE,
- IMG_EM_GATE_6_GRAY
+ EL_EMC_GATE_6_GRAY, -1, -1, FALSE,
+ IMG_EMC_GATE_6_GRAY
},
{
- EL_EM_GATE_7, -1, -1, FALSE,
- IMG_EM_GATE_7
+ EL_EMC_GATE_7, -1, -1, FALSE,
+ IMG_EMC_GATE_7
},
{
- EL_EM_GATE_7_GRAY, -1, -1, FALSE,
- IMG_EM_GATE_7_GRAY
+ EL_EMC_GATE_7_GRAY, -1, -1, FALSE,
+ IMG_EMC_GATE_7_GRAY
},
{
- EL_EM_GATE_8, -1, -1, FALSE,
- IMG_EM_GATE_8
+ EL_EMC_GATE_8, -1, -1, FALSE,
+ IMG_EMC_GATE_8
},
{
- EL_EM_GATE_8_GRAY, -1, -1, FALSE,
- IMG_EM_GATE_8_GRAY
+ EL_EMC_GATE_8_GRAY, -1, -1, FALSE,
+ IMG_EMC_GATE_8_GRAY
},
{
EL_EMC_ANDROID, -1, -1, FALSE,
IMG_INVISIBLE_STEELWALL_VERTICAL_EDITOR
},
{
- EL_EM_GATE_5_GRAY, GFX_SPECIAL_ARG_EDITOR,
- IMG_EM_GATE_5_GRAY_EDITOR
+ EL_EMC_GATE_5_GRAY, GFX_SPECIAL_ARG_EDITOR,
+ IMG_EMC_GATE_5_GRAY_EDITOR
},
{
- EL_EM_GATE_6_GRAY, GFX_SPECIAL_ARG_EDITOR,
- IMG_EM_GATE_6_GRAY_EDITOR
+ EL_EMC_GATE_6_GRAY, GFX_SPECIAL_ARG_EDITOR,
+ IMG_EMC_GATE_6_GRAY_EDITOR
},
{
- EL_EM_GATE_7_GRAY, GFX_SPECIAL_ARG_EDITOR,
- IMG_EM_GATE_7_GRAY_EDITOR
+ EL_EMC_GATE_7_GRAY, GFX_SPECIAL_ARG_EDITOR,
+ IMG_EMC_GATE_7_GRAY_EDITOR
},
{
- EL_EM_GATE_8_GRAY, GFX_SPECIAL_ARG_EDITOR,
- IMG_EM_GATE_8_GRAY_EDITOR
+ EL_EMC_GATE_8_GRAY, GFX_SPECIAL_ARG_EDITOR,
+ IMG_EMC_GATE_8_GRAY_EDITOR
},
{
EL_EMC_DRIPPER, GFX_SPECIAL_ARG_EDITOR,
{ "trigger_player.ypos", "13" },
{ "trigger_player.frames", "1" },
- { "em_key_5", "RocksEMC.pcx" },
- { "em_key_5.xpos", "0" },
- { "em_key_5.ypos", "5" },
- { "em_key_5.frames", "1" },
- { "em_key_6", "RocksEMC.pcx" },
- { "em_key_6.xpos", "1" },
- { "em_key_6.ypos", "5" },
- { "em_key_6.frames", "1" },
- { "em_key_7", "RocksEMC.pcx" },
- { "em_key_7.xpos", "2" },
- { "em_key_7.ypos", "5" },
- { "em_key_7.frames", "1" },
- { "em_key_8", "RocksEMC.pcx" },
- { "em_key_8.xpos", "3" },
- { "em_key_8.ypos", "5" },
- { "em_key_8.frames", "1" },
-
- { "em_gate_5", "RocksEMC.pcx" },
- { "em_gate_5.xpos", "0" },
- { "em_gate_5.ypos", "6" },
- { "em_gate_5.frames", "1" },
- { "em_gate_5_gray", "RocksEMC.pcx" },
- { "em_gate_5_gray.xpos", "4" },
- { "em_gate_5_gray.ypos", "7" },
- { "em_gate_5_gray.frames", "1" },
- { "em_gate_5_gray.EDITOR", "RocksEMC.pcx" },
- { "em_gate_5_gray.EDITOR.xpos", "0" },
- { "em_gate_5_gray.EDITOR.ypos", "7" },
- { "em_gate_5_gray.EDITOR.frames", "1" },
- { "em_gate_6", "RocksEMC.pcx" },
- { "em_gate_6.xpos", "1" },
- { "em_gate_6.ypos", "6" },
- { "em_gate_6.frames", "1" },
- { "em_gate_6_gray", "RocksEMC.pcx" },
- { "em_gate_6_gray.xpos", "4" },
- { "em_gate_6_gray.ypos", "7" },
- { "em_gate_6_gray.frames", "1" },
- { "em_gate_6_gray.EDITOR", "RocksEMC.pcx" },
- { "em_gate_6_gray.EDITOR.xpos", "1" },
- { "em_gate_6_gray.EDITOR.ypos", "7" },
- { "em_gate_6_gray.EDITOR.frames", "1" },
- { "em_gate_7", "RocksEMC.pcx" },
- { "em_gate_7.xpos", "2" },
- { "em_gate_7.ypos", "6" },
- { "em_gate_7.frames", "1" },
- { "em_gate_7_gray", "RocksEMC.pcx" },
- { "em_gate_7_gray.xpos", "4" },
- { "em_gate_7_gray.ypos", "7" },
- { "em_gate_7_gray.frames", "1" },
- { "em_gate_7_gray.EDITOR", "RocksEMC.pcx" },
- { "em_gate_7_gray.EDITOR.xpos", "2" },
- { "em_gate_7_gray.EDITOR.ypos", "7" },
- { "em_gate_7_gray.EDITOR.frames", "1" },
- { "em_gate_8", "RocksEMC.pcx" },
- { "em_gate_8.xpos", "3" },
- { "em_gate_8.ypos", "6" },
- { "em_gate_8.frames", "1" },
- { "em_gate_8_gray", "RocksEMC.pcx" },
- { "em_gate_8_gray.xpos", "4" },
- { "em_gate_8_gray.ypos", "7" },
- { "em_gate_8_gray.frames", "1" },
- { "em_gate_8_gray.EDITOR", "RocksEMC.pcx" },
- { "em_gate_8_gray.EDITOR.xpos", "3" },
- { "em_gate_8_gray.EDITOR.ypos", "7" },
- { "em_gate_8_gray.EDITOR.frames", "1" },
+ { "emc_key_5", "RocksEMC.pcx" },
+ { "emc_key_5.xpos", "0" },
+ { "emc_key_5.ypos", "5" },
+ { "emc_key_5.frames", "1" },
+ { "emc_key_6", "RocksEMC.pcx" },
+ { "emc_key_6.xpos", "1" },
+ { "emc_key_6.ypos", "5" },
+ { "emc_key_6.frames", "1" },
+ { "emc_key_7", "RocksEMC.pcx" },
+ { "emc_key_7.xpos", "2" },
+ { "emc_key_7.ypos", "5" },
+ { "emc_key_7.frames", "1" },
+ { "emc_key_8", "RocksEMC.pcx" },
+ { "emc_key_8.xpos", "3" },
+ { "emc_key_8.ypos", "5" },
+ { "emc_key_8.frames", "1" },
+
+ { "emc_gate_5", "RocksEMC.pcx" },
+ { "emc_gate_5.xpos", "0" },
+ { "emc_gate_5.ypos", "6" },
+ { "emc_gate_5.frames", "1" },
+ { "emc_gate_5_gray", "RocksEMC.pcx" },
+ { "emc_gate_5_gray.xpos", "4" },
+ { "emc_gate_5_gray.ypos", "7" },
+ { "emc_gate_5_gray.frames", "1" },
+ { "emc_gate_5_gray.EDITOR", "RocksEMC.pcx" },
+ { "emc_gate_5_gray.EDITOR.xpos", "0" },
+ { "emc_gate_5_gray.EDITOR.ypos", "7" },
+ { "emc_gate_5_gray.EDITOR.frames", "1" },
+ { "emc_gate_6", "RocksEMC.pcx" },
+ { "emc_gate_6.xpos", "1" },
+ { "emc_gate_6.ypos", "6" },
+ { "emc_gate_6.frames", "1" },
+ { "emc_gate_6_gray", "RocksEMC.pcx" },
+ { "emc_gate_6_gray.xpos", "4" },
+ { "emc_gate_6_gray.ypos", "7" },
+ { "emc_gate_6_gray.frames", "1" },
+ { "emc_gate_6_gray.EDITOR", "RocksEMC.pcx" },
+ { "emc_gate_6_gray.EDITOR.xpos", "1" },
+ { "emc_gate_6_gray.EDITOR.ypos", "7" },
+ { "emc_gate_6_gray.EDITOR.frames", "1" },
+ { "emc_gate_7", "RocksEMC.pcx" },
+ { "emc_gate_7.xpos", "2" },
+ { "emc_gate_7.ypos", "6" },
+ { "emc_gate_7.frames", "1" },
+ { "emc_gate_7_gray", "RocksEMC.pcx" },
+ { "emc_gate_7_gray.xpos", "4" },
+ { "emc_gate_7_gray.ypos", "7" },
+ { "emc_gate_7_gray.frames", "1" },
+ { "emc_gate_7_gray.EDITOR", "RocksEMC.pcx" },
+ { "emc_gate_7_gray.EDITOR.xpos", "2" },
+ { "emc_gate_7_gray.EDITOR.ypos", "7" },
+ { "emc_gate_7_gray.EDITOR.frames", "1" },
+ { "emc_gate_8", "RocksEMC.pcx" },
+ { "emc_gate_8.xpos", "3" },
+ { "emc_gate_8.ypos", "6" },
+ { "emc_gate_8.frames", "1" },
+ { "emc_gate_8_gray", "RocksEMC.pcx" },
+ { "emc_gate_8_gray.xpos", "4" },
+ { "emc_gate_8_gray.ypos", "7" },
+ { "emc_gate_8_gray.frames", "1" },
+ { "emc_gate_8_gray.EDITOR", "RocksEMC.pcx" },
+ { "emc_gate_8_gray.EDITOR.xpos", "3" },
+ { "emc_gate_8_gray.EDITOR.ypos", "7" },
+ { "emc_gate_8_gray.EDITOR.frames", "1" },
{ "emc_android", "emc_object.pcx" },
{ "emc_android.xpos", "7" },
#define IMG_UNKNOWN 663
#define IMG_TRIGGER_ELEMENT 664
#define IMG_TRIGGER_PLAYER 665
-#define IMG_EM_KEY_5 666
-#define IMG_EM_KEY_6 667
-#define IMG_EM_KEY_7 668
-#define IMG_EM_KEY_8 669
-#define IMG_EM_GATE_5 670
-#define IMG_EM_GATE_5_GRAY 671
-#define IMG_EM_GATE_5_GRAY_EDITOR 672
-#define IMG_EM_GATE_6 673
-#define IMG_EM_GATE_6_GRAY 674
-#define IMG_EM_GATE_6_GRAY_EDITOR 675
-#define IMG_EM_GATE_7 676
-#define IMG_EM_GATE_7_GRAY 677
-#define IMG_EM_GATE_7_GRAY_EDITOR 678
-#define IMG_EM_GATE_8 679
-#define IMG_EM_GATE_8_GRAY 680
-#define IMG_EM_GATE_8_GRAY_EDITOR 681
+#define IMG_EMC_KEY_5 666
+#define IMG_EMC_KEY_6 667
+#define IMG_EMC_KEY_7 668
+#define IMG_EMC_KEY_8 669
+#define IMG_EMC_GATE_5 670
+#define IMG_EMC_GATE_5_GRAY 671
+#define IMG_EMC_GATE_5_GRAY_EDITOR 672
+#define IMG_EMC_GATE_6 673
+#define IMG_EMC_GATE_6_GRAY 674
+#define IMG_EMC_GATE_6_GRAY_EDITOR 675
+#define IMG_EMC_GATE_7 676
+#define IMG_EMC_GATE_7_GRAY 677
+#define IMG_EMC_GATE_7_GRAY_EDITOR 678
+#define IMG_EMC_GATE_8 679
+#define IMG_EMC_GATE_8_GRAY 680
+#define IMG_EMC_GATE_8_GRAY_EDITOR 681
#define IMG_EMC_ANDROID 682
#define IMG_EMC_GRASS 683
#define IMG_EMC_GRASS_CRUMBLED 684
-#define COMPILE_DATE_STRING "[2005-01-22 18:19]"
+#define COMPILE_DATE_STRING "[2005-01-29 01:36]"
static int editor_el_emerald_mine_club[] =
{
- EL_EM_KEY_5,
- EL_EM_KEY_6,
- EL_EM_KEY_7,
- EL_EM_KEY_8,
+ EL_EMC_KEY_5,
+ EL_EMC_KEY_6,
+ EL_EMC_KEY_7,
+ EL_EMC_KEY_8,
- EL_EM_GATE_5,
- EL_EM_GATE_6,
- EL_EM_GATE_7,
- EL_EM_GATE_8,
+ EL_EMC_GATE_5,
+ EL_EMC_GATE_6,
+ EL_EMC_GATE_7,
+ EL_EMC_GATE_8,
- EL_EM_GATE_5_GRAY,
- EL_EM_GATE_6_GRAY,
- EL_EM_GATE_7_GRAY,
- EL_EM_GATE_8_GRAY,
+ EL_EMC_GATE_5_GRAY,
+ EL_EMC_GATE_6_GRAY,
+ EL_EMC_GATE_7_GRAY,
+ EL_EMC_GATE_8_GRAY,
EL_EMC_STEELWALL_1,
EL_EMC_STEELWALL_2,
{ EL_EM_KEY_3_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_EM_KEY_4_FILE, &level.score[SC_KEY], TEXT_COLLECTING },
#endif
- { EL_EM_KEY_5, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_6, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_7, &level.score[SC_KEY], TEXT_COLLECTING },
- { EL_EM_KEY_8, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_5, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_6, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_7, &level.score[SC_KEY], TEXT_COLLECTING },
+ { EL_EMC_KEY_8, &level.score[SC_KEY], TEXT_COLLECTING },
{ EL_AMOEBA_WET, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_AMOEBA_DRY, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
{ EL_AMOEBA_FULL, &level.amoeba_speed, TEXT_AMOEBA_SPEED },
DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(value, 3), FONT_TEXT_2);
}
-inline void DrawGameValue_Keys(int key[4])
+inline void DrawGameValue_Keys(int key[MAX_NUM_KEYS])
{
int i;
- for (i = 0; i < MAX_KEYS; i++)
+ /* currently only 4 of 8 possible keys are displayed */
+ for (i = 0; i < STD_NUM_KEYS; i++)
if (key[i])
DrawMiniGraphicExt(drawto, DX_KEYS + i * MINI_TILEX, DY_KEYS,
el2edimg(EL_KEY_1 + i));
void DrawAllGameValues(int emeralds, int dynamite, int score, int time,
int key_bits)
{
- int key[4];
+ int key[MAX_NUM_KEYS];
int i;
- for (i = 0; i < MAX_KEYS; i++)
+ for (i = 0; i < MAX_NUM_KEYS; i++)
key[i] = key_bits & (1 << i);
DrawGameValue_Level(level_nr);
player->lights_still_needed = 0;
player->friends_still_needed = 0;
- for (j = 0; j < MAX_KEYS; j++)
+ for (j = 0; j < MAX_NUM_KEYS; j++)
player->key[j] = FALSE;
player->dynabomb_count = 0;
return MF_NO_ACTION; /* player cannot walk here due to gravity */
#endif
- if (IS_GATE(element))
+ if (IS_RND_GATE(element))
{
- if (!player->key[element - EL_GATE_1])
+ if (!player->key[RND_GATE_NR(element)])
return MF_NO_ACTION;
}
- else if (IS_GATE_GRAY(element))
+ else if (IS_RND_GATE_GRAY(element))
{
- if (!player->key[element - EL_GATE_1_GRAY])
+ if (!player->key[RND_GATE_GRAY_NR(element)])
return MF_NO_ACTION;
}
else if (element == EL_EXIT_OPEN ||
if (IS_EM_GATE(element))
{
- if (!player->key[element - EL_EM_GATE_1])
+ if (!player->key[EM_GATE_NR(element)])
return MF_NO_ACTION;
}
else if (IS_EM_GATE_GRAY(element))
{
- if (!player->key[element - EL_EM_GATE_1_GRAY])
+ if (!player->key[EM_GATE_GRAY_NR(element)])
return MF_NO_ACTION;
}
else if (IS_SP_PORT(element))
{
player->dynabomb_xl = TRUE;
}
- else if ((element >= EL_KEY_1 && element <= EL_KEY_4) ||
- (element >= EL_EM_KEY_1 && element <= EL_EM_KEY_4))
+ else if (IS_KEY(element))
{
- int key_nr = (element >= EL_KEY_1 && element <= EL_KEY_4 ?
- element - EL_KEY_1 : element - EL_EM_KEY_1);
-
- player->key[key_nr] = TRUE;
+ player->key[KEY_NR(element)] = TRUE;
DrawGameValue_Keys(player->key);
case EL_KEY_2:
case EL_KEY_3:
case EL_KEY_4:
+ case EL_EM_KEY_1:
+ case EL_EM_KEY_2:
+ case EL_EM_KEY_3:
+ case EL_EM_KEY_4:
+ case EL_EMC_KEY_5:
+ case EL_EMC_KEY_6:
+ case EL_EMC_KEY_7:
+ case EL_EMC_KEY_8:
RaiseScore(level.score[SC_KEY]);
break;
default:
EL_EM_KEY_2,
EL_E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L_EM_GATE_4_GRAY,
- EL_EM_GATE_5_GRAY,
- EL_EM_GATE_6_GRAY,
- EL_EM_GATE_7_GRAY,
- EL_EM_GATE_8_GRAY,
+ EL_EMC_GATE_5,
+ EL_EMC_GATE_6,
+ EL_EMC_GATE_7,
+ EL_EMC_GATE_8,
+ EL_EMC_GATE_5_GRAY,
+ EL_EMC_GATE_6_GRAY,
+ EL_EMC_GATE_7_GRAY,
+ EL_EMC_GATE_8_GRAY,
EL_DYNAMITE,
EL_INVISIBLE_STEELWALL,
EL_INVISIBLE_WALL,
"stop moving balloon"
},
{
- "em_gate_5",
+ "emc_gate_5",
"gate",
"door 5 (EMC style)",
},
{
- "em_gate_6",
+ "emc_gate_6",
"gate",
"door 6 (EMC style)",
},
{
- "em_gate_7",
+ "emc_gate_7",
"gate",
"door 7 (EMC style)",
},
{
- "em_gate_8",
+ "emc_gate_8",
"gate",
"door 8 (EMC style)",
},
{
- "em_gate_5_gray",
+ "emc_gate_5_gray",
"gate",
"gray door (EMC style, key 5)",
},
{
- "em_gate_6_gray",
+ "emc_gate_6_gray",
"gate",
"gray door (EMC style, key 6)",
},
{
- "em_gate_7_gray",
+ "emc_gate_7_gray",
"gate",
"gray door (EMC style, key 7)",
},
{
- "em_gate_8_gray",
+ "emc_gate_8_gray",
"gate",
"gray door (EMC style, key 8)",
},
{
- "em_key_5",
+ "emc_key_5",
"key",
"key 5 (EMC style)",
},
{
- "em_key_6",
+ "emc_key_6",
"key",
"key 6 (EMC style)",
},
{
- "em_key_7",
+ "emc_key_7",
"key",
"key 7 (EMC style)",
},
{
- "em_key_8",
+ "emc_key_8",
"key",
"key 8 (EMC style)",
},
#define IS_ENVELOPE(e) ((e) >= EL_ENVELOPE_1 && \
(e) <= EL_ENVELOPE_4)
-#define IS_GATE(e) ((e) >= EL_GATE_1 && \
+#define IS_RND_KEY(e) ((e) >= EL_KEY_1 && \
+ (e) <= EL_KEY_4)
+#define IS_EM_KEY(e) ((e) >= EL_EM_KEY_1 && \
+ (e) <= EL_EM_KEY_4)
+#define IS_EMC_KEY(e) ((e) >= EL_EMC_KEY_5 && \
+ (e) <= EL_EMC_KEY_8)
+#define IS_KEY(e) (IS_RND_KEY(e) || \
+ IS_EM_KEY(e) || \
+ IS_EMC_KEY(e))
+#define RND_KEY_NR(e) ((e) - EL_KEY_1)
+#define EM_KEY_NR(e) ((e) - EL_EM_KEY_1)
+#define EMC_KEY_NR(e) ((e) - EL_EMC_KEY_5 + 4)
+#define KEY_NR(e) (IS_RND_KEY(e) ? RND_KEY_NR(e) : \
+ IS_EM_KEY(e) ? EM_KEY_NR(e) : \
+ IS_EMC_KEY(e) ? EMC_KEY_NR(e) : 0)
+
+#define IS_RND_GATE(e) ((e) >= EL_GATE_1 && \
(e) <= EL_GATE_4)
-
-#define IS_GATE_GRAY(e) ((e) >= EL_GATE_1_GRAY && \
- (e) <= EL_GATE_4_GRAY)
-
#define IS_EM_GATE(e) ((e) >= EL_EM_GATE_1 && \
(e) <= EL_EM_GATE_4)
-
+#define IS_EMC_GATE(e) ((e) >= EL_EMC_GATE_5 && \
+ (e) <= EL_EMC_GATE_8)
+#define IS_GATE(e) (IS_RND_GATE(e) || \
+ IS_EM_GATE(e) || \
+ IS_EMC_GATE(e))
+#define RND_GATE_NR(e) ((e) - EL_GATE_1)
+#define EM_GATE_NR(e) ((e) - EL_EM_GATE_1)
+#define EMC_GATE_NR(e) ((e) - EL_EMC_GATE_5 + 4)
+#define GATE_NR(e) (IS_RND_GATE(e) ? RND_GATE_NR(e) : \
+ IS_EM_GATE(e) ? EM_GATE_NR(e) : \
+ IS_EMC_GATE(e) ? EMC_GATE_NR(e) : 0)
+
+#define IS_RND_GATE_GRAY(e) ((e) >= EL_GATE_1_GRAY && \
+ (e) <= EL_GATE_4_GRAY)
#define IS_EM_GATE_GRAY(e) ((e) >= EL_EM_GATE_1_GRAY && \
(e) <= EL_EM_GATE_4_GRAY)
+#define IS_EMC_GATE_GRAY(e) ((e) >= EL_EMC_GATE_5_GRAY && \
+ (e) <= EL_EMC_GATE_8_GRAY)
+#define IS_GATE_GRAY(e) (IS_RND_GATE_GRAY(e) || \
+ IS_EM_GATE_GRAY(e) || \
+ IS_EMC_GATE_GRAY(e))
+#define RND_GATE_GRAY_NR(e) ((e) - EL_GATE_1_GRAY)
+#define EM_GATE_GRAY_NR(e) ((e) - EL_EM_GATE_1_GRAY)
+#define EMC_GATE_GRAY_NR(e) ((e) - EL_EMC_GATE_5_GRAY + 4)
+#define GATE_GRAY_NR(e) (IS_RND_GATE_GRAY(e) ? RND_GATE_GRAY_NR(e) : \
+ IS_EM_GATE_GRAY(e) ? EM_GATE_GRAY_NR(e) : \
+ IS_EMC_GATE_GRAY(e) ? EMC_GATE_GRAY_NR(e) : 0)
#define GFX_ELEMENT(e) (element_info[e].use_gfx_element ? \
element_info[e].gfx_element : e)
#define MAX_SCORE_ENTRIES 100
#define MAX_NUM_AMOEBA 100
#define MAX_INVENTORY_SIZE 1000
-#define MAX_KEYS 4
+#define STD_NUM_KEYS 4
+#define MAX_NUM_KEYS 8
#define NUM_BELTS 4
#define NUM_BELT_PARTS 3
#define MIN_ENVELOPE_XSIZE 1
/* the following EMC style elements are currently not implemented in R'n'D */
#define EL_BALLOON_SWITCH_NONE 667
-#define EL_EM_GATE_5 668
-#define EL_EM_GATE_6 669
-#define EL_EM_GATE_7 670
-#define EL_EM_GATE_8 671
-#define EL_EM_GATE_5_GRAY 672
-#define EL_EM_GATE_6_GRAY 673
-#define EL_EM_GATE_7_GRAY 674
-#define EL_EM_GATE_8_GRAY 675
-#define EL_EM_KEY_5 676
-#define EL_EM_KEY_6 677
-#define EL_EM_KEY_7 678
-#define EL_EM_KEY_8 679
+#define EL_EMC_GATE_5 668
+#define EL_EMC_GATE_6 669
+#define EL_EMC_GATE_7 670
+#define EL_EMC_GATE_8 671
+#define EL_EMC_GATE_5_GRAY 672
+#define EL_EMC_GATE_6_GRAY 673
+#define EL_EMC_GATE_7_GRAY 674
+#define EL_EMC_GATE_8_GRAY 675
+#define EL_EMC_KEY_5 676
+#define EL_EMC_KEY_6 677
+#define EL_EMC_KEY_7 678
+#define EL_EMC_KEY_8 679
#define EL_EMC_ANDROID 680
#define EL_EMC_GRASS 681
#define EL_EMC_MAGIC_BALL 682
int sokobanfields_still_needed;
int lights_still_needed;
int friends_still_needed;
- int key[4];
+ int key[MAX_NUM_KEYS];
int dynabomb_count, dynabomb_size, dynabombs_left, dynabomb_xl;
int shield_normal_time_left;
int shield_deadly_time_left;
},
{
Ykey_5_eat, FALSE, FALSE,
- EL_EM_KEY_5, ACTION_COLLECTING, -1
+ EL_EMC_KEY_5, ACTION_COLLECTING, -1
},
{
Ykey_6_eat, FALSE, FALSE,
- EL_EM_KEY_6, ACTION_COLLECTING, -1
+ EL_EMC_KEY_6, ACTION_COLLECTING, -1
},
{
Ykey_7_eat, FALSE, FALSE,
- EL_EM_KEY_7, ACTION_COLLECTING, -1
+ EL_EMC_KEY_7, ACTION_COLLECTING, -1
},
{
Ykey_8_eat, FALSE, FALSE,
- EL_EM_KEY_8, ACTION_COLLECTING, -1
+ EL_EMC_KEY_8, ACTION_COLLECTING, -1
},
{
Ylenses_eat, FALSE, FALSE,
},
{
Xdoor_5, TRUE, FALSE,
- EL_EM_GATE_5, -1, -1
+ EL_EMC_GATE_5, -1, -1
},
{
Xdoor_6, TRUE, FALSE,
- EL_EM_GATE_6, -1, -1
+ EL_EMC_GATE_6, -1, -1
},
{
Xdoor_7, TRUE, FALSE,
- EL_EM_GATE_7, -1, -1
+ EL_EMC_GATE_7, -1, -1
},
{
Xdoor_8, TRUE, FALSE,
- EL_EM_GATE_8, -1, -1
+ EL_EMC_GATE_8, -1, -1
},
{
Xkey_1, TRUE, FALSE,
},
{
Xkey_5, TRUE, FALSE,
- EL_EM_KEY_5, -1, -1
+ EL_EMC_KEY_5, -1, -1
},
{
Xkey_6, TRUE, FALSE,
- EL_EM_KEY_6, -1, -1
+ EL_EMC_KEY_6, -1, -1
},
{
Xkey_7, TRUE, FALSE,
- EL_EM_KEY_7, -1, -1
+ EL_EMC_KEY_7, -1, -1
},
{
Xkey_8, TRUE, FALSE,
- EL_EM_KEY_8, -1, -1
+ EL_EMC_KEY_8, -1, -1
},
{
Xwind_n, TRUE, FALSE,
},
{
Xfake_door_5, TRUE, FALSE,
- EL_EM_GATE_5_GRAY, -1, -1
+ EL_EMC_GATE_5_GRAY, -1, -1
},
{
Xfake_door_6, TRUE, FALSE,
- EL_EM_GATE_6_GRAY, -1, -1
+ EL_EMC_GATE_6_GRAY, -1, -1
},
{
Xfake_door_7, TRUE, FALSE,
- EL_EM_GATE_7_GRAY, -1, -1
+ EL_EMC_GATE_7_GRAY, -1, -1
},
{
Xfake_door_8, TRUE, FALSE,
- EL_EM_GATE_8_GRAY, -1, -1
+ EL_EMC_GATE_8_GRAY, -1, -1
},
{
Xfake_acid_1, TRUE, FALSE,