0

- Moved the source to the lwjake2 package.

- The default config directory is now ".lwjake2" rather than ".jake2".
- Updated the buildfile to reflect lwjake2 change.
- Cleaned up the headers for every source file.
- Cleaned up the imports for every source file.
- Resolves tons of warnings.
	- So many raw types. So, so very many... :sobs:
This commit is contained in:
Ethan Lee
2012-02-01 18:11:17 -05:00
parent 87ab653d38
commit bb4247557b
293 changed files with 5859 additions and 6763 deletions

View File

@@ -31,7 +31,7 @@
<mkdir dir="built/jar"/> <mkdir dir="built/jar"/>
<jar destfile="built/jar/lwjake2.jar"> <jar destfile="built/jar/lwjake2.jar">
<manifest> <manifest>
<attribute name="Main-Class" value="jake2.Jake2"/> <attribute name="Main-Class" value="lwjake2.LWJake2"/>
<attribute name="Class-Path" value=". lwjgl.jar lwjgl_util.jar"/> <attribute name="Class-Path" value=". lwjgl.jar lwjgl_util.jar"/>
</manifest> </manifest>
<fileset dir="built/javac/"/> <fileset dir="built/javac/"/>

View File

@@ -1,39 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 27.11.2003 by RST.
// $Id: centity_t.java,v 1.2 2004/07/08 20:56:50 hzi Exp $
package jake2.client;
import jake2.game.entity_state_t;
public class centity_t {
entity_state_t baseline= new entity_state_t(null); // delta from this if not from a previous frame
public entity_state_t current= new entity_state_t(null);
entity_state_t prev= new entity_state_t(null); // will always be valid, but might just be a copy of current
int serverframe; // if not current, this ent isn't in the frame
int trailcount; // for diminishing grenade trails
float[] lerp_origin = { 0, 0, 0 }; // for trails (variable hz)
int fly_stoptime;
}

View File

@@ -1,55 +0,0 @@
/*
* cl_sustain_t.java
* Copyright (C) 2004
*
* $Id: cl_sustain_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
/**
* cl_sustain_t
*/
public class cl_sustain_t {
static abstract class ThinkAdapter {
abstract void think(cl_sustain_t self);
}
int id;
int type;
int endtime;
int nextthink;
int thinkinterval;
float[] org = new float[3];
float[] dir = new float[3];
int color;
int count;
int magnitude;
ThinkAdapter think;
void clear() {
org[0] = org[1] = org[2] =
dir[0] = dir[1] = dir[2] =
id = type = endtime = nextthink = thinkinterval = color = count = magnitude = 0;
think = null;
}
}

View File

@@ -1,53 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 28.11.2003 by RST.
//$Id: clientinfo_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
package jake2.client;
import jake2.*;
import jake2.render.*;
public class clientinfo_t {
String name ="";
String cinfo ="";
image_t skin; // ptr
image_t icon; // ptr
String iconname ="";
model_t model; // ptr
model_t weaponmodel[] = new model_t[Defines.MAX_CLIENTWEAPONMODELS]; // arary of references
// public void reset()
// {
// set(new clientinfo_t());
// }
public void set (clientinfo_t from)
{
name = from.name;
cinfo = from.cinfo;
skin = from.skin;
icon = from.icon;
iconname = from.iconname;
model = from.model;
System.arraycopy(from.weaponmodel,0, weaponmodel, 0 , Defines.MAX_CLIENTWEAPONMODELS);
}
}

View File

@@ -1,51 +0,0 @@
/*
* console_t.java
* Copyright (C) 2003
*
* $Id: console_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
import jake2.Defines;
/**
* console_t
*/
public final class console_t {
boolean initialized;
byte[] text = new byte[Defines.CON_TEXTSIZE];
int current; // line where next message will be printed
int x; // offset in current line for next print
int display; // bottom of console displays this line
int ormask; // high bit mask for colored characters
int linewidth; // characters across screen
int totallines; // total lines in console scrollback
float cursorspeed;
int vislines;
float[] times = new float[Defines.NUM_CON_TIMES]; // cls.realtime time the line was generated
// for transparent notify lines
}

View File

@@ -1,46 +0,0 @@
/*
* cparticle_t.java
* Copyright (C) 2003
*
* $Id: cparticle_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
/**
* cparticle_t
*
* @author cwei
*/
public class cparticle_t {
public cparticle_t next;
public float time;
public float[] org = {0, 0, 0}; // vec3_t
public float[] vel = {0, 0, 0}; // vec3_t
public float[] accel = {0, 0, 0}; // vec3_t
public float color;
//public float colorvel;
public float alpha;
public float alphavel;
}

View File

@@ -1,31 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: dlight_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
package jake2.client;
public class dlight_t
{
public float origin[] = { 0, 0, 0 };
public float color[] = { 0, 0, 0 };
public float intensity;
}

View File

@@ -1,36 +0,0 @@
/*
* kbutton_t.java
* Copyright (C) 2004
*
* $Id: kbutton_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
/**
* kbutton_t
*/
public class kbutton_t {
int[] down = new int[2]; // key nums holding it down
long downtime; // msec timestamp
long msec; // msec down this frame
public int state;
}

View File

@@ -1,30 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: lightstyle_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
package jake2.client;
public class lightstyle_t
{
public float rgb[] = { 0, 0, 0 }; // 0.0 - 2.0
public float white; // highest of rgb
}

View File

@@ -1,50 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
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.3 2004/12/14 12:48:51 cawe Exp $
package jake2.client;
import jake2.Defines;
import jake2.util.Lib;
import java.nio.*;
public class particle_t {
// lwjgl renderer needs a ByteBuffer
private static ByteBuffer colorByteArray = Lib.newByteBuffer(Defines.MAX_PARTICLES * Lib.SIZEOF_INT, ByteOrder.LITTLE_ENDIAN);
public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3);
public static int[] colorTable = new int[256];
public static IntBuffer colorArray = colorByteArray.asIntBuffer();
public static void setColorPalette(int[] palette) {
for (int i=0; i < 256; i++) {
colorTable[i] = palette[i] & 0x00FFFFFF;
}
}
public static ByteBuffer getColorAsByteBuffer() {
return colorByteArray;
}
}

View File

@@ -1,47 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: refdef_t.java,v 1.2 2004/07/09 06:50:50 hzi Exp $
package jake2.client;
public class refdef_t {
public int x, y, width, height;// in virtual screen coordinates
public float fov_x, fov_y;
public float vieworg[] ={0,0,0};
public float viewangles[]={0,0,0};
public float blend[]={0,0,0,0}; // rgba 0-1 full screen blend
public float time; // time is uesed to auto animate
public int rdflags; // RDF_UNDERWATER, etc
public byte areabits[]; // if not NULL, only areas with set bits will be drawn
public lightstyle_t lightstyles[]; // [MAX_LIGHTSTYLES]
public int num_entities;
public entity_t entities[];
public int num_dlights;
public dlight_t dlights[];
public int num_particles;
//public particle_t particles[];
}

View File

@@ -1,28 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: viddef_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
package jake2.client;
public class viddef_t {
public int width, height;
}

View File

@@ -1,44 +0,0 @@
/*
* vidmode_t.java
* Copyright (C) 2003
*
* $Id: vidmode_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
/**
* vidmode_t
*
* @author cwei
*/
public class vidmode_t {
String description;
int width, height;
int mode;
vidmode_t (String description, int width, int height, int mode) {
this.description = description;
this.width = width;
this.height = height;
this.mode = mode;
}
}

View File

@@ -1,39 +0,0 @@
/*
* vrect_t.java
* Copyright (C) 2003
*
* $Id: vrect_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
/**
* vrect_t
*
* @author cwei
*/
public class vrect_t {
public int x;
public int y;
public int width;
public int height;
vrect_t pnext;
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 11.11.2003 by RST.
// $Id: AIAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class AIAdapter extends SuperAdapter
{
public abstract void ai(edict_t self, float dist);
}

View File

@@ -1,34 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 07.11.2003 by RST.
// $Id: EdictFindFilter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
/** Helps for filtering the iteration over the gedicts[] array, see GFind(). RST.*/
public class EdictFindFilter
{
boolean matches(edict_t e, String s)
{
return false;
};
}

View File

@@ -1,36 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 07.11.2003 by RST.
// $Id: EdictIterator.java,v 1.3 2005/02/06 18:55:16 salomo Exp $
package jake2.game;
/** Helps for iterating over the gedicts[] array. RST.*/
public class EdictIterator
{
EdictIterator(int i)
{
this.i = i;
}
public edict_t o;
int i;
}

View File

@@ -1,76 +0,0 @@
/*
* AbstractEndianHandler.java
* Copyright (C) 2003
*
* $Id: EndianHandler.java,v 1.2 2004/07/08 15:58:43 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.game;
public abstract class EndianHandler
{
private static final int mask = 0xFF;
abstract public float BigFloat(float f);
abstract public short BigShort(short s);
abstract public int BigLong(int i);
abstract public float LittleFloat(float f);
abstract public short LittleShort(short s);
abstract public int LittleLong(int i);
public static float swapFloat(float f)
{
int i = Float.floatToRawIntBits(f);
i = swapInt(i);
f = Float.intBitsToFloat(i);
return f;
}
public static int swapInt(int i)
{
int a = i & mask;
i >>>= 8;
a <<= 24;
int b = i & mask;
i >>>= 8;
b <<= 16;
int c = i & mask;
i >>>= 8;
c <<= 8;
return i | c | b | a;
}
public static short swapShort(short s)
{
int a = s & mask;
a <<= 8;
int b = (s >>> 8) & mask;
return (short) (b | a);
}
}

View File

@@ -1,30 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntBlockedAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntBlockedAdapter extends SuperAdapter
{
// move to moveinfo?
public abstract void blocked(edict_t self, edict_t other);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntDieAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntDieAdapter extends SuperAdapter
{
public abstract void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntDodgeAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntDodgeAdapter extends SuperAdapter
{
public abstract void dodge(edict_t self, edict_t other, float eta);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntInteractAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntInteractAdapter extends SuperAdapter
{
public abstract boolean interact(edict_t self, edict_t other);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntPainAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntPainAdapter extends SuperAdapter
{
public abstract void pain(edict_t self, edict_t other, float kick, int damage);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntThinkAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntThinkAdapter extends SuperAdapter
{
public abstract boolean think(edict_t self);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntTouchAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntTouchAdapter extends SuperAdapter
{
public abstract void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: EntUseAdapter.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public abstract class EntUseAdapter extends SuperAdapter
{
public abstract void use(edict_t self, edict_t other, edict_t activator);
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: ItemDropAdapter.java,v 1.2 2005/11/20 22:18:33 salomo Exp $
package jake2.game;
public abstract class ItemDropAdapter extends SuperAdapter {
public void drop(edict_t ent, gitem_t item) {
}
}

View File

@@ -1,29 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 08.11.2003 by RST.
// $Id: ItemUseAdapter.java,v 1.2 2005/11/20 22:18:33 salomo Exp $
package jake2.game;
public abstract class ItemUseAdapter extends SuperAdapter {
public void use(edict_t ent, gitem_t item) {
}
}

View File

@@ -1,60 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 09.01.2004 by RST.
// $Id: SuperAdapter.java,v 1.9 2005/11/20 22:25:28 salomo Exp $
package jake2.game;
import jake2.qcommon.Com;
import java.util.Hashtable;
import java.util.Vector;
public abstract class SuperAdapter {
/** Constructor, does the adapter registration. */
public SuperAdapter() {
register(this, getID());
}
/** Adapter registration. */
private static void register(SuperAdapter sa, String id) {
adapters.put(id, sa);
}
/** Adapter repository. */
private static Hashtable adapters= new Hashtable();
/** Returns the adapter from the repository given by its ID. */
public static SuperAdapter getFromID(String key) {
SuperAdapter sa= (SuperAdapter) adapters.get(key);
// try to create the adapter
if (sa == null) {
Com.DPrintf("SuperAdapter.getFromID():adapter not found->" + key + "\n");
}
return sa;
}
/** Returns the Adapter-ID. */
public abstract String getID();
}

View File

@@ -1,30 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created by HOZ.
// $Id: cmdalias_t.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public final class cmdalias_t
{
public cmdalias_t next;
public String name = "";
public String value;
}

View File

@@ -1,32 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 28.11.2003 by RST.
// $Id: cmodel_t.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public class cmodel_t
{
public float[] mins = { 0, 0, 0 };
public float[] maxs = { 0, 0, 0 };
public float[] origin = { 0, 0, 0 }; // for sounds or lights
public int headnode;
}

View File

@@ -1,56 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
// $Id: cplane_t.java,v 1.5 2005/12/03 19:44:05 salomo Exp $
package jake2.game;
import jake2.util.Lib;
import jake2.util.Math3D;
public class cplane_t
{
public float normal[] = new float[3];
public float dist;
/** This is for fast side tests, 0=xplane, 1=yplane, 2=zplane and 3=arbitrary. */
public byte type;
/** This represents signx + (signy<<1) + (signz << 1). */
public byte signbits; // signx + (signy<<1) + (signz<<1)
public byte pad[] = { 0, 0 };
public void set(cplane_t c) {
Math3D.set(normal, c.normal);
dist = c.dist;
type = c.type;
signbits = c.signbits;
pad[0] = c.pad[0];
pad[1] = c.pad[1];
}
public void clear() {
Math3D.VectorClear(normal);
dist = 0;
type = 0;
signbits = 0;
pad[0] = 0;
pad[1] = 0;
}
}

View File

@@ -1,30 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
// $Id: csurface_t.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
package jake2.game;
public class csurface_t
{
public String name = "";
public int flags;
public int value;
}

View File

@@ -1,40 +0,0 @@
/*
* cvar_t.java
* Copyright (C) 2003
*
* $Id: cvar_t.java,v 1.2 2004/07/08 15:58:44 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.game;
/**
* cvar_t implements the struct cvar_t of the C version
*/
public final class cvar_t
{
public String name;
public String string;
public String latched_string;
public int flags = 0;
public boolean modified = false;
public float value = 0.0f;
public cvar_t next = null;
}

View File

@@ -1,46 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 07.11.2003 by RST.
// $Id: gitem_armor_t.java,v 1.1.1.1 2004/07/07 19:59:25 hzi Exp $
package jake2.game;
public class gitem_armor_t {
public gitem_armor_t(
int base_count,
int max_count,
float normal_protection,
float energy_protection,
int armor) {
this.base_count= base_count;
this.max_count= max_count;
this.normal_protection= normal_protection;
this.energy_protection= energy_protection;
this.armor= armor;
}
int base_count;
int max_count;
float normal_protection;
float energy_protection;
int armor;
}

View File

@@ -1,33 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST
// $Id: link_t.java,v 1.1.1.1 2004/07/07 19:59:25 hzi Exp $
// simple linked structure often used in quake.
package jake2.game;
public class link_t {
public link_t(Object o) {
this.o = o;
}
public link_t prev, next;
public Object o;
}

View File

@@ -1,37 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 02.01.2004 by RST.
// $Id: mapsurface_t.java,v 1.1.1.1 2004/07/07 19:59:26 hzi Exp $
package jake2.game;
// import jake2.*;
// import jake2.client.*;
// import jake2.game.*;
// import jake2.qcommon.*;
// import jake2.render.*;
// import jake2.server.*;
public class mapsurface_t {
public csurface_t c = new csurface_t();
public String rname;
}

View File

@@ -1,62 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 11.11.2003 by RST.
// $Id: mframe_t.java,v 1.2 2004/08/20 21:29:58 salomo Exp $
package jake2.game;
import jake2.util.Lib;
import jake2.util.QuakeFile;
import java.io.IOException;
import java.io.RandomAccessFile;
public class mframe_t
{
public mframe_t(AIAdapter ai, float dist, EntThinkAdapter think)
{
this.ai= ai;
this.dist= dist;
this.think= think;
}
/** Empty constructor. */
public mframe_t()
{}
public AIAdapter ai;
public float dist;
public EntThinkAdapter think;
public void write(QuakeFile f) throws IOException
{
f.writeAdapter(ai);
f.writeFloat(dist);
f.writeAdapter(think);
}
public void read(QuakeFile f) throws IOException
{
ai= (AIAdapter) f.readAdapter();
dist= f.readFloat();
think= (EntThinkAdapter) f.readAdapter();
}
}

View File

@@ -1,31 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 31.10.2003 by RST.
// $Id: pushed_t.java,v 1.1.1.1 2004/07/07 19:59:26 hzi Exp $
package jake2.game;
public class pushed_t {
public edict_t ent;
public float[] origin= { 0.0f, 0.0f, 0.0f };
public float[] angles= { 0.0f, 0.0f, 0.0f };
public float deltayaw;
}

View File

@@ -1,34 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 19.11.2003 by RST.
// $Id: spawn_t.java,v 1.1.1.1 2004/07/07 19:59:26 hzi Exp $
package jake2.game;
public class spawn_t {
public spawn_t(String name, EntThinkAdapter spawn) {
this.name = name;
this.spawn = spawn;
}
String name;
EntThinkAdapter spawn;
}

View File

@@ -1,35 +0,0 @@
/*
* cmd_function_t.java
* Copyright (C) 2003
*
* $Id: cmd_function_t.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.qcommon;
/**
* cmd_function_t
*/
public final class cmd_function_t {
public cmd_function_t next = null;
public String name = null;
public xcommand_t function;
}

View File

@@ -1,33 +0,0 @@
/*
* longjmpException.java
* Copyright (C) 2003
*
* $Id: longjmpException.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.qcommon;
/**
* longjmpException is used to replace the setjmp/longjmp code.
*/
public final class longjmpException extends IllegalStateException {
}

View File

@@ -1,35 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 02.01.2004 by RST.
// $Id: lump_t.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
package jake2.qcommon;
public class lump_t
{
public lump_t(int offset, int len)
{
this.fileofs = offset;
this.filelen = len;
}
public int fileofs, filelen;
}

View File

@@ -1,49 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 02.01.2004 by RST.
// $Id: miptex_t.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
package jake2.qcommon;
import jake2.*;
// import jake2.client.*;
// import jake2.game.*;
// import jake2.qcommon.*;
// import jake2.render.*;
// import jake2.server.*;
public class miptex_t {
//char name[32];
String name="";
int width, height;
//unsigned offsets[MIPLEVELS]; // four mip maps stored
int offsets[] = new int[Defines.MIPLEVELS]; // four mip maps stored
//char animname[32]; // next frame in animation chain
String animframe="";
int flags;
int contents;
int value;
}

View File

@@ -1,48 +0,0 @@
/*
* sizebuf_t.java
* Copyright (C) 2003
*
* $Id: sizebuf_t.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.qcommon;
import java.util.Arrays;
/**
* sizebuf_t
*/
public final class sizebuf_t {
public boolean allowoverflow = false;
public boolean overflowed = false;
public byte[] data = null;
public int maxsize = 0;
public int cursize = 0;
public int readcount = 0;
public void clear()
{
if (data!=null)
Arrays.fill(data,(byte)0);
cursize = 0;
overflowed = false;
}
}

View File

@@ -1,34 +0,0 @@
/*
* xcommand_t.java
* Copyright (C) 2003
*
* $Id: xcommand_t.java,v 1.1.1.1 2004/07/07 19:59:34 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.qcommon;
/**
* xcommand_t
*/
public abstract class xcommand_t {
abstract public void execute();
}

View File

@@ -1,42 +0,0 @@
/*
* Ref.java
* Copyright (C) 2003
*
* $Id: Ref.java,v 1.2 2004/07/16 10:11:34 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.render;
import jake2.client.refexport_t;
/**
* Ref
*
* @author cwei
*/
public interface Ref {
// ============================================================================
// extensions (cwei)
// ============================================================================
refexport_t GetRefAPI();
String getName();
}

View File

@@ -1,45 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: glconfig_t.java,v 1.2 2005/05/07 18:23:26 cawe Exp $
package jake2.render;
public class glconfig_t {
public int renderer;
public String renderer_string;
public String vendor_string;
public String version_string;
public String extensions_string;
public boolean allow_cds;
private float version = 1.1f;
public void parseOpenGLVersion() {
version = Float.parseFloat(version_string.substring(0, 3));
}
public float getOpenGLVersion() {
return version;
}
}

View File

@@ -1,47 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: glstate_t.java,v 1.1.1.1 2004/07/07 19:59:35 hzi Exp $
package jake2.render;
public class glstate_t
{
public float inverse_intensity;
public boolean fullscreen;
public int prev_mode;
public byte d_16to8table[];
public int lightmap_textures;
public int currenttextures[]= {0,0};
public int currenttmu;
public float camera_separation;
public boolean stereo_enabled;
public byte originalRedGammaTable[]= new byte [256];
public byte originalGreenGammaTable[]= new byte [256];
public byte originalBlueGammaTable[]= new byte [256];
}

View File

@@ -1,34 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: mmodel_t.java,v 1.1.1.1 2004/07/07 19:59:35 hzi Exp $
package jake2.render;
public class mmodel_t
{
public float[] mins = { 0, 0, 0 }, maxs = { 0, 0, 0 };
public float[] origin = { 0, 0, 0 }; // for sounds or lights
public float radius;
public int headnode;
public int visleafs; // not including the solid leaf 0
public int firstface, numfaces;
}

View File

@@ -1,47 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: mnode_t.java,v 1.1.1.1 2004/07/07 19:59:35 hzi Exp $
package jake2.render;
import jake2.game.*;
public class mnode_t {
// common with leaf
public int contents; // -1, to differentiate from leafs
public int visframe; // node needs to be traversed if current
//public float minmaxs[] = new float[6]; // for bounding box culling
public float mins[] = new float[3]; // for bounding box culling
public float maxs[] = new float[3]; // for bounding box culling
public mnode_t parent;
// node specific
public cplane_t plane;
public mnode_t children[] = new mnode_t[2];
// unsigned short
public int firstsurface;
public int numsurfaces;
}

View File

@@ -1,49 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
// $Id: mtexinfo_t.java,v 1.2 2004/07/09 06:50:47 hzi Exp $
package jake2.render;
import java.util.Arrays;
public class mtexinfo_t {
// [s/t][xyz offset]
public float vecs[][] = {
{ 0, 0, 0, 0 },
{ 0, 0, 0, 0 }
};
public int flags;
public int numframes;
public mtexinfo_t next; // animation chain
public image_t image;
public void clear() {
Arrays.fill(vecs[0], 0);
Arrays.fill(vecs[1], 0);
flags = 0;
numframes = 0;
next = null;
image = null;
}
}

View File

@@ -1,43 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 09.12.2003 by RST.
// $Id: areanode_t.java,v 1.1.1.1 2004/07/07 19:59:50 hzi Exp $
package jake2.server;
import jake2.*;
import jake2.client.*;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.render.*;
import jake2.server.*;
public class areanode_t {
int axis; // -1 = leaf node
float dist;
areanode_t children[] = new areanode_t[2];
link_t trigger_edicts = new link_t(this);
link_t solid_edicts = new link_t(this);
// used for debugging
float mins_rst[] = {0,0,0};
float maxs_rst[] = {0,0,0};
}

View File

@@ -1,39 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 14.01.2004 by RST.
// $Id: challenge_t.java,v 1.1.1.1 2004/07/07 19:59:50 hzi Exp $
package jake2.server;
import jake2.*;
import jake2.client.*;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.render.*;
import jake2.server.*;
public class challenge_t {
//mem
netadr_t adr = new netadr_t();
int challenge;
int time;
}

View File

@@ -1,42 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 13.01.2004 by RST.
// $Id: client_frame_t.java,v 1.1.1.1 2004/07/07 19:59:50 hzi Exp $
package jake2.server;
import jake2.*;
import jake2.client.*;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.render.*;
import jake2.server.*;
public class client_frame_t {
int areabytes;
byte areabits[] = new byte[Defines.MAX_MAP_AREAS/8]; // portalarea visibility bits
player_state_t ps = new player_state_t();
int num_entities;
int first_entity; // into the circular sv_packet_entities[]
int senttime; // for ping calculations
}

View File

@@ -1,58 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 09.12.2003 by RST.
// $Id: moveclip_t.java,v 1.2 2005/01/14 16:14:02 cawe Exp $
package jake2.server;
import jake2.*;
import jake2.client.*;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.render.*;
import jake2.server.*;
import jake2.util.Math3D;
public class moveclip_t
{
float [] boxmins={0,0,0}, boxmaxs={0,0,0};// enclose the test object along entire move
float [] mins, maxs; // size of the moving object
float [] mins2={0,0,0}, maxs2={0,0,0}; // size when clipping against mosnters
float [] start, end;
// mem
trace_t trace = new trace_t();
edict_t passedict;
int contentmask;
public void clear() {
Math3D.VectorClear(boxmins);
Math3D.VectorClear(boxmaxs);
Math3D.VectorClear(mins);
Math3D.VectorClear(maxs);
Math3D.VectorClear(mins2);
Math3D.VectorClear(maxs2);
start = end = null;
trace.clear();
passedict = null;
contentmask = 0;
}
}

View File

@@ -1,48 +0,0 @@
/*
* sfx_t.java
* Copyright (C) 2004
*
* $Id: sfx_t.java,v 1.3 2005/04/26 20:11:03 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 28.11.2003 by RST.
package jake2.sound;
public class sfx_t {
public String name;
public int registration_sequence;
public sfxcache_t cache;
public String truename;
// is used for AL buffers
public int bufferId = -1;
public boolean isCached = false;
public void clear() {
name = truename = null;
cache = null;
registration_sequence = 0;
bufferId = -1;
isCached = false;
}
}

View File

@@ -1,37 +0,0 @@
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 28.11.2003 by RST.
// $Id: sfxcache_t.java,v 1.1 2004/07/08 20:56:49 hzi Exp $
package jake2.sound;
public class sfxcache_t {
public int length;
public int loopstart;
public int speed; // not needed, because converted on load?
public int width;
public int stereo;
public byte data[]; // variable sized
public sfxcache_t(int size) {
data = new byte[size];
}
}

View File

@@ -1,19 +0,0 @@
/*
* soundinfo_t.java
* Copyright (C) 2004
*
* $Id: soundinfo_t.java,v 1.1 2004/07/08 20:56:49 hzi Exp $
*/
package jake2.sound;
/**
* soundinfo_t
*/
public class soundinfo_t {
int channels;
int samples; // mono samples in buffer
int submission_chunk; // don't mix less than this #
int samplepos; // in mono samples
int samplebits;
int speed;
}

View File

@@ -1,19 +0,0 @@
/*
* wavinfo_t.java
* Copyright (C) 2004
*
* $Id: wavinfo_t.java,v 1.1 2004/07/08 20:56:49 hzi Exp $
*/
package jake2.sound;
/**
* wavinfo_t
*/
public class wavinfo_t {
public int rate;
public int width;
public int channels;
public int loopstart;
public int samples;
public int dataofs; // chunk starts this many bytes from file start
}

View File

@@ -1,32 +0,0 @@
/*
* HighPrecisionTimer.java
* Copyright (C) 2005
*
* $Id: HighPrecisionTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $
*/
package jake2.sys;
import sun.misc.Perf;
class HighPrecisionTimer extends Timer {
private Perf perf = Perf.getPerf();
private double f = 1000.0 / perf.highResFrequency();
private long base;
HighPrecisionTimer() {
base = perf.highResCounter();
}
public long currentTimeMillis() {
long time = perf.highResCounter();
long delta = time - base;
if (delta < 0) {
delta += Long.MAX_VALUE + 1;
}
return (long)(delta * f);
}
}

View File

@@ -1,49 +0,0 @@
/*
* Jake2InputEvent.java
* Copyright (C) 2004
*
* $Id: Jake2InputEvent.java,v 1.2 2004/11/03 08:53:27 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.sys;
import java.awt.AWTEvent;
/**
* Jake2InputEvent
*/
class Jake2InputEvent {
static final int KeyPress = 0;
static final int KeyRelease = 1;
static final int MotionNotify = 2;
static final int ButtonPress = 3;
static final int ButtonRelease = 4;
static final int CreateNotify = 5;
static final int ConfigureNotify = 6;
static final int WheelMoved = 7;
int type;
AWTEvent ev;
Jake2InputEvent(int type, AWTEvent ev) {
this.type = type;
this.ev = ev;
}
}

View File

@@ -1,52 +0,0 @@
/*
* KBD.java
* Copyright (C) 2004
*
* $Id: KBD.java,v 1.7 2004/12/16 22:45:55 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.sys;
/**
* KBD
*/
abstract public class KBD {
static int win_x = 0;
static int win_y = 0;
// motion values
public static int mx = 0;
public static int my = 0;
abstract public void Init();
abstract public void Update();
abstract public void Close();
abstract public void Do_Key_Event(int key, boolean down);
abstract public void installGrabs();
abstract public void uninstallGrabs();
//abstract public void centerMouse();
}

View File

@@ -1,27 +0,0 @@
/*
* NanoTimer.java
* Copyright (C) 2005
*
* $Id: NanoTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $
*/
package jake2.sys;
public class NanoTimer extends Timer {
private long base;
NanoTimer() {
base = System.nanoTime();
}
public long currentTimeMillis() {
long time = System.nanoTime();
long delta = time - base;
if (delta < 0) {
delta += Long.MAX_VALUE + 1;
}
return (long)(delta * 0.000001);
}
}

View File

@@ -1,27 +0,0 @@
/*
* StandardTimer.java
* Copyright (C) 2005
*
* $Id: StandardTimer.java,v 1.1 2005/07/01 14:11:00 hzi Exp $
*/
package jake2.sys;
class StandardTimer extends Timer {
private long base;
StandardTimer() {
base = System.currentTimeMillis();
}
public long currentTimeMillis() {
long time = System.currentTimeMillis();
long delta = time - base;
if (delta < 0) {
delta += Long.MAX_VALUE + 1;
}
return delta;
}
}

View File

@@ -1,36 +0,0 @@
/*
* Timer.java
* Copyright (C) 2005
*
* $Id: Timer.java,v 1.2 2005/07/01 14:20:54 hzi Exp $
*/
package jake2.sys;
import jake2.Globals;
import jake2.qcommon.Com;
public abstract class Timer {
abstract public long currentTimeMillis();
private static long time = 0;
static Timer t;
static {
try {
t = new NanoTimer();
} catch (Throwable e) {
try {
t = new HighPrecisionTimer();
} catch (Throwable e1) {
t = new StandardTimer();
}
}
Com.Println("using " + t.getClass().getName());
}
public static int Milliseconds() {
return Globals.curtime = (int)(t.currentTimeMillis());
}
}

View File

@@ -1,38 +0,0 @@
/*
* Vec3Cache.java
* Copyright (C) 2003
*
* $Id: Vec3Cache.java,v 1.1 2005/01/16 15:16:44 cawe Exp $
*/
package jake2.util;
/**
* Vec3Cache contains float[3] for temporary usage.
* The usage can reduce the garbage at runtime.
*
* @author cwei
*/
public final class Vec3Cache {
//private static Stack cache = new Stack();
private static final float[][] cache = new float[64][3];
private static int index = 0;
private static int max = 0;
public static final float[] get() {
//max = Math.max(index, max);
return cache[index++];
}
public static final void release() {
index--;
}
public static final void release(int count) {
index-=count;
}
public static final void debug() {
System.err.println("Vec3Cache: max. " + (max + 1) + " vectors used.");
}
}

View File

@@ -1,33 +1,27 @@
/* /*
Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
*
This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU General Public License for more details. * See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 31.10.2003 by RST.
// $Id: Defines.java,v 1.9 2006/01/01 15:05:47 cawe Exp $
/** Contains the definitions for the game engine. */ /** Contains the definitions for the game engine. */
package jake2; package lwjake2;
import java.nio.ByteOrder; import java.nio.ByteOrder;
public class Defines { public class Defines {
public final static int WEAPON_READY = 0; public final static int WEAPON_READY = 0;

View File

@@ -1,36 +1,37 @@
/* /*
* Globals.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: Globals.java,v 1.5 2005/02/07 17:49:26 cawe Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.client.centity_t;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.client.client_state_t;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.client.client_static_t;
import lwjake2.client.console_t;
See the GNU General Public License for more details. import lwjake2.client.refexport_t;
import lwjake2.client.viddef_t;
You should have received a copy of the GNU General Public License import lwjake2.client.vrect_t;
along with this program; if not, write to the Free Software import lwjake2.game.cmdalias_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.game.cvar_t;
import lwjake2.game.entity_state_t;
*/ import lwjake2.qcommon.netadr_t;
package jake2; import lwjake2.qcommon.sizebuf_t;
import lwjake2.render.DummyRenderer;
import jake2.client.*; import lwjake2.render.model_t;
import jake2.game.*;
import jake2.qcommon.netadr_t;
import jake2.qcommon.sizebuf_t;
import jake2.render.DummyRenderer;
import jake2.render.model_t;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;

View File

@@ -1,39 +1,32 @@
/* /*
* Jake2.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: Jake2.java,v 1.9 2005/12/03 19:43:15 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.qcommon.Com;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.qcommon.Cvar;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.qcommon.Qcommon;
import lwjake2.sys.Timer;
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2;
import jake2.qcommon.*;
import jake2.sys.Timer;
import java.util.Locale;
/** /**
* Jake2 is the main class of Quake2 for Java. * Jake2 is the main class of Quake2 for Java.
*/ */
public final class Jake2 { public final class LWJake2 {
/** /**
* main is used to start the game. Quake2 for Java supports the following * main is used to start the game. Quake2 for Java supports the following

View File

@@ -1,38 +1,51 @@
/* /*
* CL.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL.java,v 1.29 2005/12/18 22:10:10 cawe Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.game.EndianHandler;
See the GNU General Public License for more details. import lwjake2.game.Info;
import lwjake2.game.cvar_t;
You should have received a copy of the GNU General Public License import lwjake2.game.entity_state_t;
along with this program; if not, write to the Free Software import lwjake2.qcommon.CM;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.qcommon.Cbuf;
import lwjake2.qcommon.Com;
*/ import lwjake2.qcommon.Cvar;
package jake2.client; import lwjake2.qcommon.FS;
import lwjake2.qcommon.MSG;
import jake2.Defines; import lwjake2.qcommon.Netchan;
import jake2.Globals; import lwjake2.qcommon.SZ;
import jake2.game.*; import lwjake2.qcommon.netadr_t;
import jake2.qcommon.*; import lwjake2.qcommon.qfiles;
import jake2.server.SV_MAIN; import lwjake2.qcommon.sizebuf_t;
import jake2.sound.S; import lwjake2.qcommon.xcommand_t;
import jake2.sys.*; import lwjake2.server.SV_MAIN;
import jake2.util.*; import lwjake2.sound.S;
import lwjake2.sys.IN;
import lwjake2.sys.NET;
import lwjake2.sys.Sys;
import lwjake2.sys.Timer;
import lwjake2.util.Lib;
import lwjake2.util.Math3D;
import lwjake2.util.Vargs;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;

View File

@@ -1,35 +1,32 @@
/* /*
* java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_ents.java,v 1.10 2005/02/06 19:17:03 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.entity_state_t;
import lwjake2.game.player_state_t;
See the GNU General Public License for more details. import lwjake2.game.pmove_t;
import lwjake2.qcommon.Com;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.FS;
along with this program; if not, write to the Free Software import lwjake2.qcommon.MSG;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.util.Math3D;
*/
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.util.Math3D;
/** /**
* CL_ents * CL_ents

View File

@@ -1,39 +1,32 @@
/* /*
* java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_fx.java,v 1.9 2005/02/06 19:18:10 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.entity_state_t;
import lwjake2.game.monsters.M_Flash;
See the GNU General Public License for more details. import lwjake2.qcommon.Com;
import lwjake2.qcommon.MSG;
You should have received a copy of the GNU General Public License import lwjake2.sound.S;
along with this program; if not, write to the Free Software import lwjake2.util.Lib;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.util.Math3D;
*/
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.entity_state_t;
import jake2.game.monsters.M_Flash;
import jake2.qcommon.Com;
import jake2.qcommon.MSG;
import jake2.sound.S;
import jake2.util.Lib;
import jake2.util.Math3D;
/** /**
* Client Graphics Effects. * Client Graphics Effects.

View File

@@ -1,39 +1,38 @@
/* /*
* java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_input.java,v 1.7 2005/06/26 09:17:33 hzi Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.game.cvar_t;
See the GNU General Public License for more details. import lwjake2.game.usercmd_t;
import lwjake2.qcommon.Com;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.Cvar;
along with this program; if not, write to the Free Software import lwjake2.qcommon.MSG;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.qcommon.Netchan;
import lwjake2.qcommon.SZ;
*/ import lwjake2.qcommon.sizebuf_t;
package jake2.client; import lwjake2.qcommon.xcommand_t;
import lwjake2.sys.IN;
import jake2.Defines; import lwjake2.util.Lib;
import jake2.Globals; import lwjake2.util.Math3D;
import jake2.game.Cmd;
import jake2.game.cvar_t;
import jake2.game.usercmd_t;
import jake2.qcommon.*;
import jake2.sys.IN;
import jake2.util.Lib;
import jake2.util.Math3D;
/** /**
* CL_input * CL_input

View File

@@ -1,38 +1,29 @@
/* /*
* CL_fx.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_inv.java,v 1.3 2005/12/18 22:10:10 cawe Exp $ * This program is free software; you can redistribute it and/or
*/ * modify it under the terms of the GNU General Public License
/* * as published by the Free Software Foundation; either version 2
Copyright (C) 1997-2001 Id Software, Inc. * of the License, or (at your option) any later version.
*
This program is free software; you can redistribute it and/or * This program is distributed in the hope that it will be useful,
modify it under the terms of the GNU General Public License * but WITHOUT ANY WARRANTY; without even the implied warranty of
as published by the Free Software Foundation; either version 2 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
of the License, or (at your option) any later version. *
* See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, * You should have received a copy of the GNU General Public License
but WITHOUT ANY WARRANTY; without even the implied warranty of * along with this program; if not, write to the Free Software
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 31.01.2004 by RST. package lwjake2.client;
package jake2.client;
import jake2.Defines; import lwjake2.Defines;
import jake2.Globals; import lwjake2.Globals;
import jake2.qcommon.Com; import lwjake2.qcommon.Com;
import jake2.qcommon.MSG; import lwjake2.qcommon.MSG;
import jake2.util.Lib; import lwjake2.util.Lib;
import jake2.util.Vargs; import lwjake2.util.Vargs;
/** /**
* CL_inv * CL_inv

View File

@@ -1,36 +1,27 @@
/* /*
* CL_newfx.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_newfx.java,v 1.7 2005/01/17 21:50:42 cawe Exp $ * This program is free software; you can redistribute it and/or
*/ * modify it under the terms of the GNU General Public License
/* * as published by the Free Software Foundation; either version 2
Copyright (C) 1997-2001 Id Software, Inc. * of the License, or (at your option) any later version.
*
This program is free software; you can redistribute it and/or * This program is distributed in the hope that it will be useful,
modify it under the terms of the GNU General Public License * but WITHOUT ANY WARRANTY; without even the implied warranty of
as published by the Free Software Foundation; either version 2 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
of the License, or (at your option) any later version. *
* See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, * You should have received a copy of the GNU General Public License
but WITHOUT ANY WARRANTY; without even the implied warranty of * along with this program; if not, write to the Free Software
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 31.01.2004 by RST. package lwjake2.client;
package jake2.client;
import jake2.Defines; import lwjake2.Defines;
import jake2.Globals; import lwjake2.Globals;
import jake2.util.Lib; import lwjake2.util.Lib;
import jake2.util.Math3D; import lwjake2.util.Math3D;
/** /**
* CL_newfx * CL_newfx

View File

@@ -1,40 +1,39 @@
/* /*
* CL_parse.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_parse.java,v 1.21 2005/02/19 21:16:03 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.game.entity_state_t;
See the GNU General Public License for more details. import lwjake2.qcommon.CM;
import lwjake2.qcommon.Cbuf;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.Com;
along with this program; if not, write to the Free Software import lwjake2.qcommon.Cvar;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.qcommon.FS;
import lwjake2.qcommon.MSG;
*/ import lwjake2.qcommon.SZ;
package jake2.client; import lwjake2.qcommon.xcommand_t;
import lwjake2.render.model_t;
import jake2.Defines; import lwjake2.sound.S;
import jake2.Globals; import lwjake2.sys.Sys;
import jake2.game.Cmd; import lwjake2.util.Lib;
import jake2.game.entity_state_t;
import jake2.qcommon.*;
import jake2.render.model_t;
import jake2.sound.S;
import jake2.sys.Sys;
import jake2.util.Lib;
import jake2.util.Math3D;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
@@ -306,7 +305,7 @@ public class CL_parse {
Globals.cls.serverProtocol = i; Globals.cls.serverProtocol = i;
// BIG HACK to let demos from release work with the 3.0x patch!!! // BIG HACK to let demos from release work with the 3.0x patch!!!
if (Globals.server_state != 0 && Defines.PROTOCOL_VERSION == 34) { if (Globals.server_state != 0) {
} else if (i != Defines.PROTOCOL_VERSION) } else if (i != Defines.PROTOCOL_VERSION)
Com.Error(Defines.ERR_DROP, "Server returned version " + i Com.Error(Defines.ERR_DROP, "Server returned version " + i
+ ", not " + Defines.PROTOCOL_VERSION); + ", not " + Defines.PROTOCOL_VERSION);

View File

@@ -1,35 +1,35 @@
/* /*
* CL_pred.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_pred.java,v 1.6 2004/10/04 12:50:37 hzi Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.cmodel_t;
import lwjake2.game.edict_t;
See the GNU General Public License for more details. import lwjake2.game.entity_state_t;
import lwjake2.game.pmove_t;
You should have received a copy of the GNU General Public License import lwjake2.game.trace_t;
along with this program; if not, write to the Free Software import lwjake2.game.usercmd_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.qcommon.CM;
import lwjake2.qcommon.Com;
*/ import lwjake2.qcommon.PMove;
package jake2.client; import lwjake2.util.Math3D;
import jake2.Defines;
import jake2.Globals;
import jake2.game.*;
import jake2.qcommon.*;
import jake2.util.Math3D;
/** /**
* CL_pred * CL_pred

View File

@@ -1,40 +1,33 @@
/* /*
* java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: CL_tent.java,v 1.10 2005/02/20 21:50:52 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.player_state_t;
import lwjake2.qcommon.Com;
See the GNU General Public License for more details. import lwjake2.qcommon.MSG;
import lwjake2.render.model_t;
You should have received a copy of the GNU General Public License import lwjake2.sound.S;
along with this program; if not, write to the Free Software import lwjake2.sound.sfx_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.util.Lib;
import lwjake2.util.Math3D;
*/
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.player_state_t;
import jake2.qcommon.Com;
import jake2.qcommon.MSG;
import jake2.render.model_t;
import jake2.sound.S;
import jake2.sound.sfx_t;
import jake2.util.Lib;
import jake2.util.Math3D;
/** /**
* CL_tent * CL_tent

View File

@@ -1,34 +1,28 @@
/*
* CL_view.java Copyright (C) 2004
*
* $Id: CL_view.java,v 1.4 2004/09/22 19:22:07 salomo Exp $
*/
/* /*
* Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
* *
* This program is free software; you can redistribute it and/or modify it under * This program is free software; you can redistribute it and/or
* the terms of the GNU General Public License as published by the Free Software * modify it under the terms of the GNU General Public License
* Foundation; either version 2 of the License, or (at your option) any later * as published by the Free Software Foundation; either version 2
* version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, but WITHOUT * This program is distributed in the hope that it will be useful,
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * but WITHOUT ANY WARRANTY; without even the implied warranty of
* FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* *
* See the GNU General Public License for more details. * See the GNU General Public License for more details.
* * You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License along with * along with this program; if not, write to the Free Software
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/ */
package jake2.client;
import jake2.Defines; package lwjake2.client;
import jake2.Globals;
import jake2.qcommon.CM; import lwjake2.Defines;
import jake2.qcommon.Com; import lwjake2.Globals;
import jake2.sys.Sys; import lwjake2.qcommon.CM;
import lwjake2.qcommon.Com;
import lwjake2.sys.Sys;
import java.util.StringTokenizer; import java.util.StringTokenizer;

View File

@@ -1,41 +1,38 @@
/* /*
* Con.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: Console.java,v 1.7 2005/06/30 08:36:22 hzi Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.qcommon.Cbuf;
See the GNU General Public License for more details. import lwjake2.qcommon.Com;
import lwjake2.qcommon.Cvar;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.FS;
along with this program; if not, write to the Free Software import lwjake2.qcommon.xcommand_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.util.Lib;
import lwjake2.util.Vargs;
*/
package jake2.client;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.util.Arrays; import java.util.Arrays;
import jake2.Defines;
import jake2.Globals;
import jake2.game.Cmd;
import jake2.qcommon.*;
import jake2.util.Lib;
import jake2.util.Vargs;
/** /**
* Console * Console
*/ */
@@ -403,7 +400,6 @@ public final class Console extends Globals {
static void DrawInput() { static void DrawInput() {
int i; int i;
byte[] text; byte[] text;
int start = 0;
if (cls.key_dest == key_menu) if (cls.key_dest == key_menu)
return; return;
@@ -420,8 +416,8 @@ public final class Console extends Globals {
text[i] = ' '; text[i] = ' ';
// prestep if horizontally scrolling // prestep if horizontally scrolling
if (key_linepos >= con.linewidth) //if (key_linepos >= con.linewidth)
start += 1 + key_linepos - con.linewidth; // start += 1 + key_linepos - con.linewidth;
// draw it // draw it
// y = con.vislines-16; // y = con.vislines-16;

View File

@@ -1,35 +1,31 @@
/* /*
* Key.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: Key.java,v 1.12 2005/12/18 22:10:12 cawe Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.qcommon.Cbuf;
See the GNU General Public License for more details. import lwjake2.qcommon.Com;
import lwjake2.qcommon.Cvar;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.xcommand_t;
along with this program; if not, write to the Free Software import lwjake2.util.Lib;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.Cmd;
import jake2.qcommon.*;
import jake2.util.Lib;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;

View File

@@ -1,36 +1,34 @@
/* /*
* M.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: M.java,v 1.9 2006/01/21 21:53:32 salomo Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.EntThinkAdapter;
import lwjake2.game.GameBase;
See the GNU General Public License for more details. import lwjake2.game.GameCombat;
import lwjake2.game.edict_t;
You should have received a copy of the GNU General Public License import lwjake2.game.mmove_t;
along with this program; if not, write to the Free Software import lwjake2.game.trace_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.server.SV;
import lwjake2.util.Lib;
*/ import lwjake2.util.Math3D;
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.*;
import jake2.server.SV;
import jake2.util.Lib;
import jake2.util.Math3D;
/** /**
* M * M

View File

@@ -1,39 +1,39 @@
/* /*
* Menu.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2004
* *
* $Id: Menu.java,v 1.20.2.1 2006/04/06 13:14:59 cawe Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Globals;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.game.Cmd;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.cvar_t;
import lwjake2.qcommon.Cbuf;
See the GNU General Public License for more details. import lwjake2.qcommon.Com;
import lwjake2.qcommon.Cvar;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.FS;
along with this program; if not, write to the Free Software import lwjake2.qcommon.netadr_t;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.qcommon.xcommand_t;
import lwjake2.sound.S;
*/ import lwjake2.sys.NET;
package jake2.client; import lwjake2.sys.Sys;
import lwjake2.sys.Timer;
import jake2.Globals; import lwjake2.util.Lib;
import jake2.game.Cmd; import lwjake2.util.Math3D;
import jake2.game.cvar_t; import lwjake2.util.QuakeFile;
import jake2.qcommon.*;
import jake2.sound.S;
import jake2.sys.*;
import jake2.sys.NET;
import jake2.sys.Sys;
import jake2.util.*;
import java.awt.Dimension; import java.awt.Dimension;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
@@ -447,7 +447,6 @@ public final class Menu extends Key {
int ystart; int ystart;
int xoffset; int xoffset;
int widest = -1; int widest = -1;
int totalheight = 0;
String litname; String litname;
String[] names = { "m_main_game", "m_main_multiplayer", String[] names = { "m_main_game", "m_main_multiplayer",
"m_main_options", "m_main_video", "m_main_quit" }; "m_main_options", "m_main_video", "m_main_quit" };
@@ -460,7 +459,6 @@ public final class Menu extends Key {
if (w > widest) if (w > widest)
widest = w; widest = w;
totalheight += (h + 12);
} }
ystart = (Globals.viddef.height / 2 - 110); ystart = (Globals.viddef.height / 2 - 110);
@@ -4669,7 +4667,6 @@ public final class Menu extends Key {
public static void Menu_DrawStatusBar(String string) { public static void Menu_DrawStatusBar(String string) {
if (string != null) { if (string != null) {
int l = string.length(); int l = string.length();
int maxrow = viddef.height / 8;
int maxcol = viddef.width / 8; int maxcol = viddef.width / 8;
int col = maxcol / 2 - l / 2; int col = maxcol / 2 - l / 2;
@@ -4881,7 +4878,6 @@ public final class Menu extends Key {
public static void SpinControl_Draw(menulist_s s) { public static void SpinControl_Draw(menulist_s s) {
//char buffer[100]; //char buffer[100];
String buffer;
if (s.name != null) { if (s.name != null) {
Menu_DrawStringR2LDark(s.x + s.parent.x + LCOLUMN_OFFSET, s.y Menu_DrawStringR2LDark(s.x + s.parent.x + LCOLUMN_OFFSET, s.y

View File

@@ -1,45 +1,40 @@
/* /*
* SCR.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: SCR.java,v 1.18 2005/12/04 17:32:42 cawe Exp $ * This program is free software; you can redistribute it and/or
*/ * modify it under the terms of the GNU General Public License
/* * as published by the Free Software Foundation; either version 2
Copyright (C) 1997-2001 Id Software, Inc. * of the License, or (at your option) any later version.
*
This program is free software; you can redistribute it and/or * This program is distributed in the hope that it will be useful,
modify it under the terms of the GNU General Public License * but WITHOUT ANY WARRANTY; without even the implied warranty of
as published by the Free Software Foundation; either version 2 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
of the License, or (at your option) any later version. *
* See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, * You should have received a copy of the GNU General Public License
but WITHOUT ANY WARRANTY; without even the implied warranty of * along with this program; if not, write to the Free Software
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
package jake2.client; package lwjake2.client;
import jake2.Defines; import lwjake2.Defines;
import jake2.Globals; import lwjake2.Globals;
import jake2.game.Cmd; import lwjake2.game.Cmd;
import jake2.game.cvar_t; import lwjake2.game.cvar_t;
import jake2.qcommon.*; import lwjake2.qcommon.Com;
import jake2.sound.S; import lwjake2.qcommon.Cvar;
import jake2.sys.Sys; import lwjake2.qcommon.FS;
import jake2.sys.Timer; import lwjake2.qcommon.MSG;
import jake2.util.Lib; import lwjake2.qcommon.SZ;
import jake2.util.Vargs; import lwjake2.qcommon.qfiles;
import lwjake2.qcommon.xcommand_t;
import lwjake2.sound.S;
import lwjake2.sys.Timer;
import lwjake2.util.Lib;
import lwjake2.util.Vargs;
import java.awt.Dimension; import java.awt.Dimension;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.util.Arrays; import java.util.Arrays;
@@ -291,9 +286,7 @@ public final class SCR extends Globals {
int x, y; int x, y;
int remaining; int remaining;
if (cs == null) if (cs == null || cs.length() == 0)
return;
if (cs.length() == 0)
return; return;
// the finale prints the characters one at a time // the finale prints the characters one at a time

View File

@@ -1,37 +1,32 @@
/* /*
* V.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: V.java,v 1.5 2005/07/01 14:20:50 hzi Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Globals;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.game.Cmd;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.cvar_t;
import lwjake2.qcommon.Com;
See the GNU General Public License for more details. import lwjake2.qcommon.Cvar;
import lwjake2.qcommon.xcommand_t;
You should have received a copy of the GNU General Public License import lwjake2.sys.Timer;
along with this program; if not, write to the Free Software import lwjake2.util.Math3D;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.util.Vargs;
*/
package jake2.client;
import jake2.Globals;
import jake2.game.Cmd;
import jake2.game.cvar_t;
import jake2.qcommon.*;
import jake2.sys.Timer;
import jake2.util.Math3D;
import jake2.util.Vargs;
import java.io.IOException; import java.io.IOException;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;

View File

@@ -1,39 +1,34 @@
/* /*
* VID.java * Copyright (C) 1997-2001 Id Software, Inc.
* Copyright (C) 2003
* *
* $Id: VID.java,v 1.17 2005/11/13 13:36:00 cawe Exp $ * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/*
Copyright (C) 1997-2001 Id Software, Inc.
This program is free software; you can redistribute it and/or package lwjake2.client;
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, import lwjake2.Defines;
but WITHOUT ANY WARRANTY; without even the implied warranty of import lwjake2.Globals;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. import lwjake2.game.Cmd;
import lwjake2.game.cvar_t;
See the GNU General Public License for more details. import lwjake2.qcommon.Com;
import lwjake2.qcommon.Cvar;
You should have received a copy of the GNU General Public License import lwjake2.qcommon.xcommand_t;
along with this program; if not, write to the Free Software import lwjake2.render.Renderer;
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import lwjake2.sound.S;
import lwjake2.sys.IN;
*/ import lwjake2.util.Vargs;
package jake2.client;
import jake2.Defines;
import jake2.Globals;
import jake2.game.Cmd;
import jake2.game.cvar_t;
import jake2.qcommon.*;
import jake2.render.Renderer;
import jake2.sound.S;
import jake2.sys.IN;
import jake2.util.Vargs;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.DisplayMode; import java.awt.DisplayMode;

View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
import lwjake2.game.entity_state_t;
public class centity_t {
entity_state_t baseline= new entity_state_t(null); // delta from this if not from a previous frame
public entity_state_t current= new entity_state_t(null);
entity_state_t prev= new entity_state_t(null); // will always be valid, but might just be a copy of current
int serverframe; // if not current, this ent isn't in the frame
int trailcount; // for diminishing grenade trails
float[] lerp_origin = { 0, 0, 0 }; // for trails (variable hz)
int fly_stoptime;
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
/**
* cl_sustain_t
*/
public class cl_sustain_t {
static abstract class ThinkAdapter {
abstract void think(cl_sustain_t self);
}
int id;
int type;
int endtime;
int nextthink;
int thinkinterval;
float[] org = new float[3];
float[] dir = new float[3];
int color;
int count;
int magnitude;
ThinkAdapter think;
void clear() {
org[0] = org[1] = org[2] =
dir[0] = dir[1] = dir[2] =
id = type = endtime = nextthink = thinkinterval = color = count = magnitude = 0;
think = null;
}
}

View File

@@ -1,36 +1,30 @@
/* /*
Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
*
This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU General Public License for more details. * See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 27.11.2003 by RST. package lwjake2.client;
//$Id: client_state_t.java,v 1.5 2005/11/21 19:38:38 cawe Exp $
package jake2.client; import lwjake2.Defines;
import lwjake2.game.cmodel_t;
import lwjake2.game.usercmd_t;
import lwjake2.render.image_t;
import lwjake2.render.model_t;
import lwjake2.sound.sfx_t;
import jake2.Defines;
import jake2.game.cmodel_t;
import jake2.game.usercmd_t;
import jake2.render.image_t;
import jake2.render.model_t;
import jake2.sound.*;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
public class client_state_t { public class client_state_t {

View File

@@ -1,31 +1,26 @@
/* /*
Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
*
This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU General Public License for more details. * See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 27.11.2003 by RST. package lwjake2.client;
// $Id: client_static_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $
import lwjake2.qcommon.netchan_t;
package jake2.client; import java.io.RandomAccessFile;
import jake2.qcommon.netchan_t;
import java.io.*;
public class client_static_t { public class client_static_t {

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
import lwjake2.Defines;
import lwjake2.render.image_t;
import lwjake2.render.model_t;
public class clientinfo_t {
String name ="";
String cinfo ="";
image_t skin; // ptr
image_t icon; // ptr
String iconname ="";
model_t model; // ptr
model_t weaponmodel[] = new model_t[Defines.MAX_CLIENTWEAPONMODELS]; // arary of references
// public void reset()
// {
// set(new clientinfo_t());
// }
public void set (clientinfo_t from)
{
name = from.name;
cinfo = from.cinfo;
skin = from.skin;
icon = from.icon;
iconname = from.iconname;
model = from.model;
System.arraycopy(from.weaponmodel,0, weaponmodel, 0 , Defines.MAX_CLIENTWEAPONMODELS);
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
import lwjake2.Defines;
/**
* console_t
*/
public final class console_t {
boolean initialized;
byte[] text = new byte[Defines.CON_TEXTSIZE];
int current; // line where next message will be printed
int x; // offset in current line for next print
int display; // bottom of console displays this line
int ormask; // high bit mask for colored characters
int linewidth; // characters across screen
int totallines; // total lines in console scrollback
float cursorspeed;
int vislines;
float[] times = new float[Defines.NUM_CON_TIMES]; // cls.realtime time the line was generated
// for transparent notify lines
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
/**
* cparticle_t
*
* @author cwei
*/
public class cparticle_t {
public cparticle_t next;
public float time;
public float[] org = {0, 0, 0}; // vec3_t
public float[] vel = {0, 0, 0}; // vec3_t
public float[] accel = {0, 0, 0}; // vec3_t
public float color;
//public float colorvel;
public float alpha;
public float alphavel;
}

View File

@@ -0,0 +1,26 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
public class dlight_t
{
public float origin[] = { 0, 0, 0 };
public float color[] = { 0, 0, 0 };
public float intensity;
}

View File

@@ -1,32 +1,27 @@
/* /*
Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
*
This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU General Public License for more details. * See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 20.11.2003 by RST. package lwjake2.client;
// $Id: entity_t.java,v 1.2 2005/01/16 13:56:49 cawe Exp $
package jake2.client; import lwjake2.render.image_t;
import lwjake2.render.model_t;
import lwjake2.util.Math3D;
import jake2.render.*;
import jake2.util.Math3D;
// ok!
public class entity_t implements Cloneable{ public class entity_t implements Cloneable{
//ptr //ptr
public model_t model; // opaque type outside refresh public model_t model; // opaque type outside refresh

View File

@@ -1,29 +1,24 @@
/* /*
Copyright (C) 1997-2001 Id Software, Inc. * Copyright (C) 1997-2001 Id Software, Inc.
*
This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
*
This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU General Public License for more details. * See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// Created on 27.11.2003 by RST. package lwjake2.client;
// $Id: frame_t.java,v 1.3 2004/07/09 06:50:50 hzi Exp $
package jake2.client; import lwjake2.game.player_state_t;
import jake2.game.player_state_t;
import java.util.Arrays; import java.util.Arrays;

View File

@@ -0,0 +1,29 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
/**
* kbutton_t
*/
public class kbutton_t {
int[] down = new int[2]; // key nums holding it down
long downtime; // msec timestamp
long msec; // msec down this frame
public int state;
}

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
public class lightstyle_t
{
public float rgb[] = { 0, 0, 0 }; // 0.0 - 2.0
public float white; // highest of rgb
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.client;
import lwjake2.Defines;
import lwjake2.util.Lib;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
public class particle_t {
// lwjgl renderer needs a ByteBuffer
private static ByteBuffer colorByteArray = Lib.newByteBuffer(Defines.MAX_PARTICLES * Lib.SIZEOF_INT, ByteOrder.LITTLE_ENDIAN);
public static FloatBuffer vertexArray = Lib.newFloatBuffer(Defines.MAX_PARTICLES * 3);
public static int[] colorTable = new int[256];
public static IntBuffer colorArray = colorByteArray.asIntBuffer();
public static void setColorPalette(int[] palette) {
for (int i=0; i < 256; i++) {
colorTable[i] = palette[i] & 0x00FFFFFF;
}
}
public static ByteBuffer getColorAsByteBuffer() {
return colorByteArray;
}
}

Some files were not shown because too many files have changed in this diff Show More