Kill Old ALAMLIGHTING code
This commit is contained in:
parent
62764b8f48
commit
43c9f1223e
15 changed files with 2 additions and 1718 deletions
|
|
@ -36,10 +36,6 @@
|
|||
#include "d_clisrv.h"
|
||||
#include "v_video.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_light.h"
|
||||
#endif
|
||||
|
||||
#include "m_cond.h"
|
||||
|
||||
#include "dehacked.h"
|
||||
|
|
@ -519,77 +515,6 @@ void readskincolor(MYFILE *f, INT32 num, boolean mainfile)
|
|||
Z_Free(s);
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
void readlight(MYFILE *f, INT32 num)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
char *word;
|
||||
char *tmp;
|
||||
INT32 value;
|
||||
float fvalue;
|
||||
|
||||
do
|
||||
{
|
||||
if (myfgets(s, MAXLINELEN, f))
|
||||
{
|
||||
if (s[0] == '\n')
|
||||
break;
|
||||
|
||||
tmp = strchr(s, '#');
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
if (s == tmp)
|
||||
continue; // Skip comment lines, but don't break.
|
||||
|
||||
fvalue = searchfvalue(s);
|
||||
value = searchvalue(s);
|
||||
|
||||
word = strtok(s, " ");
|
||||
if (word)
|
||||
strupr(word);
|
||||
else
|
||||
break;
|
||||
|
||||
if (fastcmp(word, "TYPE"))
|
||||
{
|
||||
lspr[num].type = (UINT16)value;
|
||||
}
|
||||
else if (fastcmp(word, "OFFSETX"))
|
||||
{
|
||||
lspr[num].light_xoffset = fvalue;
|
||||
}
|
||||
else if (fastcmp(word, "OFFSETY"))
|
||||
{
|
||||
lspr[num].light_yoffset = fvalue;
|
||||
}
|
||||
else if (fastcmp(word, "CORONACOLOR"))
|
||||
{
|
||||
lspr[num].corona_color = value;
|
||||
}
|
||||
else if (fastcmp(word, "CORONARADIUS"))
|
||||
{
|
||||
lspr[num].corona_radius = fvalue;
|
||||
}
|
||||
else if (fastcmp(word, "DYNAMICCOLOR"))
|
||||
{
|
||||
lspr[num].dynamic_color = value;
|
||||
}
|
||||
else if (fastcmp(word, "DYNAMICRADIUS"))
|
||||
{
|
||||
lspr[num].dynamic_radius = fvalue;
|
||||
|
||||
/// \note Update the sqrradius! unnecessary?
|
||||
lspr[num].dynamic_sqrradius = fvalue * fvalue;
|
||||
}
|
||||
else
|
||||
deh_warning("Light %d: unknown word '%s'", num, word);
|
||||
}
|
||||
} while (!myfeof(f)); // finish when the line is empty
|
||||
|
||||
Z_Free(s);
|
||||
}
|
||||
#endif // HWRENDER
|
||||
|
||||
void readsprite2(MYFILE *f, INT32 num)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@
|
|||
#include "d_clisrv.h"
|
||||
#include "k_items.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_light.h"
|
||||
#endif
|
||||
|
||||
#include "info.h"
|
||||
#include "dehacked.h"
|
||||
#include "doomdef.h" // HWRENDER
|
||||
|
|
@ -80,9 +76,6 @@ void readcutscene(MYFILE *f, INT32 num);
|
|||
void readlevelheader(MYFILE *f, char * name);
|
||||
void readgametype(MYFILE *f, char *gtname);
|
||||
void readsprite2(MYFILE *f, INT32 num);
|
||||
#ifdef HWRENDER
|
||||
void readlight(MYFILE *f, INT32 num);
|
||||
#endif
|
||||
void readskincolor(MYFILE *f, INT32 num, boolean mainfile);
|
||||
void readthing(MYFILE *f, INT32 num);
|
||||
void readfreeslots(MYFILE *f);
|
||||
|
|
|
|||
|
|
@ -560,19 +560,6 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
ignorelines(f);
|
||||
}
|
||||
}
|
||||
#ifdef HWRENDER
|
||||
else if (fastcmp(word, "LIGHT"))
|
||||
{
|
||||
// TODO: Read lights by name
|
||||
if (i > 0 && i < NUMLIGHTS)
|
||||
readlight(f, i);
|
||||
else
|
||||
{
|
||||
deh_warning("Light number %d out of range (1 - %d)", i, NUMLIGHTS-1);
|
||||
ignorelines(f);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (fastcmp(word, "LEVEL"))
|
||||
{
|
||||
size_t len = strlen(word2);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ target_sources(BLANKART PRIVATE
|
|||
hw_map.c
|
||||
hw_bsp.c
|
||||
hw_draw.c
|
||||
hw_light.c
|
||||
hw_main.c
|
||||
hw_sky.c
|
||||
hw_things.c
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,103 +0,0 @@
|
|||
// BLANKART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file hw_light.h
|
||||
/// \brief Dynamic lighting & coronas add on by Hurdler
|
||||
|
||||
#ifndef _HW_LIGHTS_
|
||||
#define _HW_LIGHTS_
|
||||
|
||||
#include "hw_glob.h"
|
||||
#include "hw_defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NUMLIGHTFREESLOTS 32 // Free light slots (for SOCs)
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
#define NEWCORONAS
|
||||
|
||||
#define DL_MAX_LIGHT 256 // maximum number of lights (extra lights are ignored)
|
||||
|
||||
void HWR_InitLight(void);
|
||||
void HWR_DL_AddLight(gl_vissprite_t *spr, GLPatch_t *patch);
|
||||
void HWR_PlaneLighting(FOutVector *clVerts, int nrClipVerts);
|
||||
void HWR_WallLighting(FOutVector *wlVerts);
|
||||
void HWR_ResetLights(void);
|
||||
void HWR_SetLights(int viewnumber);
|
||||
|
||||
#ifdef NEWCORONAS
|
||||
void HWR_DrawCoronas(void);
|
||||
#else
|
||||
void HWR_DoCoronasLighting(FOutVector *outVerts, gl_vissprite_t *spr);
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int nb;
|
||||
light_t *p_lspr[DL_MAX_LIGHT];
|
||||
FVector position[DL_MAX_LIGHT]; // actually maximum DL_MAX_LIGHT lights
|
||||
mobj_t *mo[DL_MAX_LIGHT];
|
||||
} dynlights_t;
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NOLIGHT = 0,
|
||||
RINGSPARK_L,
|
||||
SUPERSONIC_L, // Cool. =)
|
||||
SUPERSPARK_L,
|
||||
INVINCIBLE_L,
|
||||
GREENSHIELD_L,
|
||||
BLUESHIELD_L,
|
||||
YELLOWSHIELD_L,
|
||||
REDSHIELD_L,
|
||||
BLACKSHIELD_L,
|
||||
WHITESHIELD_L,
|
||||
SMALLREDBALL_L,
|
||||
RINGLIGHT_L,
|
||||
GREENSMALL_L,
|
||||
REDSMALL_L,
|
||||
GREENSHINE_L,
|
||||
ORANGESHINE_L,
|
||||
PINKSHINE_L,
|
||||
BLUESHINE_L,
|
||||
REDSHINE_L,
|
||||
LBLUESHINE_L,
|
||||
GREYSHINE_L,
|
||||
REDBALL_L,
|
||||
GREENBALL_L,
|
||||
BLUEBALL_L,
|
||||
NIGHTSLIGHT_L,
|
||||
JETLIGHT_L,
|
||||
GOOPLIGHT_L,
|
||||
STREETLIGHT_L,
|
||||
|
||||
// free slots for SOCs at run-time --------------------
|
||||
FREESLOT0_L,
|
||||
//
|
||||
// ... 32 free lights here ...
|
||||
//
|
||||
LASTFREESLOT_L = (FREESLOT0_L+NUMLIGHTFREESLOTS-1),
|
||||
// end of freeslots ---------------------------------------------
|
||||
|
||||
NUMLIGHTS
|
||||
} lightspritenum_t;
|
||||
|
||||
extern light_t lspr[NUMLIGHTS];
|
||||
extern light_t *t_lspr[NUMSPRITES];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
#ifdef HWRENDER
|
||||
#include "hw_clip.h"
|
||||
#include "hw_glob.h"
|
||||
#include "hw_light.h"
|
||||
#include "hw_gpu.h"
|
||||
#include "hw_batching.h"
|
||||
|
||||
|
|
@ -638,12 +637,6 @@ void HWR_RenderViewpoint(player_t *player, boolean drawSkyTexture, boolean is_sk
|
|||
// Check for new console commands.
|
||||
NetUpdate();
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
//14/11/99: Hurdler: moved here because it doesn't work with
|
||||
// subsector, see other comments;
|
||||
HWR_ResetLights();
|
||||
#endif
|
||||
|
||||
// Draw MD2 and sprites
|
||||
|
||||
if (timing)
|
||||
|
|
@ -765,9 +758,6 @@ void HWR_RenderPlayerView(void)
|
|||
stplyr = player;
|
||||
ST_doPaletteStuff();
|
||||
stplyr = saved_player;
|
||||
#ifdef ALAM_LIGHTING
|
||||
HWR_SetLights(viewssnum);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Reset the shader state.
|
||||
|
|
@ -856,11 +846,6 @@ static void HWR_TogglePaletteRendering(void)
|
|||
|
||||
void HWR_LoadLevel(void)
|
||||
{
|
||||
#ifdef ALAM_LIGHTING
|
||||
// BP: reset light between levels (we draw preview frame lights on current frame)
|
||||
HWR_ResetLights();
|
||||
#endif
|
||||
|
||||
HWR_CreatePlanePolygons((INT32)numnodes - 1);
|
||||
|
||||
// Build the sky dome
|
||||
|
|
@ -900,13 +885,6 @@ consvar_t cv_glallowshaders = CVAR_INIT ("gr_allowclientshaders", "On", CV_NETVA
|
|||
consvar_t cv_fovchange = CVAR_INIT ("gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
consvar_t cv_glsecbright = CVAR_INIT("gr_secbright", "0", CV_SAVE, glsecbright_cons_t, NULL);
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
consvar_t cv_gldynamiclighting = CVAR_INIT ("gr_dynamiclighting", "On", CV_SAVE, CV_OnOff, NULL);
|
||||
consvar_t cv_glstaticlighting = CVAR_INIT ("gr_staticlighting", "On", CV_SAVE, CV_OnOff, NULL);
|
||||
consvar_t cv_glcoronas = CVAR_INIT ("gr_coronas", "On", CV_SAVE, CV_OnOff, NULL);
|
||||
consvar_t cv_glcoronasize = CVAR_INIT ("gr_coronasize", "1", CV_SAVE|CV_FLOAT, 0, NULL);
|
||||
#endif
|
||||
|
||||
consvar_t cv_glmodels = CVAR_INIT ("gr_models", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
||||
#ifdef BAD_MODEL_OPTIONS
|
||||
|
|
@ -1022,13 +1000,6 @@ void HWR_AddCommands(void)
|
|||
{
|
||||
CV_RegisterVar(&cv_fovchange);
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
CV_RegisterVar(&cv_glstaticlighting);
|
||||
CV_RegisterVar(&cv_gldynamiclighting);
|
||||
CV_RegisterVar(&cv_glcoronasize);
|
||||
CV_RegisterVar(&cv_glcoronas);
|
||||
#endif
|
||||
|
||||
#ifdef BAD_MODEL_OPTIONS
|
||||
CV_RegisterVar(&cv_glmodellighting);
|
||||
CV_RegisterVar(&cv_glmodelinterpolation);
|
||||
|
|
@ -1085,9 +1056,6 @@ void HWR_Startup(void)
|
|||
HWR_AddSessionCommands();
|
||||
HWR_InitMapTextures();
|
||||
HWR_InitModels();
|
||||
#ifdef ALAM_LIGHTING
|
||||
HWR_InitLight();
|
||||
#endif
|
||||
|
||||
gl_shadersavailable = HWR_InitShaders();
|
||||
HWR_SetShaderState();
|
||||
|
|
|
|||
|
|
@ -85,13 +85,6 @@ boolean HWR_ShouldUsePaletteRendering(void);
|
|||
|
||||
extern CV_PossibleValue_t glanisotropicmode_cons_t[];
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
extern consvar_t cv_gldynamiclighting;
|
||||
extern consvar_t cv_glstaticlighting;
|
||||
extern consvar_t cv_glcoronas;
|
||||
extern consvar_t cv_glcoronasize;
|
||||
#endif
|
||||
|
||||
extern consvar_t cv_glshaders, cv_glallowshaders;
|
||||
extern consvar_t cv_glmodels;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#ifdef HWRENDER
|
||||
#include "hw_gpu.h"
|
||||
#include "hw_light.h"
|
||||
#include "hw_md2.h"
|
||||
#include "../d_main.h"
|
||||
#include "../r_bsp.h"
|
||||
|
|
|
|||
|
|
@ -290,11 +290,6 @@ void HWR_RenderPlane(subsector_t *subsector, poly_subsector_t *xsub, boolean isc
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
// add here code for dynamic lighting on planes
|
||||
HWR_PlaneLighting(planeVerts, nrPlaneVerts);
|
||||
#endif
|
||||
}
|
||||
|
||||
void HWR_RenderPolyObjectPlane(polyobj_t *polysector, boolean isceiling, fixed_t fixedheight,
|
||||
|
|
|
|||
|
|
@ -796,11 +796,6 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||
|
||||
gpatch = spr->gpatch;
|
||||
|
||||
#ifdef ALAM_LIGHTING
|
||||
if (!(spr->mobj->flags2 & MF2_DEBRIS) && (spr->mobj->sprite != SPR_PLAY))
|
||||
HWR_DL_AddLight(spr, gpatch);
|
||||
#endif
|
||||
|
||||
// create the sprite billboard
|
||||
//
|
||||
// 3--2
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
#endif
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
#include "hardware/hw_light.h"
|
||||
#include "hardware/hw_glob.h"
|
||||
#include "hardware/hw_model.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@
|
|||
#include "acs/interface.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_light.h"
|
||||
#include "hardware/hw_main.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
#ifdef HWRENDER
|
||||
#include "hardware/hw_md2.h"
|
||||
#include "hardware/hw_glob.h"
|
||||
#include "hardware/hw_light.h"
|
||||
#include "hardware/hw_gpu.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
#include "hardware/hw_light.h"
|
||||
#include "hardware/hw_glob.h"
|
||||
#include "hardware/hw_model.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue