From: Holger Schemel Date: Sat, 25 Sep 1999 00:07:29 +0000 (+0200) Subject: rnd-19990925-1-src X-Git-Tag: 1.4.0^2~14 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=eae2f3467caaaf64a9370c1acd8cecf11fd58328;p=rocksndiamonds.git rnd-19990925-1-src --- diff --git a/src/events.c b/src/events.c index 0e812285..1866e7ae 100644 --- a/src/events.c +++ b/src/events.c @@ -356,7 +356,7 @@ void HandleButton(int mx, int my, int button) break; case HALLOFFAME: - HandleHallOfFame(button); + HandleHallOfFame(0,0, 0,0, button); break; case LEVELED: @@ -561,6 +561,14 @@ void HandleKey(KeySym key, int key_status) BackToFront(); break; + case XK_Page_Up: + HandleHallOfFame(0,0, 0,-SCR_FIELDY, MB_MENU_MARK); + break; + + case XK_Page_Down: + HandleHallOfFame(0,0, 0,SCR_FIELDY, MB_MENU_MARK); + break; + default: break; } @@ -773,7 +781,7 @@ void HandleJoystick() } case HALLOFFAME: - HandleHallOfFame(!newbutton); + HandleHallOfFame(0,0, dx,dy, !newbutton); break; case HELPSCREEN: diff --git a/src/init.c b/src/init.c index a9f06177..0a2e0b03 100644 --- a/src/init.c +++ b/src/init.c @@ -473,7 +473,8 @@ void InitGfx() { "SP", TRUE }, { "DC", TRUE }, { "Font", FALSE }, - { "Font2", FALSE } + { "Font2", FALSE }, + { "Font3", FALSE } }; #else static struct PictureFileInfo pic[NUM_PICTURES] = @@ -485,7 +486,8 @@ void InitGfx() { "RocksSP", TRUE }, { "RocksDC", TRUE }, { "RocksFont", FALSE }, - { "RocksFont2", FALSE } + { "RocksFont2", FALSE }, + { "RocksFont3", FALSE } }; #endif diff --git a/src/main.h b/src/main.h index b8ba717b..880223b2 100644 --- a/src/main.h +++ b/src/main.h @@ -202,13 +202,14 @@ typedef unsigned char byte; #define PIX_DC 5 #define PIX_BIGFONT 6 #define PIX_SMALLFONT 7 +#define PIX_MEDIUMFONT 8 /* Pixmaps without graphic file */ -#define PIX_DB_BACK 8 -#define PIX_DB_DOOR 9 -#define PIX_DB_FIELD 10 +#define PIX_DB_BACK 9 +#define PIX_DB_DOOR 10 +#define PIX_DB_FIELD 11 -#define NUM_PICTURES 8 -#define NUM_PIXMAPS 10 +#define NUM_PICTURES 9 +#define NUM_PIXMAPS 11 /* boundaries of arrays etc. */ #define MAX_PLAYER_NAME_LEN 10 @@ -576,6 +577,8 @@ extern char *element_info[]; #define FONT4_YSIZE 16 #define FONT5_XSIZE 10 #define FONT5_YSIZE 14 +#define FONT6_XSIZE 16 +#define FONT6_YSIZE 32 #define GFX_STARTX SX #define GFX_STARTY SY @@ -1543,6 +1546,7 @@ extern char *element_info[]; /* font types */ #define FS_SMALL 0 #define FS_BIG 1 +#define FS_MEDIUM 2 /* font colors */ #define FC_RED 0 #define FC_BLUE 1 diff --git a/src/screens.c b/src/screens.c index 819e25df..6fccd1dc 100644 --- a/src/screens.c +++ b/src/screens.c @@ -823,17 +823,23 @@ void DrawChooseLevel() static void drawChooseLevelList(int first_entry, int num_page_entries) { int i; - char buffer[SCR_FIELDX]; + char buffer[SCR_FIELDX * 2]; ClearWindow(); DrawText(SX, SY, "Level Directories", FS_BIG, FC_GREEN); for(i=0; i 0) + { + first_entry -= step; + if (first_entry < 0) + first_entry = 0; + + drawHallOfFameList(first_entry, highlight_position); + return; + } + } + else if (dy > 0) + { + if (first_entry + MAX_LEVEL_SERIES_ON_SCREEN < MAX_SCORE_ENTRIES) + { + first_entry += step; + if (first_entry + MAX_LEVEL_SERIES_ON_SCREEN > MAX_SCORE_ENTRIES) + first_entry = MAX(0, MAX_SCORE_ENTRIES - MAX_LEVEL_SERIES_ON_SCREEN); + + drawHallOfFameList(first_entry, highlight_position); + return; + } + } + if (button_released) { FadeSound(SND_HALLOFFAME); game_status = MAINMENU; DrawMainMenu(); - BackToFront(); } - else + + BackToFront(); + + if (game_status == HALLOFFAME) DoAnimation(); } diff --git a/src/screens.h b/src/screens.h index ccb6cd50..67ee9c28 100644 --- a/src/screens.h +++ b/src/screens.h @@ -29,7 +29,7 @@ void HandleTypeName(int, KeySym); void DrawChooseLevel(void); void HandleChooseLevel(int, int, int, int, int); void DrawHallOfFame(int); -void HandleHallOfFame(int); +void HandleHallOfFame(int, int, int, int, int); void DrawSetupScreen(void); void HandleSetupScreen(int, int, int, int, int); void DrawSetupInputScreen(void); diff --git a/src/tools.c b/src/tools.c index f40c0475..d73c1d89 100644 --- a/src/tools.c +++ b/src/tools.c @@ -319,6 +319,7 @@ void ClearWindow() int getFontWidth(int font_size, int font_type) { return (font_size == FS_BIG ? FONT1_XSIZE : + font_size == FS_MEDIUM ? FONT6_XSIZE : font_type == FC_SPECIAL1 ? FONT3_XSIZE : font_type == FC_SPECIAL2 ? FONT4_XSIZE : font_type == FC_SPECIAL3 ? FONT5_XSIZE : @@ -328,6 +329,7 @@ int getFontWidth(int font_size, int font_type) int getFontHeight(int font_size, int font_type) { return (font_size == FS_BIG ? FONT1_YSIZE : + font_size == FS_MEDIUM ? FONT6_YSIZE : font_type == FC_SPECIAL1 ? FONT3_YSIZE : font_type == FC_SPECIAL2 ? FONT4_YSIZE : font_type == FC_SPECIAL3 ? FONT5_YSIZE : @@ -388,7 +390,7 @@ void DrawTextExt(Drawable d, GC gc, int x, int y, int font_pixmap; boolean print_inverse = FALSE; - if (font_size != FS_SMALL && font_size != FS_BIG) + if (font_size != FS_SMALL && font_size != FS_BIG && font_size != FS_MEDIUM) font_size = FS_SMALL; if (font_type < FC_RED || font_type > FC_SPECIAL3) font_type = FC_RED; @@ -396,8 +398,12 @@ void DrawTextExt(Drawable d, GC gc, int x, int y, font_width = getFontWidth(font_size, font_type); font_height = getFontHeight(font_size, font_type); - font_pixmap = (font_size == FS_BIG ? PIX_BIGFONT : PIX_SMALLFONT); - font_start = (font_type * (font_size == FS_BIG ? FONT1_YSIZE : FONT2_YSIZE) * + font_pixmap = (font_size == FS_BIG ? PIX_BIGFONT : + font_size == FS_MEDIUM ? PIX_MEDIUMFONT : + PIX_SMALLFONT); + font_start = (font_type * (font_size == FS_BIG ? FONT1_YSIZE : + font_size == FS_MEDIUM ? FONT6_YSIZE : + FONT2_YSIZE) * FONT_LINES_PER_FONT); if (font_type == FC_SPECIAL3)