Долой наследование от статических классов с константами!
This commit is contained in:
@@ -512,10 +512,10 @@ public class Defines {
|
||||
public final static int DF_FIXED_FOV = 0x00008000; // 32768
|
||||
|
||||
// ROGUE
|
||||
protected final static int DF_NO_MINES = 0x00020000;
|
||||
protected final static int DF_NO_STACK_DOUBLE = 0x00040000;
|
||||
protected final static int DF_NO_NUKES = 0x00080000;
|
||||
protected final static int DF_NO_SPHERES = 0x00100000;
|
||||
public final static int DF_NO_MINES = 0x00020000;
|
||||
public final static int DF_NO_STACK_DOUBLE = 0x00040000;
|
||||
public final static int DF_NO_NUKES = 0x00080000;
|
||||
public final static int DF_NO_SPHERES = 0x00100000;
|
||||
// ROGUE
|
||||
|
||||
//
|
||||
@@ -865,7 +865,7 @@ public class Defines {
|
||||
// R E N D E R E R
|
||||
////////////////////
|
||||
public static final int MAX_DLIGHTS = 32;
|
||||
protected static final int MAX_ENTITIES = 128;
|
||||
public static final int MAX_ENTITIES = 128;
|
||||
public static final int MAX_PARTICLES = 4096;
|
||||
|
||||
// gl_model.h
|
||||
@@ -930,14 +930,14 @@ public class Defines {
|
||||
public final static int PS_WEAPONFRAME = (1 << 13);
|
||||
public final static int PS_RDFLAGS = (1 << 14);
|
||||
|
||||
protected static final int CM_ANGLE1 = (1);
|
||||
protected static final int CM_ANGLE2 = (1 << 1);
|
||||
protected static final int CM_ANGLE3 = (1 << 2);
|
||||
protected static final int CM_FORWARD = (1 << 3);
|
||||
protected static final int CM_SIDE = (1 << 4);
|
||||
protected static final int CM_UP = (1 << 5);
|
||||
protected static final int CM_BUTTONS = (1 << 6);
|
||||
protected static final int CM_IMPULSE = (1 << 7);
|
||||
public static final int CM_ANGLE1 = (1);
|
||||
public static final int CM_ANGLE2 = (1 << 1);
|
||||
public static final int CM_ANGLE3 = (1 << 2);
|
||||
public static final int CM_FORWARD = (1 << 3);
|
||||
public static final int CM_SIDE = (1 << 4);
|
||||
public static final int CM_UP = (1 << 5);
|
||||
public static final int CM_BUTTONS = (1 << 6);
|
||||
public static final int CM_IMPULSE = (1 << 7);
|
||||
|
||||
// try to pack the common update flags into the first byte
|
||||
public final static int U_ORIGIN1 = (1);
|
||||
|
||||
@@ -18,13 +18,7 @@
|
||||
|
||||
package lwjake2;
|
||||
|
||||
import lwjake2.client.centity_t;
|
||||
import lwjake2.client.client_state_t;
|
||||
import lwjake2.client.client_static_t;
|
||||
import lwjake2.client.console_t;
|
||||
import lwjake2.client.refexport_t;
|
||||
import lwjake2.client.viddef_t;
|
||||
import lwjake2.client.vrect_t;
|
||||
import lwjake2.client.*;
|
||||
import lwjake2.game.cmdalias_t;
|
||||
import lwjake2.game.cvar_t;
|
||||
import lwjake2.game.entity_state_t;
|
||||
@@ -37,6 +31,8 @@ import java.io.FileWriter;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Random;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
|
||||
/**
|
||||
* Globals ist the collection of global variables and constants.
|
||||
* It is more elegant to use these vars by inheritance to separate
|
||||
@@ -44,7 +40,7 @@ import java.util.Random;
|
||||
*
|
||||
* As consequence you dont have to touch that much code this time.
|
||||
*/
|
||||
public class Globals extends Defines {
|
||||
public class Globals {
|
||||
|
||||
public static final String __DATE__ = "2003";
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class LWJake2 {
|
||||
|
||||
// TODO: check if dedicated is set in config file
|
||||
|
||||
Globals.dedicated= Cvar.Get("dedicated", "0", Qcommon.CVAR_NOSET);
|
||||
Globals.dedicated= Cvar.Get("dedicated", "0", Defines.CVAR_NOSET);
|
||||
|
||||
if (dedicated)
|
||||
Globals.dedicated.value = 1.0f;
|
||||
|
||||
@@ -22,11 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import lwjake2.Defines;
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.game.Cmd;
|
||||
import lwjake2.qcommon.Cbuf;
|
||||
import lwjake2.qcommon.Com;
|
||||
import lwjake2.qcommon.Cvar;
|
||||
import lwjake2.qcommon.FileSystem;
|
||||
import lwjake2.qcommon.BaseQ2FileSystem;
|
||||
import lwjake2.qcommon.*;
|
||||
import lwjake2.util.Lib;
|
||||
import lwjake2.util.Vargs;
|
||||
|
||||
@@ -34,11 +30,19 @@ import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static lwjake2.Defines.NUM_CON_TIMES;
|
||||
import static lwjake2.Defines.ca_active;
|
||||
import static lwjake2.Defines.key_console;
|
||||
import static lwjake2.Defines.key_game;
|
||||
import static lwjake2.Defines.key_menu;
|
||||
import static lwjake2.Defines.key_message;
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* Console
|
||||
*/
|
||||
@Slf4j
|
||||
public final class Console extends Globals {
|
||||
public final class Console {
|
||||
private static final FileSystem fileSystem = BaseQ2FileSystem.getInstance();
|
||||
public static Runnable ToggleConsole_f = () -> {
|
||||
SCR.EndLoadingPlaque(); // get rid of loading plaque
|
||||
@@ -48,7 +52,7 @@ public final class Console extends Globals {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Globals.cls.state == Defines.ca_disconnected) {
|
||||
if (cls.state == Defines.ca_disconnected) {
|
||||
// start the demo loop again
|
||||
Cbuf.AddText("d1\n");
|
||||
return;
|
||||
@@ -57,12 +61,12 @@ public final class Console extends Globals {
|
||||
Key.ClearTyping();
|
||||
Console.ClearNotify();
|
||||
|
||||
if (Globals.cls.key_dest == Defines.key_console) {
|
||||
if (cls.key_dest == key_console) {
|
||||
Menu.ForceMenuOff();
|
||||
Cvar.Set("paused", "0");
|
||||
} else {
|
||||
Menu.ForceMenuOff();
|
||||
Globals.cls.key_dest = Defines.key_console;
|
||||
cls.key_dest = key_console;
|
||||
|
||||
if (Cvar.VariableValue("maxclients") == 1
|
||||
&& Globals.server_state != 0)
|
||||
@@ -70,7 +74,7 @@ public final class Console extends Globals {
|
||||
}
|
||||
};
|
||||
|
||||
public static Runnable Clear_f = () -> Arrays.fill(Globals.con.text, (byte) ' ');
|
||||
public static Runnable Clear_f = () -> Arrays.fill(con.text, (byte) ' ');
|
||||
|
||||
public static Runnable Dump_f = () -> {
|
||||
|
||||
@@ -139,7 +143,7 @@ public final class Console extends Globals {
|
||||
*
|
||||
*/
|
||||
public static void Init() {
|
||||
Globals.con.linewidth = -1;
|
||||
con.linewidth = -1;
|
||||
|
||||
CheckResize();
|
||||
|
||||
@@ -156,7 +160,7 @@ public final class Console extends Globals {
|
||||
Cmd.AddCommand("messagemode2", MessageMode2_f);
|
||||
Cmd.AddCommand("clear", Clear_f);
|
||||
Cmd.AddCommand("condump", Dump_f);
|
||||
Globals.con.initialized = true;
|
||||
con.initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,41 +171,41 @@ public final class Console extends Globals {
|
||||
int width = (Globals.viddef.width >> 3) - 2;
|
||||
if (width > Defines.MAXCMDLINE) width = Defines.MAXCMDLINE;
|
||||
|
||||
if (width == Globals.con.linewidth)
|
||||
if (width == con.linewidth)
|
||||
return;
|
||||
|
||||
if (width < 1) { // video hasn't been initialized yet
|
||||
width = 38;
|
||||
Globals.con.linewidth = width;
|
||||
Globals.con.totallines = Defines.CON_TEXTSIZE
|
||||
/ Globals.con.linewidth;
|
||||
Arrays.fill(Globals.con.text, (byte) ' ');
|
||||
con.linewidth = width;
|
||||
con.totallines = Defines.CON_TEXTSIZE
|
||||
/ con.linewidth;
|
||||
Arrays.fill(con.text, (byte) ' ');
|
||||
} else {
|
||||
int oldwidth = Globals.con.linewidth;
|
||||
Globals.con.linewidth = width;
|
||||
int oldtotallines = Globals.con.totallines;
|
||||
Globals.con.totallines = Defines.CON_TEXTSIZE
|
||||
/ Globals.con.linewidth;
|
||||
int oldwidth = con.linewidth;
|
||||
con.linewidth = width;
|
||||
int oldtotallines = con.totallines;
|
||||
con.totallines = Defines.CON_TEXTSIZE
|
||||
/ con.linewidth;
|
||||
int numlines = oldtotallines;
|
||||
|
||||
if (Globals.con.totallines < numlines)
|
||||
numlines = Globals.con.totallines;
|
||||
if (con.totallines < numlines)
|
||||
numlines = con.totallines;
|
||||
|
||||
int numchars = oldwidth;
|
||||
|
||||
if (Globals.con.linewidth < numchars)
|
||||
numchars = Globals.con.linewidth;
|
||||
if (con.linewidth < numchars)
|
||||
numchars = con.linewidth;
|
||||
|
||||
byte[] tbuf = new byte[Defines.CON_TEXTSIZE];
|
||||
System
|
||||
.arraycopy(Globals.con.text, 0, tbuf, 0,
|
||||
.arraycopy(con.text, 0, tbuf, 0,
|
||||
Defines.CON_TEXTSIZE);
|
||||
Arrays.fill(Globals.con.text, (byte) ' ');
|
||||
Arrays.fill(con.text, (byte) ' ');
|
||||
|
||||
for (int i = 0; i < numlines; i++) {
|
||||
for (int j = 0; j < numchars; j++) {
|
||||
Globals.con.text[(Globals.con.totallines - 1 - i)
|
||||
* Globals.con.linewidth + j] = tbuf[((Globals.con.current
|
||||
con.text[(con.totallines - 1 - i)
|
||||
* con.linewidth + j] = tbuf[((con.current
|
||||
- i + oldtotallines) % oldtotallines)
|
||||
* oldwidth + j];
|
||||
}
|
||||
@@ -210,14 +214,14 @@ public final class Console extends Globals {
|
||||
Console.ClearNotify();
|
||||
}
|
||||
|
||||
Globals.con.current = Globals.con.totallines - 1;
|
||||
Globals.con.display = Globals.con.current;
|
||||
con.current = con.totallines - 1;
|
||||
con.display = con.current;
|
||||
}
|
||||
|
||||
public static void ClearNotify() {
|
||||
int i;
|
||||
for (i = 0; i < Defines.NUM_CON_TIMES; i++)
|
||||
Globals.con.times[i] = 0;
|
||||
con.times[i] = 0;
|
||||
}
|
||||
|
||||
static void DrawString(int x, int y, String s) {
|
||||
@@ -271,15 +275,15 @@ public final class Console extends Globals {
|
||||
* =============== Con_Linefeed ===============
|
||||
*/
|
||||
static void Linefeed() {
|
||||
Globals.con.x = 0;
|
||||
if (Globals.con.display == Globals.con.current)
|
||||
Globals.con.display++;
|
||||
Globals.con.current++;
|
||||
int i = (Globals.con.current % Globals.con.totallines)
|
||||
* Globals.con.linewidth;
|
||||
int e = i + Globals.con.linewidth;
|
||||
con.x = 0;
|
||||
if (con.display == con.current)
|
||||
con.display++;
|
||||
con.current++;
|
||||
int i = (con.current % con.totallines)
|
||||
* con.linewidth;
|
||||
int e = i + con.linewidth;
|
||||
while (i++ < e)
|
||||
Globals.con.text[i] = ' ';
|
||||
con.text[i] = ' ';
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,11 +32,13 @@ import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Vector;
|
||||
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* Key
|
||||
*/
|
||||
@Slf4j
|
||||
public class Key extends Globals {
|
||||
public class Key {
|
||||
//
|
||||
// these are the key numbers that should be passed to Key_Event
|
||||
//
|
||||
|
||||
@@ -30,13 +30,15 @@ import lwjake2.util.Lib;
|
||||
import lwjake2.util.Math3D;
|
||||
import lwjake2.util.QuakeFile;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.*;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.ErrorCode.ERR_DROP;
|
||||
import static lwjake2.ErrorCode.ERR_FATAL;
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* Menu
|
||||
|
||||
@@ -29,18 +29,20 @@ import lwjake2.sys.Timer;
|
||||
import lwjake2.util.Lib;
|
||||
import lwjake2.util.Vargs;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.ErrorCode.ERR_DROP;
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* SCR
|
||||
*/
|
||||
@Slf4j
|
||||
public final class SCR extends Globals {
|
||||
public final class SCR {
|
||||
private static final FileSystem fileSystem = BaseQ2FileSystem.getInstance();
|
||||
// cl_scrn.c -- master for refresh, status bar, console, chat, notify, etc
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
package lwjake2.client;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.game.Cmd;
|
||||
import lwjake2.game.cvar_t;
|
||||
import lwjake2.qcommon.Com;
|
||||
@@ -30,13 +29,15 @@ import lwjake2.util.Math3D;
|
||||
import java.io.IOException;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.ErrorCode.ERR_DROP;
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* V
|
||||
*/
|
||||
@Slf4j
|
||||
public final class V extends Globals {
|
||||
public final class V {
|
||||
static cvar_t cl_testblend;
|
||||
|
||||
static cvar_t cl_testparticles;
|
||||
|
||||
@@ -24,7 +24,6 @@ import lwjake2.ErrorCode;
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.game.Cmd;
|
||||
import lwjake2.game.cvar_t;
|
||||
import lwjake2.qcommon.Callback;
|
||||
import lwjake2.qcommon.Com;
|
||||
import lwjake2.qcommon.Cvar;
|
||||
import lwjake2.render.Renderer;
|
||||
@@ -32,8 +31,11 @@ import lwjake2.sound.S;
|
||||
import lwjake2.sys.IN;
|
||||
import lwjake2.util.Vargs;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.DisplayMode;
|
||||
import java.awt.*;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.Globals.re;
|
||||
import static lwjake2.Globals.viddef;
|
||||
|
||||
/**
|
||||
* VID is a video driver.
|
||||
@@ -43,7 +45,7 @@ import java.awt.DisplayMode;
|
||||
* @author cwei
|
||||
*/
|
||||
@Slf4j
|
||||
public class VID extends Globals {
|
||||
public class VID {
|
||||
// Main windowed and fullscreen graphics interface module. This module
|
||||
// is used for both the software and OpenGL rendering versions of the
|
||||
// Quake refresh engine.
|
||||
|
||||
@@ -29,10 +29,13 @@ import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Vector;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.Globals.cvar_vars;
|
||||
|
||||
/**
|
||||
* Cvar implements console variables. The original code is located in cvar.c
|
||||
*/
|
||||
public class Cvar extends Globals {
|
||||
public class Cvar {
|
||||
private static final FileSystem fileSystem = BaseQ2FileSystem.getInstance();
|
||||
|
||||
/**
|
||||
@@ -77,8 +80,8 @@ public class Cvar extends Globals {
|
||||
var.value = 0.0f;
|
||||
}
|
||||
// link the variable in
|
||||
var.next = Globals.cvar_vars;
|
||||
Globals.cvar_vars = var;
|
||||
var.next = cvar_vars;
|
||||
cvar_vars = var;
|
||||
|
||||
var.flags = flags;
|
||||
|
||||
@@ -99,7 +102,7 @@ public class Cvar extends Globals {
|
||||
static cvar_t FindVar(String var_name) {
|
||||
cvar_t var;
|
||||
|
||||
for (var = Globals.cvar_vars; var != null; var = var.next) {
|
||||
for (var = cvar_vars; var != null; var = var.next) {
|
||||
if (var_name.equals(var.name))
|
||||
return var;
|
||||
}
|
||||
@@ -262,7 +265,7 @@ public class Cvar extends Globals {
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
for (var = Globals.cvar_vars; var != null; var = var.next, i++) {
|
||||
for (var = cvar_vars; var != null; var = var.next, i++) {
|
||||
if ((var.flags & CVAR_ARCHIVE) != 0)
|
||||
Com.Printf("*");
|
||||
else
|
||||
@@ -348,7 +351,7 @@ public class Cvar extends Globals {
|
||||
|
||||
info = "";
|
||||
|
||||
for (var = Globals.cvar_vars; var != null; var = var.next) {
|
||||
for (var = cvar_vars; var != null; var = var.next) {
|
||||
if ((var.flags & bit) != 0)
|
||||
info = Info.Info_SetValueForKey(info, var.name, var.string);
|
||||
}
|
||||
@@ -369,7 +372,7 @@ public class Cvar extends Globals {
|
||||
public static void GetLatchedVars() {
|
||||
cvar_t var;
|
||||
|
||||
for (var = Globals.cvar_vars; var != null; var = var.next) {
|
||||
for (var = cvar_vars; var != null; var = var.next) {
|
||||
if (var.latched_string == null || var.latched_string.length() == 0)
|
||||
continue;
|
||||
var.string = var.latched_string;
|
||||
@@ -433,7 +436,7 @@ public class Cvar extends Globals {
|
||||
Vector<String> vars = new Vector<String>();
|
||||
|
||||
// check match
|
||||
for (cvar_t cvar = Globals.cvar_vars; cvar != null; cvar = cvar.next)
|
||||
for (cvar_t cvar = cvar_vars; cvar != null; cvar = cvar.next)
|
||||
if (cvar.name.startsWith(partial))
|
||||
vars.add(cvar.name);
|
||||
|
||||
|
||||
@@ -18,16 +18,17 @@
|
||||
|
||||
package lwjake2.qcommon;
|
||||
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.game.entity_state_t;
|
||||
import lwjake2.game.usercmd_t;
|
||||
import lwjake2.util.Lib;
|
||||
import lwjake2.util.Math3D;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.ErrorCode.ERR_DROP;
|
||||
import static lwjake2.ErrorCode.ERR_FATAL;
|
||||
import static lwjake2.Globals.bytedirs;
|
||||
|
||||
public class MSG extends Globals {
|
||||
public class MSG {
|
||||
|
||||
//
|
||||
// writing functions
|
||||
|
||||
@@ -33,12 +33,14 @@ import lwjake2.util.Vargs;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
|
||||
/**
|
||||
* Qcommon contains some basic routines for the game engine
|
||||
* namely initialization, shutdown and frame generation.
|
||||
*/
|
||||
@Slf4j
|
||||
public final class Qcommon extends Globals {
|
||||
public final class Qcommon {
|
||||
private static final FileSystem fileSystem = BaseQ2FileSystem.getInstance();
|
||||
public static final String BUILDSTRING = "Java " + System.getProperty("java.version");;
|
||||
public static final String CPUSTRING = System.getProperty("os.arch");
|
||||
|
||||
@@ -929,7 +929,7 @@ public abstract class Main extends Base {
|
||||
* R_Register
|
||||
*/
|
||||
protected void R_Register() {
|
||||
r_lefthand = Cvar.Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE);
|
||||
r_lefthand = Cvar.Get("hand", "0", Defines.CVAR_USERINFO | Defines.CVAR_ARCHIVE);
|
||||
r_norefresh = Cvar.Get("r_norefresh", "0", 0);
|
||||
r_fullbright = Cvar.Get("r_fullbright", "0", 0);
|
||||
r_drawentities = Cvar.Get("r_drawentities", "1", 0);
|
||||
@@ -944,19 +944,19 @@ public abstract class Main extends Base {
|
||||
gl_nosubimage = Cvar.Get("gl_nosubimage", "0", 0);
|
||||
gl_allow_software = Cvar.Get("gl_allow_software", "0", 0);
|
||||
|
||||
gl_particle_min_size = Cvar.Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_max_size = Cvar.Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_size = Cvar.Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_att_a = Cvar.Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_att_b = Cvar.Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_att_c = Cvar.Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE);
|
||||
gl_particle_min_size = Cvar.Get("gl_particle_min_size", "2", Defines.CVAR_ARCHIVE);
|
||||
gl_particle_max_size = Cvar.Get("gl_particle_max_size", "40", Defines.CVAR_ARCHIVE);
|
||||
gl_particle_size = Cvar.Get("gl_particle_size", "40", Defines.CVAR_ARCHIVE);
|
||||
gl_particle_att_a = Cvar.Get("gl_particle_att_a", "0.01", Defines.CVAR_ARCHIVE);
|
||||
gl_particle_att_b = Cvar.Get("gl_particle_att_b", "0.0", Defines.CVAR_ARCHIVE);
|
||||
gl_particle_att_c = Cvar.Get("gl_particle_att_c", "0.01", Defines.CVAR_ARCHIVE);
|
||||
|
||||
gl_modulate = Cvar.Get("gl_modulate", "1.5", Globals.CVAR_ARCHIVE);
|
||||
gl_modulate = Cvar.Get("gl_modulate", "1.5", Defines.CVAR_ARCHIVE);
|
||||
gl_log = Cvar.Get("gl_log", "0", 0);
|
||||
gl_bitdepth = Cvar.Get("gl_bitdepth", "0", 0);
|
||||
gl_mode = Cvar.Get("gl_mode", "3", Globals.CVAR_ARCHIVE); // 640x480
|
||||
gl_mode = Cvar.Get("gl_mode", "3", Defines.CVAR_ARCHIVE); // 640x480
|
||||
gl_lightmap = Cvar.Get("gl_lightmap", "0", 0);
|
||||
gl_shadows = Cvar.Get("gl_shadows", "0", Globals.CVAR_ARCHIVE);
|
||||
gl_shadows = Cvar.Get("gl_shadows", "0", Defines.CVAR_ARCHIVE);
|
||||
gl_dynamic = Cvar.Get("gl_dynamic", "1", 0);
|
||||
gl_nobind = Cvar.Get("gl_nobind", "0", 0);
|
||||
gl_round_down = Cvar.Get("gl_round_down", "1", 0);
|
||||
@@ -964,37 +964,37 @@ public abstract class Main extends Base {
|
||||
gl_skymip = Cvar.Get("gl_skymip", "0", 0);
|
||||
gl_showtris = Cvar.Get("gl_showtris", "0", 0);
|
||||
gl_ztrick = Cvar.Get("gl_ztrick", "0", 0);
|
||||
gl_finish = Cvar.Get("gl_finish", "0", Globals.CVAR_ARCHIVE);
|
||||
gl_finish = Cvar.Get("gl_finish", "0", Defines.CVAR_ARCHIVE);
|
||||
gl_clear = Cvar.Get("gl_clear", "0", 0);
|
||||
gl_cull = Cvar.Get("gl_cull", "1", 0);
|
||||
gl_polyblend = Cvar.Get("gl_polyblend", "1", 0);
|
||||
gl_flashblend = Cvar.Get("gl_flashblend", "0", 0);
|
||||
gl_playermip = Cvar.Get("gl_playermip", "0", 0);
|
||||
gl_monolightmap = Cvar.Get("gl_monolightmap", "0", 0);
|
||||
gl_driver = Cvar.Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE);
|
||||
gl_texturemode = Cvar.Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE);
|
||||
gl_texturealphamode = Cvar.Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE);
|
||||
gl_texturesolidmode = Cvar.Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE);
|
||||
gl_driver = Cvar.Get("gl_driver", "opengl32", Defines.CVAR_ARCHIVE);
|
||||
gl_texturemode = Cvar.Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Defines.CVAR_ARCHIVE);
|
||||
gl_texturealphamode = Cvar.Get("gl_texturealphamode", "default", Defines.CVAR_ARCHIVE);
|
||||
gl_texturesolidmode = Cvar.Get("gl_texturesolidmode", "default", Defines.CVAR_ARCHIVE);
|
||||
gl_lockpvs = Cvar.Get("gl_lockpvs", "0", 0);
|
||||
|
||||
gl_vertex_arrays = Cvar.Get("gl_vertex_arrays", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_vertex_arrays = Cvar.Get("gl_vertex_arrays", "1", Defines.CVAR_ARCHIVE);
|
||||
|
||||
gl_ext_swapinterval = Cvar.Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_ext_palettedtexture = Cvar.Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE);
|
||||
gl_ext_multitexture = Cvar.Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_ext_pointparameters = Cvar.Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_ext_compiled_vertex_array = Cvar.Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_ext_swapinterval = Cvar.Get("gl_ext_swapinterval", "1", Defines.CVAR_ARCHIVE);
|
||||
gl_ext_palettedtexture = Cvar.Get("gl_ext_palettedtexture", "0", Defines.CVAR_ARCHIVE);
|
||||
gl_ext_multitexture = Cvar.Get("gl_ext_multitexture", "1", Defines.CVAR_ARCHIVE);
|
||||
gl_ext_pointparameters = Cvar.Get("gl_ext_pointparameters", "1", Defines.CVAR_ARCHIVE);
|
||||
gl_ext_compiled_vertex_array = Cvar.Get("gl_ext_compiled_vertex_array", "1", Defines.CVAR_ARCHIVE);
|
||||
|
||||
gl_drawbuffer = Cvar.Get("gl_drawbuffer", "GL_BACK", 0);
|
||||
gl_swapinterval = Cvar.Get("gl_swapinterval", "0", Globals.CVAR_ARCHIVE);
|
||||
gl_swapinterval = Cvar.Get("gl_swapinterval", "0", Defines.CVAR_ARCHIVE);
|
||||
|
||||
gl_saturatelighting = Cvar.Get("gl_saturatelighting", "0", 0);
|
||||
|
||||
gl_3dlabs_broken = Cvar.Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE);
|
||||
gl_3dlabs_broken = Cvar.Get("gl_3dlabs_broken", "1", Defines.CVAR_ARCHIVE);
|
||||
|
||||
vid_fullscreen = Cvar.Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE);
|
||||
vid_gamma = Cvar.Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE);
|
||||
vid_ref = Cvar.Get("vid_ref", "lwjgl", Globals.CVAR_ARCHIVE);
|
||||
vid_fullscreen = Cvar.Get("vid_fullscreen", "0", Defines.CVAR_ARCHIVE);
|
||||
vid_gamma = Cvar.Get("vid_gamma", "1.0", Defines.CVAR_ARCHIVE);
|
||||
vid_ref = Cvar.Get("vid_ref", "lwjgl", Defines.CVAR_ARCHIVE);
|
||||
|
||||
Cmd.AddCommand("imagelist", this::GL_ImageList_f);
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ public class Channel {
|
||||
*/
|
||||
static void addLoopSounds() {
|
||||
|
||||
if ((Globals.cl_paused.value != 0.0f) || (Globals.cls.state != Globals.ca_active) || !Globals.cl.sound_prepped) {
|
||||
if ((Globals.cl_paused.value != 0.0f) || (Globals.cls.state != Defines.ca_active) || !Globals.cl.sound_prepped) {
|
||||
removeUnusedLoopSounds();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public final class LWJGLSoundImpl implements Sound {
|
||||
|
||||
// determine what model the client is using
|
||||
String model = null;
|
||||
int n = Globals.CS_PLAYERSKINS + ent.number - 1;
|
||||
int n = Defines.CS_PLAYERSKINS + ent.number - 1;
|
||||
if (Globals.cl.configstrings[n] != null) {
|
||||
int p = Globals.cl.configstrings[n].indexOf('\\');
|
||||
if (p >= 0) {
|
||||
|
||||
@@ -26,10 +26,13 @@ import lwjake2.game.usercmd_t;
|
||||
import lwjake2.qcommon.Cvar;
|
||||
import lwjake2.util.Math3D;
|
||||
|
||||
import static lwjake2.Defines.*;
|
||||
import static lwjake2.Globals.*;
|
||||
|
||||
/**
|
||||
* IN
|
||||
*/
|
||||
public final class IN extends Globals {
|
||||
public final class IN {
|
||||
|
||||
static boolean mouse_avail = true;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.regex.PatternSyntaxException;
|
||||
* Sys
|
||||
*/
|
||||
@Slf4j
|
||||
public final class Sys extends Defines {
|
||||
public final class Sys {
|
||||
public static void Error(String error) {
|
||||
|
||||
CL.Shutdown();
|
||||
|
||||
Reference in New Issue
Block a user