From: Holger Schemel Date: Sat, 7 Aug 1999 19:22:34 +0000 (+0200) Subject: rnd-19990807-1-src X-Git-Tag: 1.4.0^2~25 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d4665f01d15ba3679f378819710a84d6c2348a9c;p=rocksndiamonds.git rnd-19990807-1-src --- diff --git a/src/editor.c b/src/editor.c index bf51938f..6aa94aeb 100644 --- a/src/editor.c +++ b/src/editor.c @@ -736,7 +736,7 @@ int editor_element[] = EL_CHAR('U'), EL_CHAR('L'), - EL_CHAR_MINUS, + EL_CHAR('-'), EL_CHAR('D'), EL_CHAR('E'), EL_CHAR('R'), @@ -774,7 +774,7 @@ int editor_element[] = EL_CHAR('E'), EL_CHAR('M'), EL_CHAR('E'), - EL_CHAR_MINUS, + EL_CHAR('-'), EL_CHAR('R'), EL_CHAR('A'), @@ -936,7 +936,7 @@ int editor_element[] = EL_CHAR('K'), EL_CHAR('O'), - EL_CHAR_MINUS, + EL_CHAR('-'), EL_CHAR('B'), EL_CHAR('A'), EL_CHAR('N'), @@ -946,11 +946,6 @@ int editor_element[] = EL_SOKOBAN_FELD_VOLL, EL_BETON, - EL_LEERRAUM, - EL_LEERRAUM, - EL_LEERRAUM, - EL_LEERRAUM, - EL_CHAR('S'), EL_CHAR('U'), EL_CHAR('P'), @@ -1011,6 +1006,56 @@ int editor_element[] = EL_SP_CHIP_UPPER, EL_SP_CHIP_LOWER, + EL_CHAR('D'), + EL_CHAR('I'), + EL_CHAR('A'), + EL_CHAR('-'), + + EL_CHAR('M'), + EL_CHAR('O'), + EL_CHAR('N'), + EL_CHAR('D'), + + EL_CHAR('C'), + EL_CHAR('A'), + EL_CHAR('V'), + EL_CHAR('E'), + + EL_CHAR('S'), + EL_CHAR(' '), + EL_CHAR('I'), + EL_CHAR('I'), + + EL_BELT1_LEFT, + EL_BELT1_MIDDLE, + EL_BELT1_RIGHT, + EL_BELT1_SWITCH_M, + + EL_BELT2_LEFT, + EL_BELT2_MIDDLE, + EL_BELT2_RIGHT, + EL_BELT2_SWITCH_M, + + EL_BELT3_LEFT, + EL_BELT3_MIDDLE, + EL_BELT3_RIGHT, + EL_BELT3_SWITCH_M, + + EL_BELT4_LEFT, + EL_BELT4_MIDDLE, + EL_BELT4_RIGHT, + EL_BELT4_SWITCH_M, + + EL_BELT1_SWITCH_L, + EL_BELT2_SWITCH_L, + EL_BELT3_SWITCH_L, + EL_BELT4_SWITCH_L, + + EL_BELT1_SWITCH_R, + EL_BELT2_SWITCH_R, + EL_BELT3_SWITCH_R, + EL_BELT4_SWITCH_R, + /* EL_CHAR('D'), EL_CHAR('Y'), diff --git a/src/game.c b/src/game.c index d4860369..ce6ca3ab 100644 --- a/src/game.c +++ b/src/game.c @@ -23,6 +23,9 @@ #include "joystick.h" #include "network.h" +/* this switch controls how rocks move horizontally */ +#define OLD_GAME_BEHAVIOUR FALSE + /* for DigField() */ #define DF_NO_PUSH 0 #define DF_DIG 1 @@ -144,7 +147,7 @@ static unsigned int getStateCheckSum(int counter) checksum += mult++ * StorePlayer[x][y]; checksum += mult++ * Frame[x][y]; checksum += mult++ * AmoebaNr[x][y]; - checksum += mult++ * JustHit[x][y]; + checksum += mult++ * JustStopped[x][y]; checksum += mult++ * Stop[x][y]; */ } @@ -366,6 +369,7 @@ void InitGame() player->MovDir = MV_NO_MOVING; player->MovPos = 0; player->Pushing = FALSE; + player->Switching = FALSE; player->GfxPos = 0; player->Frame = 0; @@ -419,6 +423,8 @@ void InitGame() AllPlayersGone = FALSE; game.magic_wall_active = FALSE; game.magic_wall_time_left = 0; + for (i=0; i<4; i++) + game.belt_dir[i] = MV_NO_MOVING; for (i=0; i0 && IS_FREE(x-1, y) && (IS_FREE(x-1, y+1) || Feld[x-1][y+1] == EL_SALZSAEURE)); @@ -2431,12 +2443,14 @@ void ContinueMoving(int x, int y) int newx = x + dx, newy = y + dy; int step = (horiz_move ? dx : dy) * TILEX/8; - if (CAN_FALL(element) && horiz_move && !IS_SP_ELEMENT(element)) - step*=2; - else if (element == EL_TROPFEN) + if (element == EL_TROPFEN) step/=2; else if (Store[x][y] == EL_MORAST_VOLL || Store[x][y] == EL_MORAST_LEER) step/=4; +#if OLD_GAME_BEHAVIOUR + else if (CAN_FALL(element) && horiz_move && !IS_SP_ELEMENT(element)) + step*=2; +#endif MovPos[x][y] += step; @@ -2500,7 +2514,7 @@ void ContinueMoving(int x, int y) DrawLevelField(newx, newy); Stop[newx][newy] = TRUE; - JustHit[x][newy] = 3; + JustStopped[newx][newy] = 3; if (DONT_TOUCH(element)) /* object may be nasty to player or others */ { @@ -3566,8 +3580,8 @@ void GameActions() for (y=0; y0) - JustHit[x][y]--; + if (JustStopped[x][y] > 0) + JustStopped[x][y]--; #if DEBUG if (IS_BLOCKED(x, y)) @@ -4355,6 +4369,7 @@ int DigField(struct PlayerInfo *player, if (mode == DF_NO_PUSH) { + player->Switching = FALSE; player->push_delay = 0; return MF_NO_ACTION; } @@ -4364,7 +4379,7 @@ int DigField(struct PlayerInfo *player, element = Feld[x][y]; - switch(element) + switch (element) { case EL_LEERRAUM: PlaySoundLevel(x, y, SND_EMPTY); @@ -4511,6 +4526,72 @@ int DigField(struct PlayerInfo *player, } break; + case EL_BELT1_SWITCH_L: + case EL_BELT1_SWITCH_M: + case EL_BELT1_SWITCH_R: + case EL_BELT2_SWITCH_L: + case EL_BELT2_SWITCH_M: + case EL_BELT2_SWITCH_R: + case EL_BELT3_SWITCH_L: + case EL_BELT3_SWITCH_M: + case EL_BELT3_SWITCH_R: + case EL_BELT4_SWITCH_L: + case EL_BELT4_SWITCH_M: + case EL_BELT4_SWITCH_R: + { + static int belt_base_element[4] = + { + EL_BELT1_SWITCH_L, + EL_BELT2_SWITCH_L, + EL_BELT3_SWITCH_L, + EL_BELT4_SWITCH_L + }; + static int belt_move_dir[3] = + { + MV_LEFT, + MV_NO_MOVING, + MV_RIGHT + }; + + int belt_nr = (element < EL_BELT2_SWITCH_L ? 0 : + element < EL_BELT3_SWITCH_L ? 1 : + element < EL_BELT4_SWITCH_L ? 2 : 3); + int belt_dir_nr = element - belt_base_element[belt_nr]; + int belt_dir_nr_next = (belt_dir_nr + 1) % 3; + int belt_dir_next = belt_move_dir[belt_dir_nr_next]; + int xx, yy; + + if (player->Switching) + return MF_ACTION; + + game.belt_dir[belt_nr] = belt_dir_next; + + for (yy=0; yySwitching = TRUE; + + return MF_ACTION; + } + break; + case EL_SP_EXIT: if (local_player->gems_still_needed > 0) return MF_NO_ACTION; diff --git a/src/image.c b/src/image.c index 09a75fce..83d8216b 100644 --- a/src/image.c +++ b/src/image.c @@ -514,7 +514,7 @@ int Read_PCX_to_Pixmap(Display *display, Window window, GC gc, char *filename, /* read the graphic file in PCX format to image structure */ if ((image = Read_PCX_to_Image(filename)) == NULL) - return PCX_FileInvalid; + return errno_pcx; #if DEBUG_TIMING printf("%s:\n", filename); @@ -548,7 +548,7 @@ int Read_PCX_to_Pixmap(Display *display, Window window, GC gc, char *filename, *pixmap = ximageinfo->pixmap; *pixmap_mask = ximageinfo->pixmap_mask; - return(PCX_Success); + return PCX_Success; } #endif /* !MSDOS */ diff --git a/src/init.c b/src/init.c index 78bfb711..00cf8234 100644 --- a/src/init.c +++ b/src/init.c @@ -480,7 +480,8 @@ void InitGfx() { "Door", TRUE }, { "Heroes", TRUE }, { "Toons", TRUE }, - { "More", TRUE }, + { "SP", TRUE }, + { "DC", TRUE }, { "Font", FALSE }, { "Font2", FALSE } }; @@ -491,7 +492,8 @@ void InitGfx() { "RocksDoor", TRUE }, { "RocksHeroes", TRUE }, { "RocksToons", TRUE }, - { "RocksMore", TRUE }, + { "RocksSP", TRUE }, + { "RocksDC", TRUE }, { "RocksFont", FALSE }, { "RocksFont2", FALSE } }; @@ -1553,7 +1555,41 @@ void InitElementProperties() }; static int ep_active_bomb_num = sizeof(ep_active_bomb)/sizeof(int); - static long ep_bit[] = + static int ep_belt[] = + { + EL_BELT1_LEFT, + EL_BELT1_MIDDLE, + EL_BELT1_RIGHT, + EL_BELT2_LEFT, + EL_BELT2_MIDDLE, + EL_BELT2_RIGHT, + EL_BELT3_LEFT, + EL_BELT3_MIDDLE, + EL_BELT3_RIGHT, + EL_BELT4_LEFT, + EL_BELT4_MIDDLE, + EL_BELT4_RIGHT, + }; + static int ep_belt_num = sizeof(ep_belt)/sizeof(int); + + static int ep_belt_switch[] = + { + EL_BELT1_SWITCH_L, + EL_BELT1_SWITCH_M, + EL_BELT1_SWITCH_R, + EL_BELT2_SWITCH_L, + EL_BELT2_SWITCH_M, + EL_BELT2_SWITCH_R, + EL_BELT3_SWITCH_L, + EL_BELT3_SWITCH_M, + EL_BELT3_SWITCH_R, + EL_BELT4_SWITCH_L, + EL_BELT4_SWITCH_M, + EL_BELT4_SWITCH_R, + }; + static int ep_belt_switch_num = sizeof(ep_belt_switch)/sizeof(int); + + static long ep1_bit[] = { EP_BIT_AMOEBALIVE, EP_BIT_AMOEBOID, @@ -1587,7 +1623,12 @@ void InitElementProperties() EP_BIT_OVER_PLAYER, EP_BIT_ACTIVE_BOMB }; - static int *ep_array[] = + static long ep2_bit[] = + { + EP_BIT_BELT, + EP_BIT_BELT_SWITCH + }; + static int *ep1_array[] = { ep_amoebalive, ep_amoeboid, @@ -1621,7 +1662,12 @@ void InitElementProperties() ep_over_player, ep_active_bomb }; - static int *ep_num[] = + static int *ep2_array[] = + { + ep_belt, + ep_belt_switch + }; + static int *ep1_num[] = { &ep_amoebalive_num, &ep_amoeboid_num, @@ -1655,16 +1701,29 @@ void InitElementProperties() &ep_over_player_num, &ep_active_bomb_num }; - static int num_properties = sizeof(ep_num)/sizeof(int *); + static int *ep2_num[] = + { + &ep_belt_num, + &ep_belt_switch_num + }; + static int num_properties1 = sizeof(ep1_num)/sizeof(int *); + static int num_properties2 = sizeof(ep2_num)/sizeof(int *); for(i=0; i'", + "letter '>'", /* 150 */ "letter '?'", "letter '@'", "letter 'A'", @@ -356,7 +357,7 @@ char *element_info[] = "letter 'E'", "letter 'F'", "letter 'G'", - "letter 'H'", + "letter 'H'", /* 160 */ "letter 'I'", "letter 'J'", "letter 'K'", @@ -366,7 +367,7 @@ char *element_info[] = "letter 'O'", "letter 'P'", "letter 'Q'", - "letter 'R'", + "letter 'R'", /* 170 */ "letter 'S'", "letter 'T'", "letter 'U'", @@ -376,7 +377,7 @@ char *element_info[] = "letter 'Y'", "letter 'Z'", "letter 'Ä'", - "letter 'Ö'", + "letter 'Ö'", /* 180 */ "letter 'Ü'", "letter '^'", "letter ''", @@ -386,6 +387,7 @@ char *element_info[] = "letter ''", "letter ''", "letter ''", + "letter ''", /* 190 */ "letter ''", "letter ''", "letter ''", @@ -395,8 +397,7 @@ char *element_info[] = "letter ''", "letter ''", "letter ''", - "letter ''", - "growing wall (horizontally)", + "growing wall (horizontally)", /* 200 */ "growing wall (vertically)", "growing wall (all directions)", "unused", @@ -406,7 +407,7 @@ char *element_info[] = "unused", "unused", "unused", - "empty space", + "empty space", /* 210 */ "zonk", "base", "murphy", @@ -416,7 +417,7 @@ char *element_info[] = "exit", "orange disk", "port (leading right)", - "port (leading down)", + "port (leading down)", /* 220 */ "port (leading left)", "port (leading up)", "port (leading right)", @@ -426,7 +427,7 @@ char *element_info[] = "snik snak", "yellow disk", "terminal", - "red disk", + "red disk", /* 230 */ "port (vertically)", "port (horizontally)", "port (all directions)", @@ -436,7 +437,7 @@ char *element_info[] = "chip (right half)", "hardware", "hardware", - "hardware", + "hardware", /* 240 */ "hardware", "hardware", "hardware", @@ -446,7 +447,7 @@ char *element_info[] = "hardware", "chip (upper half)", "chip (lower half)", - "unknown", + "unknown", /* 250 */ "unknown", "unknown", "unknown", @@ -455,38 +456,51 @@ char *element_info[] = /* 256 */ - "pearl", + "pearl", /* (256) */ "crystal", "wall with pearl", "wall with crystal", - "white door", + "white door", /* 260 */ "gray door (opened by white key)", "white key", "force field", "extra time", "switch gate (open)", "switch gate (closed)", - "switch for switch gate", + "switch for switch gate (open)", + "switch for switch gate (closed)", "time gate", - "time gate with magic wheel", - "green conveyor belt (left)", - "green conveyor belt (middle)", - "green conveyor belt (right)", - "switch for green conveyor belt", + "time gate with magic wheel", /* 270 */ "red conveyor belt (left)", "red conveyor belt (middle)", "red conveyor belt (right)", - "switch for red conveyor belt", + "switch for red conveyor belt (left)", + "switch for red conveyor belt (middle)", + "switch for red conveyor belt (right)", + "yellow conveyor belt (left)", + "yellow conveyor belt (middle)", + "yellow conveyor belt (right)", + "switch for yellow conveyor belt (left)", /* 280 */ + "switch for yellow conveyor belt (middle)", + "switch for yellow conveyor belt (right)", + "green conveyor belt (left)", + "green conveyor belt (middle)", + "green conveyor belt (right)", + "switch for green conveyor belt (left)", + "switch for green conveyor belt (middle)", + "switch for green conveyor belt (right)", "blue conveyor belt (left)", - "blue conveyor belt (middle)", + "blue conveyor belt (middle)", /* 290 */ "blue conveyor belt (right)", - "switch for blue conveyor belt", + "switch for blue conveyor belt (left)", + "switch for blue conveyor belt (middle)", + "switch for blue conveyor belt (right)", "land mine", "mail envelope", "light switch", "sign (exclamation)", "sign (radio activity)", - "sign (stop)", + "sign (stop)", /* 300 */ "sign (wheel chair)", "sign (parking)", "sign (one way)", @@ -496,7 +510,7 @@ char *element_info[] = "sign (exit)", "sign (yin yang)", "sign (other)", - "mole (starts moving left)", + "mole (starts moving left)", /* 310 */ "mole (starts moving right)", "mole (starts moving up)", "mole (starts moving down)", @@ -506,7 +520,7 @@ char *element_info[] = "-", "-", "-", - "-", + "-", /* 320 */ "-", "-", "-", diff --git a/src/main.h b/src/main.h index 0550a996..b10d0357 100644 --- a/src/main.h +++ b/src/main.h @@ -95,6 +95,7 @@ typedef unsigned char byte; #define IN_SCR_FIELD(x,y) ((x)>=BX1 && (x)<=BX2 && (y)>=BY1 &&(y)<=BY2) #define IN_LEV_FIELD(x,y) ((x)>=0 && (x)=0 &&(y)= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE) - { - graphic -= GFX_START_ROCKSMORE; - *pixmap_nr = PIX_MORE; - *x = (graphic % MORE_PER_LINE) * TILEX; - *y = (graphic / MORE_PER_LINE) * TILEY; - } else if (graphic >= GFX_START_ROCKSHEROES && graphic <= GFX_END_ROCKSHEROES) { graphic -= GFX_START_ROCKSHEROES; @@ -755,6 +748,20 @@ void getGraphicSource(int graphic, int *pixmap_nr, int *x, int *y) *x = (graphic % HEROES_PER_LINE) * TILEX; *y = (graphic / HEROES_PER_LINE) * TILEY; } + else if (graphic >= GFX_START_ROCKSSP && graphic <= GFX_END_ROCKSSP) + { + graphic -= GFX_START_ROCKSSP; + *pixmap_nr = PIX_SP; + *x = (graphic % SP_PER_LINE) * TILEX; + *y = (graphic / SP_PER_LINE) * TILEY; + } + else if (graphic >= GFX_START_ROCKSDC && graphic <= GFX_END_ROCKSDC) + { + graphic -= GFX_START_ROCKSDC; + *pixmap_nr = PIX_DC; + *x = (graphic % DC_PER_LINE) * TILEX; + *y = (graphic / DC_PER_LINE) * TILEY; + } else if (graphic >= GFX_START_ROCKSFONT && graphic <= GFX_END_ROCKSFONT) { graphic -= GFX_START_ROCKSFONT; @@ -765,7 +772,7 @@ void getGraphicSource(int graphic, int *pixmap_nr, int *x, int *y) } else { - *pixmap_nr = PIX_MORE; + *pixmap_nr = PIX_SP; *x = 0; *y = 0; } @@ -860,13 +867,20 @@ void getMiniGraphicSource(int graphic, Pixmap *pixmap, int *x, int *y) *x = MINI_GFX_STARTX + (graphic % MINI_GFX_PER_LINE) * MINI_TILEX; *y = MINI_GFX_STARTY + (graphic / MINI_GFX_PER_LINE) * MINI_TILEY; } - else if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE) + else if (graphic >= GFX_START_ROCKSSP && graphic <= GFX_END_ROCKSSP) { - graphic -= GFX_START_ROCKSMORE; - graphic -= ((graphic / MORE_PER_LINE) * MORE_PER_LINE) / 2; - *pixmap = pix[PIX_MORE]; - *x = MINI_MORE_STARTX + (graphic % MINI_MORE_PER_LINE) * MINI_TILEX; - *y = MINI_MORE_STARTY + (graphic / MINI_MORE_PER_LINE) * MINI_TILEY; + graphic -= GFX_START_ROCKSSP; + graphic -= ((graphic / SP_PER_LINE) * SP_PER_LINE) / 2; + *pixmap = pix[PIX_SP]; + *x = MINI_SP_STARTX + (graphic % MINI_SP_PER_LINE) * MINI_TILEX; + *y = MINI_SP_STARTY + (graphic / MINI_SP_PER_LINE) * MINI_TILEY; + } + else if (graphic >= GFX_START_ROCKSDC && graphic <= GFX_END_ROCKSDC) + { + graphic -= GFX_START_ROCKSDC; + *pixmap = pix[PIX_DC]; + *x = MINI_DC_STARTX + (graphic % MINI_DC_PER_LINE) * MINI_TILEX; + *y = MINI_DC_STARTY + (graphic / MINI_DC_PER_LINE) * MINI_TILEY; } else if (graphic >= GFX_START_ROCKSFONT && graphic <= GFX_END_ROCKSFONT) { @@ -878,9 +892,9 @@ void getMiniGraphicSource(int graphic, Pixmap *pixmap, int *x, int *y) } else { - *pixmap = pix[PIX_MORE]; - *x = MINI_MORE_STARTX; - *y = MINI_MORE_STARTY; + *pixmap = pix[PIX_SP]; + *x = MINI_SP_STARTX; + *y = MINI_SP_STARTY; } } @@ -1459,13 +1473,22 @@ void DrawMicroElement(int xpos, int ypos, int element) graphic = el2gfx(element); - if (graphic >= GFX_START_ROCKSMORE && graphic <= GFX_END_ROCKSMORE) + if (graphic >= GFX_START_ROCKSSP && graphic <= GFX_END_ROCKSSP) + { + graphic -= GFX_START_ROCKSSP; + graphic -= ((graphic / SP_PER_LINE) * SP_PER_LINE) / 2; + XCopyArea(display, pix[PIX_SP], drawto, gc, + MICRO_SP_STARTX + (graphic % MICRO_SP_PER_LINE) *MICRO_TILEX, + MICRO_SP_STARTY + (graphic / MICRO_SP_PER_LINE) *MICRO_TILEY, + MICRO_TILEX, MICRO_TILEY, xpos, ypos); + } + else if (graphic >= GFX_START_ROCKSDC && graphic <= GFX_END_ROCKSDC) { - graphic -= GFX_START_ROCKSMORE; - graphic -= ((graphic / MORE_PER_LINE) * MORE_PER_LINE) / 2; - XCopyArea(display, pix[PIX_MORE], drawto, gc, - MICRO_MORE_STARTX + (graphic % MICRO_MORE_PER_LINE) *MICRO_TILEX, - MICRO_MORE_STARTY + (graphic / MICRO_MORE_PER_LINE) *MICRO_TILEY, + graphic -= GFX_START_ROCKSDC; + graphic -= ((graphic / DC_PER_LINE) * DC_PER_LINE) / 2; + XCopyArea(display, pix[PIX_DC], drawto, gc, + MICRO_DC_STARTX + (graphic % MICRO_DC_PER_LINE) *MICRO_TILEX, + MICRO_DC_STARTY + (graphic / MICRO_DC_PER_LINE) *MICRO_TILEY, MICRO_TILEX, MICRO_TILEY, xpos, ypos); } else @@ -2455,23 +2478,36 @@ int el2gfx(int element) case EL_KEY_WHITE: return GFX_KEY_WHITE; case EL_FORCE_FIELD: return GFX_FORCE_FIELD; case EL_EXTRA_TIME: return GFX_EXTRA_TIME; - case EL_SWITCH_GATE_OPEN: return GFX_SWITCH_GATE_OPEN; - case EL_SWITCH_GATE_CLOSED: return GFX_SWITCH_GATE_CLOSED; - case EL_SWITCH_GATE_SWITCH: return GFX_SWITCH_GATE_SWITCH; + case EL_SWITCHGATE_OPEN: return GFX_SWITCHGATE_OPEN; + case EL_SWITCHGATE_CLOSED: return GFX_SWITCHGATE_CLOSED; + case EL_SWITCHGATE_SWITCH_L:return GFX_SWITCHGATE_SWITCH_L; + case EL_SWITCHGATE_SWITCH_R:return GFX_SWITCHGATE_SWITCH_R; case EL_TIME_GATE: return GFX_TIME_GATE; case EL_TIME_GATE_WHEEL: return GFX_TIME_GATE_WHEEL; - case EL_BELT_GREEN_LEFT: return GFX_BELT_GREEN_LEFT; - case EL_BELT_GREEN_MIDDLE: return GFX_BELT_GREEN_MIDDLE; - case EL_BELT_GREEN_RIGHT: return GFX_BELT_GREEN_RIGHT; - case EL_BELT_GREEN_SWITCH: return GFX_BELT_GREEN_SWITCH; - case EL_BELT_RED_LEFT: return GFX_BELT_RED_LEFT; - case EL_BELT_RED_MIDDLE: return GFX_BELT_RED_MIDDLE; - case EL_BELT_RED_RIGHT: return GFX_BELT_RED_RIGHT; - case EL_BELT_RED_SWITCH: return GFX_BELT_RED_SWITCH; - case EL_BELT_BLUE_LEFT: return GFX_BELT_BLUE_LEFT; - case EL_BELT_BLUE_MIDDLE: return GFX_BELT_BLUE_MIDDLE; - case EL_BELT_BLUE_RIGHT: return GFX_BELT_BLUE_RIGHT; - case EL_BELT_BLUE_SWITCH: return GFX_BELT_BLUE_SWITCH; + case EL_BELT1_LEFT: return GFX_BELT1_LEFT; + case EL_BELT1_MIDDLE: return GFX_BELT1_MIDDLE; + case EL_BELT1_RIGHT: return GFX_BELT1_RIGHT; + case EL_BELT1_SWITCH_L: return GFX_BELT1_SWITCH_L; + case EL_BELT1_SWITCH_M: return GFX_BELT1_SWITCH_M; + case EL_BELT1_SWITCH_R: return GFX_BELT1_SWITCH_R; + case EL_BELT2_LEFT: return GFX_BELT2_LEFT; + case EL_BELT2_MIDDLE: return GFX_BELT2_MIDDLE; + case EL_BELT2_RIGHT: return GFX_BELT2_RIGHT; + case EL_BELT2_SWITCH_L: return GFX_BELT2_SWITCH_L; + case EL_BELT2_SWITCH_M: return GFX_BELT2_SWITCH_M; + case EL_BELT2_SWITCH_R: return GFX_BELT2_SWITCH_R; + case EL_BELT3_LEFT: return GFX_BELT3_LEFT; + case EL_BELT3_MIDDLE: return GFX_BELT3_MIDDLE; + case EL_BELT3_RIGHT: return GFX_BELT3_RIGHT; + case EL_BELT3_SWITCH_L: return GFX_BELT3_SWITCH_L; + case EL_BELT3_SWITCH_M: return GFX_BELT3_SWITCH_M; + case EL_BELT3_SWITCH_R: return GFX_BELT3_SWITCH_R; + case EL_BELT4_LEFT: return GFX_BELT4_LEFT; + case EL_BELT4_MIDDLE: return GFX_BELT4_MIDDLE; + case EL_BELT4_RIGHT: return GFX_BELT4_RIGHT; + case EL_BELT4_SWITCH_L: return GFX_BELT4_SWITCH_L; + case EL_BELT4_SWITCH_M: return GFX_BELT4_SWITCH_M; + case EL_BELT4_SWITCH_R: return GFX_BELT4_SWITCH_R; case EL_LANDMINE: return GFX_LANDMINE; case EL_ENVELOPE: return GFX_ENVELOPE; case EL_LIGHT_SWITCH: return GFX_LIGHT_SWITCH; @@ -2503,10 +2539,10 @@ int el2gfx(int element) int nr_element = element - EL_SP_START; int gfx_per_line = 8; int nr_graphic = - (nr_element / gfx_per_line) * MORE_PER_LINE + + (nr_element / gfx_per_line) * SP_PER_LINE + (nr_element % gfx_per_line); - return GFX_START_ROCKSMORE + nr_graphic; + return GFX_START_ROCKSSP + nr_graphic; } else return -1;