summaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-12-09 04:44:18 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:37 +0200
commitc69d42233364999afe5257e3ea536d6b3cd035c6 (patch)
tree7504011538a590e38e036be1544c4f1839fb668c /src/render.c
parent783657fac7fbb254e35367cf10a87b4248e28319 (diff)
Moved LightIntensityAtPoint to a better location.
Silenced more stub messages.
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/render.c b/src/render.c
deleted file mode 100644
index 25e77ab..0000000
--- a/src/render.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <SDL.h>
-#include <GL/gl.h>
-#include <GL/glext.h>
-
-#include "fixer.h"
-
-#include "3dc.h"
-#include "platform.h"
-#include "inline.h"
-#include "gamedef.h"
-#include "module.h"
-#include "stratdef.h"
-#include "projfont.h"
-#include "kshape.h"
-#include "prototyp.h"
-#include "d3d_hud.h"
-#include "bh_types.h"
-#include "equipmnt.h"
-#include "pldghost.h"
-
-#define UseLocalAssert Yes
-#include "ourasert.h"
-
-extern DISPLAYBLOCK *ActiveBlockList[];
-extern int NumActiveBlocks;
-extern int GlobalAmbience;
-
-int LightIntensityAtPoint(VECTORCH *pointPtr)
-{
- int intensity = 0;
- int i, j;
-
- DISPLAYBLOCK **activeBlockListPtr = ActiveBlockList;
- for(i = NumActiveBlocks; i != 0; i--) {
- DISPLAYBLOCK *dispPtr = *activeBlockListPtr++;
-
- if (dispPtr->ObNumLights) {
- for(j = 0; j < dispPtr->ObNumLights; j++) {
- LIGHTBLOCK *lptr = dispPtr->ObLights[j];
- VECTORCH disp = lptr->LightWorld;
- int dist;
-
- disp.vx -= pointPtr->vx;
- disp.vy -= pointPtr->vy;
- disp.vz -= pointPtr->vz;
-
- dist = Approximate3dMagnitude(&disp);
-
- if (dist<lptr->LightRange) {
- intensity += WideMulNarrowDiv(lptr->LightBright,lptr->LightRange-dist,lptr->LightRange);
- }
- }
- }
- }
- if (intensity>ONE_FIXED) intensity=ONE_FIXED;
- else if (intensity<GlobalAmbience) intensity=GlobalAmbience;
-
- /* KJL 20:31:39 12/1/97 - limit how dark things can be so blood doesn't go green */
- if (intensity<10*256) intensity = 10*256;
-
- return intensity;
-}