diff --git a/Makefile b/Makefile index 2bba2ef..e404216 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,15 @@ export OUTPUT_FORMAT ?= 3dsx #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := -g -Wall -O2 -mword-relocations -save-temps \ +CFLAGS2 := -g -Wall -O2 -mword-relocations -save-temps \ -fomit-frame-pointer -ffast-math \ $(ARCH) -CFLAGS1 := -g -O0 -mword-relocations \ - -ffast-math \ - $(ARCH) +CFLAGS := -g -Wall -mword-relocations \ + -ffunction-sections \ + -fdata-sections \ + $(ARCH) \ + -O2 CFLAGS += $(INCLUDE) -DARM11 -D_3DS -DHAVE_CONFIG_H diff --git a/arm11/source/3ds_sound.c b/arm11/source/3ds_sound.c index 2a9e41b..8436a86 100644 --- a/arm11/source/3ds_sound.c +++ b/arm11/source/3ds_sound.c @@ -91,7 +91,7 @@ void S_ChangeMusic(int music_id, int looping) { sprintf(namebuf, "d_%s", music->name); music->lumpnum = W_GetNumForName(namebuf); } - printf("mus: d_%s\n", music->name); + //printf("mus: d_%s\n", music->name); music->data = W_CacheLumpNum(music->lumpnum); mus_play_music(music->data); diff --git a/arm11/source/keyboard.c b/arm11/source/keyboard.c index a3b001b..3652992 100644 --- a/arm11/source/keyboard.c +++ b/arm11/source/keyboard.c @@ -23,8 +23,8 @@ static char key_buttons[] = "1234567890"; sregion_t key_button_array[] = { - { 32, 0, 0, 0, 0, 0, key_buttons, key_buttons }, - { 270, 0, 6, 0, 0, 0x200, 0 }, + { 32, 16, 0, 0, 0, 0, key_buttons, key_buttons }, + { 270, 16, 6, 0, 0, 0x200, 0 }, { -30, 32 * 1, 7, 0, 0, KEYD_AUX1, KEYD_AUX1 }, { -30, 32 * 2, 7, 0, 0, KEYD_AUX2, KEYD_AUX2 }, { -30, 32 * 3, 7, 0, 0, KEYD_AUX3, KEYD_AUX3 }, diff --git a/arm9/source/ds_vid.c b/arm9/source/ds_vid.c index a1520b3..8190413 100644 --- a/arm9/source/ds_vid.c +++ b/arm9/source/ds_vid.c @@ -452,11 +452,38 @@ void I_StartTic(void) { } } +#define automapactive ((automapmode & am_active) != 0) + // // I_StartFrame // void I_StartFrame(void) { + extern int viewheight; + extern int keyboard_visible_last; + extern int hud_displayed; + byte *subscreen = screens[5].data; + static viewheight_last = 0; + static hud_displayed_last = 0; + +#define HU_HEIGHT 57 +#define HU_TOP (240 - HU_HEIGHT - 1) +#define HU_ROWS (240 - HU_TOP) + + //if the automap is not active then erase the top few lines + if (!automapactive) { + memset(subscreen, 0, screens[5].width * 16); + } + + //erase the bottom if the viewsize changes or the hud is active + if (hud_displayed || + hud_displayed_last != hud_displayed || + viewheight_last > viewheight) { + memset(subscreen + (screens[5].width * HU_TOP), 0, screens[5].width * HU_ROWS); + } + + viewheight_last = viewheight; + hud_displayed_last = hud_displayed; } diff --git a/prboom3ds.3ds b/prboom3ds.3ds index 24abfa1..ccc2725 100644 Binary files a/prboom3ds.3ds and b/prboom3ds.3ds differ diff --git a/prboom3ds.3dsx b/prboom3ds.3dsx index b29a686..8d976e5 100644 Binary files a/prboom3ds.3dsx and b/prboom3ds.3dsx differ diff --git a/prboom3ds.cia b/prboom3ds.cia index fbf212f..5518c6d 100644 Binary files a/prboom3ds.cia and b/prboom3ds.cia differ diff --git a/src/am_map.c b/src/am_map.c index 2cf327d..b53bc09 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -1563,6 +1563,8 @@ inline static void AM_drawCrosshair(int color) V_DrawLine(&line, color); } +extern boolean automapontop; + // // AM_Drawer() // @@ -1575,7 +1577,7 @@ void AM_Drawer (void) // CPhipps - all automap modes put into one enum if (!(automapmode & am_active)) return; - if (!(automapmode & am_overlay)) // cph - If not overlay mode, clear background for the automap + if ((!(automapmode & am_overlay)) || (!automapontop)) // cph - If not overlay mode, clear background for the automap V_FillRect(FB, f_x, f_y, f_w, f_h, (byte)mapcolor_back); //jff 1/5/98 background default color if (automapmode & am_grid) AM_drawGrid(mapcolor_grid); //jff 1/7/98 grid default color diff --git a/src/d_main.c b/src/d_main.c index ea78278..5f06379 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -301,10 +301,10 @@ void D_Display (void) if (viewheight == SCREENHEIGHT) { SCREENWIDTH = 320; } - ST_Drawer(true, + ST_Drawer(!hud_displayed, //((viewheight != SCREENHEIGHT) // || ((automapmode & am_active) && !(automapmode & am_overlay))), - redrawborderstuff, + redrawborderstuff && !hud_displayed, (menuactive == mnact_full)); HU_Drawer(); diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 12798d0..bd12d06 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -67,7 +67,7 @@ int hud_graph_keys=1; //jff 3/7/98 display HUD keys as graphics //jff 2/16/98 change 167 to ST_Y-1 // CPhipps - changed to ST_TY // proff - changed to 200-ST_HEIGHT for stretching -#define HU_TITLEY ((200-ST_HEIGHT) - 1 - hu_font[0].height) +#define HU_TITLEY ((200-ST_HEIGHT) - 17 - hu_font[0].height) //jff 2/16/98 add coord text widget coordinates // proff - changed to SCREENWIDTH to 320 for stretching @@ -789,8 +789,8 @@ void HU_Drawer(void) ( hud_active>0 && // hud optioned on hud_displayed && // hud on from fullscreen key - viewheight==SCREENHEIGHT && // fullscreen mode is active - !(automapmode & am_active) // automap is not active + viewheight==SCREENHEIGHT //&& // fullscreen mode is active + //!(automapmode & am_active) // automap is not active ) { doit = !(gametic&1); //jff 3/4/98 speed update up for slow systems diff --git a/src/m_misc.c b/src/m_misc.c index 5ae5520..7af1c3c 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -867,7 +867,7 @@ void M_SaveDefaults (void) f = fopen (defaultfile, "w"); if (!f) { printf("failed to save defaults to:\n%s\n", defaultfile); - //svcSleepThread(5000000000LL); + svcSleepThread(5000000000LL); return; // can't write the file, but don't complain } @@ -960,14 +960,14 @@ void M_LoadDefaults (void) else { const char* exedir = I_DoomExeDir(); /* get config file from same directory as executable */ -#if 1 +#if 0 int len = doom_snprintf(NULL, 0, BOOM_CFG); defaultfile = malloc(len+1); doom_snprintf(defaultfile, len+1, BOOM_CFG); #else - int len = doom_snprintf(NULL, 0, "%s/" BOOM_CFG, exedir); + int len = doom_snprintf(NULL, 0, "%s" BOOM_CFG, exedir); defaultfile = malloc(len+1); - doom_snprintf(defaultfile, len+1, "%s/" BOOM_CFG, exedir); + doom_snprintf(defaultfile, len+1, "%s" BOOM_CFG, exedir); #endif } diff --git a/src/st_stuff.c b/src/st_stuff.c index a8918c2..1fd585d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -827,16 +827,20 @@ static void ST_drawWidgets(boolean refresh) void ST_Drawer(boolean statusbaron, boolean refresh, boolean fullmenu) { + extern int hud_displayed; static int FG_last = 0; - /* cph - let status bar on be controlled + static hud_displayed_last = 0; + /* cph - let status bar on be controlled * completely by the call from D_Display * proff - really do it */ st_firsttime = st_firsttime || refresh || fullmenu; - if (FG_last != FG) { + if (FG_last != FG || + hud_displayed_last != hud_displayed) { FG_last = FG; st_firsttime = true; fullmenu = false; + hud_displayed_last = hud_displayed; } ST_doPaletteStuff(); // Do red-/gold-shifts from damage/items