From c356ebcf69cf63180eb3d13f69ef72d6081ac566 Mon Sep 17 00:00:00 2001 From: kreatordxx <> Date: Thu, 21 Feb 2008 10:32:34 +0000 Subject: [PATCH] add support for Macintosh splash screens and menu backgrounds in descent.hog, but not fonts (yet) --- CHANGELOG.txt | 4 ++++ main/inferno.c | 10 +++++++++- main/newmenu.c | 2 +- main/titles.c | 15 ++++++++------- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1f63825ae..4fe9d801f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20080221 +-------- +main/inferno.c, main/newmenu.c, main/titles.c: add support for Macintosh splash screens and menu backgrounds in descent.hog, but not fonts (yet) + 20080217 -------- d1x-rebirth.xcodeproj, main/game.c, main/newmenu.c: get SDL Video build to work again diff --git a/main/inferno.c b/main/inferno.c index 8eb95b581..ccbd1b15c 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -361,7 +361,15 @@ int main(int argc,char *argv[]) if (!GameArg.SysNoTitles) { - show_title_screen( "iplogo1.pcx", 1 ); + char publisher[16]; + + strcpy(publisher, "macplay.pcx"); // Mac Shareware + if (!PHYSFS_exists(publisher)) + strcpy(publisher, "mplaycd.pcx"); // Mac Registered + if (!PHYSFS_exists(publisher)) + strcpy(publisher, "iplogo1.pcx"); // PC. Only down here because it's lowres ;-) + + show_title_screen( publisher, 1 ); show_title_screen( "logo.pcx", 1 ); show_title_screen( "descent.pcx", 1 ); } diff --git a/main/newmenu.c b/main/newmenu.c index caed7f668..d02d2eae8 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -174,7 +174,7 @@ void nm_draw_background(int x1, int y1, int x2, int y2 ) grs_bitmap bg; old=grd_curcanv; tmp=gr_create_sub_canvas(old,x1,y1,w,h); - gr_init_sub_bitmap(&bg,&nm_background,0,0,w*(320.0/SWIDTH),h*(200.0/SHEIGHT));//note that we haven't replaced current_canvas yet, so these macros are still ok. + gr_init_sub_bitmap(&bg,&nm_background,0,0,w*(((float) nm_background.bm_w)/SWIDTH),h*(((float) nm_background.bm_h)/SHEIGHT));//note that we haven't replaced current_canvas yet, so these macros are still ok. gr_set_current_canvas(tmp); gr_palette_load( gr_palette ); diff --git a/main/titles.c b/main/titles.c index fe237c799..92a168878 100644 --- a/main/titles.c +++ b/main/titles.c @@ -1095,13 +1095,14 @@ void do_briefing_screens(int level_num) void show_order_form() { - show_title_screen( -#ifdef SHAREWARE - "order01.pcx", -#else - "warning.pcx", -#endif - 1); + char exit_screen[16]; + + strcpy(exit_screen, "apple.pcx"); // D1 Mac OEM Demo + if (! cfexist(exit_screen)) + strcpy(exit_screen, "order01.pcx"); // D1 Demo + if (! cfexist(exit_screen)) + strcpy(exit_screen, "warning.pcx"); // D1 Registered + show_title_screen(exit_screen, 1); } #ifndef SHAREWARE