📄 defines.java
字号:
/*Copyright (C) 1997-2001 Id Software, Inc.This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of 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 ofMERCHANTABILITY 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 Licensealong with this program; if not, write to the Free SoftwareFoundation, 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. */package jake2;import java.nio.ByteOrder;public class Defines { public final static int WEAPON_READY = 0; public final static int WEAPON_ACTIVATING = 1; public final static int WEAPON_DROPPING = 2; public final static int WEAPON_FIRING = 3; public final static float GRENADE_TIMER = 3.0f; public final static int GRENADE_MINSPEED = 400; public final static int GRENADE_MAXSPEED = 800; // ----------------- // client/q_shared.h // can accelerate and turn public final static int PM_NORMAL = 0; public final static int PM_SPECTATOR = 1; // no acceleration or turning public final static int PM_DEAD = 2; public final static int PM_GIB = 3; // different bounding box public final static int PM_FREEZE = 4; public final static int EV_NONE = 0; public final static int EV_ITEM_RESPAWN = 1; public final static int EV_FOOTSTEP = 2; public final static int EV_FALLSHORT = 3; public final static int EV_FALL = 4; public final static int EV_FALLFAR = 5; public final static int EV_PLAYER_TELEPORT = 6; public final static int EV_OTHER_TELEPORT = 7; // angle indexes public final static int PITCH = 0; // up / down public final static int YAW = 1; // left / right public final static int ROLL = 2; // fall over public final static int MAX_STRING_CHARS = 1024; // max length of a string passed to Cmd_TokenizeString public final static int MAX_STRING_TOKENS = 80; // max tokens resulting from Cmd_TokenizeString public final static int MAX_TOKEN_CHARS = 1024; // max length of an individual token public final static int MAX_QPATH = 64; // max length of a quake game pathname public final static int MAX_OSPATH = 128; // max length of a filesystem pathname // per-level limits public final static int MAX_CLIENTS = 256; // absolute limit public final static int MAX_EDICTS = 1024; // must change protocol to increase more public final static int MAX_LIGHTSTYLES = 256; public final static int MAX_MODELS = 256; // these are sent over the net as bytes public final static int MAX_SOUNDS = 256; // so they cannot be blindly increased public final static int MAX_IMAGES = 256; public final static int MAX_ITEMS = 256; public final static int MAX_GENERAL = (MAX_CLIENTS * 2); // general config strings // game print flags public final static int PRINT_LOW = 0; // pickup messages public final static int PRINT_MEDIUM = 1; // death messages public final static int PRINT_HIGH = 2; // critical messages public final static int PRINT_CHAT = 3; // chat messages public final static int ERR_FATAL = 0; // exit the entire game with a popup window public final static int ERR_DROP = 1; // print to console and disconnect from game public final static int ERR_DISCONNECT = 2; // don't kill server public final static int PRINT_ALL = 0; public final static int PRINT_DEVELOPER = 1; // only print when "developer 1" public final static int PRINT_ALERT = 2; // key / value info strings public final static int MAX_INFO_KEY = 64; public final static int MAX_INFO_VALUE = 64; public final static int MAX_INFO_STRING = 512; // directory searching public final static int SFF_ARCH = 0x01; public final static int SFF_HIDDEN = 0x02; public final static int SFF_RDONLY = 0x04; public final static int SFF_SUBDIR = 0x08; public final static int SFF_SYSTEM = 0x10; public final static int CVAR_ARCHIVE = 1; // set to cause it to be saved to vars.rc public final static int CVAR_USERINFO = 2; // added to userinfo when changed public final static int CVAR_SERVERINFO = 4; // added to serverinfo when changed public final static int CVAR_NOSET = 8; // don't allow change from console at all, // but can be set from the command line public final static int CVAR_LATCH = 16; // save changes until server restart // lower bits are stronger, and will eat weaker brushes completely public final static int CONTENTS_SOLID = 1; // an eye is never valid in a solid public final static int CONTENTS_WINDOW = 2; // translucent, but not watery public final static int CONTENTS_AUX = 4; public final static int CONTENTS_LAVA = 8; public final static int CONTENTS_SLIME = 16; public final static int CONTENTS_WATER = 32; public final static int CONTENTS_MIST = 64; public final static int LAST_VISIBLE_CONTENTS = 64; // remaining contents are non-visible, and don't eat brushes public final static int CONTENTS_AREAPORTAL = 0x8000; public final static int CONTENTS_PLAYERCLIP = 0x10000; public final static int CONTENTS_MONSTERCLIP = 0x20000; // currents can be added to any other contents, and may be mixed public final static int CONTENTS_CURRENT_0 = 0x40000; public final static int CONTENTS_CURRENT_90 = 0x80000; public final static int CONTENTS_CURRENT_180 = 0x100000; public final static int CONTENTS_CURRENT_270 = 0x200000; public final static int CONTENTS_CURRENT_UP = 0x400000; public final static int CONTENTS_CURRENT_DOWN = 0x800000; public final static int CONTENTS_ORIGIN = 0x1000000; // removed before bsping an entity public final static int CONTENTS_MONSTER = 0x2000000; // should never be on a brush, only in game public final static int CONTENTS_DEADMONSTER = 0x4000000; public final static int CONTENTS_DETAIL = 0x8000000; // brushes to be added after vis leafs public final static int CONTENTS_TRANSLUCENT = 0x10000000; // auto set if any surface has trans public final static int CONTENTS_LADDER = 0x20000000; public final static int SURF_LIGHT = 0x1; // value will hold the light strength public final static int SURF_SLICK = 0x2; // effects game physics public final static int SURF_SKY = 0x4; // don't draw, but add to skybox public final static int SURF_WARP = 0x8; // turbulent water warp public final static int SURF_TRANS33 = 0x10; public final static int SURF_TRANS66 = 0x20; public final static int SURF_FLOWING = 0x40; // scroll towards angle public final static int SURF_NODRAW = 0x80; // don't bother referencing the texture // // button bits // public final static int BUTTON_ATTACK = 1; public final static int BUTTON_USE = 2; public final static int BUTTON_ANY = 128; // any key whatsoever public final static int MAXTOUCH = 32; // entity_state_t->effects // Effects are things handled on the client side (lights, particles, frame animations) // that happen constantly on the given entity. // An entity that has effects will be sent to the client // even if it has a zero index model. public final static int EF_ROTATE = 0x00000001; // rotate (bonus items) public final static int EF_GIB = 0x00000002; // leave a trail public final static int EF_BLASTER = 0x00000008; // redlight + trail public final static int EF_ROCKET = 0x00000010; // redlight + trail public final static int EF_GRENADE = 0x00000020; public final static int EF_HYPERBLASTER = 0x00000040; public final static int EF_BFG = 0x00000080; public final static int EF_COLOR_SHELL = 0x00000100; public final static int EF_POWERSCREEN = 0x00000200; public final static int EF_ANIM01 = 0x00000400; // automatically cycle between frames 0 and 1 at 2 hz public final static int EF_ANIM23 = 0x00000800; // automatically cycle between frames 2 and 3 at 2 hz public final static int EF_ANIM_ALL = 0x00001000; // automatically cycle through all frames at 2hz public final static int EF_ANIM_ALLFAST = 0x00002000; // automatically cycle through all frames at 10hz public final static int EF_FLIES = 0x00004000; public final static int EF_QUAD = 0x00008000; public final static int EF_PENT = 0x00010000; public final static int EF_TELEPORTER = 0x00020000; // particle fountain public final static int EF_FLAG1 = 0x00040000; public final static int EF_FLAG2 = 0x00080000; // RAFAEL public final static int EF_IONRIPPER = 0x00100000; public final static int EF_GREENGIB = 0x00200000; public final static int EF_BLUEHYPERBLASTER = 0x00400000; public final static int EF_SPINNINGLIGHTS = 0x00800000; public final static int EF_PLASMA = 0x01000000; public final static int EF_TRAP = 0x02000000; //ROGUE public final static int EF_TRACKER = 0x04000000; public final static int EF_DOUBLE = 0x08000000; public final static int EF_SPHERETRANS = 0x10000000; public final static int EF_TAGTRAIL = 0x20000000; public final static int EF_HALF_DAMAGE = 0x40000000; public final static int EF_TRACKERTRAIL = 0x80000000; //ROGUE // entity_state_t->renderfx flags public final static int RF_MINLIGHT = 1; // allways have some light (viewmodel) public final static int RF_VIEWERMODEL = 2; // don't draw through eyes, only mirrors public final static int RF_WEAPONMODEL = 4; // only draw through eyes public final static int RF_FULLBRIGHT = 8; // allways draw full intensity public final static int RF_DEPTHHACK = 16; // for view weapon Z crunching public final static int RF_TRANSLUCENT = 32; public final static int RF_FRAMELERP = 64; public final static int RF_BEAM = 128; public final static int RF_CUSTOMSKIN = 256; // skin is an index in image_precache public final static int RF_GLOW = 512; // pulse lighting for bonus items public final static int RF_SHELL_RED = 1024; public final static int RF_SHELL_GREEN = 2048; public final static int RF_SHELL_BLUE = 4096; //ROGUE public final static int RF_IR_VISIBLE = 0x00008000; // 32768 public final static int RF_SHELL_DOUBLE = 0x00010000; // 65536 public final static int RF_SHELL_HALF_DAM = 0x00020000; public final static int RF_USE_DISGUISE = 0x00040000; //ROGUE // player_state_t->refdef flags public final static int RDF_UNDERWATER = 1; // warp the screen as apropriate public final static int RDF_NOWORLDMODEL = 2; // used for player configuration screen //ROGUE public final static int RDF_IRGOGGLES = 4; public final static int RDF_UVGOGGLES = 8; //ROGUE // muzzle flashes / player effects public final static int MZ_BLASTER = 0; public final static int MZ_MACHINEGUN = 1; public final static int MZ_SHOTGUN = 2; public final static int MZ_CHAINGUN1 = 3; public final static int MZ_CHAINGUN2 = 4; public final static int MZ_CHAINGUN3 = 5; public final static int MZ_RAILGUN = 6; public final static int MZ_ROCKET = 7; public final static int MZ_GRENADE = 8; public final static int MZ_LOGIN = 9; public final static int MZ_LOGOUT = 10; public final static int MZ_RESPAWN = 11; public final static int MZ_BFG = 12; public final static int MZ_SSHOTGUN = 13; public final static int MZ_HYPERBLASTER = 14; public final static int MZ_ITEMRESPAWN = 15; // RAFAEL public final static int MZ_IONRIPPER = 16; public final static int MZ_BLUEHYPERBLASTER = 17; public final static int MZ_PHALANX = 18; public final static int MZ_SILENCED = 128; // bit flag ORed with one of the above numbers //ROGUE public final static int MZ_ETF_RIFLE = 30; public final static int MZ_UNUSED = 31; public final static int MZ_SHOTGUN2 = 32; public final static int MZ_HEATBEAM = 33; public final static int MZ_BLASTER2 = 34; public final static int MZ_TRACKER = 35; public final static int MZ_NUKE1 = 36; public final static int MZ_NUKE2 = 37; public final static int MZ_NUKE4 = 38; public final static int MZ_NUKE8 = 39; //ROGUE // // monster muzzle flashes // public final static int MZ2_TANK_BLASTER_1 = 1; public final static int MZ2_TANK_BLASTER_2 = 2; public final static int MZ2_TANK_BLASTER_3 = 3; public final static int MZ2_TANK_MACHINEGUN_1 = 4; public final static int MZ2_TANK_MACHINEGUN_2 = 5; public final static int MZ2_TANK_MACHINEGUN_3 = 6; public final static int MZ2_TANK_MACHINEGUN_4 = 7; public final static int MZ2_TANK_MACHINEGUN_5 = 8; public final static int MZ2_TANK_MACHINEGUN_6 = 9; public final static int MZ2_TANK_MACHINEGUN_7 = 10; public final static int MZ2_TANK_MACHINEGUN_8 = 11; public final static int MZ2_TANK_MACHINEGUN_9 = 12; public final static int MZ2_TANK_MACHINEGUN_10 = 13; public final static int MZ2_TANK_MACHINEGUN_11 = 14; public final static int MZ2_TANK_MACHINEGUN_12 = 15; public final static int MZ2_TANK_MACHINEGUN_13 = 16; public final static int MZ2_TANK_MACHINEGUN_14 = 17; public final static int MZ2_TANK_MACHINEGUN_15 = 18; public final static int MZ2_TANK_MACHINEGUN_16 = 19; public final static int MZ2_TANK_MACHINEGUN_17 = 20; public final static int MZ2_TANK_MACHINEGUN_18 = 21; public final static int MZ2_TANK_MACHINEGUN_19 = 22; public final static int MZ2_TANK_ROCKET_1 = 23; public final static int MZ2_TANK_ROCKET_2 = 24; public final static int MZ2_TANK_ROCKET_3 = 25; public final static int MZ2_INFANTRY_MACHINEGUN_1 = 26; public final static int MZ2_INFANTRY_MACHINEGUN_2 = 27; public final static int MZ2_INFANTRY_MACHINEGUN_3 = 28; public final static int MZ2_INFANTRY_MACHINEGUN_4 = 29; public final static int MZ2_INFANTRY_MACHINEGUN_5 = 30; public final static int MZ2_INFANTRY_MACHINEGUN_6 = 31; public final static int MZ2_INFANTRY_MACHINEGUN_7 = 32; public final static int MZ2_INFANTRY_MACHINEGUN_8 = 33; public final static int MZ2_INFANTRY_MACHINEGUN_9 = 34; public final static int MZ2_INFANTRY_MACHINEGUN_10 = 35; public final static int MZ2_INFANTRY_MACHINEGUN_11 = 36; public final static int MZ2_INFANTRY_MACHINEGUN_12 = 37; public final static int MZ2_INFANTRY_MACHINEGUN_13 = 38; public final static int MZ2_SOLDIER_BLASTER_1 = 39; public final static int MZ2_SOLDIER_BLASTER_2 = 40; public final static int MZ2_SOLDIER_SHOTGUN_1 = 41; public final static int MZ2_SOLDIER_SHOTGUN_2 = 42; public final static int MZ2_SOLDIER_MACHINEGUN_1 = 43; public final static int MZ2_SOLDIER_MACHINEGUN_2 = 44; public final static int MZ2_GUNNER_MACHINEGUN_1 = 45; public final static int MZ2_GUNNER_MACHINEGUN_2 = 46; public final static int MZ2_GUNNER_MACHINEGUN_3 = 47; public final static int MZ2_GUNNER_MACHINEGUN_4 = 48; public final static int MZ2_GUNNER_MACHINEGUN_5 = 49; public final static int MZ2_GUNNER_MACHINEGUN_6 = 50; public final static int MZ2_GUNNER_MACHINEGUN_7 = 51; public final static int MZ2_GUNNER_MACHINEGUN_8 = 52; public final static int MZ2_GUNNER_GRENADE_1 = 53; public final static int MZ2_GUNNER_GRENADE_2 = 54; public final static int MZ2_GUNNER_GRENADE_3 = 55; public final static int MZ2_GUNNER_GRENADE_4 = 56; public final static int MZ2_CHICK_ROCKET_1 = 57; public final static int MZ2_FLYER_BLASTER_1 = 58; public final static int MZ2_FLYER_BLASTER_2 = 59;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -