aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-05-07 17:21:42 +0000
committerCarsten Weisse <[email protected]>2005-05-07 17:21:42 +0000
commitf3adb1e8792fd077cd0c8c3183c03fd32a949e46 (patch)
tree4aa9699e3e7eaacbf5997172a11d10e8bc59f39b /src/jake2/render
parent034acfd65f9ee764331832833c18f8942da79138 (diff)
preconstruct a Throwable is faster; (is used in control flow)
Diffstat (limited to 'src/jake2/render')
-rw-r--r--src/jake2/render/fastjogl/Light.java10
-rw-r--r--src/jake2/render/lwjgl/Light.java14
2 files changed, 12 insertions, 12 deletions
diff --git a/src/jake2/render/fastjogl/Light.java b/src/jake2/render/fastjogl/Light.java
index f617e9f..685b8d5 100644
--- a/src/jake2/render/fastjogl/Light.java
+++ b/src/jake2/render/fastjogl/Light.java
@@ -2,7 +2,7 @@
* Light.java
* Copyright (C) 2003
*
- * $Id: Light.java,v 1.11 2005-01-16 15:24:50 cawe Exp $
+ * $Id: Light.java,v 1.12 2005-05-07 17:17:48 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -30,7 +30,6 @@ import jake2.Globals;
import jake2.client.dlight_t;
import jake2.game.cplane_t;
import jake2.qcommon.Com;
-import jake2.qcommon.longjmpException;
import jake2.render.*;
import jake2.util.Math3D;
import jake2.util.Vec3Cache;
@@ -448,6 +447,9 @@ public abstract class Light extends Warp {
}
}
+ // replaces the goto jump
+ private Throwable gotoStore = new Throwable();
+
/*
* =============== R_BuildLightMap
*
@@ -489,7 +491,7 @@ public abstract class Light extends Warp {
// }
// goto store;
- throw new longjmpException();
+ throw gotoStore;
}
// count the # of maps
@@ -590,7 +592,7 @@ public abstract class Light extends Warp {
R_AddDynamicLights(surf);
// label store:
- } catch (longjmpException store) {
+ } catch (Throwable store) {
}
// put into texture format
diff --git a/src/jake2/render/lwjgl/Light.java b/src/jake2/render/lwjgl/Light.java
index 5c46e68..9ffcd0b 100644
--- a/src/jake2/render/lwjgl/Light.java
+++ b/src/jake2/render/lwjgl/Light.java
@@ -2,7 +2,7 @@
* Light.java
* Copyright (C) 2003
*
- * $Id: Light.java,v 1.3 2005-01-17 17:37:02 cawe Exp $
+ * $Id: Light.java,v 1.4 2005-05-07 17:21:42 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -28,13 +28,9 @@ package jake2.render.lwjgl;
import jake2.Defines;
import jake2.Globals;
import jake2.client.dlight_t;
-import jake2.game.GameBase;
import jake2.game.cplane_t;
import jake2.qcommon.Com;
-import jake2.qcommon.longjmpException;
-import jake2.render.mnode_t;
-import jake2.render.msurface_t;
-import jake2.render.mtexinfo_t;
+import jake2.render.*;
import jake2.util.Math3D;
import jake2.util.Vec3Cache;
@@ -471,6 +467,8 @@ public abstract class Light extends Warp {
surf.cached_light[maps] = r_newrefdef.lightstyles[surf.styles[maps] & 0xFF].white;
}
}
+
+ private Throwable gotoStore = new Throwable();
// TODO sync with jogl renderer. hoz
/**
@@ -513,7 +511,7 @@ public abstract class Light extends Warp {
// }
// goto store;
- throw new longjmpException();
+ throw gotoStore;
}
// count the # of maps
@@ -614,7 +612,7 @@ public abstract class Light extends Warp {
R_AddDynamicLights(surf);
// label store:
- } catch (longjmpException store) {
+ } catch (Throwable store) {
}
// put into texture format