Skip to content

Commit

Permalink
Fixed all FTBFS issues with r_things.c due to recent work that had be…
Browse files Browse the repository at this point in the history
…en left incomplete due to my accident.

Note there remains an issue in that currently the max number of vertex lights per model is ignored, I'll address this later on this evening. This commit should allow everyone to once again build and run.
  • Loading branch information
danij committed Oct 5, 2008
1 parent f98c28a commit a7b47b6
Show file tree
Hide file tree
Showing 11 changed files with 490 additions and 317 deletions.
1 change: 0 additions & 1 deletion doomsday/engine/portable/include/r_data.h
Expand Up @@ -230,7 +230,6 @@ typedef struct animgroup_s {
} animgroup_t;

typedef struct {
boolean used;
float approxDist; // Only an approximation.
float vector[3]; // Light direction vector.
float color[3]; // How intense the light is (0..1, RGB).
Expand Down
10 changes: 6 additions & 4 deletions doomsday/engine/portable/include/r_things.h
Expand Up @@ -101,8 +101,7 @@ typedef struct rendspriteparams_s {

// Lighting/color:
float ambientColor[4];
uint numLights;
vlight_t* lights;
uint vLightListIdx;

// Misc
struct subsector_s* subsector;
Expand Down Expand Up @@ -208,7 +207,10 @@ void R_InitSprites(void);
void R_ClearSprites(void);
void R_ClipVisSprite(vissprite_t* vis, int xl, int xh);

void R_CollectAffectingLights(const collectaffectinglights_params_t* params,
vlight_t** ptr, uint* num);
uint R_CollectAffectingLights(const collectaffectinglights_params_t* params);

void VL_InitForMap(void);
void VL_InitForNewFrame(void);
boolean VL_ListIterator(uint listIdx, void* data,
boolean (*func) (const vlight_t*, void*));
#endif
3 changes: 1 addition & 2 deletions doomsday/engine/portable/include/rend_model.h
Expand Up @@ -54,8 +54,7 @@ typedef struct rendmodelparams_s {

// Lighting/color:
float ambientColor[4];
uint numLights;
vlight_t *lights;
uint vLightListIdx;

// Shinemaping:
float shineYawOffset;
Expand Down
3 changes: 1 addition & 2 deletions doomsday/engine/portable/include/rend_sprite.h
Expand Up @@ -42,8 +42,7 @@ typedef struct rendpspriteparams_s {

// Lighting/color:
float ambientColor[4];
uint numLights;
vlight_t* lights;
uint vLightListIdx;
} rendpspriteparams_t;

extern int spriteLight, useSpriteAlpha;
Expand Down
3 changes: 2 additions & 1 deletion doomsday/engine/portable/src/p_data.c
Expand Up @@ -497,7 +497,8 @@ boolean P_LoadMap(const char *mapID)

R_InitObjLinksForMap();
LO_InitForMap(); // Lumobj management.
DL_InitForMap(); // Projected lumobjs (dynlights) management.
DL_InitForMap(); // Projected dynlights (from lumobjs) management.
VL_InitForMap(); // Converted vlights (from lumobjs) management.

spawnParticleGeneratorsForMap(P_GetMapID(map));

Expand Down

0 comments on commit a7b47b6

Please sign in to comment.