aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/client/particle_t.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-07-09 06:50:52 +0000
committerHolger Zickner <[email protected]>2004-07-09 06:50:52 +0000
commit20a66a892a3f0704ef37f1eebb681edfee6fc165 (patch)
tree118e0e5ea00eecf450e4c63edc88c421d52a7db2 /src/jake2/client/particle_t.java
parent6b36f9e0380b7c80aecdc78ef07a0cf473712416 (diff)
import of Jake2
Diffstat (limited to 'src/jake2/client/particle_t.java')
-rw-r--r--src/jake2/client/particle_t.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/jake2/client/particle_t.java b/src/jake2/client/particle_t.java
index 2127b5d..027cadf 100644
--- a/src/jake2/client/particle_t.java
+++ b/src/jake2/client/particle_t.java
@@ -19,12 +19,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
-// $Id: particle_t.java,v 1.1 2004-07-07 19:58:52 hzi Exp $
+// $Id: particle_t.java,v 1.2 2004-07-09 06:50:50 hzi Exp $
package jake2.client;
+import jake2.Defines;
+import jake2.util.Lib;
+
+import java.nio.*;
+
public class particle_t {
- public float origin[] = { 0, 0, 0 };
- public int color;
- public float alpha;
+
+ public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3);
+ public static IntBuffer colorArray = Lib.newIntBuffer(Defines.MAX_PARTICLES, ByteOrder.LITTLE_ENDIAN);
+ public static int[] colorTable = new int[256];
+
+ public static void setColorPalette(int[] palette) {
+ for (int i=0; i < 256; i++) {
+ colorTable[i] = palette[i] & 0x00FFFFFF;
+ }
+ }
}