From: Holger Schemel Date: Wed, 29 Sep 1999 13:14:36 +0000 (+0200) Subject: rnd-19990929-2-src X-Git-Tag: 1.4.0^2~9 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a35852e106072656e444202e672d050ebff03abb;p=rocksndiamonds.git rnd-19990929-2-src --- diff --git a/src/init.c b/src/init.c index 4adf31ec..3e98c552 100644 --- a/src/init.c +++ b/src/init.c @@ -476,6 +476,7 @@ void InitGfx() { "Toons", TRUE }, { "SP", TRUE }, { "DC", TRUE }, + { "More", TRUE }, { "Font", FALSE }, { "Font2", FALSE }, { "Font3", FALSE } @@ -489,6 +490,7 @@ void InitGfx() { "RocksToons", TRUE }, { "RocksSP", TRUE }, { "RocksDC", TRUE }, + { "RocksMore", TRUE }, { "RocksFont", FALSE }, { "RocksFont2", FALSE }, { "RocksFont3", FALSE } diff --git a/src/main.h b/src/main.h index 880223b2..27acc1e1 100644 --- a/src/main.h +++ b/src/main.h @@ -200,16 +200,17 @@ typedef unsigned char byte; #define PIX_TOONS 3 #define PIX_SP 4 #define PIX_DC 5 -#define PIX_BIGFONT 6 -#define PIX_SMALLFONT 7 -#define PIX_MEDIUMFONT 8 +#define PIX_MORE 6 +#define PIX_BIGFONT 7 +#define PIX_SMALLFONT 8 +#define PIX_MEDIUMFONT 9 /* Pixmaps without graphic file */ -#define PIX_DB_BACK 9 -#define PIX_DB_DOOR 10 -#define PIX_DB_FIELD 11 +#define PIX_DB_BACK 10 +#define PIX_DB_DOOR 11 +#define PIX_DB_FIELD 12 -#define NUM_PICTURES 9 -#define NUM_PIXMAPS 11 +#define NUM_PICTURES 10 +#define NUM_PIXMAPS 13 /* boundaries of arrays etc. */ #define MAX_PLAYER_NAME_LEN 10 @@ -608,6 +609,14 @@ extern char *element_info[]; #define MINI_DC_PER_LINE 16 #define MICRO_DC_PER_LINE 16 +#define MINI_MORE_STARTX 256 +#define MINI_MORE_STARTY 256 +#define MICRO_MORE_STARTX 384 +#define MICRO_MORE_STARTY 384 +#define MORE_PER_LINE 16 +#define MINI_MORE_PER_LINE 16 +#define MICRO_MORE_PER_LINE 16 + #define FONT_CHARS_PER_LINE 16 #define FONT_LINES_PER_FONT 4 @@ -994,6 +1003,7 @@ extern char *element_info[]; ** 512 - 767: graphics from "RocksHeroes" ** 768 - 1023: graphics from "RocksSP" ** 1024 - 1279: graphics from "RocksDC" +** 1280 - 1535: graphics from "RocksMore" */ #define GFX_START_ROCKSSCREEN 0 @@ -1006,8 +1016,10 @@ extern char *element_info[]; #define GFX_END_ROCKSSP 1023 #define GFX_START_ROCKSDC 1024 #define GFX_END_ROCKSDC 1279 +#define GFX_START_ROCKSMORE 1280 +#define GFX_END_ROCKSMORE 1535 -#define NUM_TILES 1280 +#define NUM_TILES 1536 /* graphics from "RocksScreen" */ /* Zeile 0 (0) */ @@ -1405,6 +1417,18 @@ extern char *element_info[]; #define GFX_EMC_WALL_7 (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 15) #define GFX_EMC_WALL_8 (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 14) +/* graphics from "RocksMore" */ +#define GFX_ARROW_BLUE_LEFT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 0) +#define GFX_ARROW_BLUE_RIGHT (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 1) +#define GFX_ARROW_BLUE_UP (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 2) +#define GFX_ARROW_BLUE_DOWN (GFX_START_ROCKSMORE + 0 * MORE_PER_LINE + 3) +#define GFX_ARROW_RED_LEFT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 0) +#define GFX_ARROW_RED_RIGHT (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 1) +#define GFX_ARROW_RED_UP (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 2) +#define GFX_ARROW_RED_DOWN (GFX_START_ROCKSMORE + 1 * MORE_PER_LINE + 3) +#define GFX_SCROLLBAR_BLUE (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 0) +#define GFX_SCROLLBAR_RED (GFX_START_ROCKSMORE + 2 * MORE_PER_LINE + 1) + /* graphics from "RocksFont" */ #define GFX_CHAR_START (GFX_START_ROCKSFONT) #define GFX_CHAR_ASCII0 (GFX_CHAR_START - 32) diff --git a/src/pcx.c b/src/pcx.c index cb8e5498..b26e4427 100644 --- a/src/pcx.c +++ b/src/pcx.c @@ -154,6 +154,7 @@ Image *Read_PCX_to_Image(char *filename) { /* PCX file is too short to contain a valid PCX header */ fclose(file); + errno_pcx = PCX_FileInvalid; return NULL; } @@ -190,6 +191,7 @@ Image *Read_PCX_to_Image(char *filename) width < 0 || height < 0) { free(file_buffer); + errno_pcx = PCX_FileInvalid; return NULL; } @@ -198,7 +200,7 @@ Image *Read_PCX_to_Image(char *filename) if (options.verbose) { printf("%s is a %dx%d PC Paintbrush image with %d bitplanes\n", - filename, pcx.xmax, pcx.ymax, + filename, width, height, pcx.color_planes); printf("depth: %d\n", pcx.bits_per_pixel); printf("color_planes: %d\n", pcx.color_planes); @@ -220,6 +222,7 @@ Image *Read_PCX_to_Image(char *filename) { free(file_buffer); freeImage(image); + errno_pcx = PCX_FileInvalid; return NULL; } diff --git a/src/screens.c b/src/screens.c index 75727695..2d53a4a2 100644 --- a/src/screens.c +++ b/src/screens.c @@ -125,8 +125,8 @@ void DrawMainMenu() for(i=2; i<10; i++) DrawGraphic(0, i, GFX_KUGEL_BLAU); - DrawGraphic(10, 3, GFX_PFEIL_LEFT); - DrawGraphic(14, 3, GFX_PFEIL_RIGHT); + DrawGraphic(10, 3, GFX_ARROW_BLUE_LEFT); + DrawGraphic(14, 3, GFX_ARROW_BLUE_RIGHT); DrawText(SX + 56, SY + 326, "A Game by Artsoft Entertainment", FS_SMALL, FC_RED); @@ -880,10 +880,10 @@ static void drawChooseLevelList(int first_entry, int num_page_entries) } if (first_entry > 0) - DrawGraphic(0, 1, GFX_PFEIL_UP); + DrawGraphic(0, 1, GFX_ARROW_BLUE_UP); if (first_entry + num_page_entries < num_leveldirs) - DrawGraphic(0, MAX_LEVEL_SERIES_ON_SCREEN + 1, GFX_PFEIL_DOWN); + DrawGraphic(0, MAX_LEVEL_SERIES_ON_SCREEN + 1, GFX_ARROW_BLUE_DOWN); } static void drawChooseLevelInfo(int leveldir_nr) @@ -1436,8 +1436,8 @@ void DrawSetupInputScreen() DrawGraphic(0, 3, GFX_KUGEL_BLAU); DrawGraphic(0, 4, GFX_KUGEL_BLAU); DrawGraphic(0, 15, GFX_KUGEL_BLAU); - DrawGraphic(10, 2, GFX_PFEIL_LEFT); - DrawGraphic(12, 2, GFX_PFEIL_RIGHT); + DrawGraphic(10, 2, GFX_ARROW_BLUE_LEFT); + DrawGraphic(12, 2, GFX_ARROW_BLUE_RIGHT); DrawText(SX+32, SY+2*32, "Player:", FS_BIG, FC_GREEN); DrawText(SX+32, SY+3*32, "Device:", FS_BIG, FC_GREEN); @@ -1517,10 +1517,10 @@ static void drawPlayerSetupInputInfo(int player_nr) } DrawText(SX+32, SY+5*32, "Actual Settings:", FS_BIG, FC_GREEN); - DrawGraphic(1, 6, GFX_PFEIL_LEFT); - DrawGraphic(1, 7, GFX_PFEIL_RIGHT); - DrawGraphic(1, 8, GFX_PFEIL_UP); - DrawGraphic(1, 9, GFX_PFEIL_DOWN); + DrawGraphic(1, 6, GFX_ARROW_BLUE_LEFT); + DrawGraphic(1, 7, GFX_ARROW_BLUE_RIGHT); + DrawGraphic(1, 8, GFX_ARROW_BLUE_UP); + DrawGraphic(1, 9, GFX_ARROW_BLUE_DOWN); DrawText(SX+2*32, SY+6*32, ":", FS_BIG, FC_BLUE); DrawText(SX+2*32, SY+7*32, ":", FS_BIG, FC_BLUE); DrawText(SX+2*32, SY+8*32, ":", FS_BIG, FC_BLUE); @@ -2096,24 +2096,24 @@ void HandleGameActions() /* ---------- new screen button stuff -------------------------------------- */ /* graphic position and size values for buttons and scrollbars */ -#define SC_SCROLLBUTTON_XPOS 24 +#define SC_SCROLLBUTTON_XPOS 64 #define SC_SCROLLBUTTON_YPOS 0 -#define SC_SCROLLBAR_XPOS 24 +#define SC_SCROLLBAR_XPOS 0 #define SC_SCROLLBAR_YPOS 64 -#define SC_SCROLLBUTTON_XSIZE 16 -#define SC_SCROLLBUTTON_YSIZE 16 +#define SC_SCROLLBUTTON_XSIZE 32 +#define SC_SCROLLBUTTON_YSIZE 32 #define SC_SCROLL_UP_XPOS (SXSIZE - SC_SCROLLBUTTON_XSIZE) -#define SC_SCROLL_UP_YPOS (3 * SC_SCROLLBUTTON_YSIZE) +#define SC_SCROLL_UP_YPOS SC_SCROLLBUTTON_YSIZE #define SC_SCROLL_DOWN_XPOS SC_SCROLL_UP_XPOS -#define SC_SCROLL_DOWN_YPOS (SYSIZE - 2 * SC_SCROLLBUTTON_YSIZE) +#define SC_SCROLL_DOWN_YPOS (SYSIZE - SC_SCROLLBUTTON_YSIZE) #define SC_SCROLL_VERTICAL_XPOS SC_SCROLL_UP_XPOS #define SC_SCROLL_VERTICAL_YPOS (SC_SCROLL_UP_YPOS + SC_SCROLLBUTTON_YSIZE) #define SC_SCROLL_VERTICAL_XSIZE SC_SCROLLBUTTON_XSIZE -#define SC_SCROLL_VERTICAL_YSIZE (SYSIZE - 6 * SC_SCROLLBUTTON_YSIZE) +#define SC_SCROLL_VERTICAL_YSIZE (SYSIZE - 3 * SC_SCROLLBUTTON_YSIZE) -#define SC_BORDER_SIZE 3 +#define SC_BORDER_SIZE 14 static struct { @@ -2124,14 +2124,14 @@ static struct } scrollbutton_info[NUM_SCREEN_SCROLLBUTTONS] = { { - SC_SCROLLBUTTON_XPOS, SC_SCROLLBUTTON_YPOS + 0 * SC_SCROLLBUTTON_YSIZE, - SC_SCROLL_UP_XPOS, SC_SCROLL_UP_YPOS, + SC_SCROLLBUTTON_XPOS + 0 * SC_SCROLLBUTTON_XSIZE, SC_SCROLLBUTTON_YPOS, + SC_SCROLL_UP_XPOS, SC_SCROLL_UP_YPOS, SCREEN_CTRL_ID_SCROLL_UP, "scroll level series up" }, { - SC_SCROLLBUTTON_XPOS, SC_SCROLLBUTTON_YPOS + 1 * SC_SCROLLBUTTON_YSIZE, - SC_SCROLL_DOWN_XPOS, SC_SCROLL_DOWN_YPOS, + SC_SCROLLBUTTON_XPOS + 1 * SC_SCROLLBUTTON_XSIZE, SC_SCROLLBUTTON_YPOS, + SC_SCROLL_DOWN_XPOS, SC_SCROLL_DOWN_YPOS, SCREEN_CTRL_ID_SCROLL_DOWN, "scroll level series down" } @@ -2159,7 +2159,7 @@ static struct static void CreateScreenScrollbuttons() { - Pixmap gd_pixmap = pix[PIX_DOOR]; + Pixmap gd_pixmap = pix[PIX_MORE]; struct GadgetInfo *gi; unsigned long event_mask; int i; @@ -2179,10 +2179,10 @@ static void CreateScreenScrollbuttons() y += SY; width = SC_SCROLLBUTTON_XSIZE; height = SC_SCROLLBUTTON_YSIZE; - gd_x1 = DOOR_GFX_PAGEX8 + scrollbutton_info[i].xpos; - gd_y1 = DOOR_GFX_PAGEY1 + scrollbutton_info[i].ypos; - gd_x2 = gd_x1 - SC_SCROLLBUTTON_XSIZE; - gd_y2 = gd_y1; + gd_x1 = scrollbutton_info[i].xpos; + gd_y1 = scrollbutton_info[i].ypos; + gd_x2 = gd_x1; + gd_y2 = gd_y1 + SC_SCROLLBUTTON_YSIZE; gi = CreateGadget(GDI_CUSTOM_ID, id, GDI_CUSTOM_TYPE_ID, i, @@ -2213,7 +2213,7 @@ static void CreateScreenScrollbars() for (i=0; i= 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_ROCKSFONT && graphic <= GFX_END_ROCKSFONT) { graphic -= GFX_START_ROCKSFONT;