diff options
author | Holger Zickner <[email protected]> | 2004-07-12 22:08:04 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-07-12 22:08:04 +0000 |
commit | 87169713e60b4e00e9179c1bc32a1bcbf2ce8d75 (patch) | |
tree | 1ac285e316d8a9b9f3b4229a25351f489eac47ed /src/jake2/render/jogl/Image.java | |
parent | 4dca2574fe978cb98a9320f6db8176ee77973e91 (diff) |
small optimizations
Diffstat (limited to 'src/jake2/render/jogl/Image.java')
-rw-r--r-- | src/jake2/render/jogl/Image.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jake2/render/jogl/Image.java b/src/jake2/render/jogl/Image.java index f0034fe..3a58884 100644 --- a/src/jake2/render/jogl/Image.java +++ b/src/jake2/render/jogl/Image.java @@ -2,7 +2,7 @@ * Image.java * Copyright (C) 2003 * - * $Id: Image.java,v 1.3 2004-07-09 06:50:48 hzi Exp $ + * $Id: Image.java,v 1.4 2004-07-12 22:08:03 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -761,20 +761,20 @@ public abstract class Image extends Main { // } // else if (pos[off] != 255) fdc = pos[off]; // } - + static floodfill_t[] fifo = new floodfill_t[FLOODFILL_FIFO_SIZE]; + static { + for (int j = 0; j < fifo.length; j++) { + fifo[j] = new floodfill_t(); + } + } // TODO check this: R_FloodFillSkin( byte[] skin, int skinwidth, int skinheight) void R_FloodFillSkin(byte[] skin, int skinwidth, int skinheight) { // byte fillcolor = *skin; // assume this is the pixel to fill int fillcolor = skin[0] & 0xff; - floodfill_t[] fifo = new floodfill_t[FLOODFILL_FIFO_SIZE]; int inpt = 0, outpt = 0; int filledcolor = -1; int i; - for (int j = 0; j < fifo.length; j++) { - fifo[j] = new floodfill_t(); - } - if (filledcolor == -1) { filledcolor = 0; // attempt to find opaque black |