Skip to content

Commit

Permalink
temp fix soft lock. status bar/hud/automap cleanup. config file save …
Browse files Browse the repository at this point in the history
…directory /3ds/prboom3ds for cia and install directory for 3dsx.
  • Loading branch information
elhobbs committed May 13, 2017
1 parent 5786861 commit 9ee94de
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 19 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion arm11/source/3ds_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions arm11/source/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
27 changes: 27 additions & 0 deletions arm9/source/ds_vid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
Binary file modified prboom3ds.3ds
Binary file not shown.
Binary file modified prboom3ds.3dsx
Binary file not shown.
Binary file modified prboom3ds.cia
Binary file not shown.
4 changes: 3 additions & 1 deletion src/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,8 @@ inline static void AM_drawCrosshair(int color)
V_DrawLine(&line, color);
}

extern boolean automapontop;

//
// AM_Drawer()
//
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions src/hu_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down
8 changes: 6 additions & 2 deletions src/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ee94de

Please sign in to comment.