Skip to content

Commit

Permalink
implement PNG brightmaps
Browse files Browse the repository at this point in the history
So far, only the sprites are working.
  • Loading branch information
rfomin committed Sep 23, 2024
1 parent 5426138 commit 0b26327
Show file tree
Hide file tree
Showing 20 changed files with 565 additions and 511 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ set(WOOF_SOURCES
p_telept.c
p_tick.c p_tick.h
p_user.c p_user.h
r_bmaps.c r_bmaps.h
r_brightmaps.c r_brightmaps.h
r_bsp.c r_bsp.h
r_data.c r_data.h
r_defs.h
Expand Down
7 changes: 4 additions & 3 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#include "p_map.h" // MELEERANGE
#include "p_mobj.h"
#include "p_setup.h"
#include "r_bmaps.h"
#include "r_brightmaps.h"
#include "r_defs.h"
#include "r_draw.h"
#include "r_main.h"
Expand Down Expand Up @@ -2288,8 +2288,6 @@ void D_DoomMain(void)

PostProcessDeh();

W_ProcessInWads("BRGHTMPS", R_ParseBrightmaps, false);

// Moved after WAD initialization because we are checking the COMPLVL lump
G_ReloadDefaults(false); // killough 3/4/98: set defaults just loaded.
// jff 3/24/98 this sets startskill if it was -1
Expand Down Expand Up @@ -2457,6 +2455,9 @@ void D_DoomMain(void)
I_Printf(VB_INFO, "VX_Init: ");
VX_Init();

I_Printf(VB_INFO, "R_InitBrightmaps: Load brightmaps.");
R_InitBrightmaps();

I_PutChar(VB_INFO, '\n');

idmusnum = -1; //jff 3/17/98 insure idmus number is blank
Expand Down
7 changes: 2 additions & 5 deletions src/mn_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "mn_font.h"
#include "mn_menu.h"
#include "p_mobj.h"
#include "r_bmaps.h"
#include "r_brightmaps.h"
#include "r_data.h"
#include "r_defs.h"
#include "r_draw.h"
Expand Down Expand Up @@ -2837,8 +2837,7 @@ static setup_menu_t gen_settings5[] = {

{"Voxels", S_ONOFF | S_STRICT, OFF_CNTR_X, M_SPC, {"voxels_rendering"}},

{"Brightmaps", S_ONOFF | S_STRICT, OFF_CNTR_X, M_SPC, {"brightmaps"},
.action = R_InitDrawFunctions},
{"Brightmaps", S_ONOFF | S_STRICT, OFF_CNTR_X, M_SPC, {"brightmaps"}},

{"Stretch Short Skies", S_ONOFF, OFF_CNTR_X, M_SPC, {"stretchsky"},
.action = R_InitSkyMap},
Expand Down Expand Up @@ -4451,8 +4450,6 @@ void MN_SetupResetMenu(void)
DisableItem(M_ParmExists("-uncapped") || M_ParmExists("-nouncapped"),
gen_settings1, "uncapped");
DisableItem(deh_set_blood_color, enem_settings1, "colored_blood");
DisableItem(!brightmaps_found || force_brightmaps, gen_settings5,
"brightmaps");
UpdateInterceptsEmuItem();
UpdateCrosshairItems();
UpdateCenteredWeaponItem();
Expand Down
Loading

0 comments on commit 0b26327

Please sign in to comment.