From bb4247557b61bce7d97dd1c558b5a4d14b03577b Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 1 Feb 2012 18:11:17 -0500 Subject: [PATCH] - 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: --- build.xml | 2 +- src/jake2/client/centity_t.java | 39 -------- src/jake2/client/cl_sustain_t.java | 55 ----------- src/jake2/client/clientinfo_t.java | 53 ----------- src/jake2/client/console_t.java | 51 ---------- src/jake2/client/cparticle_t.java | 46 --------- src/jake2/client/dlight_t.java | 31 ------ src/jake2/client/kbutton_t.java | 36 ------- src/jake2/client/lightstyle_t.java | 30 ------ src/jake2/client/particle_t.java | 50 ---------- src/jake2/client/refdef_t.java | 47 --------- src/jake2/client/viddef_t.java | 28 ------ src/jake2/client/vidmode_t.java | 44 --------- src/jake2/client/vrect_t.java | 39 -------- src/jake2/game/AIAdapter.java | 29 ------ src/jake2/game/EdictFindFilter.java | 34 ------- src/jake2/game/EdictIterator.java | 36 ------- src/jake2/game/EndianHandler.java | 76 --------------- src/jake2/game/EntBlockedAdapter.java | 30 ------ src/jake2/game/EntDieAdapter.java | 29 ------ src/jake2/game/EntDodgeAdapter.java | 29 ------ src/jake2/game/EntInteractAdapter.java | 29 ------ src/jake2/game/EntPainAdapter.java | 29 ------ src/jake2/game/EntThinkAdapter.java | 29 ------ src/jake2/game/EntTouchAdapter.java | 29 ------ src/jake2/game/EntUseAdapter.java | 29 ------ src/jake2/game/ItemDropAdapter.java | 29 ------ src/jake2/game/ItemUseAdapter.java | 29 ------ src/jake2/game/SuperAdapter.java | 60 ------------ src/jake2/game/cmdalias_t.java | 30 ------ src/jake2/game/cmodel_t.java | 32 ------- src/jake2/game/cplane_t.java | 56 ----------- src/jake2/game/csurface_t.java | 30 ------ src/jake2/game/cvar_t.java | 40 -------- src/jake2/game/gitem_armor_t.java | 46 --------- src/jake2/game/link_t.java | 33 ------- src/jake2/game/mapsurface_t.java | 37 -------- src/jake2/game/mframe_t.java | 62 ------------ src/jake2/game/pushed_t.java | 31 ------ src/jake2/game/spawn_t.java | 34 ------- src/jake2/qcommon/cmd_function_t.java | 35 ------- src/jake2/qcommon/longjmpException.java | 33 ------- src/jake2/qcommon/lump_t.java | 35 ------- src/jake2/qcommon/miptex_t.java | 49 ---------- src/jake2/qcommon/sizebuf_t.java | 48 ---------- src/jake2/qcommon/xcommand_t.java | 34 ------- src/jake2/render/Ref.java | 42 -------- src/jake2/render/glconfig_t.java | 45 --------- src/jake2/render/glstate_t.java | 47 --------- src/jake2/render/mmodel_t.java | 34 ------- src/jake2/render/mnode_t.java | 47 --------- src/jake2/render/mtexinfo_t.java | 49 ---------- src/jake2/server/areanode_t.java | 43 --------- src/jake2/server/challenge_t.java | 39 -------- src/jake2/server/client_frame_t.java | 42 -------- src/jake2/server/moveclip_t.java | 58 ----------- src/jake2/sound/sfx_t.java | 48 ---------- src/jake2/sound/sfxcache_t.java | 37 -------- src/jake2/sound/soundinfo_t.java | 19 ---- src/jake2/sound/wavinfo_t.java | 19 ---- src/jake2/sys/HighPrecisionTimer.java | 32 ------- src/jake2/sys/Jake2InputEvent.java | 49 ---------- src/jake2/sys/KBD.java | 52 ---------- src/jake2/sys/NanoTimer.java | 27 ------ src/jake2/sys/StandardTimer.java | 27 ------ src/jake2/sys/Timer.java | 36 ------- src/jake2/util/Vec3Cache.java | 38 -------- src/{jake2 => lwjake2}/Defines.java | 40 ++++---- src/{jake2 => lwjake2}/Globals.java | 57 +++++------ .../Jake2.java => lwjake2/LWJake2.java} | 47 ++++----- src/{jake2 => lwjake2}/client/CL.java | 73 ++++++++------ src/{jake2 => lwjake2}/client/CL_ents.java | 51 +++++----- src/{jake2 => lwjake2}/client/CL_fx.java | 55 +++++------ src/{jake2 => lwjake2}/client/CL_input.java | 61 ++++++------ src/{jake2 => lwjake2}/client/CL_inv.java | 51 ++++------ src/{jake2 => lwjake2}/client/CL_newfx.java | 47 ++++----- src/{jake2 => lwjake2}/client/CL_parse.java | 65 +++++++------ src/{jake2 => lwjake2}/client/CL_pred.java | 54 +++++------ src/{jake2 => lwjake2}/client/CL_tent.java | 57 +++++------ src/{jake2 => lwjake2}/client/CL_view.java | 40 ++++---- src/{jake2 => lwjake2}/client/Console.java | 58 ++++++----- src/{jake2 => lwjake2}/client/Key.java | 50 +++++----- src/{jake2 => lwjake2}/client/M.java | 54 +++++------ src/{jake2 => lwjake2}/client/Menu.java | 66 ++++++------- src/{jake2 => lwjake2}/client/SCR.java | 71 +++++++------- src/{jake2 => lwjake2}/client/V.java | 53 +++++------ src/{jake2 => lwjake2}/client/VID.java | 59 ++++++------ src/lwjake2/client/centity_t.java | 34 +++++++ src/lwjake2/client/cl_sustain_t.java | 48 ++++++++++ .../client/client_state_t.java | 52 +++++----- .../client/client_static_t.java | 43 ++++----- src/lwjake2/client/clientinfo_t.java | 49 ++++++++++ src/lwjake2/client/console_t.java | 44 +++++++++ src/lwjake2/client/cparticle_t.java | 39 ++++++++ src/lwjake2/client/dlight_t.java | 26 +++++ src/{jake2 => lwjake2}/client/entity_t.java | 45 ++++----- src/{jake2 => lwjake2}/client/frame_t.java | 41 ++++---- src/lwjake2/client/kbutton_t.java | 29 ++++++ src/lwjake2/client/lightstyle_t.java | 25 +++++ src/lwjake2/client/particle_t.java | 48 ++++++++++ src/lwjake2/client/refdef_t.java | 42 ++++++++ .../client/refexport_t.java | 50 ++++------ src/lwjake2/client/viddef_t.java | 23 +++++ src/lwjake2/client/vidmode_t.java | 37 ++++++++ src/lwjake2/client/vrect_t.java | 32 +++++++ src/lwjake2/game/AIAdapter.java | 24 +++++ src/{jake2 => lwjake2}/game/Cmd.java | 58 +++++------ src/lwjake2/game/EdictFindFilter.java | 29 ++++++ src/lwjake2/game/EdictIterator.java | 31 ++++++ src/lwjake2/game/EndianHandler.java | 69 ++++++++++++++ src/lwjake2/game/EntBlockedAdapter.java | 25 +++++ src/lwjake2/game/EntDieAdapter.java | 24 +++++ src/lwjake2/game/EntDodgeAdapter.java | 24 +++++ src/lwjake2/game/EntInteractAdapter.java | 24 +++++ src/lwjake2/game/EntPainAdapter.java | 24 +++++ src/lwjake2/game/EntThinkAdapter.java | 24 +++++ src/lwjake2/game/EntTouchAdapter.java | 24 +++++ src/lwjake2/game/EntUseAdapter.java | 24 +++++ src/{jake2 => lwjake2}/game/GameAI.java | 38 ++++---- src/{jake2 => lwjake2}/game/GameBase.java | 52 +++++----- src/{jake2 => lwjake2}/game/GameChase.java | 52 ++++------ src/{jake2 => lwjake2}/game/GameCombat.java | 47 ++++----- src/{jake2 => lwjake2}/game/GameFunc.java | 34 +++---- src/{jake2 => lwjake2}/game/GameItemList.java | 43 ++++----- src/{jake2 => lwjake2}/game/GameItems.java | 47 ++++----- src/{jake2 => lwjake2}/game/GameMisc.java | 41 ++++---- src/{jake2 => lwjake2}/game/GameSVCmds.java | 32 +++---- src/{jake2 => lwjake2}/game/GameSave.java | 37 ++++---- src/{jake2 => lwjake2}/game/GameSpawn.java | 63 ++++++------ src/{jake2 => lwjake2}/game/GameTarget.java | 37 ++++---- src/{jake2 => lwjake2}/game/GameTrigger.java | 39 +++----- src/{jake2 => lwjake2}/game/GameTurret.java | 39 ++++---- src/{jake2 => lwjake2}/game/GameUtil.java | 40 ++++---- src/{jake2 => lwjake2}/game/GameWeapon.java | 53 ++++------- src/{jake2 => lwjake2}/game/Info.java | 32 +++---- src/lwjake2/game/ItemDropAdapter.java | 24 +++++ src/lwjake2/game/ItemUseAdapter.java | 24 +++++ src/{jake2 => lwjake2}/game/Monster.java | 38 ++++---- src/{jake2 => lwjake2}/game/PlayerClient.java | 37 +++----- src/{jake2 => lwjake2}/game/PlayerHud.java | 44 ++++----- src/{jake2 => lwjake2}/game/PlayerTrail.java | 28 +++--- src/{jake2 => lwjake2}/game/PlayerView.java | 36 ++++--- src/{jake2 => lwjake2}/game/PlayerWeapon.java | 39 ++++---- src/lwjake2/game/SuperAdapter.java | 54 +++++++++++ .../game/client_persistant_t.java | 46 ++++----- .../game/client_respawn_t.java | 49 ++++------ src/lwjake2/game/cmdalias_t.java | 26 +++++ src/lwjake2/game/cmodel_t.java | 27 ++++++ src/lwjake2/game/cplane_t.java | 50 ++++++++++ src/lwjake2/game/csurface_t.java | 26 +++++ src/lwjake2/game/cvar_t.java | 33 +++++++ src/{jake2 => lwjake2}/game/edict_t.java | 36 ++++--- .../game/entity_state_t.java | 44 ++++----- .../game/game_import_t.java | 39 ++++---- .../game/game_locals_t.java | 37 +++----- src/{jake2 => lwjake2}/game/gclient_t.java | 46 ++++----- src/lwjake2/game/gitem_armor_t.java | 41 ++++++++ src/{jake2 => lwjake2}/game/gitem_t.java | 29 +++--- .../game/level_locals_t.java | 45 ++++----- src/lwjake2/game/link_t.java | 27 ++++++ src/lwjake2/game/mapsurface_t.java | 24 +++++ src/lwjake2/game/mframe_t.java | 55 +++++++++++ src/{jake2 => lwjake2}/game/mmove_t.java | 43 ++++----- .../game/monsterinfo_t.java | 46 ++++----- .../game/monsters/M_Actor.java | 62 ++++++------ .../game/monsters/M_Berserk.java | 47 +++++---- .../game/monsters/M_Boss2.java | 56 +++++------ .../game/monsters/M_Boss3.java | 40 ++++---- .../game/monsters/M_Boss31.java | 58 +++++------ .../game/monsters/M_Boss32.java | 66 ++++++------- .../game/monsters/M_Brain.java | 48 ++++++---- .../game/monsters/M_Chick.java | 49 ++++++---- .../game/monsters/M_Flash.java | 26 +++-- .../game/monsters/M_Flipper.java | 55 +++++------ .../game/monsters/M_Float.java | 61 ++++++------ .../game/monsters/M_Flyer.java | 58 ++++++----- .../game/monsters/M_Gladiator.java | 58 ++++++----- .../game/monsters/M_Gunner.java | 59 ++++++------ .../game/monsters/M_Hover.java | 57 ++++++----- .../game/monsters/M_Infantry.java | 62 ++++++------ .../game/monsters/M_Insane.java | 52 +++++----- .../game/monsters/M_Medic.java | 50 ++++++---- .../game/monsters/M_Mutant.java | 51 ++++++---- .../game/monsters/M_Parasite.java | 59 ++++++------ .../game/monsters/M_Player.java | 26 +++-- .../game/monsters/M_Soldier.java | 62 ++++++------ .../game/monsters/M_Supertank.java | 55 +++++------ .../game/monsters/M_Tank.java | 57 ++++++----- src/{jake2 => lwjake2}/game/moveinfo_t.java | 43 ++++----- .../game/player_state_t.java | 57 +++++------ .../game/pmove_state_t.java | 48 ++++------ src/{jake2 => lwjake2}/game/pmove_t.java | 30 +++--- src/lwjake2/game/pushed_t.java | 26 +++++ src/lwjake2/game/spawn_t.java | 29 ++++++ src/{jake2 => lwjake2}/game/spawn_temp_t.java | 41 ++++---- src/{jake2 => lwjake2}/game/trace_t.java | 41 ++++---- src/{jake2 => lwjake2}/game/usercmd_t.java | 44 ++++----- src/{jake2 => lwjake2}/qcommon/CM.java | 52 +++++----- src/{jake2 => lwjake2}/qcommon/CRC.java | 40 ++++---- src/{jake2 => lwjake2}/qcommon/Cbuf.java | 45 ++++----- src/{jake2 => lwjake2}/qcommon/Com.java | 58 ++++++----- src/{jake2 => lwjake2}/qcommon/Cvar.java | 54 +++++------ src/{jake2 => lwjake2}/qcommon/FS.java | 73 +++++++------- src/{jake2 => lwjake2}/qcommon/MD4.java | 46 ++++----- src/{jake2 => lwjake2}/qcommon/MSG.java | 34 ++++--- src/{jake2 => lwjake2}/qcommon/Netchan.java | 54 +++++------ src/{jake2 => lwjake2}/qcommon/PMove.java | 38 ++++---- src/{jake2 => lwjake2}/qcommon/Qcommon.java | 56 +++++------ src/{jake2 => lwjake2}/qcommon/SZ.java | 41 ++++---- src/lwjake2/qcommon/cmd_function_t.java | 28 ++++++ src/lwjake2/qcommon/longjmpException.java | 26 +++++ src/lwjake2/qcommon/lump_t.java | 30 ++++++ src/lwjake2/qcommon/miptex_t.java | 38 ++++++++ src/{jake2 => lwjake2}/qcommon/netadr_t.java | 30 +++--- src/{jake2 => lwjake2}/qcommon/netchan_t.java | 28 +++--- src/{jake2 => lwjake2}/qcommon/qfiles.java | 46 ++++----- src/lwjake2/qcommon/sizebuf_t.java | 41 ++++++++ src/{jake2 => lwjake2}/qcommon/texinfo_t.java | 41 ++++---- src/lwjake2/qcommon/xcommand_t.java | 27 ++++++ .../render/DummyRenderer.java | 33 ++++--- .../render/LWJGLRenderer.java | 51 +++++----- src/lwjake2/render/Ref.java | 35 +++++++ src/{jake2 => lwjake2}/render/Renderer.java | 57 ++++------- src/lwjake2/render/glconfig_t.java | 40 ++++++++ src/{jake2 => lwjake2}/render/glpoly_t.java | 41 ++++---- src/lwjake2/render/glstate_t.java | 42 ++++++++ src/{jake2 => lwjake2}/render/image_t.java | 41 ++++---- .../render/lwjgl/Anorms.java | 39 ++++---- src/{jake2 => lwjake2}/render/lwjgl/Base.java | 41 ++++---- src/{jake2 => lwjake2}/render/lwjgl/Draw.java | 51 +++++----- .../render/lwjgl/Image.java | 73 +++++++------- .../render/lwjgl/LWJGLBase.java | 47 ++++----- .../render/lwjgl/Light.java | 59 ++++++------ src/{jake2 => lwjake2}/render/lwjgl/Main.java | 79 +++++++-------- src/{jake2 => lwjake2}/render/lwjgl/Mesh.java | 53 +++++------ src/{jake2 => lwjake2}/render/lwjgl/Misc.java | 55 ++++++----- .../render/lwjgl/Model.java | 81 ++++++++-------- .../render/lwjgl/Polygon.java | 43 ++++----- src/{jake2 => lwjake2}/render/lwjgl/Surf.java | 76 +++++++-------- src/{jake2 => lwjake2}/render/lwjgl/Warp.java | 53 +++++------ src/{jake2 => lwjake2}/render/medge_t.java | 28 +++--- src/{jake2 => lwjake2}/render/mleaf_t.java | 39 ++++---- src/lwjake2/render/mmodel_t.java | 29 ++++++ src/lwjake2/render/mnode_t.java | 42 ++++++++ src/{jake2 => lwjake2}/render/model_t.java | 49 +++++----- src/{jake2 => lwjake2}/render/msurface_t.java | 45 ++++----- src/lwjake2/render/mtexinfo_t.java | 44 +++++++++ src/{jake2 => lwjake2}/render/mvertex_t.java | 28 +++--- src/{jake2 => lwjake2}/server/SV.java | 57 +++++------ src/{jake2 => lwjake2}/server/SV_CCMDS.java | 95 ++++++++----------- src/{jake2 => lwjake2}/server/SV_ENTS.java | 48 +++++----- src/{jake2 => lwjake2}/server/SV_GAME.java | 43 +++++---- src/{jake2 => lwjake2}/server/SV_INIT.java | 57 ++++++----- src/{jake2 => lwjake2}/server/SV_MAIN.java | 53 ++++++----- src/{jake2 => lwjake2}/server/SV_SEND.java | 58 +++++------ src/{jake2 => lwjake2}/server/SV_USER.java | 59 ++++++------ src/{jake2 => lwjake2}/server/SV_WORLD.java | 53 +++++------ src/lwjake2/server/areanode_t.java | 33 +++++++ src/lwjake2/server/challenge_t.java | 28 ++++++ src/lwjake2/server/client_frame_t.java | 32 +++++++ src/{jake2 => lwjake2}/server/client_t.java | 50 +++++----- src/lwjake2/server/moveclip_t.java | 48 ++++++++++ .../server/server_static_t.java | 32 +++---- src/{jake2 => lwjake2}/server/server_t.java | 34 +++---- src/{jake2 => lwjake2}/sound/DummyDriver.java | 38 +++----- src/{jake2 => lwjake2}/sound/S.java | 61 +++++------- src/{jake2 => lwjake2}/sound/Sound.java | 40 ++++---- src/{jake2 => lwjake2}/sound/WaveLoader.java | 49 ++++------ .../sound/lwjgl/Channel.java | 66 ++++++------- .../sound/lwjgl/LWJGLSoundImpl.java | 62 ++++++++---- .../sound/lwjgl/PlaySound.java | 44 ++++----- src/lwjake2/sound/sfx_t.java | 38 ++++++++ src/lwjake2/sound/sfxcache_t.java | 32 +++++++ src/lwjake2/sound/soundinfo_t.java | 31 ++++++ src/lwjake2/sound/wavinfo_t.java | 31 ++++++ src/lwjake2/sys/HighPrecisionTimer.java | 41 ++++++++ src/{jake2 => lwjake2}/sys/IN.java | 53 +++++------ src/{jake2 => lwjake2}/sys/InputListener.java | 50 +++++----- src/{jake2 => lwjake2}/sys/JOGLKBD.java | 35 ++++++- src/lwjake2/sys/Jake2InputEvent.java | 42 ++++++++ src/lwjake2/sys/KBD.java | 44 +++++++++ src/{jake2 => lwjake2}/sys/LWJGLKBD.java | 32 +++++-- src/{jake2 => lwjake2}/sys/NET.java | 46 ++++----- src/lwjake2/sys/NanoTimer.java | 38 ++++++++ src/lwjake2/sys/StandardTimer.java | 38 ++++++++ src/{jake2 => lwjake2}/sys/Sys.java | 45 ++++----- src/lwjake2/sys/Timer.java | 46 +++++++++ src/{jake2 => lwjake2}/util/Lib.java | 55 +++++------ src/{jake2 => lwjake2}/util/Math3D.java | 45 ++++----- src/{jake2 => lwjake2}/util/PrintfFormat.java | 35 ++++--- src/{jake2 => lwjake2}/util/QuakeFile.java | 52 +++++----- src/{jake2 => lwjake2}/util/Vargs.java | 39 ++++---- src/lwjake2/util/Vec3Cache.java | 50 ++++++++++ 293 files changed, 5859 insertions(+), 6763 deletions(-) delete mode 100644 src/jake2/client/centity_t.java delete mode 100644 src/jake2/client/cl_sustain_t.java delete mode 100644 src/jake2/client/clientinfo_t.java delete mode 100644 src/jake2/client/console_t.java delete mode 100644 src/jake2/client/cparticle_t.java delete mode 100644 src/jake2/client/dlight_t.java delete mode 100644 src/jake2/client/kbutton_t.java delete mode 100644 src/jake2/client/lightstyle_t.java delete mode 100644 src/jake2/client/particle_t.java delete mode 100644 src/jake2/client/refdef_t.java delete mode 100644 src/jake2/client/viddef_t.java delete mode 100644 src/jake2/client/vidmode_t.java delete mode 100644 src/jake2/client/vrect_t.java delete mode 100644 src/jake2/game/AIAdapter.java delete mode 100644 src/jake2/game/EdictFindFilter.java delete mode 100644 src/jake2/game/EdictIterator.java delete mode 100644 src/jake2/game/EndianHandler.java delete mode 100644 src/jake2/game/EntBlockedAdapter.java delete mode 100644 src/jake2/game/EntDieAdapter.java delete mode 100644 src/jake2/game/EntDodgeAdapter.java delete mode 100644 src/jake2/game/EntInteractAdapter.java delete mode 100644 src/jake2/game/EntPainAdapter.java delete mode 100644 src/jake2/game/EntThinkAdapter.java delete mode 100644 src/jake2/game/EntTouchAdapter.java delete mode 100644 src/jake2/game/EntUseAdapter.java delete mode 100644 src/jake2/game/ItemDropAdapter.java delete mode 100644 src/jake2/game/ItemUseAdapter.java delete mode 100644 src/jake2/game/SuperAdapter.java delete mode 100644 src/jake2/game/cmdalias_t.java delete mode 100644 src/jake2/game/cmodel_t.java delete mode 100644 src/jake2/game/cplane_t.java delete mode 100644 src/jake2/game/csurface_t.java delete mode 100644 src/jake2/game/cvar_t.java delete mode 100644 src/jake2/game/gitem_armor_t.java delete mode 100644 src/jake2/game/link_t.java delete mode 100644 src/jake2/game/mapsurface_t.java delete mode 100644 src/jake2/game/mframe_t.java delete mode 100644 src/jake2/game/pushed_t.java delete mode 100644 src/jake2/game/spawn_t.java delete mode 100644 src/jake2/qcommon/cmd_function_t.java delete mode 100644 src/jake2/qcommon/longjmpException.java delete mode 100644 src/jake2/qcommon/lump_t.java delete mode 100644 src/jake2/qcommon/miptex_t.java delete mode 100644 src/jake2/qcommon/sizebuf_t.java delete mode 100644 src/jake2/qcommon/xcommand_t.java delete mode 100644 src/jake2/render/Ref.java delete mode 100644 src/jake2/render/glconfig_t.java delete mode 100644 src/jake2/render/glstate_t.java delete mode 100644 src/jake2/render/mmodel_t.java delete mode 100644 src/jake2/render/mnode_t.java delete mode 100644 src/jake2/render/mtexinfo_t.java delete mode 100644 src/jake2/server/areanode_t.java delete mode 100644 src/jake2/server/challenge_t.java delete mode 100644 src/jake2/server/client_frame_t.java delete mode 100644 src/jake2/server/moveclip_t.java delete mode 100644 src/jake2/sound/sfx_t.java delete mode 100644 src/jake2/sound/sfxcache_t.java delete mode 100644 src/jake2/sound/soundinfo_t.java delete mode 100644 src/jake2/sound/wavinfo_t.java delete mode 100644 src/jake2/sys/HighPrecisionTimer.java delete mode 100644 src/jake2/sys/Jake2InputEvent.java delete mode 100644 src/jake2/sys/KBD.java delete mode 100644 src/jake2/sys/NanoTimer.java delete mode 100644 src/jake2/sys/StandardTimer.java delete mode 100644 src/jake2/sys/Timer.java delete mode 100644 src/jake2/util/Vec3Cache.java rename src/{jake2 => lwjake2}/Defines.java (98%) rename src/{jake2 => lwjake2}/Globals.java (90%) rename src/{jake2/Jake2.java => lwjake2/LWJake2.java} (64%) rename src/{jake2 => lwjake2}/client/CL.java (97%) rename src/{jake2 => lwjake2}/client/CL_ents.java (97%) rename src/{jake2 => lwjake2}/client/CL_fx.java (98%) rename src/{jake2 => lwjake2}/client/CL_input.java (93%) rename src/{jake2 => lwjake2}/client/CL_inv.java (71%) rename src/{jake2 => lwjake2}/client/CL_newfx.java (96%) rename src/{jake2 => lwjake2}/client/CL_parse.java (95%) rename src/{jake2 => lwjake2}/client/CL_pred.java (88%) rename src/{jake2 => lwjake2}/client/CL_tent.java (98%) rename src/{jake2 => lwjake2}/client/CL_view.java (89%) rename src/{jake2 => lwjake2}/client/Console.java (93%) rename src/{jake2 => lwjake2}/client/Key.java (95%) rename src/{jake2 => lwjake2}/client/M.java (93%) rename src/{jake2 => lwjake2}/client/Menu.java (99%) rename src/{jake2 => lwjake2}/client/SCR.java (97%) rename src/{jake2 => lwjake2}/client/V.java (91%) rename src/{jake2 => lwjake2}/client/VID.java (94%) create mode 100644 src/lwjake2/client/centity_t.java create mode 100644 src/lwjake2/client/cl_sustain_t.java rename src/{jake2 => lwjake2}/client/client_state_t.java (76%) rename src/{jake2 => lwjake2}/client/client_static_t.java (62%) create mode 100644 src/lwjake2/client/clientinfo_t.java create mode 100644 src/lwjake2/client/console_t.java create mode 100644 src/lwjake2/client/cparticle_t.java create mode 100644 src/lwjake2/client/dlight_t.java rename src/{jake2 => lwjake2}/client/entity_t.java (61%) rename src/{jake2 => lwjake2}/client/frame_t.java (54%) create mode 100644 src/lwjake2/client/kbutton_t.java create mode 100644 src/lwjake2/client/lightstyle_t.java create mode 100644 src/lwjake2/client/particle_t.java create mode 100644 src/lwjake2/client/refdef_t.java rename src/{jake2 => lwjake2}/client/refexport_t.java (72%) create mode 100644 src/lwjake2/client/viddef_t.java create mode 100644 src/lwjake2/client/vidmode_t.java create mode 100644 src/lwjake2/client/vrect_t.java create mode 100644 src/lwjake2/game/AIAdapter.java rename src/{jake2 => lwjake2}/game/Cmd.java (96%) create mode 100644 src/lwjake2/game/EdictFindFilter.java create mode 100644 src/lwjake2/game/EdictIterator.java create mode 100644 src/lwjake2/game/EndianHandler.java create mode 100644 src/lwjake2/game/EntBlockedAdapter.java create mode 100644 src/lwjake2/game/EntDieAdapter.java create mode 100644 src/lwjake2/game/EntDodgeAdapter.java create mode 100644 src/lwjake2/game/EntInteractAdapter.java create mode 100644 src/lwjake2/game/EntPainAdapter.java create mode 100644 src/lwjake2/game/EntThinkAdapter.java create mode 100644 src/lwjake2/game/EntTouchAdapter.java create mode 100644 src/lwjake2/game/EntUseAdapter.java rename src/{jake2 => lwjake2}/game/GameAI.java (97%) rename src/{jake2 => lwjake2}/game/GameBase.java (94%) rename src/{jake2 => lwjake2}/game/GameChase.java (83%) rename src/{jake2 => lwjake2}/game/GameCombat.java (95%) rename src/{jake2 => lwjake2}/game/GameFunc.java (99%) rename src/{jake2 => lwjake2}/game/GameItemList.java (96%) rename src/{jake2 => lwjake2}/game/GameItems.java (98%) rename src/{jake2 => lwjake2}/game/GameMisc.java (98%) rename src/{jake2 => lwjake2}/game/GameSVCmds.java (92%) rename src/{jake2 => lwjake2}/game/GameSave.java (93%) rename src/{jake2 => lwjake2}/game/GameSpawn.java (97%) rename src/{jake2 => lwjake2}/game/GameTarget.java (97%) rename src/{jake2 => lwjake2}/game/GameTrigger.java (96%) rename src/{jake2 => lwjake2}/game/GameTurret.java (95%) rename src/{jake2 => lwjake2}/game/GameUtil.java (96%) rename src/{jake2 => lwjake2}/game/GameWeapon.java (97%) rename src/{jake2 => lwjake2}/game/Info.java (86%) create mode 100644 src/lwjake2/game/ItemDropAdapter.java create mode 100644 src/lwjake2/game/ItemUseAdapter.java rename src/{jake2 => lwjake2}/game/Monster.java (94%) rename src/{jake2 => lwjake2}/game/PlayerClient.java (98%) rename src/{jake2 => lwjake2}/game/PlayerHud.java (95%) rename src/{jake2 => lwjake2}/game/PlayerTrail.java (85%) rename src/{jake2 => lwjake2}/game/PlayerView.java (98%) rename src/{jake2 => lwjake2}/game/PlayerWeapon.java (98%) create mode 100644 src/lwjake2/game/SuperAdapter.java rename src/{jake2 => lwjake2}/game/client_persistant_t.java (76%) rename src/{jake2 => lwjake2}/game/client_respawn_t.java (59%) create mode 100644 src/lwjake2/game/cmdalias_t.java create mode 100644 src/lwjake2/game/cmodel_t.java create mode 100644 src/lwjake2/game/cplane_t.java create mode 100644 src/lwjake2/game/csurface_t.java create mode 100644 src/lwjake2/game/cvar_t.java rename src/{jake2 => lwjake2}/game/edict_t.java (96%) rename src/{jake2 => lwjake2}/game/entity_state_t.java (78%) rename src/{jake2 => lwjake2}/game/game_import_t.java (87%) rename src/{jake2 => lwjake2}/game/game_locals_t.java (75%) rename src/{jake2 => lwjake2}/game/gclient_t.java (90%) create mode 100644 src/lwjake2/game/gitem_armor_t.java rename src/{jake2 => lwjake2}/game/gitem_t.java (80%) rename src/{jake2 => lwjake2}/game/level_locals_t.java (77%) create mode 100644 src/lwjake2/game/link_t.java create mode 100644 src/lwjake2/game/mapsurface_t.java create mode 100644 src/lwjake2/game/mframe_t.java rename src/{jake2 => lwjake2}/game/mmove_t.java (54%) rename src/{jake2 => lwjake2}/game/monsterinfo_t.java (73%) rename src/{jake2 => lwjake2}/game/monsters/M_Actor.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Berserk.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Boss2.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Boss3.java (73%) rename src/{jake2 => lwjake2}/game/monsters/M_Boss31.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Boss32.java (98%) rename src/{jake2 => lwjake2}/game/monsters/M_Brain.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Chick.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Flash.java (96%) rename src/{jake2 => lwjake2}/game/monsters/M_Flipper.java (96%) rename src/{jake2 => lwjake2}/game/monsters/M_Float.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Flyer.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Gladiator.java (95%) rename src/{jake2 => lwjake2}/game/monsters/M_Gunner.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Hover.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Infantry.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Insane.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Medic.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Mutant.java (96%) rename src/{jake2 => lwjake2}/game/monsters/M_Parasite.java (96%) rename src/{jake2 => lwjake2}/game/monsters/M_Player.java (94%) rename src/{jake2 => lwjake2}/game/monsters/M_Soldier.java (98%) rename src/{jake2 => lwjake2}/game/monsters/M_Supertank.java (97%) rename src/{jake2 => lwjake2}/game/monsters/M_Tank.java (98%) rename src/{jake2 => lwjake2}/game/moveinfo_t.java (66%) rename src/{jake2 => lwjake2}/game/player_state_t.java (78%) rename src/{jake2 => lwjake2}/game/pmove_state_t.java (75%) rename src/{jake2 => lwjake2}/game/pmove_t.java (80%) create mode 100644 src/lwjake2/game/pushed_t.java create mode 100644 src/lwjake2/game/spawn_t.java rename src/{jake2 => lwjake2}/game/spawn_temp_t.java (71%) rename src/{jake2 => lwjake2}/game/trace_t.java (55%) rename src/{jake2 => lwjake2}/game/usercmd_t.java (54%) rename src/{jake2 => lwjake2}/qcommon/CM.java (98%) rename src/{jake2 => lwjake2}/qcommon/CRC.java (82%) rename src/{jake2 => lwjake2}/qcommon/Cbuf.java (85%) rename src/{jake2 => lwjake2}/qcommon/Com.java (95%) rename src/{jake2 => lwjake2}/qcommon/Cvar.java (91%) rename src/{jake2 => lwjake2}/qcommon/FS.java (95%) rename src/{jake2 => lwjake2}/qcommon/MD4.java (89%) rename src/{jake2 => lwjake2}/qcommon/MSG.java (96%) rename src/{jake2 => lwjake2}/qcommon/Netchan.java (91%) rename src/{jake2 => lwjake2}/qcommon/PMove.java (97%) rename src/{jake2 => lwjake2}/qcommon/Qcommon.java (84%) rename src/{jake2 => lwjake2}/qcommon/SZ.java (72%) create mode 100644 src/lwjake2/qcommon/cmd_function_t.java create mode 100644 src/lwjake2/qcommon/longjmpException.java create mode 100644 src/lwjake2/qcommon/lump_t.java create mode 100644 src/lwjake2/qcommon/miptex_t.java rename src/{jake2 => lwjake2}/qcommon/netadr_t.java (70%) rename src/{jake2 => lwjake2}/qcommon/netchan_t.java (79%) rename src/{jake2 => lwjake2}/qcommon/qfiles.java (94%) create mode 100644 src/lwjake2/qcommon/sizebuf_t.java rename src/{jake2 => lwjake2}/qcommon/texinfo_t.java (54%) create mode 100644 src/lwjake2/qcommon/xcommand_t.java rename src/{jake2 => lwjake2}/render/DummyRenderer.java (80%) rename src/{jake2 => lwjake2}/render/LWJGLRenderer.java (82%) create mode 100644 src/lwjake2/render/Ref.java rename src/{jake2 => lwjake2}/render/Renderer.java (51%) create mode 100644 src/lwjake2/render/glconfig_t.java rename src/{jake2 => lwjake2}/render/glpoly_t.java (56%) create mode 100644 src/lwjake2/render/glstate_t.java rename src/{jake2 => lwjake2}/render/image_t.java (57%) rename src/{jake2 => lwjake2}/render/lwjgl/Anorms.java (97%) rename src/{jake2 => lwjake2}/render/lwjgl/Base.java (78%) rename src/{jake2 => lwjake2}/render/lwjgl/Draw.java (90%) rename src/{jake2 => lwjake2}/render/lwjgl/Image.java (96%) rename src/{jake2 => lwjake2}/render/lwjgl/LWJGLBase.java (87%) rename src/{jake2 => lwjake2}/render/lwjgl/Light.java (94%) rename src/{jake2 => lwjake2}/render/lwjgl/Main.java (96%) rename src/{jake2 => lwjake2}/render/lwjgl/Mesh.java (94%) rename src/{jake2 => lwjake2}/render/lwjgl/Misc.java (87%) rename src/{jake2 => lwjake2}/render/lwjgl/Model.java (95%) rename src/{jake2 => lwjake2}/render/lwjgl/Polygon.java (76%) rename src/{jake2 => lwjake2}/render/lwjgl/Surf.java (95%) rename src/{jake2 => lwjake2}/render/lwjgl/Warp.java (94%) rename src/{jake2 => lwjake2}/render/medge_t.java (53%) rename src/{jake2 => lwjake2}/render/mleaf_t.java (53%) create mode 100644 src/lwjake2/render/mmodel_t.java create mode 100644 src/lwjake2/render/mnode_t.java rename src/{jake2 => lwjake2}/render/model_t.java (75%) rename src/{jake2 => lwjake2}/render/msurface_t.java (63%) create mode 100644 src/lwjake2/render/mtexinfo_t.java rename src/{jake2 => lwjake2}/render/mvertex_t.java (53%) rename src/{jake2 => lwjake2}/server/SV.java (97%) rename src/{jake2 => lwjake2}/server/SV_CCMDS.java (93%) rename src/{jake2 => lwjake2}/server/SV_ENTS.java (95%) rename src/{jake2 => lwjake2}/server/SV_GAME.java (90%) rename src/{jake2 => lwjake2}/server/SV_INIT.java (93%) rename src/{jake2 => lwjake2}/server/SV_MAIN.java (96%) rename src/{jake2 => lwjake2}/server/SV_SEND.java (92%) rename src/{jake2 => lwjake2}/server/SV_USER.java (95%) rename src/{jake2 => lwjake2}/server/SV_WORLD.java (94%) create mode 100644 src/lwjake2/server/areanode_t.java create mode 100644 src/lwjake2/server/challenge_t.java create mode 100644 src/lwjake2/server/client_frame_t.java rename src/{jake2 => lwjake2}/server/client_t.java (63%) create mode 100644 src/lwjake2/server/moveclip_t.java rename src/{jake2 => lwjake2}/server/server_static_t.java (71%) rename src/{jake2 => lwjake2}/server/server_t.java (68%) rename src/{jake2 => lwjake2}/sound/DummyDriver.java (67%) rename src/{jake2 => lwjake2}/sound/S.java (76%) rename src/{jake2 => lwjake2}/sound/Sound.java (63%) rename src/{jake2 => lwjake2}/sound/WaveLoader.java (88%) rename src/{jake2 => lwjake2}/sound/lwjgl/Channel.java (89%) rename src/{jake2 => lwjake2}/sound/lwjgl/LWJGLSoundImpl.java (90%) rename src/{jake2 => lwjake2}/sound/lwjgl/PlaySound.java (79%) create mode 100644 src/lwjake2/sound/sfx_t.java create mode 100644 src/lwjake2/sound/sfxcache_t.java create mode 100644 src/lwjake2/sound/soundinfo_t.java create mode 100644 src/lwjake2/sound/wavinfo_t.java create mode 100644 src/lwjake2/sys/HighPrecisionTimer.java rename src/{jake2 => lwjake2}/sys/IN.java (82%) rename src/{jake2 => lwjake2}/sys/InputListener.java (64%) rename src/{jake2 => lwjake2}/sys/JOGLKBD.java (84%) create mode 100644 src/lwjake2/sys/Jake2InputEvent.java create mode 100644 src/lwjake2/sys/KBD.java rename src/{jake2 => lwjake2}/sys/LWJGLKBD.java (86%) rename src/{jake2 => lwjake2}/sys/NET.java (93%) create mode 100644 src/lwjake2/sys/NanoTimer.java create mode 100644 src/lwjake2/sys/StandardTimer.java rename src/{jake2 => lwjake2}/sys/Sys.java (85%) create mode 100644 src/lwjake2/sys/Timer.java rename src/{jake2 => lwjake2}/util/Lib.java (89%) rename src/{jake2 => lwjake2}/util/Math3D.java (93%) rename src/{jake2 => lwjake2}/util/PrintfFormat.java (99%) rename src/{jake2 => lwjake2}/util/QuakeFile.java (74%) rename src/{jake2 => lwjake2}/util/Vargs.java (62%) create mode 100644 src/lwjake2/util/Vec3Cache.java diff --git a/build.xml b/build.xml index 7a84342..34af8c9 100644 --- a/build.xml +++ b/build.xml @@ -31,7 +31,7 @@ - + diff --git a/src/jake2/client/centity_t.java b/src/jake2/client/centity_t.java deleted file mode 100644 index 83bfc88..0000000 --- a/src/jake2/client/centity_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/client/cl_sustain_t.java b/src/jake2/client/cl_sustain_t.java deleted file mode 100644 index ca37261..0000000 --- a/src/jake2/client/cl_sustain_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/client/clientinfo_t.java b/src/jake2/client/clientinfo_t.java deleted file mode 100644 index edb5955..0000000 --- a/src/jake2/client/clientinfo_t.java +++ /dev/null @@ -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); - } -} diff --git a/src/jake2/client/console_t.java b/src/jake2/client/console_t.java deleted file mode 100644 index cf16d66..0000000 --- a/src/jake2/client/console_t.java +++ /dev/null @@ -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 -} diff --git a/src/jake2/client/cparticle_t.java b/src/jake2/client/cparticle_t.java deleted file mode 100644 index df9be61..0000000 --- a/src/jake2/client/cparticle_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/client/dlight_t.java b/src/jake2/client/dlight_t.java deleted file mode 100644 index 29acba2..0000000 --- a/src/jake2/client/dlight_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/client/kbutton_t.java b/src/jake2/client/kbutton_t.java deleted file mode 100644 index 398a548..0000000 --- a/src/jake2/client/kbutton_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/client/lightstyle_t.java b/src/jake2/client/lightstyle_t.java deleted file mode 100644 index c70c195..0000000 --- a/src/jake2/client/lightstyle_t.java +++ /dev/null @@ -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 -} diff --git a/src/jake2/client/particle_t.java b/src/jake2/client/particle_t.java deleted file mode 100644 index c984933..0000000 --- a/src/jake2/client/particle_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/client/refdef_t.java b/src/jake2/client/refdef_t.java deleted file mode 100644 index df9096d..0000000 --- a/src/jake2/client/refdef_t.java +++ /dev/null @@ -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[]; -} diff --git a/src/jake2/client/viddef_t.java b/src/jake2/client/viddef_t.java deleted file mode 100644 index a7d3781..0000000 --- a/src/jake2/client/viddef_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/client/vidmode_t.java b/src/jake2/client/vidmode_t.java deleted file mode 100644 index 0cf828c..0000000 --- a/src/jake2/client/vidmode_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/client/vrect_t.java b/src/jake2/client/vrect_t.java deleted file mode 100644 index fe31e9a..0000000 --- a/src/jake2/client/vrect_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/AIAdapter.java b/src/jake2/game/AIAdapter.java deleted file mode 100644 index c16a7b6..0000000 --- a/src/jake2/game/AIAdapter.java +++ /dev/null @@ -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); -} diff --git a/src/jake2/game/EdictFindFilter.java b/src/jake2/game/EdictFindFilter.java deleted file mode 100644 index 79256c9..0000000 --- a/src/jake2/game/EdictFindFilter.java +++ /dev/null @@ -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; - }; -} \ No newline at end of file diff --git a/src/jake2/game/EdictIterator.java b/src/jake2/game/EdictIterator.java deleted file mode 100644 index ad3b497..0000000 --- a/src/jake2/game/EdictIterator.java +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/src/jake2/game/EndianHandler.java b/src/jake2/game/EndianHandler.java deleted file mode 100644 index 8e041a4..0000000 --- a/src/jake2/game/EndianHandler.java +++ /dev/null @@ -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); - } -} diff --git a/src/jake2/game/EntBlockedAdapter.java b/src/jake2/game/EntBlockedAdapter.java deleted file mode 100644 index 9532069..0000000 --- a/src/jake2/game/EntBlockedAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntDieAdapter.java b/src/jake2/game/EntDieAdapter.java deleted file mode 100644 index 81e4f95..0000000 --- a/src/jake2/game/EntDieAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntDodgeAdapter.java b/src/jake2/game/EntDodgeAdapter.java deleted file mode 100644 index 25e28e2..0000000 --- a/src/jake2/game/EntDodgeAdapter.java +++ /dev/null @@ -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); -} diff --git a/src/jake2/game/EntInteractAdapter.java b/src/jake2/game/EntInteractAdapter.java deleted file mode 100644 index e683b80..0000000 --- a/src/jake2/game/EntInteractAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntPainAdapter.java b/src/jake2/game/EntPainAdapter.java deleted file mode 100644 index e74e30b..0000000 --- a/src/jake2/game/EntPainAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntThinkAdapter.java b/src/jake2/game/EntThinkAdapter.java deleted file mode 100644 index e64fcdd..0000000 --- a/src/jake2/game/EntThinkAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntTouchAdapter.java b/src/jake2/game/EntTouchAdapter.java deleted file mode 100644 index 6cb1a73..0000000 --- a/src/jake2/game/EntTouchAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/EntUseAdapter.java b/src/jake2/game/EntUseAdapter.java deleted file mode 100644 index 5eedd79..0000000 --- a/src/jake2/game/EntUseAdapter.java +++ /dev/null @@ -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); -} \ No newline at end of file diff --git a/src/jake2/game/ItemDropAdapter.java b/src/jake2/game/ItemDropAdapter.java deleted file mode 100644 index 7f3c0a9..0000000 --- a/src/jake2/game/ItemDropAdapter.java +++ /dev/null @@ -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) { - } -} diff --git a/src/jake2/game/ItemUseAdapter.java b/src/jake2/game/ItemUseAdapter.java deleted file mode 100644 index 79627bb..0000000 --- a/src/jake2/game/ItemUseAdapter.java +++ /dev/null @@ -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) { - } -} \ No newline at end of file diff --git a/src/jake2/game/SuperAdapter.java b/src/jake2/game/SuperAdapter.java deleted file mode 100644 index da038be..0000000 --- a/src/jake2/game/SuperAdapter.java +++ /dev/null @@ -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(); -} diff --git a/src/jake2/game/cmdalias_t.java b/src/jake2/game/cmdalias_t.java deleted file mode 100644 index e10236d..0000000 --- a/src/jake2/game/cmdalias_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/cmodel_t.java b/src/jake2/game/cmodel_t.java deleted file mode 100644 index 9983a18..0000000 --- a/src/jake2/game/cmodel_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/cplane_t.java b/src/jake2/game/cplane_t.java deleted file mode 100644 index 796cbb3..0000000 --- a/src/jake2/game/cplane_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/game/csurface_t.java b/src/jake2/game/csurface_t.java deleted file mode 100644 index d788912..0000000 --- a/src/jake2/game/csurface_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/cvar_t.java b/src/jake2/game/cvar_t.java deleted file mode 100644 index cac7782..0000000 --- a/src/jake2/game/cvar_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/gitem_armor_t.java b/src/jake2/game/gitem_armor_t.java deleted file mode 100644 index 3729595..0000000 --- a/src/jake2/game/gitem_armor_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/link_t.java b/src/jake2/game/link_t.java deleted file mode 100644 index 2b70274..0000000 --- a/src/jake2/game/link_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/mapsurface_t.java b/src/jake2/game/mapsurface_t.java deleted file mode 100644 index 0594212..0000000 --- a/src/jake2/game/mapsurface_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/mframe_t.java b/src/jake2/game/mframe_t.java deleted file mode 100644 index 0a1f642..0000000 --- a/src/jake2/game/mframe_t.java +++ /dev/null @@ -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(); - } -} diff --git a/src/jake2/game/pushed_t.java b/src/jake2/game/pushed_t.java deleted file mode 100644 index d6bb314..0000000 --- a/src/jake2/game/pushed_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/game/spawn_t.java b/src/jake2/game/spawn_t.java deleted file mode 100644 index 7de92ff..0000000 --- a/src/jake2/game/spawn_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/qcommon/cmd_function_t.java b/src/jake2/qcommon/cmd_function_t.java deleted file mode 100644 index 81d8b17..0000000 --- a/src/jake2/qcommon/cmd_function_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/qcommon/longjmpException.java b/src/jake2/qcommon/longjmpException.java deleted file mode 100644 index 33a1557..0000000 --- a/src/jake2/qcommon/longjmpException.java +++ /dev/null @@ -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 { - -} diff --git a/src/jake2/qcommon/lump_t.java b/src/jake2/qcommon/lump_t.java deleted file mode 100644 index 66e35e2..0000000 --- a/src/jake2/qcommon/lump_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/qcommon/miptex_t.java b/src/jake2/qcommon/miptex_t.java deleted file mode 100644 index 6884825..0000000 --- a/src/jake2/qcommon/miptex_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/qcommon/sizebuf_t.java b/src/jake2/qcommon/sizebuf_t.java deleted file mode 100644 index d0d9c95..0000000 --- a/src/jake2/qcommon/sizebuf_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/qcommon/xcommand_t.java b/src/jake2/qcommon/xcommand_t.java deleted file mode 100644 index 6f8c853..0000000 --- a/src/jake2/qcommon/xcommand_t.java +++ /dev/null @@ -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(); -} diff --git a/src/jake2/render/Ref.java b/src/jake2/render/Ref.java deleted file mode 100644 index b6c4eb4..0000000 --- a/src/jake2/render/Ref.java +++ /dev/null @@ -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(); -} diff --git a/src/jake2/render/glconfig_t.java b/src/jake2/render/glconfig_t.java deleted file mode 100644 index 4fe05b5..0000000 --- a/src/jake2/render/glconfig_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/render/glstate_t.java b/src/jake2/render/glstate_t.java deleted file mode 100644 index 5dfcce0..0000000 --- a/src/jake2/render/glstate_t.java +++ /dev/null @@ -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]; - -} diff --git a/src/jake2/render/mmodel_t.java b/src/jake2/render/mmodel_t.java deleted file mode 100644 index ad67df2..0000000 --- a/src/jake2/render/mmodel_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/render/mnode_t.java b/src/jake2/render/mnode_t.java deleted file mode 100644 index 41a89d8..0000000 --- a/src/jake2/render/mnode_t.java +++ /dev/null @@ -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; - -} diff --git a/src/jake2/render/mtexinfo_t.java b/src/jake2/render/mtexinfo_t.java deleted file mode 100644 index ee1fedb..0000000 --- a/src/jake2/render/mtexinfo_t.java +++ /dev/null @@ -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; - } - -} diff --git a/src/jake2/server/areanode_t.java b/src/jake2/server/areanode_t.java deleted file mode 100644 index f866112..0000000 --- a/src/jake2/server/areanode_t.java +++ /dev/null @@ -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}; -} diff --git a/src/jake2/server/challenge_t.java b/src/jake2/server/challenge_t.java deleted file mode 100644 index 93bb7d9..0000000 --- a/src/jake2/server/challenge_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/server/client_frame_t.java b/src/jake2/server/client_frame_t.java deleted file mode 100644 index 04a8e61..0000000 --- a/src/jake2/server/client_frame_t.java +++ /dev/null @@ -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 -} diff --git a/src/jake2/server/moveclip_t.java b/src/jake2/server/moveclip_t.java deleted file mode 100644 index bc024b4..0000000 --- a/src/jake2/server/moveclip_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/sound/sfx_t.java b/src/jake2/sound/sfx_t.java deleted file mode 100644 index 6386cb1..0000000 --- a/src/jake2/sound/sfx_t.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/sound/sfxcache_t.java b/src/jake2/sound/sfxcache_t.java deleted file mode 100644 index 2dae42e..0000000 --- a/src/jake2/sound/sfxcache_t.java +++ /dev/null @@ -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]; - } -} diff --git a/src/jake2/sound/soundinfo_t.java b/src/jake2/sound/soundinfo_t.java deleted file mode 100644 index 9b830e0..0000000 --- a/src/jake2/sound/soundinfo_t.java +++ /dev/null @@ -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; -} diff --git a/src/jake2/sound/wavinfo_t.java b/src/jake2/sound/wavinfo_t.java deleted file mode 100644 index 941dfe4..0000000 --- a/src/jake2/sound/wavinfo_t.java +++ /dev/null @@ -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 -} diff --git a/src/jake2/sys/HighPrecisionTimer.java b/src/jake2/sys/HighPrecisionTimer.java deleted file mode 100644 index aaba98b..0000000 --- a/src/jake2/sys/HighPrecisionTimer.java +++ /dev/null @@ -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); - } -} diff --git a/src/jake2/sys/Jake2InputEvent.java b/src/jake2/sys/Jake2InputEvent.java deleted file mode 100644 index 8fff4ba..0000000 --- a/src/jake2/sys/Jake2InputEvent.java +++ /dev/null @@ -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; - } -} diff --git a/src/jake2/sys/KBD.java b/src/jake2/sys/KBD.java deleted file mode 100644 index c653fea..0000000 --- a/src/jake2/sys/KBD.java +++ /dev/null @@ -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(); -} - diff --git a/src/jake2/sys/NanoTimer.java b/src/jake2/sys/NanoTimer.java deleted file mode 100644 index 47292ea..0000000 --- a/src/jake2/sys/NanoTimer.java +++ /dev/null @@ -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); - } - -} diff --git a/src/jake2/sys/StandardTimer.java b/src/jake2/sys/StandardTimer.java deleted file mode 100644 index 1da7cb6..0000000 --- a/src/jake2/sys/StandardTimer.java +++ /dev/null @@ -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; - } - -} diff --git a/src/jake2/sys/Timer.java b/src/jake2/sys/Timer.java deleted file mode 100644 index ef1d4e6..0000000 --- a/src/jake2/sys/Timer.java +++ /dev/null @@ -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()); - } -} diff --git a/src/jake2/util/Vec3Cache.java b/src/jake2/util/Vec3Cache.java deleted file mode 100644 index ddcf5ce..0000000 --- a/src/jake2/util/Vec3Cache.java +++ /dev/null @@ -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."); - } -} \ No newline at end of file diff --git a/src/jake2/Defines.java b/src/lwjake2/Defines.java similarity index 98% rename from src/jake2/Defines.java rename to src/lwjake2/Defines.java index 8b9e956..3376a74 100644 --- a/src/jake2/Defines.java +++ b/src/lwjake2/Defines.java @@ -1,33 +1,27 @@ /* -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: Defines.java,v 1.9 2006/01/01 15:05:47 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. + */ /** Contains the definitions for the game engine. */ -package jake2; +package lwjake2; import java.nio.ByteOrder; - public class Defines { public final static int WEAPON_READY = 0; diff --git a/src/jake2/Globals.java b/src/lwjake2/Globals.java similarity index 90% rename from src/jake2/Globals.java rename to src/lwjake2/Globals.java index d7c44ec..4e1d127 100644 --- a/src/jake2/Globals.java +++ b/src/lwjake2/Globals.java @@ -1,36 +1,37 @@ /* - * Globals.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 -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. +package lwjake2; -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; - -import jake2.client.*; -import jake2.game.*; -import jake2.qcommon.netadr_t; -import jake2.qcommon.sizebuf_t; -import jake2.render.DummyRenderer; -import jake2.render.model_t; +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.game.cmdalias_t; +import lwjake2.game.cvar_t; +import lwjake2.game.entity_state_t; +import lwjake2.qcommon.netadr_t; +import lwjake2.qcommon.sizebuf_t; +import lwjake2.render.DummyRenderer; +import lwjake2.render.model_t; import java.io.FileWriter; import java.io.RandomAccessFile; diff --git a/src/jake2/Jake2.java b/src/lwjake2/LWJake2.java similarity index 64% rename from src/jake2/Jake2.java rename to src/lwjake2/LWJake2.java index 83b839c..bdda94c 100644 --- a/src/jake2/Jake2.java +++ b/src/lwjake2/LWJake2.java @@ -1,39 +1,32 @@ /* - * Jake2.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2; - 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; - -import jake2.qcommon.*; -import jake2.sys.Timer; - -import java.util.Locale; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.Qcommon; +import lwjake2.sys.Timer; /** * 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 diff --git a/src/jake2/client/CL.java b/src/lwjake2/client/CL.java similarity index 97% rename from src/jake2/client/CL.java rename to src/lwjake2/client/CL.java index 7145392..47ccbcb 100644 --- a/src/jake2/client/CL.java +++ b/src/lwjake2/client/CL.java @@ -1,38 +1,51 @@ /* - * CL.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -import jake2.game.*; -import jake2.qcommon.*; -import jake2.server.SV_MAIN; -import jake2.sound.S; -import jake2.sys.*; -import jake2.util.*; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.EndianHandler; +import lwjake2.game.Info; +import lwjake2.game.cvar_t; +import lwjake2.game.entity_state_t; +import lwjake2.qcommon.CM; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.MSG; +import lwjake2.qcommon.Netchan; +import lwjake2.qcommon.SZ; +import lwjake2.qcommon.netadr_t; +import lwjake2.qcommon.qfiles; +import lwjake2.qcommon.sizebuf_t; +import lwjake2.qcommon.xcommand_t; +import lwjake2.server.SV_MAIN; +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.RandomAccessFile; diff --git a/src/jake2/client/CL_ents.java b/src/lwjake2/client/CL_ents.java similarity index 97% rename from src/jake2/client/CL_ents.java rename to src/lwjake2/client/CL_ents.java index 5544196..dea2eca 100644 --- a/src/jake2/client/CL_ents.java +++ b/src/lwjake2/client/CL_ents.java @@ -1,35 +1,32 @@ /* - * java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -import jake2.game.*; -import jake2.qcommon.*; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.entity_state_t; +import lwjake2.game.player_state_t; +import lwjake2.game.pmove_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.MSG; +import lwjake2.util.Math3D; /** * CL_ents diff --git a/src/jake2/client/CL_fx.java b/src/lwjake2/client/CL_fx.java similarity index 98% rename from src/jake2/client/CL_fx.java rename to src/lwjake2/client/CL_fx.java index 9749bdf..c3d6f7d 100644 --- a/src/jake2/client/CL_fx.java +++ b/src/lwjake2/client/CL_fx.java @@ -1,39 +1,32 @@ /* - * java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -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; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.entity_state_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.MSG; +import lwjake2.sound.S; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; /** * Client Graphics Effects. diff --git a/src/jake2/client/CL_input.java b/src/lwjake2/client/CL_input.java similarity index 93% rename from src/jake2/client/CL_input.java rename to src/lwjake2/client/CL_input.java index d3efc82..703bb53 100644 --- a/src/jake2/client/CL_input.java +++ b/src/lwjake2/client/CL_input.java @@ -1,39 +1,38 @@ /* - * java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -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; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.game.usercmd_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.MSG; +import lwjake2.qcommon.Netchan; +import lwjake2.qcommon.SZ; +import lwjake2.qcommon.sizebuf_t; +import lwjake2.qcommon.xcommand_t; +import lwjake2.sys.IN; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; /** * CL_input diff --git a/src/jake2/client/CL_inv.java b/src/lwjake2/client/CL_inv.java similarity index 71% rename from src/jake2/client/CL_inv.java rename to src/lwjake2/client/CL_inv.java index 399f063..989b871 100644 --- a/src/jake2/client/CL_inv.java +++ b/src/lwjake2/client/CL_inv.java @@ -1,38 +1,29 @@ /* - * CL_fx.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: CL_inv.java,v 1.3 2005/12/18 22:10:10 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. - + * 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.01.2004 by RST. -package jake2.client; +package lwjake2.client; -import jake2.Defines; -import jake2.Globals; -import jake2.qcommon.Com; -import jake2.qcommon.MSG; -import jake2.util.Lib; -import jake2.util.Vargs; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.MSG; +import lwjake2.util.Lib; +import lwjake2.util.Vargs; /** * CL_inv diff --git a/src/jake2/client/CL_newfx.java b/src/lwjake2/client/CL_newfx.java similarity index 96% rename from src/jake2/client/CL_newfx.java rename to src/lwjake2/client/CL_newfx.java index 53a53be..cb7c776 100644 --- a/src/jake2/client/CL_newfx.java +++ b/src/lwjake2/client/CL_newfx.java @@ -1,36 +1,27 @@ /* - * CL_newfx.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: CL_newfx.java,v 1.7 2005/01/17 21:50:42 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. - + * 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.01.2004 by RST. -package jake2.client; +package lwjake2.client; -import jake2.Defines; -import jake2.Globals; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; /** * CL_newfx diff --git a/src/jake2/client/CL_parse.java b/src/lwjake2/client/CL_parse.java similarity index 95% rename from src/jake2/client/CL_parse.java rename to src/lwjake2/client/CL_parse.java index 520211f..1139346 100644 --- a/src/jake2/client/CL_parse.java +++ b/src/lwjake2/client/CL_parse.java @@ -1,40 +1,39 @@ /* - * CL_parse.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -import jake2.game.Cmd; -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 lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.entity_state_t; +import lwjake2.qcommon.CM; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.MSG; +import lwjake2.qcommon.SZ; +import lwjake2.qcommon.xcommand_t; +import lwjake2.render.model_t; +import lwjake2.sound.S; +import lwjake2.sys.Sys; +import lwjake2.util.Lib; import java.io.IOException; import java.io.RandomAccessFile; @@ -306,7 +305,7 @@ public class CL_parse { Globals.cls.serverProtocol = i; // 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) Com.Error(Defines.ERR_DROP, "Server returned version " + i + ", not " + Defines.PROTOCOL_VERSION); diff --git a/src/jake2/client/CL_pred.java b/src/lwjake2/client/CL_pred.java similarity index 88% rename from src/jake2/client/CL_pred.java rename to src/lwjake2/client/CL_pred.java index 37793b5..1ce7e97 100644 --- a/src/jake2/client/CL_pred.java +++ b/src/lwjake2/client/CL_pred.java @@ -1,35 +1,35 @@ /* - * CL_pred.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -import jake2.game.*; -import jake2.qcommon.*; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.cmodel_t; +import lwjake2.game.edict_t; +import lwjake2.game.entity_state_t; +import lwjake2.game.pmove_t; +import lwjake2.game.trace_t; +import lwjake2.game.usercmd_t; +import lwjake2.qcommon.CM; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.PMove; +import lwjake2.util.Math3D; /** * CL_pred diff --git a/src/jake2/client/CL_tent.java b/src/lwjake2/client/CL_tent.java similarity index 98% rename from src/jake2/client/CL_tent.java rename to src/lwjake2/client/CL_tent.java index 9764069..96e788c 100644 --- a/src/jake2/client/CL_tent.java +++ b/src/lwjake2/client/CL_tent.java @@ -1,40 +1,33 @@ /* - * java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -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; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.player_state_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.MSG; +import lwjake2.render.model_t; +import lwjake2.sound.S; +import lwjake2.sound.sfx_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; /** * CL_tent diff --git a/src/jake2/client/CL_view.java b/src/lwjake2/client/CL_view.java similarity index 89% rename from src/jake2/client/CL_view.java rename to src/lwjake2/client/CL_view.java index a5a4bb8..accf542 100644 --- a/src/jake2/client/CL_view.java +++ b/src/lwjake2/client/CL_view.java @@ -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. * - * 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 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. + * 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. - * + * 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; -import jake2.Globals; -import jake2.qcommon.CM; -import jake2.qcommon.Com; -import jake2.sys.Sys; +package lwjake2.client; + +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.qcommon.CM; +import lwjake2.qcommon.Com; +import lwjake2.sys.Sys; import java.util.StringTokenizer; diff --git a/src/jake2/client/Console.java b/src/lwjake2/client/Console.java similarity index 93% rename from src/jake2/client/Console.java rename to src/lwjake2/client/Console.java index 4bc4b05..9c3045e 100644 --- a/src/jake2/client/Console.java +++ b/src/lwjake2/client/Console.java @@ -1,41 +1,38 @@ /* - * Con.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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 lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.xcommand_t; +import lwjake2.util.Lib; +import lwjake2.util.Vargs; import java.io.IOException; import java.io.RandomAccessFile; 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 */ @@ -403,7 +400,6 @@ public final class Console extends Globals { static void DrawInput() { int i; byte[] text; - int start = 0; if (cls.key_dest == key_menu) return; @@ -420,8 +416,8 @@ public final class Console extends Globals { text[i] = ' '; // prestep if horizontally scrolling - if (key_linepos >= con.linewidth) - start += 1 + key_linepos - con.linewidth; + //if (key_linepos >= con.linewidth) + // start += 1 + key_linepos - con.linewidth; // draw it // y = con.vislines-16; diff --git a/src/jake2/client/Key.java b/src/lwjake2/client/Key.java similarity index 95% rename from src/jake2/client/Key.java rename to src/lwjake2/client/Key.java index d2376d1..d79a456 100644 --- a/src/jake2/client/Key.java +++ b/src/lwjake2/client/Key.java @@ -1,35 +1,31 @@ /* - * Key.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 -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. +package lwjake2.client; -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; -import jake2.Globals; -import jake2.game.Cmd; -import jake2.qcommon.*; -import jake2.util.Lib; +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.xcommand_t; +import lwjake2.util.Lib; import java.io.IOException; import java.io.RandomAccessFile; diff --git a/src/jake2/client/M.java b/src/lwjake2/client/M.java similarity index 93% rename from src/jake2/client/M.java rename to src/lwjake2/client/M.java index 835d877..607e18f 100644 --- a/src/jake2/client/M.java +++ b/src/lwjake2/client/M.java @@ -1,36 +1,34 @@ /* - * M.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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; -import jake2.Globals; -import jake2.game.*; -import jake2.server.SV; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameBase; +import lwjake2.game.GameCombat; +import lwjake2.game.edict_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.server.SV; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; /** * M diff --git a/src/jake2/client/Menu.java b/src/lwjake2/client/Menu.java similarity index 99% rename from src/jake2/client/Menu.java rename to src/lwjake2/client/Menu.java index 8764909..10b3e59 100644 --- a/src/jake2/client/Menu.java +++ b/src/lwjake2/client/Menu.java @@ -1,39 +1,39 @@ /* - * Menu.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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.Globals; -import jake2.game.Cmd; -import jake2.game.cvar_t; -import jake2.qcommon.*; -import jake2.sound.S; -import jake2.sys.*; -import jake2.sys.NET; -import jake2.sys.Sys; -import jake2.util.*; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.netadr_t; +import lwjake2.qcommon.xcommand_t; +import lwjake2.sound.S; +import lwjake2.sys.NET; +import lwjake2.sys.Sys; +import lwjake2.sys.Timer; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; +import lwjake2.util.QuakeFile; import java.awt.Dimension; import java.io.RandomAccessFile; @@ -447,7 +447,6 @@ public final class Menu extends Key { int ystart; int xoffset; int widest = -1; - int totalheight = 0; String litname; String[] names = { "m_main_game", "m_main_multiplayer", "m_main_options", "m_main_video", "m_main_quit" }; @@ -460,7 +459,6 @@ public final class Menu extends Key { if (w > widest) widest = w; - totalheight += (h + 12); } ystart = (Globals.viddef.height / 2 - 110); @@ -4669,7 +4667,6 @@ public final class Menu extends Key { public static void Menu_DrawStatusBar(String string) { if (string != null) { int l = string.length(); - int maxrow = viddef.height / 8; int maxcol = viddef.width / 8; int col = maxcol / 2 - l / 2; @@ -4881,7 +4878,6 @@ public final class Menu extends Key { public static void SpinControl_Draw(menulist_s s) { //char buffer[100]; - String buffer; if (s.name != null) { Menu_DrawStringR2LDark(s.x + s.parent.x + LCOLUMN_OFFSET, s.y diff --git a/src/jake2/client/SCR.java b/src/lwjake2/client/SCR.java similarity index 97% rename from src/jake2/client/SCR.java rename to src/lwjake2/client/SCR.java index 34e4b74..ade0da0 100644 --- a/src/jake2/client/SCR.java +++ b/src/lwjake2/client/SCR.java @@ -1,45 +1,40 @@ /* - * SCR.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: SCR.java,v 1.18 2005/12/04 17:32:42 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. - + * 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; +package lwjake2.client; -import jake2.Defines; -import jake2.Globals; -import jake2.game.Cmd; -import jake2.game.cvar_t; -import jake2.qcommon.*; -import jake2.sound.S; -import jake2.sys.Sys; -import jake2.sys.Timer; -import jake2.util.Lib; -import jake2.util.Vargs; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.MSG; +import lwjake2.qcommon.SZ; +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.io.IOException; -import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Arrays; @@ -290,10 +285,8 @@ public final class SCR extends Globals { int j; int x, y; int remaining; - - if (cs == null) - return; - if (cs.length() == 0) + + if (cs == null || cs.length() == 0) return; // the finale prints the characters one at a time diff --git a/src/jake2/client/V.java b/src/lwjake2/client/V.java similarity index 91% rename from src/jake2/client/V.java rename to src/lwjake2/client/V.java index f519e89..af5c5ce 100644 --- a/src/jake2/client/V.java +++ b/src/lwjake2/client/V.java @@ -1,37 +1,32 @@ /* - * V.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $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 - 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. +package lwjake2.client; - 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.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 lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.xcommand_t; +import lwjake2.sys.Timer; +import lwjake2.util.Math3D; +import lwjake2.util.Vargs; import java.io.IOException; import java.nio.FloatBuffer; diff --git a/src/jake2/client/VID.java b/src/lwjake2/client/VID.java similarity index 94% rename from src/jake2/client/VID.java rename to src/lwjake2/client/VID.java index d297d92..10da069 100644 --- a/src/jake2/client/VID.java +++ b/src/lwjake2/client/VID.java @@ -1,39 +1,34 @@ /* - * VID.java - * Copyright (C) 2003 - * - * $Id: VID.java,v 1.17 2005/11/13 13:36:00 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. */ -/* -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. +package lwjake2.client; -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; -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 lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.xcommand_t; +import lwjake2.render.Renderer; +import lwjake2.sound.S; +import lwjake2.sys.IN; +import lwjake2.util.Vargs; import java.awt.Dimension; import java.awt.DisplayMode; diff --git a/src/lwjake2/client/centity_t.java b/src/lwjake2/client/centity_t.java new file mode 100644 index 0000000..aa3f9f7 --- /dev/null +++ b/src/lwjake2/client/centity_t.java @@ -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; +} diff --git a/src/lwjake2/client/cl_sustain_t.java b/src/lwjake2/client/cl_sustain_t.java new file mode 100644 index 0000000..fb335c7 --- /dev/null +++ b/src/lwjake2/client/cl_sustain_t.java @@ -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; + } +} diff --git a/src/jake2/client/client_state_t.java b/src/lwjake2/client/client_state_t.java similarity index 76% rename from src/jake2/client/client_state_t.java rename to src/lwjake2/client/client_state_t.java index 20c3011..190a1f2 100644 --- a/src/jake2/client/client_state_t.java +++ b/src/lwjake2/client/client_state_t.java @@ -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 + * 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. + */ -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. +package lwjake2.client; -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. +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; -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: client_state_t.java,v 1.5 2005/11/21 19:38:38 cawe Exp $ - -package jake2.client; - -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; public class client_state_t { diff --git a/src/jake2/client/client_static_t.java b/src/lwjake2/client/client_static_t.java similarity index 62% rename from src/jake2/client/client_static_t.java rename to src/lwjake2/client/client_static_t.java index 59bb138..3013521 100644 --- a/src/jake2/client/client_static_t.java +++ b/src/lwjake2/client/client_static_t.java @@ -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 + * 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. + */ -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. +package lwjake2.client; -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. +import lwjake2.qcommon.netchan_t; -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: client_static_t.java,v 1.1.1.1 2004/07/07 19:58:52 hzi Exp $ - - -package jake2.client; - -import jake2.qcommon.netchan_t; -import java.io.*; +import java.io.RandomAccessFile; public class client_static_t { diff --git a/src/lwjake2/client/clientinfo_t.java b/src/lwjake2/client/clientinfo_t.java new file mode 100644 index 0000000..345a0ec --- /dev/null +++ b/src/lwjake2/client/clientinfo_t.java @@ -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); + } +} diff --git a/src/lwjake2/client/console_t.java b/src/lwjake2/client/console_t.java new file mode 100644 index 0000000..3a841f4 --- /dev/null +++ b/src/lwjake2/client/console_t.java @@ -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 +} diff --git a/src/lwjake2/client/cparticle_t.java b/src/lwjake2/client/cparticle_t.java new file mode 100644 index 0000000..7dec141 --- /dev/null +++ b/src/lwjake2/client/cparticle_t.java @@ -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; +} diff --git a/src/lwjake2/client/dlight_t.java b/src/lwjake2/client/dlight_t.java new file mode 100644 index 0000000..8e757b8 --- /dev/null +++ b/src/lwjake2/client/dlight_t.java @@ -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; +} diff --git a/src/jake2/client/entity_t.java b/src/lwjake2/client/entity_t.java similarity index 61% rename from src/jake2/client/entity_t.java rename to src/lwjake2/client/entity_t.java index 52e1d68..b9943d6 100644 --- a/src/jake2/client/entity_t.java +++ b/src/lwjake2/client/entity_t.java @@ -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 + * 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. + */ -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. +package lwjake2.client; -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. +import lwjake2.render.image_t; +import lwjake2.render.model_t; +import lwjake2.util.Math3D; -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: entity_t.java,v 1.2 2005/01/16 13:56:49 cawe Exp $ - -package jake2.client; - -import jake2.render.*; -import jake2.util.Math3D; - -// ok! public class entity_t implements Cloneable{ //ptr public model_t model; // opaque type outside refresh diff --git a/src/jake2/client/frame_t.java b/src/lwjake2/client/frame_t.java similarity index 54% rename from src/jake2/client/frame_t.java rename to src/lwjake2/client/frame_t.java index 1200b2a..b849fb2 100644 --- a/src/jake2/client/frame_t.java +++ b/src/lwjake2/client/frame_t.java @@ -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 + * 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. + */ -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. +package lwjake2.client; -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: frame_t.java,v 1.3 2004/07/09 06:50:50 hzi Exp $ - -package jake2.client; - -import jake2.game.player_state_t; +import lwjake2.game.player_state_t; import java.util.Arrays; diff --git a/src/lwjake2/client/kbutton_t.java b/src/lwjake2/client/kbutton_t.java new file mode 100644 index 0000000..7f9c472 --- /dev/null +++ b/src/lwjake2/client/kbutton_t.java @@ -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; +} diff --git a/src/lwjake2/client/lightstyle_t.java b/src/lwjake2/client/lightstyle_t.java new file mode 100644 index 0000000..0e9b322 --- /dev/null +++ b/src/lwjake2/client/lightstyle_t.java @@ -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 +} diff --git a/src/lwjake2/client/particle_t.java b/src/lwjake2/client/particle_t.java new file mode 100644 index 0000000..2724869 --- /dev/null +++ b/src/lwjake2/client/particle_t.java @@ -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; + } +} diff --git a/src/lwjake2/client/refdef_t.java b/src/lwjake2/client/refdef_t.java new file mode 100644 index 0000000..4665a0a --- /dev/null +++ b/src/lwjake2/client/refdef_t.java @@ -0,0 +1,42 @@ +/* + * 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 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[]; +} diff --git a/src/jake2/client/refexport_t.java b/src/lwjake2/client/refexport_t.java similarity index 72% rename from src/jake2/client/refexport_t.java rename to src/lwjake2/client/refexport_t.java index d5ce3c8..4c732b6 100644 --- a/src/jake2/client/refexport_t.java +++ b/src/lwjake2/client/refexport_t.java @@ -1,35 +1,27 @@ /* - * refexport_t.java - * Copyright (C) 2003 - * - * $Id: refexport_t.java,v 1.3 2004/12/14 00:11:10 hzi 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 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. + */ -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. +package lwjake2.client; -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.qcommon.xcommand_t; -import jake2.render.image_t; -import jake2.render.model_t; -import jake2.sys.KBD; +import lwjake2.qcommon.xcommand_t; +import lwjake2.render.image_t; +import lwjake2.render.model_t; +import lwjake2.sys.KBD; import java.awt.Dimension; import java.awt.DisplayMode; diff --git a/src/lwjake2/client/viddef_t.java b/src/lwjake2/client/viddef_t.java new file mode 100644 index 0000000..7076ca0 --- /dev/null +++ b/src/lwjake2/client/viddef_t.java @@ -0,0 +1,23 @@ +/* + * 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 viddef_t { + public int width, height; +} diff --git a/src/lwjake2/client/vidmode_t.java b/src/lwjake2/client/vidmode_t.java new file mode 100644 index 0000000..75512b6 --- /dev/null +++ b/src/lwjake2/client/vidmode_t.java @@ -0,0 +1,37 @@ +/* + * 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; + +/** + * 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; + } +} diff --git a/src/lwjake2/client/vrect_t.java b/src/lwjake2/client/vrect_t.java new file mode 100644 index 0000000..196115f --- /dev/null +++ b/src/lwjake2/client/vrect_t.java @@ -0,0 +1,32 @@ +/* + * 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; + +/** + * vrect_t + * + * @author cwei + */ +public class vrect_t { + public int x; + public int y; + public int width; + public int height; + vrect_t pnext; +} diff --git a/src/lwjake2/game/AIAdapter.java b/src/lwjake2/game/AIAdapter.java new file mode 100644 index 0000000..d65a26f --- /dev/null +++ b/src/lwjake2/game/AIAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class AIAdapter extends SuperAdapter +{ + public abstract void ai(edict_t self, float dist); +} diff --git a/src/jake2/game/Cmd.java b/src/lwjake2/game/Cmd.java similarity index 96% rename from src/jake2/game/Cmd.java rename to src/lwjake2/game/Cmd.java index 68eca8d..ebf24f8 100644 --- a/src/jake2/game/Cmd.java +++ b/src/lwjake2/game/Cmd.java @@ -1,39 +1,39 @@ /* - * Cmd.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Cmd.java,v 1.18 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 - 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. +package lwjake2.game; - 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. +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.monsters.M_Player; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.MSG; +import lwjake2.qcommon.SZ; +import lwjake2.qcommon.cmd_function_t; +import lwjake2.qcommon.xcommand_t; +import lwjake2.server.SV_GAME; +import lwjake2.util.Lib; - 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; - -import jake2.Defines; -import jake2.Globals; -import jake2.game.monsters.M_Player; -import jake2.qcommon.*; -import jake2.server.SV_GAME; -import jake2.util.Lib; - -import java.util.*; import java.util.Arrays; +import java.util.Comparator; import java.util.Vector; /** diff --git a/src/lwjake2/game/EdictFindFilter.java b/src/lwjake2/game/EdictFindFilter.java new file mode 100644 index 0000000..488b104 --- /dev/null +++ b/src/lwjake2/game/EdictFindFilter.java @@ -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.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; + }; +} \ No newline at end of file diff --git a/src/lwjake2/game/EdictIterator.java b/src/lwjake2/game/EdictIterator.java new file mode 100644 index 0000000..b68976b --- /dev/null +++ b/src/lwjake2/game/EdictIterator.java @@ -0,0 +1,31 @@ +/* + * 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.game; + +/** Helps for iterating over the gedicts[] array. RST. */ + +public class EdictIterator +{ + EdictIterator(int i) + { + this.i = i; + } + public edict_t o; + int i; +} \ No newline at end of file diff --git a/src/lwjake2/game/EndianHandler.java b/src/lwjake2/game/EndianHandler.java new file mode 100644 index 0000000..ff909ec --- /dev/null +++ b/src/lwjake2/game/EndianHandler.java @@ -0,0 +1,69 @@ +/* + * 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.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); + } +} diff --git a/src/lwjake2/game/EntBlockedAdapter.java b/src/lwjake2/game/EntBlockedAdapter.java new file mode 100644 index 0000000..ef12af1 --- /dev/null +++ b/src/lwjake2/game/EntBlockedAdapter.java @@ -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.game; + +public abstract class EntBlockedAdapter extends SuperAdapter +{ + // move to moveinfo? + public abstract void blocked(edict_t self, edict_t other); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntDieAdapter.java b/src/lwjake2/game/EntDieAdapter.java new file mode 100644 index 0000000..b97dbbd --- /dev/null +++ b/src/lwjake2/game/EntDieAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntDieAdapter extends SuperAdapter +{ + public abstract void die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntDodgeAdapter.java b/src/lwjake2/game/EntDodgeAdapter.java new file mode 100644 index 0000000..a83bbc9 --- /dev/null +++ b/src/lwjake2/game/EntDodgeAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntDodgeAdapter extends SuperAdapter +{ + public abstract void dodge(edict_t self, edict_t other, float eta); +} diff --git a/src/lwjake2/game/EntInteractAdapter.java b/src/lwjake2/game/EntInteractAdapter.java new file mode 100644 index 0000000..c91f5ce --- /dev/null +++ b/src/lwjake2/game/EntInteractAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntInteractAdapter extends SuperAdapter +{ + public abstract boolean interact(edict_t self, edict_t other); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntPainAdapter.java b/src/lwjake2/game/EntPainAdapter.java new file mode 100644 index 0000000..2cfc75c --- /dev/null +++ b/src/lwjake2/game/EntPainAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntPainAdapter extends SuperAdapter +{ + public abstract void pain(edict_t self, edict_t other, float kick, int damage); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntThinkAdapter.java b/src/lwjake2/game/EntThinkAdapter.java new file mode 100644 index 0000000..a3b6ad5 --- /dev/null +++ b/src/lwjake2/game/EntThinkAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntThinkAdapter extends SuperAdapter +{ + public abstract boolean think(edict_t self); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntTouchAdapter.java b/src/lwjake2/game/EntTouchAdapter.java new file mode 100644 index 0000000..3963eab --- /dev/null +++ b/src/lwjake2/game/EntTouchAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntTouchAdapter extends SuperAdapter +{ + public abstract void touch(edict_t self, edict_t other, cplane_t plane, csurface_t surf); +} \ No newline at end of file diff --git a/src/lwjake2/game/EntUseAdapter.java b/src/lwjake2/game/EntUseAdapter.java new file mode 100644 index 0000000..5018eea --- /dev/null +++ b/src/lwjake2/game/EntUseAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class EntUseAdapter extends SuperAdapter +{ + public abstract void use(edict_t self, edict_t other, edict_t activator); +} \ No newline at end of file diff --git a/src/jake2/game/GameAI.java b/src/lwjake2/game/GameAI.java similarity index 97% rename from src/jake2/game/GameAI.java rename to src/lwjake2/game/GameAI.java index 4bf23c8..e6cf9fa 100644 --- a/src/jake2/game/GameAI.java +++ b/src/lwjake2/game/GameAI.java @@ -1,34 +1,28 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. +package lwjake2.game; -// $Id: GameAI.java,v 1.10 2005/12/27 21:02:30 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.Globals; -import jake2.client.M; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.M; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameAI { diff --git a/src/jake2/game/GameBase.java b/src/lwjake2/game/GameBase.java similarity index 94% rename from src/jake2/game/GameBase.java rename to src/lwjake2/game/GameBase.java index 800a98c..8afae27 100644 --- a/src/jake2/game/GameBase.java +++ b/src/lwjake2/game/GameBase.java @@ -1,39 +1,35 @@ /* - 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. - + * 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 30.11.2003 by RST. - -// $Id: GameBase.java,v 1.13 2006/01/21 21:53:31 salomo Exp $ - /** Father of all GameObjects. */ -package jake2.game; +package lwjake2.game; + +import lwjake2.Defines; +import lwjake2.client.M; +import lwjake2.qcommon.Com; +import lwjake2.server.SV; +import lwjake2.server.SV_WORLD; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; import java.util.StringTokenizer; -import jake2.*; -import jake2.client.*; -import jake2.qcommon.Com; -import jake2.server.*; -import jake2.util.*; - public class GameBase { public static cplane_t dummyplane = new cplane_t(); diff --git a/src/jake2/game/GameChase.java b/src/lwjake2/game/GameChase.java similarity index 83% rename from src/jake2/game/GameChase.java rename to src/lwjake2/game/GameChase.java index b040b62..5c2b41b 100644 --- a/src/jake2/game/GameChase.java +++ b/src/lwjake2/game/GameChase.java @@ -1,37 +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 + * 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. + */ -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 16.11.2005 by RST. -// $Id: GameChase.java,v 1.2 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - - -import jake2.*; -import jake2.client.*; -import jake2.game.*; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Math3D; +package lwjake2.game; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.server.SV_WORLD; +import lwjake2.util.Math3D; public class GameChase { diff --git a/src/jake2/game/GameCombat.java b/src/lwjake2/game/GameCombat.java similarity index 95% rename from src/jake2/game/GameCombat.java rename to src/lwjake2/game/GameCombat.java index 23e3339..e15de49 100644 --- a/src/jake2/game/GameCombat.java +++ b/src/lwjake2/game/GameCombat.java @@ -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 + * 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. + */ -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. +package lwjake2.game; -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 16.11.2005 by RST. -// $Id: GameCombat.java,v 1.3 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.Globals; -import jake2.qcommon.Com; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.qcommon.Com; +import lwjake2.util.Math3D; public class GameCombat { diff --git a/src/jake2/game/GameFunc.java b/src/lwjake2/game/GameFunc.java similarity index 99% rename from src/jake2/game/GameFunc.java rename to src/lwjake2/game/GameFunc.java index 2ae466a..875d6e4 100644 --- a/src/jake2/game/GameFunc.java +++ b/src/lwjake2/game/GameFunc.java @@ -1,31 +1,27 @@ /* * 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 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. + * 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. - * + * 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 18.11.2003 by RST. -// $Id: GameFunc.java,v 1.9 2006/01/21 21:53:32 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.Globals; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameFunc { diff --git a/src/jake2/game/GameItemList.java b/src/lwjake2/game/GameItemList.java similarity index 96% rename from src/jake2/game/GameItemList.java rename to src/lwjake2/game/GameItemList.java index 30f0ad2..df4538e 100644 --- a/src/jake2/game/GameItemList.java +++ b/src/lwjake2/game/GameItemList.java @@ -1,31 +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 + * 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. + */ -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.2005 by RST. -// $Id: GameItemList.java,v 1.2 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - - -import jake2.Defines; +package lwjake2.game; +import lwjake2.Defines; public class GameItemList { diff --git a/src/jake2/game/GameItems.java b/src/lwjake2/game/GameItems.java similarity index 98% rename from src/jake2/game/GameItems.java rename to src/lwjake2/game/GameItems.java index d0d9fbf..45727f4 100644 --- a/src/jake2/game/GameItems.java +++ b/src/lwjake2/game/GameItems.java @@ -1,33 +1,28 @@ /* -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 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. + */ -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 16.11.2005 by RST. -// $Id: GameItems.java,v 1.4 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; import java.util.StringTokenizer; diff --git a/src/jake2/game/GameMisc.java b/src/lwjake2/game/GameMisc.java similarity index 98% rename from src/jake2/game/GameMisc.java rename to src/lwjake2/game/GameMisc.java index e18d2ce..465b713 100644 --- a/src/jake2/game/GameMisc.java +++ b/src/lwjake2/game/GameMisc.java @@ -1,35 +1,31 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. -// $Id: GameMisc.java,v 1.7 2006/01/21 21:53:32 salomo Exp $ -package jake2.game; +package lwjake2.game; + +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.M; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; import java.util.Calendar; -import jake2.Defines; -import jake2.Globals; -import jake2.client.M; -import jake2.util.Lib; -import jake2.util.Math3D; - public class GameMisc { public static void SP_path_corner(edict_t self) { if (self.targetname == null) { @@ -1818,8 +1814,7 @@ public class GameMisc { if (other.client == null) return; - - EdictIterator es = null; + dest = GameBase.G_Find(null, GameBase.findByTarget, self.target).o; if (dest == null) { diff --git a/src/jake2/game/GameSVCmds.java b/src/lwjake2/game/GameSVCmds.java similarity index 92% rename from src/jake2/game/GameSVCmds.java rename to src/lwjake2/game/GameSVCmds.java index 6416df5..c1d56ed 100644 --- a/src/jake2/game/GameSVCmds.java +++ b/src/lwjake2/game/GameSVCmds.java @@ -1,30 +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 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. + * 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. - * + * 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 01.02.2004 by RST. -// $Id: GameSVCmds.java,v 1.4 2006/01/21 21:53:32 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.qcommon.Com; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; import java.io.IOException; import java.io.RandomAccessFile; diff --git a/src/jake2/game/GameSave.java b/src/lwjake2/game/GameSave.java similarity index 93% rename from src/jake2/game/GameSave.java rename to src/lwjake2/game/GameSave.java index 3fce39e..ebd9cba 100644 --- a/src/jake2/game/GameSave.java +++ b/src/lwjake2/game/GameSave.java @@ -1,32 +1,28 @@ /* * 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 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. + * 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. - * + * 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 29.12.2003 by RST. -// $Id: GameSave.java,v 1.11 2006/01/21 21:53:32 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.Globals; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.QuakeFile; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.QuakeFile; public class GameSave { @@ -34,7 +30,6 @@ public class GameSave { GameBase.g_edicts = new edict_t[GameBase.game.maxentities]; for (int i = 0; i < GameBase.game.maxentities; i++) GameBase.g_edicts[i] = new edict_t(i); - GameBase.g_edicts = GameBase.g_edicts; } public static void CreateClients() { diff --git a/src/jake2/game/GameSpawn.java b/src/lwjake2/game/GameSpawn.java similarity index 97% rename from src/jake2/game/GameSpawn.java rename to src/lwjake2/game/GameSpawn.java index f72f1b2..11019dd 100644 --- a/src/jake2/game/GameSpawn.java +++ b/src/lwjake2/game/GameSpawn.java @@ -1,34 +1,47 @@ /* * 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 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. + * 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. - * + * 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 18.11.2003 by RST. +package lwjake2.game; -// $Id: GameSpawn.java,v 1.17 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.Globals; -import jake2.game.monsters.*; -import jake2.qcommon.Com; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.game.monsters.M_Actor; +import lwjake2.game.monsters.M_Berserk; +import lwjake2.game.monsters.M_Boss2; +import lwjake2.game.monsters.M_Boss3; +import lwjake2.game.monsters.M_Boss31; +import lwjake2.game.monsters.M_Brain; +import lwjake2.game.monsters.M_Chick; +import lwjake2.game.monsters.M_Flipper; +import lwjake2.game.monsters.M_Float; +import lwjake2.game.monsters.M_Flyer; +import lwjake2.game.monsters.M_Gladiator; +import lwjake2.game.monsters.M_Gunner; +import lwjake2.game.monsters.M_Hover; +import lwjake2.game.monsters.M_Infantry; +import lwjake2.game.monsters.M_Insane; +import lwjake2.game.monsters.M_Medic; +import lwjake2.game.monsters.M_Mutant; +import lwjake2.game.monsters.M_Parasite; +import lwjake2.game.monsters.M_Soldier; +import lwjake2.game.monsters.M_Supertank; +import lwjake2.game.monsters.M_Tank; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; public class GameSpawn { @@ -412,9 +425,6 @@ public class GameSpawn { static void G_FindTeams() { edict_t e, e2, chain; int i, j; - int c, c2; - c = 0; - c2 = 0; for (i = 1; i < GameBase.num_edicts; i++) { e = GameBase.g_edicts[i]; @@ -426,8 +436,6 @@ public class GameSpawn { continue; chain = e; e.teammaster = e; - c++; - c2++; for (j = i + 1; j < GameBase.num_edicts; j++) { e2 = GameBase.g_edicts[j]; @@ -438,7 +446,6 @@ public class GameSpawn { if ((e2.flags & Defines.FL_TEAMSLAVE) != 0) continue; if (0 == Lib.strcmp(e.team, e2.team)) { - c2++; chain.teamchain = e2; e2.teammaster = e; chain = e2; diff --git a/src/jake2/game/GameTarget.java b/src/lwjake2/game/GameTarget.java similarity index 97% rename from src/jake2/game/GameTarget.java rename to src/lwjake2/game/GameTarget.java index f5c375a..a07bebc 100644 --- a/src/jake2/game/GameTarget.java +++ b/src/lwjake2/game/GameTarget.java @@ -1,31 +1,27 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. -// $Id: GameTarget.java,v 1.8 2006/01/21 21:53:31 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.Globals; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameTarget { @@ -514,6 +510,8 @@ public class GameTarget { public static EntUseAdapter use_target_blaster = new EntUseAdapter() { public String getID() { return "use_target_blaster"; } public void use(edict_t self, edict_t other, edict_t activator) { + + /* Wait what - flibit int effect; if ((self.spawnflags & 2) != 0) @@ -522,6 +520,7 @@ public class GameTarget { effect = Defines.EF_HYPERBLASTER; else effect = Defines.EF_BLASTER; + */ GameWeapon.fire_blaster(self, self.s.origin, self.movedir, self.dmg, (int) self.speed, Defines.EF_BLASTER, diff --git a/src/jake2/game/GameTrigger.java b/src/lwjake2/game/GameTrigger.java similarity index 96% rename from src/jake2/game/GameTrigger.java rename to src/lwjake2/game/GameTrigger.java index 0b873f6..5376762 100644 --- a/src/jake2/game/GameTrigger.java +++ b/src/lwjake2/game/GameTrigger.java @@ -1,36 +1,27 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. +package lwjake2.game; -// $Id: GameTrigger.java,v 1.8 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - -import jake2.*; -import jake2.client.*; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameTrigger { diff --git a/src/jake2/game/GameTurret.java b/src/lwjake2/game/GameTurret.java similarity index 95% rename from src/jake2/game/GameTurret.java rename to src/lwjake2/game/GameTurret.java index 47f304f..19754d6 100644 --- a/src/jake2/game/GameTurret.java +++ b/src/lwjake2/game/GameTurret.java @@ -1,35 +1,28 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. -// $Id: GameTurret.java,v 1.7 2006/01/21 21:53:32 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.*; -import jake2.client.*; -import jake2.game.monsters.M_Infantry; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.monsters.M_Infantry; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameTurret { diff --git a/src/jake2/game/GameUtil.java b/src/lwjake2/game/GameUtil.java similarity index 96% rename from src/jake2/game/GameUtil.java rename to src/lwjake2/game/GameUtil.java index b883bd4..242f2cb 100644 --- a/src/jake2/game/GameUtil.java +++ b/src/lwjake2/game/GameUtil.java @@ -1,35 +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 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. + * 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. - * + * 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 01.11.2003 by RST. +package lwjake2.game; -// $Id: GameUtil.java,v 1.15 2005/12/27 21:02:31 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.Globals; -import jake2.client.M; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.M; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameUtil { diff --git a/src/jake2/game/GameWeapon.java b/src/lwjake2/game/GameWeapon.java similarity index 97% rename from src/jake2/game/GameWeapon.java rename to src/lwjake2/game/GameWeapon.java index acdc1da..b65af81 100644 --- a/src/jake2/game/GameWeapon.java +++ b/src/lwjake2/game/GameWeapon.java @@ -1,38 +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 + * 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. + */ -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 on 12.11.2003 by RST. -// $Id: GameWeapon.java,v 1.6 2005/11/20 22:18:33 salomo Exp $ - -package jake2.game; - - -import jake2.*; -import jake2.client.*; -import jake2.game.*; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Lib; -import jake2.util.Math3D; +package lwjake2.game; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class GameWeapon { diff --git a/src/jake2/game/Info.java b/src/lwjake2/game/Info.java similarity index 86% rename from src/jake2/game/Info.java rename to src/lwjake2/game/Info.java index 3f5f645..3de39d3 100644 --- a/src/jake2/game/Info.java +++ b/src/lwjake2/game/Info.java @@ -1,31 +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 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. + * 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. - * + * 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.12.2003 by RST. +package lwjake2.game; -// $Id: Info.java,v 1.7 2006/01/10 13:09:18 hzi Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.qcommon.Com; +import lwjake2.Defines; +import lwjake2.qcommon.Com; import java.util.StringTokenizer; diff --git a/src/lwjake2/game/ItemDropAdapter.java b/src/lwjake2/game/ItemDropAdapter.java new file mode 100644 index 0000000..24a30bb --- /dev/null +++ b/src/lwjake2/game/ItemDropAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class ItemDropAdapter extends SuperAdapter { + public void drop(edict_t ent, gitem_t item) { + } +} diff --git a/src/lwjake2/game/ItemUseAdapter.java b/src/lwjake2/game/ItemUseAdapter.java new file mode 100644 index 0000000..15e5f8f --- /dev/null +++ b/src/lwjake2/game/ItemUseAdapter.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public abstract class ItemUseAdapter extends SuperAdapter { + public void use(edict_t ent, gitem_t item) { + } +} \ No newline at end of file diff --git a/src/jake2/game/Monster.java b/src/lwjake2/game/Monster.java similarity index 94% rename from src/jake2/game/Monster.java rename to src/lwjake2/game/Monster.java index 0588cc2..426c458 100644 --- a/src/jake2/game/Monster.java +++ b/src/lwjake2/game/Monster.java @@ -1,34 +1,28 @@ /* * 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 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. + * 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. - * + * 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 17.12.2003 by RST. -// $Id: Monster.java,v 1.7 2005/11/20 22:18:33 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.client.M; -import jake2.qcommon.CM; -import jake2.qcommon.Com; -import jake2.util.*; - -import java.util.*; +import lwjake2.Defines; +import lwjake2.client.M; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class Monster { diff --git a/src/jake2/game/PlayerClient.java b/src/lwjake2/game/PlayerClient.java similarity index 98% rename from src/jake2/game/PlayerClient.java rename to src/lwjake2/game/PlayerClient.java index f77f344..87321e1 100644 --- a/src/jake2/game/PlayerClient.java +++ b/src/lwjake2/game/PlayerClient.java @@ -1,34 +1,27 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. +package lwjake2.game; -// $Id: PlayerClient.java,v 1.12 2005/12/27 21:02:30 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.game.monsters.M_Player; -import jake2.game.pmove_t.TraceAdapter; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.monsters.M_Player; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class PlayerClient { diff --git a/src/jake2/game/PlayerHud.java b/src/lwjake2/game/PlayerHud.java similarity index 95% rename from src/jake2/game/PlayerHud.java rename to src/lwjake2/game/PlayerHud.java index 7cab8d8..11daa48 100644 --- a/src/jake2/game/PlayerHud.java +++ b/src/lwjake2/game/PlayerHud.java @@ -1,36 +1,28 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. -// $Id: PlayerHud.java,v 1.9 2005/11/20 22:18:33 salomo Exp $ +package lwjake2.game; -package jake2.game; - -import jake2.*; -import jake2.client.*; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Lib; -import jake2.util.Math3D; -import jake2.util.Vargs; +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; +import lwjake2.util.Vargs; public class PlayerHud { @@ -172,12 +164,10 @@ public class PlayerHud { public static void DeathmatchScoreboardMessage(edict_t ent, edict_t killer) { StringBuffer string = new StringBuffer(1400); - int stringlength; int i, j, k; int sorted[] = new int[Defines.MAX_CLIENTS]; int sortedscores[] = new int[Defines.MAX_CLIENTS]; int score, total; - int picnum; int x, y; gclient_t cl; edict_t cl_ent; @@ -213,7 +203,7 @@ public class PlayerHud { cl = GameBase.game.clients[sorted[i]]; cl_ent = GameBase.g_edicts[1 + sorted[i]]; - picnum = GameBase.gi.imageindex("i_fixme"); + GameBase.gi.imageindex("i_fixme"); x = (i >= 6) ? 160 : 0; y = 32 + 32 * (i % 6); diff --git a/src/jake2/game/PlayerTrail.java b/src/lwjake2/game/PlayerTrail.java similarity index 85% rename from src/jake2/game/PlayerTrail.java rename to src/lwjake2/game/PlayerTrail.java index a884a97..5f0ae17 100644 --- a/src/jake2/game/PlayerTrail.java +++ b/src/lwjake2/game/PlayerTrail.java @@ -1,28 +1,24 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: PlayerTrail.java,v 1.2 2004/09/22 19:22:04 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.util.Math3D; +import lwjake2.util.Math3D; public class PlayerTrail { diff --git a/src/jake2/game/PlayerView.java b/src/lwjake2/game/PlayerView.java similarity index 98% rename from src/jake2/game/PlayerView.java rename to src/lwjake2/game/PlayerView.java index 5886820..51bf224 100644 --- a/src/jake2/game/PlayerView.java +++ b/src/lwjake2/game/PlayerView.java @@ -1,32 +1,28 @@ /* * 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 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. + * 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. - * + * 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.12.2003 by RST. -// $Id: PlayerView.java,v 1.5 2005/12/27 21:02:30 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.Globals; -import jake2.game.monsters.M_Player; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.monsters.M_Player; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class PlayerView { diff --git a/src/jake2/game/PlayerWeapon.java b/src/lwjake2/game/PlayerWeapon.java similarity index 98% rename from src/jake2/game/PlayerWeapon.java rename to src/lwjake2/game/PlayerWeapon.java index 85b5068..325137f 100644 --- a/src/jake2/game/PlayerWeapon.java +++ b/src/lwjake2/game/PlayerWeapon.java @@ -1,35 +1,28 @@ /* * 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 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. + * 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. - * + * 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 16.11.2003 by RST. +package lwjake2.game; -// $Id: PlayerWeapon.java,v 1.2 2005/11/20 22:18:33 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.Globals; -import jake2.game.monsters.M_Player; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.monsters.M_Player; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class PlayerWeapon { diff --git a/src/lwjake2/game/SuperAdapter.java b/src/lwjake2/game/SuperAdapter.java new file mode 100644 index 0000000..7e781ac --- /dev/null +++ b/src/lwjake2/game/SuperAdapter.java @@ -0,0 +1,54 @@ +/* + * 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.game; + +import lwjake2.qcommon.Com; + +import java.util.Hashtable; + +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(); +} diff --git a/src/jake2/game/client_persistant_t.java b/src/lwjake2/game/client_persistant_t.java similarity index 76% rename from src/jake2/game/client_persistant_t.java rename to src/lwjake2/game/client_persistant_t.java index 1d79ddb..a7a7f17 100644 --- a/src/jake2/game/client_persistant_t.java +++ b/src/lwjake2/game/client_persistant_t.java @@ -1,35 +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 + * 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. + */ -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. +package lwjake2.game; -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: client_persistant_t.java,v 1.7 2005/02/06 18:52:55 salomo Exp $ - -package jake2.game; - -import jake2.Defines; -import jake2.util.Lib; -import jake2.util.QuakeFile; +import lwjake2.Defines; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; public class client_persistant_t { diff --git a/src/jake2/game/client_respawn_t.java b/src/lwjake2/game/client_respawn_t.java similarity index 59% rename from src/jake2/game/client_respawn_t.java rename to src/lwjake2/game/client_respawn_t.java index 023e235..49b86f9 100644 --- a/src/jake2/game/client_respawn_t.java +++ b/src/lwjake2/game/client_respawn_t.java @@ -1,39 +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 + * 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. + */ -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. +package lwjake2.game; -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: client_respawn_t.java,v 1.6 2004/09/10 19:02:54 salomo Exp $ - -package jake2.game; - -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; -import jake2.util.QuakeFile; +import lwjake2.util.Math3D; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; -/** Client data that stays across deathmatch respawns.*/ +/** Client data that stays across deathmatch respawns. */ public class client_respawn_t - { /** What to set client->pers to on a respawn */ protected client_persistant_t coop_respawn = new client_persistant_t(); diff --git a/src/lwjake2/game/cmdalias_t.java b/src/lwjake2/game/cmdalias_t.java new file mode 100644 index 0000000..7898cd2 --- /dev/null +++ b/src/lwjake2/game/cmdalias_t.java @@ -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.game; + +public final class cmdalias_t +{ + public cmdalias_t next; + public String name = ""; + public String value; +} diff --git a/src/lwjake2/game/cmodel_t.java b/src/lwjake2/game/cmodel_t.java new file mode 100644 index 0000000..47e986e --- /dev/null +++ b/src/lwjake2/game/cmodel_t.java @@ -0,0 +1,27 @@ +/* + * 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.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; +} diff --git a/src/lwjake2/game/cplane_t.java b/src/lwjake2/game/cplane_t.java new file mode 100644 index 0000000..ed04370 --- /dev/null +++ b/src/lwjake2/game/cplane_t.java @@ -0,0 +1,50 @@ +/* + * 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.game; + +import lwjake2.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; + } +} diff --git a/src/lwjake2/game/csurface_t.java b/src/lwjake2/game/csurface_t.java new file mode 100644 index 0000000..c4027f8 --- /dev/null +++ b/src/lwjake2/game/csurface_t.java @@ -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.game; + +public class csurface_t +{ + public String name = ""; + public int flags; + public int value; +} diff --git a/src/lwjake2/game/cvar_t.java b/src/lwjake2/game/cvar_t.java new file mode 100644 index 0000000..1772313 --- /dev/null +++ b/src/lwjake2/game/cvar_t.java @@ -0,0 +1,33 @@ +/* + * 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.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; +} diff --git a/src/jake2/game/edict_t.java b/src/lwjake2/game/edict_t.java similarity index 96% rename from src/jake2/game/edict_t.java rename to src/lwjake2/game/edict_t.java index df17f75..377cf08 100644 --- a/src/jake2/game/edict_t.java +++ b/src/lwjake2/game/edict_t.java @@ -1,33 +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 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. + * 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. - * + * 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 04.11.2003 by RST. -// $Id: edict_t.java,v 1.7 2005/02/19 21:17:44 salomo Exp $ -package jake2.game; +package lwjake2.game; + +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; - -import jake2.*; -import jake2.qcommon.Com; -import jake2.util.*; public class edict_t { diff --git a/src/jake2/game/entity_state_t.java b/src/lwjake2/game/entity_state_t.java similarity index 78% rename from src/jake2/game/entity_state_t.java rename to src/lwjake2/game/entity_state_t.java index 4892ff8..99c0358 100644 --- a/src/jake2/game/entity_state_t.java +++ b/src/lwjake2/game/entity_state_t.java @@ -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 + * 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. + */ -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: entity_state_t.java,v 1.5 2005/06/05 15:21:47 salomo Exp $ - -package jake2.game; +package lwjake2.game; import java.io.IOException; -import java.io.RandomAccessFile; -import jake2.util.Math3D; -import jake2.util.QuakeFile; +import lwjake2.util.Math3D; +import lwjake2.util.QuakeFile; public class entity_state_t implements Cloneable { diff --git a/src/jake2/game/game_import_t.java b/src/lwjake2/game/game_import_t.java similarity index 87% rename from src/jake2/game/game_import_t.java rename to src/lwjake2/game/game_import_t.java index ea943eb..d226f5a 100644 --- a/src/jake2/game/game_import_t.java +++ b/src/lwjake2/game/game_import_t.java @@ -1,30 +1,33 @@ /* * 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 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. + * 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. - * + * 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: game_import_t.java,v 1.7 2006/01/21 21:53:31 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.qcommon.*; -import jake2.server.*; +import lwjake2.Defines; +import lwjake2.qcommon.CM; +import lwjake2.qcommon.Cbuf; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.PMove; +import lwjake2.server.SV_GAME; +import lwjake2.server.SV_INIT; +import lwjake2.server.SV_SEND; +import lwjake2.server.SV_WORLD; // // collection of functions provided by the main engine diff --git a/src/jake2/game/game_locals_t.java b/src/lwjake2/game/game_locals_t.java similarity index 75% rename from src/jake2/game/game_locals_t.java rename to src/lwjake2/game/game_locals_t.java index cc4efc5..33c9a14 100644 --- a/src/jake2/game/game_locals_t.java +++ b/src/lwjake2/game/game_locals_t.java @@ -1,35 +1,28 @@ /* * 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 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. + * 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. - * + * 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: game_locals_t.java,v 1.7 2004/09/22 19:22:06 salomo Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.QuakeFile; +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; import java.util.Date; public class game_locals_t { @@ -68,7 +61,7 @@ public class game_locals_t { /** Reads the game locals from a file. */ public void load(QuakeFile f) throws IOException { - String date = f.readString(); + f.readString(); // Reads date? helpmessage1 = f.readString(); helpmessage2 = f.readString(); diff --git a/src/jake2/game/gclient_t.java b/src/lwjake2/game/gclient_t.java similarity index 90% rename from src/jake2/game/gclient_t.java rename to src/lwjake2/game/gclient_t.java index 70037f8..71e11ad 100644 --- a/src/jake2/game/gclient_t.java +++ b/src/lwjake2/game/gclient_t.java @@ -1,36 +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 + * 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. + */ -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. +package lwjake2.game; -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. +import lwjake2.util.QuakeFile; -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: gclient_t.java,v 1.7 2006/01/21 21:53:32 salomo Exp $ - -package jake2.game; - -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.QuakeFile; - -import java.awt.event.ItemListener; import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteBuffer; public class gclient_t { diff --git a/src/lwjake2/game/gitem_armor_t.java b/src/lwjake2/game/gitem_armor_t.java new file mode 100644 index 0000000..407b2bd --- /dev/null +++ b/src/lwjake2/game/gitem_armor_t.java @@ -0,0 +1,41 @@ +/* + * 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.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; +} diff --git a/src/jake2/game/gitem_t.java b/src/lwjake2/game/gitem_t.java similarity index 80% rename from src/jake2/game/gitem_t.java rename to src/lwjake2/game/gitem_t.java index 6fccde1..6b3da41 100644 --- a/src/jake2/game/gitem_t.java +++ b/src/lwjake2/game/gitem_t.java @@ -1,29 +1,22 @@ /* * 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 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. + * 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. - * + * 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: gitem_t.java,v 1.5 2005/02/06 19:08:00 salomo Exp $ -package jake2.game; - -import jake2.*; -import jake2.*; +package lwjake2.game; public class gitem_t { private static int id = 0; diff --git a/src/jake2/game/level_locals_t.java b/src/lwjake2/game/level_locals_t.java similarity index 77% rename from src/jake2/game/level_locals_t.java rename to src/lwjake2/game/level_locals_t.java index dc588c6..6bf11d2 100644 --- a/src/jake2/game/level_locals_t.java +++ b/src/lwjake2/game/level_locals_t.java @@ -1,33 +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 + * 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. + */ -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. +package lwjake2.game; -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: level_locals_t.java,v 1.2 2004/08/20 21:29:57 salomo Exp $ - -package jake2.game; - -import jake2.util.Lib; -import jake2.util.QuakeFile; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; public class level_locals_t { @@ -76,7 +69,7 @@ public class level_locals_t public int power_cubes; // ugly necessity for coop - /** Writes the levellocales to the file.*/ + /** Writes the levellocales to the file. */ public void write(QuakeFile f) throws IOException { f.writeInt(framenum); diff --git a/src/lwjake2/game/link_t.java b/src/lwjake2/game/link_t.java new file mode 100644 index 0000000..f16cc9a --- /dev/null +++ b/src/lwjake2/game/link_t.java @@ -0,0 +1,27 @@ +/* + * 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.game; + +public class link_t { + public link_t(Object o) { + this.o = o; + } + public link_t prev, next; + public Object o; +} diff --git a/src/lwjake2/game/mapsurface_t.java b/src/lwjake2/game/mapsurface_t.java new file mode 100644 index 0000000..4095d80 --- /dev/null +++ b/src/lwjake2/game/mapsurface_t.java @@ -0,0 +1,24 @@ +/* + * 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.game; + +public class mapsurface_t { + public csurface_t c = new csurface_t(); + public String rname; +} diff --git a/src/lwjake2/game/mframe_t.java b/src/lwjake2/game/mframe_t.java new file mode 100644 index 0000000..7cb52b1 --- /dev/null +++ b/src/lwjake2/game/mframe_t.java @@ -0,0 +1,55 @@ +/* + * 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.game; + +import lwjake2.util.QuakeFile; + +import java.io.IOException; + +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(); + } +} diff --git a/src/jake2/game/mmove_t.java b/src/lwjake2/game/mmove_t.java similarity index 54% rename from src/jake2/game/mmove_t.java rename to src/lwjake2/game/mmove_t.java index 03f6c0b..2e5b244 100644 --- a/src/jake2/game/mmove_t.java +++ b/src/lwjake2/game/mmove_t.java @@ -1,33 +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 + * 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. + */ -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. +package lwjake2.game; -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: mmove_t.java,v 1.2 2004/08/20 21:29:57 salomo Exp $ - -package jake2.game; - -import jake2.util.Lib; -import jake2.util.QuakeFile; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; public class mmove_t { public mmove_t(int firstframe, int lastframe, mframe_t frame[], EntThinkAdapter endfunc) { diff --git a/src/jake2/game/monsterinfo_t.java b/src/lwjake2/game/monsterinfo_t.java similarity index 73% rename from src/jake2/game/monsterinfo_t.java rename to src/lwjake2/game/monsterinfo_t.java index 66b282f..8a18f68 100644 --- a/src/jake2/game/monsterinfo_t.java +++ b/src/lwjake2/game/monsterinfo_t.java @@ -1,32 +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 + * 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. + */ -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. +package lwjake2.game; -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: monsterinfo_t.java,v 1.2 2004/08/20 21:29:58 salomo Exp $ - -package jake2.game; - -import jake2.util.QuakeFile; +import lwjake2.util.QuakeFile; import java.io.IOException; -import java.io.RandomAccessFile; public class monsterinfo_t { @@ -65,7 +59,7 @@ public class monsterinfo_t { public int power_armor_type; public int power_armor_power; - /** Writes the monsterinfo to the file.*/ + /** Writes the monsterinfo to the file. */ public void write(QuakeFile f) throws IOException { f.writeBoolean(currentmove != null); @@ -109,7 +103,7 @@ public class monsterinfo_t { f.writeInt(power_armor_type); } - /** Writes the monsterinfo to the file.*/ + /** Writes the monsterinfo to the file. */ public void read(QuakeFile f) throws IOException { if (f.readBoolean()) diff --git a/src/jake2/game/monsters/M_Actor.java b/src/lwjake2/game/monsters/M_Actor.java similarity index 97% rename from src/jake2/game/monsters/M_Actor.java rename to src/lwjake2/game/monsters/M_Actor.java index f19a947..4e11467 100644 --- a/src/jake2/game/monsters/M_Actor.java +++ b/src/lwjake2/game/monsters/M_Actor.java @@ -1,45 +1,41 @@ /* * 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 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. + * 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. - * + * 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: M_Actor.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.EntTouchAdapter; -import jake2.game.EntUseAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.cplane_t; -import jake2.game.csurface_t; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.EntTouchAdapter; +import lwjake2.game.EntUseAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.cplane_t; +import lwjake2.game.csurface_t; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Actor { // This file generated by ModelGen - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Berserk.java b/src/lwjake2/game/monsters/M_Berserk.java similarity index 97% rename from src/jake2/game/monsters/M_Berserk.java rename to src/lwjake2/game/monsters/M_Berserk.java index b0ce15a..b1dd43d 100644 --- a/src/jake2/game/monsters/M_Berserk.java +++ b/src/lwjake2/game/monsters/M_Berserk.java @@ -1,33 +1,38 @@ /* * 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 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. + * 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. - * + * 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 +package lwjake2.game.monsters; -// $Id: M_Berserk.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ - -package jake2.game.monsters; - -import jake2.Defines; -import jake2.game.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Berserk { diff --git a/src/jake2/game/monsters/M_Boss2.java b/src/lwjake2/game/monsters/M_Boss2.java similarity index 97% rename from src/jake2/game/monsters/M_Boss2.java rename to src/lwjake2/game/monsters/M_Boss2.java index dcdbd33..846d44c 100644 --- a/src/jake2/game/monsters/M_Boss2.java +++ b/src/lwjake2/game/monsters/M_Boss2.java @@ -1,41 +1,37 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Boss2.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.EntDieAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.game.trace_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Boss2 { @@ -547,7 +543,6 @@ public class M_Boss2 { float[] temp = { 0, 0, 0 }; float chance; trace_t tr; - boolean enemy_infront; int enemy_range; float enemy_yaw; @@ -568,7 +563,6 @@ public class M_Boss2 { return false; } - enemy_infront = GameUtil.infront(self, self.enemy); enemy_range = GameUtil.range(self, self.enemy); Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, temp); enemy_yaw = Math3D.vectoyaw(temp); diff --git a/src/jake2/game/monsters/M_Boss3.java b/src/lwjake2/game/monsters/M_Boss3.java similarity index 73% rename from src/jake2/game/monsters/M_Boss3.java rename to src/lwjake2/game/monsters/M_Boss3.java index 684c021..4a1d580 100644 --- a/src/jake2/game/monsters/M_Boss3.java +++ b/src/lwjake2/game/monsters/M_Boss3.java @@ -1,34 +1,30 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Boss3.java,v 1.3 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.EntThinkAdapter; -import jake2.game.EntUseAdapter; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.edict_t; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.EntUseAdapter; +import lwjake2.game.GameBase; +import lwjake2.game.GameUtil; +import lwjake2.game.edict_t; +import lwjake2.util.Math3D; public class M_Boss3 { diff --git a/src/jake2/game/monsters/M_Boss31.java b/src/lwjake2/game/monsters/M_Boss31.java similarity index 97% rename from src/jake2/game/monsters/M_Boss31.java rename to src/lwjake2/game/monsters/M_Boss31.java index de67225..dd9ff89 100644 --- a/src/jake2/game/monsters/M_Boss31.java +++ b/src/lwjake2/game/monsters/M_Boss31.java @@ -1,41 +1,37 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Boss31.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.EntDieAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.game.trace_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Boss31 { @@ -708,10 +704,8 @@ public class M_Boss31 { public String getID() { return "jorg_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; - float range = 0; Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, vec); - range = Math3D.VectorLength(vec); if (Lib.random() <= 0.75) { GameBase.gi.sound(self, Defines.CHAN_VOICE, sound_attack1, 1, @@ -773,7 +767,6 @@ public class M_Boss31 { float[] temp = { 0, 0, 0 }; float chance; trace_t tr; - boolean enemy_infront; int enemy_range; float enemy_yaw; @@ -794,7 +787,6 @@ public class M_Boss31 { return false; } - enemy_infront = GameUtil.infront(self, self.enemy); enemy_range = GameUtil.range(self, self.enemy); Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, temp); enemy_yaw = Math3D.vectoyaw(temp); diff --git a/src/jake2/game/monsters/M_Boss32.java b/src/lwjake2/game/monsters/M_Boss32.java similarity index 98% rename from src/jake2/game/monsters/M_Boss32.java rename to src/lwjake2/game/monsters/M_Boss32.java index 16bf143..f446b7c 100644 --- a/src/jake2/game/monsters/M_Boss32.java +++ b/src/lwjake2/game/monsters/M_Boss32.java @@ -1,44 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Boss32.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.Globals; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.game.trace_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Boss32 { @@ -1647,13 +1643,11 @@ public class M_Boss32 { public String getID() { return "makron_attack"; } public boolean think(edict_t self) { float[] vec = { 0, 0, 0 }; - float range; float r; r = Lib.random(); Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, vec); - range = Math3D.VectorLength(vec); if (r <= 0.3) self.monsterinfo.currentmove = makron_move_attack3; @@ -1756,7 +1750,6 @@ public class M_Boss32 { float[] temp = { 0, 0, 0 }; float chance; trace_t tr; - boolean enemy_infront; int enemy_range; float enemy_yaw; @@ -1776,8 +1769,7 @@ public class M_Boss32 { if (tr.ent != self.enemy) return false; } - - enemy_infront = GameUtil.infront(self, self.enemy); + enemy_range = GameUtil.range(self, self.enemy); Math3D.VectorSubtract(self.enemy.s.origin, self.s.origin, temp); enemy_yaw = Math3D.vectoyaw(temp); diff --git a/src/jake2/game/monsters/M_Brain.java b/src/lwjake2/game/monsters/M_Brain.java similarity index 97% rename from src/jake2/game/monsters/M_Brain.java rename to src/lwjake2/game/monsters/M_Brain.java index 6956ef8..9d35942 100644 --- a/src/jake2/game/monsters/M_Brain.java +++ b/src/lwjake2/game/monsters/M_Brain.java @@ -1,33 +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 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. + * 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. - * + * 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.11.2003 by RST. +package lwjake2.game.monsters; -// $Id: M_Brain.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ - -package jake2.game.monsters; - -import jake2.Defines; -import jake2.game.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Brain { diff --git a/src/jake2/game/monsters/M_Chick.java b/src/lwjake2/game/monsters/M_Chick.java similarity index 97% rename from src/jake2/game/monsters/M_Chick.java rename to src/lwjake2/game/monsters/M_Chick.java index 14920e6..5bee755 100644 --- a/src/jake2/game/monsters/M_Chick.java +++ b/src/lwjake2/game/monsters/M_Chick.java @@ -1,33 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. +package lwjake2.game.monsters; -// $Id: M_Chick.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ - -package jake2.game.monsters; - -import jake2.Defines; -import jake2.game.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Chick { diff --git a/src/jake2/game/monsters/M_Flash.java b/src/lwjake2/game/monsters/M_Flash.java similarity index 96% rename from src/jake2/game/monsters/M_Flash.java rename to src/lwjake2/game/monsters/M_Flash.java index 7c7a8f5..4f7327e 100644 --- a/src/jake2/game/monsters/M_Flash.java +++ b/src/lwjake2/game/monsters/M_Flash.java @@ -1,26 +1,22 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Flash.java,v 1.2 2005/02/06 18:48:32 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; public class M_Flash { diff --git a/src/jake2/game/monsters/M_Flipper.java b/src/lwjake2/game/monsters/M_Flipper.java similarity index 96% rename from src/jake2/game/monsters/M_Flipper.java rename to src/lwjake2/game/monsters/M_Flipper.java index 84a7636..ebb3eff 100644 --- a/src/jake2/game/monsters/M_Flipper.java +++ b/src/lwjake2/game/monsters/M_Flipper.java @@ -1,41 +1,38 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Flipper.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Flipper { diff --git a/src/jake2/game/monsters/M_Float.java b/src/lwjake2/game/monsters/M_Float.java similarity index 97% rename from src/jake2/game/monsters/M_Float.java rename to src/lwjake2/game/monsters/M_Float.java index 62af707..180b4bd 100644 --- a/src/jake2/game/monsters/M_Float.java +++ b/src/lwjake2/game/monsters/M_Float.java @@ -1,43 +1,42 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Float.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.Globals; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameCombat; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Float { diff --git a/src/jake2/game/monsters/M_Flyer.java b/src/lwjake2/game/monsters/M_Flyer.java similarity index 97% rename from src/jake2/game/monsters/M_Flyer.java rename to src/lwjake2/game/monsters/M_Flyer.java index da1e562..f6f23a6 100644 --- a/src/jake2/game/monsters/M_Flyer.java +++ b/src/lwjake2/game/monsters/M_Flyer.java @@ -1,42 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Flyer.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Flyer { // This file generated by ModelGen - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Gladiator.java b/src/lwjake2/game/monsters/M_Gladiator.java similarity index 95% rename from src/jake2/game/monsters/M_Gladiator.java rename to src/lwjake2/game/monsters/M_Gladiator.java index 1211c48..4258eaf 100644 --- a/src/jake2/game/monsters/M_Gladiator.java +++ b/src/lwjake2/game/monsters/M_Gladiator.java @@ -1,42 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Gladiator.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Gladiator { diff --git a/src/jake2/game/monsters/M_Gunner.java b/src/lwjake2/game/monsters/M_Gunner.java similarity index 97% rename from src/jake2/game/monsters/M_Gunner.java rename to src/lwjake2/game/monsters/M_Gunner.java index 8479b52..61b3a62 100644 --- a/src/jake2/game/monsters/M_Gunner.java +++ b/src/lwjake2/game/monsters/M_Gunner.java @@ -1,43 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Gunner.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntDodgeAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Gunner { // This file generated by ModelGen - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Hover.java b/src/lwjake2/game/monsters/M_Hover.java similarity index 97% rename from src/jake2/game/monsters/M_Hover.java rename to src/lwjake2/game/monsters/M_Hover.java index 530ff01..b7ea2b6 100644 --- a/src/jake2/game/monsters/M_Hover.java +++ b/src/lwjake2/game/monsters/M_Hover.java @@ -1,42 +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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Hover.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Hover { diff --git a/src/jake2/game/monsters/M_Infantry.java b/src/lwjake2/game/monsters/M_Infantry.java similarity index 97% rename from src/jake2/game/monsters/M_Infantry.java rename to src/lwjake2/game/monsters/M_Infantry.java index 08fdd5b..368c181 100644 --- a/src/jake2/game/monsters/M_Infantry.java +++ b/src/lwjake2/game/monsters/M_Infantry.java @@ -1,44 +1,42 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Infantry.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.client.M; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntDodgeAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.client.M; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Infantry { diff --git a/src/jake2/game/monsters/M_Insane.java b/src/lwjake2/game/monsters/M_Insane.java similarity index 97% rename from src/jake2/game/monsters/M_Insane.java rename to src/lwjake2/game/monsters/M_Insane.java index c0f195e..be339e3 100644 --- a/src/jake2/game/monsters/M_Insane.java +++ b/src/lwjake2/game/monsters/M_Insane.java @@ -1,40 +1,36 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Insane.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Insane { // This file generated by ModelGen - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Medic.java b/src/lwjake2/game/monsters/M_Medic.java similarity index 97% rename from src/jake2/game/monsters/M_Medic.java rename to src/lwjake2/game/monsters/M_Medic.java index 925ddcd..e16b6e2 100644 --- a/src/jake2/game/monsters/M_Medic.java +++ b/src/lwjake2/game/monsters/M_Medic.java @@ -1,31 +1,43 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Medic.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EdictIterator; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameSpawn; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Medic { // This file generated by ModelGen - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Mutant.java b/src/lwjake2/game/monsters/M_Mutant.java similarity index 96% rename from src/jake2/game/monsters/M_Mutant.java rename to src/lwjake2/game/monsters/M_Mutant.java index 81a6734..de0d3f0 100644 --- a/src/jake2/game/monsters/M_Mutant.java +++ b/src/lwjake2/game/monsters/M_Mutant.java @@ -1,32 +1,43 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Mutant.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.client.M; -import jake2.game.*; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.client.M; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.EntTouchAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameCombat; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.GameWeapon; +import lwjake2.game.cplane_t; +import lwjake2.game.csurface_t; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Mutant { diff --git a/src/jake2/game/monsters/M_Parasite.java b/src/lwjake2/game/monsters/M_Parasite.java similarity index 96% rename from src/jake2/game/monsters/M_Parasite.java rename to src/lwjake2/game/monsters/M_Parasite.java index d0f59b8..c8370a5 100644 --- a/src/jake2/game/monsters/M_Parasite.java +++ b/src/lwjake2/game/monsters/M_Parasite.java @@ -1,43 +1,40 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Parasite.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.Globals; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.game.trace_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameCombat; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.trace_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Parasite { diff --git a/src/jake2/game/monsters/M_Player.java b/src/lwjake2/game/monsters/M_Player.java similarity index 94% rename from src/jake2/game/monsters/M_Player.java rename to src/lwjake2/game/monsters/M_Player.java index ff09732..02c2c64 100644 --- a/src/jake2/game/monsters/M_Player.java +++ b/src/lwjake2/game/monsters/M_Player.java @@ -1,26 +1,22 @@ /* * 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 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. + * 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. - * + * 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: M_Player.java,v 1.2 2005/02/06 18:48:14 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; public class M_Player { // This file generated by qdata - Do NOT Modify diff --git a/src/jake2/game/monsters/M_Soldier.java b/src/lwjake2/game/monsters/M_Soldier.java similarity index 98% rename from src/jake2/game/monsters/M_Soldier.java rename to src/lwjake2/game/monsters/M_Soldier.java index 652ce9e..643411c 100644 --- a/src/jake2/game/monsters/M_Soldier.java +++ b/src/lwjake2/game/monsters/M_Soldier.java @@ -1,44 +1,41 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Soldier.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntDodgeAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntDodgeAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Soldier { @@ -1331,7 +1328,6 @@ public class M_Soldier { || self.monsterinfo.currentmove == soldier_move_walk2 || self.monsterinfo.currentmove == soldier_move_start_run) { self.monsterinfo.currentmove = soldier_move_run; - int a = 2; } else { self.monsterinfo.currentmove = soldier_move_start_run; } diff --git a/src/jake2/game/monsters/M_Supertank.java b/src/lwjake2/game/monsters/M_Supertank.java similarity index 97% rename from src/jake2/game/monsters/M_Supertank.java rename to src/lwjake2/game/monsters/M_Supertank.java index 8bb5759..ddb9ec5 100644 --- a/src/jake2/game/monsters/M_Supertank.java +++ b/src/lwjake2/game/monsters/M_Supertank.java @@ -1,41 +1,38 @@ /* * 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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Supertank.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Supertank { diff --git a/src/jake2/game/monsters/M_Tank.java b/src/lwjake2/game/monsters/M_Tank.java similarity index 98% rename from src/jake2/game/monsters/M_Tank.java rename to src/lwjake2/game/monsters/M_Tank.java index e004173..b2b4486 100644 --- a/src/jake2/game/monsters/M_Tank.java +++ b/src/lwjake2/game/monsters/M_Tank.java @@ -1,42 +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 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. + * 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. - * + * 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.11.2003 by RST. -// $Id: M_Tank.java,v 1.4 2005/11/20 22:18:33 salomo Exp $ -package jake2.game.monsters; +package lwjake2.game.monsters; -import jake2.Defines; -import jake2.game.*; -import jake2.game.EntDieAdapter; -import jake2.game.EntInteractAdapter; -import jake2.game.EntPainAdapter; -import jake2.game.EntThinkAdapter; -import jake2.game.GameAI; -import jake2.game.GameBase; -import jake2.game.GameUtil; -import jake2.game.Monster; -import jake2.game.edict_t; -import jake2.game.mframe_t; -import jake2.game.mmove_t; -import jake2.util.Lib; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.game.EntDieAdapter; +import lwjake2.game.EntInteractAdapter; +import lwjake2.game.EntPainAdapter; +import lwjake2.game.EntThinkAdapter; +import lwjake2.game.GameAI; +import lwjake2.game.GameBase; +import lwjake2.game.GameMisc; +import lwjake2.game.GameUtil; +import lwjake2.game.Monster; +import lwjake2.game.edict_t; +import lwjake2.game.mframe_t; +import lwjake2.game.mmove_t; +import lwjake2.game.monsters.M_Flash; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class M_Tank { // G:\quake2\baseq2\models/monsters/tank diff --git a/src/jake2/game/moveinfo_t.java b/src/lwjake2/game/moveinfo_t.java similarity index 66% rename from src/jake2/game/moveinfo_t.java rename to src/lwjake2/game/moveinfo_t.java index e42cbf0..80447a6 100644 --- a/src/jake2/game/moveinfo_t.java +++ b/src/lwjake2/game/moveinfo_t.java @@ -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 + * 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. + */ -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. +package lwjake2.game; -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: moveinfo_t.java,v 1.2 2004/08/20 21:29:58 salomo Exp $ - -package jake2.game; +import lwjake2.util.QuakeFile; import java.io.IOException; -import jake2.util.QuakeFile; - public class moveinfo_t { // fixed data float[] start_origin= { 0, 0, 0 }; @@ -56,7 +51,7 @@ public class moveinfo_t { float decel_distance; EntThinkAdapter endfunc; - /** saves the moveinfo to the file.*/ + /** saves the moveinfo to the file. */ public void write(QuakeFile f) throws IOException { f.writeVector(start_origin); f.writeVector(start_angles); diff --git a/src/jake2/game/player_state_t.java b/src/lwjake2/game/player_state_t.java similarity index 78% rename from src/jake2/game/player_state_t.java rename to src/lwjake2/game/player_state_t.java index 7ea66ef..679d1cd 100644 --- a/src/jake2/game/player_state_t.java +++ b/src/lwjake2/game/player_state_t.java @@ -1,37 +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 + * 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. + */ -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. +package lwjake2.game; -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: player_state_t.java,v 1.4 2004/08/20 21:29:58 salomo Exp $ - -package jake2.game; +import lwjake2.Defines; +import lwjake2.qcommon.Com; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; import java.io.IOException; import java.io.RandomAccessFile; -import java.nio.ByteBuffer; - -import jake2.*; -import jake2.*; -import jake2.qcommon.Com; -import jake2.util.Lib; -import jake2.util.Math3D; /** Player_state_t is the information needed in addition to pmove_state_t @@ -66,12 +59,12 @@ public class player_state_t { /** Lets cleverly reset the structure. */ private static player_state_t prototype= new player_state_t(); - /** Clears the player_state.*/ + /** Clears the player_state. */ public void clear() { this.set(prototype); } - /** Clones the object.*/ + /** Clones the object. */ public player_state_t getClone() { return new player_state_t().set(this); } @@ -102,7 +95,7 @@ public class player_state_t { return this; } - /** Reads a player_state from a file.*/ + /** Reads a player_state from a file. */ public void load(RandomAccessFile f) throws IOException { pmove.load(f); @@ -142,7 +135,7 @@ public class player_state_t { stats[n]= f.readShort(); } - /** Writes a player_state to a file.*/ + /** Writes a player_state to a file. */ public void write(RandomAccessFile f) throws IOException { pmove.write(f); diff --git a/src/jake2/game/pmove_state_t.java b/src/lwjake2/game/pmove_state_t.java similarity index 75% rename from src/jake2/game/pmove_state_t.java rename to src/lwjake2/game/pmove_state_t.java index 559b136..7c47866 100644 --- a/src/jake2/game/pmove_state_t.java +++ b/src/lwjake2/game/pmove_state_t.java @@ -1,33 +1,28 @@ /* -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 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. + */ -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. +package lwjake2.game; -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: pmove_state_t.java,v 1.3 2005/01/21 01:08:48 cawe Exp $ -package jake2.game; - -import jake2.qcommon.Com; -import jake2.util.Math3D; +import lwjake2.qcommon.Com; +import lwjake2.util.Math3D; import java.io.IOException; import java.io.RandomAccessFile; -import java.nio.ByteBuffer; public class pmove_state_t { // this structure needs to be communicated bit-accurate @@ -47,7 +42,7 @@ public class pmove_state_t { public short gravity; /** add to command angles to get view direction. */ public short delta_angles[] = { 0, 0, 0 }; - /** changed by spawns, rotating objects, and teleporters.*/ + /** changed by spawns, rotating objects, and teleporters. */ private static pmove_state_t prototype = new pmove_state_t(); @@ -76,7 +71,6 @@ public class pmove_state_t { && velocity[2] == p2.origin[2] && pm_flags == p2.pm_flags && pm_time == p2.pm_time - && gravity == gravity && delta_angles[0] == p2.delta_angles[0] && delta_angles[1] == p2.delta_angles[1] && delta_angles[2] == p2.origin[2]) @@ -85,7 +79,7 @@ public class pmove_state_t { return false; } - /** Reads the playermove from the file.*/ + /** Reads the playermove from the file. */ public void load(RandomAccessFile f) throws IOException { pm_type = f.readInt(); diff --git a/src/jake2/game/pmove_t.java b/src/lwjake2/game/pmove_t.java similarity index 80% rename from src/jake2/game/pmove_t.java rename to src/lwjake2/game/pmove_t.java index c331d10..6280f4a 100644 --- a/src/jake2/game/pmove_t.java +++ b/src/lwjake2/game/pmove_t.java @@ -1,29 +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 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. + * 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. - * + * 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: pmove_t.java,v 1.4 2005/01/21 01:08:48 cawe Exp $ -package jake2.game; +package lwjake2.game; -import jake2.Defines; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.util.Math3D; import java.util.Arrays; diff --git a/src/lwjake2/game/pushed_t.java b/src/lwjake2/game/pushed_t.java new file mode 100644 index 0000000..d5e5f3f --- /dev/null +++ b/src/lwjake2/game/pushed_t.java @@ -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.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; +} diff --git a/src/lwjake2/game/spawn_t.java b/src/lwjake2/game/spawn_t.java new file mode 100644 index 0000000..0637b1b --- /dev/null +++ b/src/lwjake2/game/spawn_t.java @@ -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.game; + +public class spawn_t { + public spawn_t(String name, EntThinkAdapter spawn) { + this.name = name; + this.spawn = spawn; + } + + String name; + EntThinkAdapter spawn; +} diff --git a/src/jake2/game/spawn_temp_t.java b/src/lwjake2/game/spawn_temp_t.java similarity index 71% rename from src/jake2/game/spawn_temp_t.java rename to src/lwjake2/game/spawn_temp_t.java index 5ec4da2..35c3e16 100644 --- a/src/jake2/game/spawn_temp_t.java +++ b/src/lwjake2/game/spawn_temp_t.java @@ -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 + * 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. + */ -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. +package lwjake2.game; -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: spawn_temp_t.java,v 1.1.1.1 2004/07/07 19:59:26 hzi Exp $ - -package jake2.game; - -import jake2.util.*; +import lwjake2.util.Lib; public class spawn_temp_t { // world vars diff --git a/src/jake2/game/trace_t.java b/src/lwjake2/game/trace_t.java similarity index 55% rename from src/jake2/game/trace_t.java rename to src/lwjake2/game/trace_t.java index 9b5fa11..b9a49e2 100644 --- a/src/jake2/game/trace_t.java +++ b/src/lwjake2/game/trace_t.java @@ -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 + * 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. + */ -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. +package lwjake2.game; -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: trace_t.java,v 1.5 2005/01/14 16:09:42 cawe Exp $ - -package jake2.game; - -import jake2.util.Math3D; +import lwjake2.util.Math3D; //a trace is returned when a box is swept through the world public class trace_t { diff --git a/src/jake2/game/usercmd_t.java b/src/lwjake2/game/usercmd_t.java similarity index 54% rename from src/jake2/game/usercmd_t.java rename to src/lwjake2/game/usercmd_t.java index 76a53d0..7b04d1f 100644 --- a/src/jake2/game/usercmd_t.java +++ b/src/lwjake2/game/usercmd_t.java @@ -1,32 +1,22 @@ /* -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 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. + */ -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: usercmd_t.java,v 1.4 2005/01/21 01:08:48 cawe Exp $ - -package jake2.game; - -import java.util.Arrays; - -import jake2.util.Lib; -import jake2.util.Math3D; +package lwjake2.game; public class usercmd_t implements Cloneable { public byte msec; diff --git a/src/jake2/qcommon/CM.java b/src/lwjake2/qcommon/CM.java similarity index 98% rename from src/jake2/qcommon/CM.java rename to src/lwjake2/qcommon/CM.java index 0657f55..875ab25 100644 --- a/src/jake2/qcommon/CM.java +++ b/src/lwjake2/qcommon/CM.java @@ -1,36 +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 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. + * 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. - * + * 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. +package lwjake2.qcommon; -// $Id: CM.java,v 1.12 2005/12/04 21:00:17 cawe Exp $ - -package jake2.qcommon; - -import jake2.Defines; -import jake2.Globals; -import jake2.game.*; -import jake2.util.*; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.cmodel_t; +import lwjake2.game.cplane_t; +import lwjake2.game.cvar_t; +import lwjake2.game.mapsurface_t; +import lwjake2.game.trace_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; +import lwjake2.util.Vargs; +import lwjake2.util.Vec3Cache; import java.io.RandomAccessFile; -import java.nio.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; import java.util.Arrays; public class CM { @@ -207,7 +210,6 @@ public class CM { int checksum[]) { Com.DPrintf("CM_LoadMap(" + name + ")...\n"); byte buf[]; - int i; qfiles.dheader_t header; int length; @@ -427,7 +429,7 @@ public class CM { } } - /** Loads brushes.*/ + /** Loads brushes. */ public static void CMod_LoadBrushes(lump_t l) { Com.DPrintf("CMod_LoadBrushes()\n"); qfiles.dbrush_t in; @@ -593,7 +595,6 @@ public class CM { Com.DPrintf("CMod_LoadLeafBrushes()\n"); int i; int out[]; - short in[]; int count; if ((l.filelen % 2) != 0) @@ -761,7 +762,6 @@ public class CM { /** Loads visibility data. */ public static void CMod_LoadVisibility(lump_t l) { Com.DPrintf("CMod_LoadVisibility()\n"); - int i; numvisibility = l.filelen; diff --git a/src/jake2/qcommon/CRC.java b/src/lwjake2/qcommon/CRC.java similarity index 82% rename from src/jake2/qcommon/CRC.java rename to src/lwjake2/qcommon/CRC.java index c30166c..fdc99a0 100644 --- a/src/jake2/qcommon/CRC.java +++ b/src/lwjake2/qcommon/CRC.java @@ -1,28 +1,22 @@ /* -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 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. + */ -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 25.01.2004 by RST. -// $Id: CRC.java,v 1.2 2005/01/23 01:19:06 cawe Exp $ -package jake2.qcommon; - -import jake2.util.Vargs; +package lwjake2.qcommon; public class CRC { diff --git a/src/jake2/qcommon/Cbuf.java b/src/lwjake2/qcommon/Cbuf.java similarity index 85% rename from src/jake2/qcommon/Cbuf.java rename to src/lwjake2/qcommon/Cbuf.java index ba00f26..cb94049 100644 --- a/src/jake2/qcommon/Cbuf.java +++ b/src/lwjake2/qcommon/Cbuf.java @@ -1,34 +1,27 @@ /* - * Cbuf.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Cbuf.java,v 1.8 2005/12/18 22:10:09 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 - 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. +package lwjake2.qcommon; - 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 jake2.Defines; -import jake2.Globals; -import jake2.game.Cmd; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.util.Lib; /** * Cbuf diff --git a/src/jake2/qcommon/Com.java b/src/lwjake2/qcommon/Com.java similarity index 95% rename from src/jake2/qcommon/Com.java rename to src/lwjake2/qcommon/Com.java index 24e294e..6bdc76b 100644 --- a/src/jake2/qcommon/Com.java +++ b/src/lwjake2/qcommon/Com.java @@ -1,40 +1,36 @@ /* - * Com.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Com.java,v 1.14 2005/12/16 21:17:08 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 -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. +package lwjake2.qcommon; -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. +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.CL; +import lwjake2.client.Console; +import lwjake2.game.Cmd; +import lwjake2.server.SV_MAIN; +import lwjake2.sys.Sys; +import lwjake2.util.PrintfFormat; +import lwjake2.util.Vargs; -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 jake2.Defines; -import jake2.Globals; -import jake2.client.CL; -import jake2.client.Console; -import jake2.game.Cmd; -import jake2.server.SV_MAIN; -import jake2.sys.Sys; -import jake2.util.*; - -import java.io.*; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; /** * Com diff --git a/src/jake2/qcommon/Cvar.java b/src/lwjake2/qcommon/Cvar.java similarity index 91% rename from src/jake2/qcommon/Cvar.java rename to src/lwjake2/qcommon/Cvar.java index 6241de0..8e4ddd8 100644 --- a/src/jake2/qcommon/Cvar.java +++ b/src/lwjake2/qcommon/Cvar.java @@ -1,37 +1,29 @@ /* - * Cvar.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Cvar.java,v 1.9 2005/12/27 21:02:30 salomo 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. - + * 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; +package lwjake2.qcommon; -import jake2.Defines; -import jake2.Globals; -import jake2.game.Cmd; -import jake2.game.Info; -import jake2.game.cvar_t; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.Info; +import lwjake2.game.cvar_t; +import lwjake2.util.Lib; import java.io.IOException; import java.io.RandomAccessFile; @@ -440,9 +432,9 @@ public class Cvar extends Globals { /** * Variable typing auto completition. */ - public static Vector CompleteVariable(String partial) { + public static Vector CompleteVariable(String partial) { - Vector vars = new Vector(); + Vector vars = new Vector(); // check match for (cvar_t cvar = Globals.cvar_vars; cvar != null; cvar = cvar.next) diff --git a/src/jake2/qcommon/FS.java b/src/lwjake2/qcommon/FS.java similarity index 95% rename from src/jake2/qcommon/FS.java rename to src/lwjake2/qcommon/FS.java index 9b43adc..41418bb 100644 --- a/src/jake2/qcommon/FS.java +++ b/src/lwjake2/qcommon/FS.java @@ -1,41 +1,41 @@ /* - * FS.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: FS.java,v 1.15 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 - 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. +package lwjake2.qcommon; - 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. +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.Cmd; +import lwjake2.game.cvar_t; +import lwjake2.sys.Sys; - 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 jake2.Defines; -import jake2.Globals; -import jake2.game.Cmd; -import jake2.game.cvar_t; -import jake2.sys.Sys; - -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.channels.FileChannel; -import java.util.*; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; /** * FS @@ -166,7 +166,6 @@ public final class FS extends Globals { searchpath_t search; String netpath; pack_t pak; - int i; filelink_t link; file_from_pak = 0; @@ -239,7 +238,6 @@ public final class FS extends Globals { searchpath_t search; String netpath; pack_t pak; - int i; filelink_t link; File file = null; @@ -322,7 +320,6 @@ public final class FS extends Globals { int block, remaining; int offset = 0; int read = 0; - boolean tries = true; // read in chunks for progress bar remaining = len; @@ -393,7 +390,6 @@ public final class FS extends Globals { searchpath_t search; String netpath; pack_t pak; - int i; filelink_t link; File file = null; @@ -641,7 +637,7 @@ public final class FS extends Globals { * Gamedir * * Called to find where to write a file (demos, savegames, etc) - * this is modified to /.jake2 + * this is modified to /.lwjake2 */ public static String Gamedir() { return (fs_userdir != null) ? fs_userdir : Globals.BASEDIRNAME; @@ -902,7 +898,7 @@ public final class FS extends Globals { } }); - fs_userdir = System.getProperty("user.home") + "/.jake2"; + fs_userdir = System.getProperty("user.home") + "/.lwjake2"; FS.CreatePath(fs_userdir + "/"); FS.AddGameDirectory(fs_userdir); @@ -955,16 +951,11 @@ public final class FS extends Globals { */ public static int Developer_searchpath(int who) { - int ch; // PMM - warning removal // char *start; searchpath_t s; - if (who == 1) // xatrix - ch = 'x'; - else if (who == 2) - ch = 'r'; - + for (s = fs_searchpaths; s != null; s = s.next) { if (s.filename.indexOf("xatrix") != -1) return 1; diff --git a/src/jake2/qcommon/MD4.java b/src/lwjake2/qcommon/MD4.java similarity index 89% rename from src/jake2/qcommon/MD4.java rename to src/lwjake2/qcommon/MD4.java index 503ca60..837dac6 100644 --- a/src/jake2/qcommon/MD4.java +++ b/src/lwjake2/qcommon/MD4.java @@ -1,39 +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 + * 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. + */ -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.02.2004 by RST. -// $Id: MD4.java,v 1.2 2004/07/09 06:50:49 hzi Exp $ - -package jake2.qcommon; +package lwjake2.qcommon; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.security.MessageDigest; -import jake2.*; -import jake2.client.*; -import jake2.game.*; -import jake2.render.*; -import jake2.server.*; -import jake2.util.Lib; - public class MD4 extends MessageDigest implements Cloneable { // MD4 specific object variables diff --git a/src/jake2/qcommon/MSG.java b/src/lwjake2/qcommon/MSG.java similarity index 96% rename from src/jake2/qcommon/MSG.java rename to src/lwjake2/qcommon/MSG.java index 9fdd6a9..969a6cb 100644 --- a/src/jake2/qcommon/MSG.java +++ b/src/lwjake2/qcommon/MSG.java @@ -1,30 +1,28 @@ /* * 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 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. + * 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. - * + * 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 29.11.2003 by RST. -// $Id: MSG.java,v 1.8 2005/12/18 22:10:02 cawe Exp $ -package jake2.qcommon; +package lwjake2.qcommon; -import jake2.Globals; -import jake2.game.*; -import jake2.util.*; +import lwjake2.Globals; +import lwjake2.game.entity_state_t; +import lwjake2.game.usercmd_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; public class MSG extends Globals { diff --git a/src/jake2/qcommon/Netchan.java b/src/lwjake2/qcommon/Netchan.java similarity index 91% rename from src/jake2/qcommon/Netchan.java rename to src/lwjake2/qcommon/Netchan.java index 2bfb732..2ecaf25 100644 --- a/src/jake2/qcommon/Netchan.java +++ b/src/lwjake2/qcommon/Netchan.java @@ -1,37 +1,30 @@ /* - * NetChannel.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Netchan.java,v 1.7 2005/12/18 22:10:08 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 - 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. +package lwjake2.qcommon; - 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 jake2.Defines; -import jake2.Globals; -import jake2.game.cvar_t; -import jake2.server.SV_MAIN; -import jake2.sys.NET; -import jake2.sys.Timer; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.cvar_t; +import lwjake2.server.SV_MAIN; +import lwjake2.sys.NET; +import lwjake2.sys.Timer; +import lwjake2.util.Lib; /** * Netchan @@ -288,7 +281,6 @@ public final class Netchan extends SV_MAIN { public static boolean Process(netchan_t chan, sizebuf_t msg) { int sequence, sequence_ack; int reliable_ack, reliable_message; - int qport; // get sequence numbers MSG.BeginReading(msg); @@ -297,7 +289,7 @@ public final class Netchan extends SV_MAIN { // read the qport if we are a server if (chan.sock == Defines.NS_SERVER) - qport = MSG.ReadShort(msg); + MSG.ReadShort(msg); // achtung unsigned int reliable_message = sequence >>> 31; diff --git a/src/jake2/qcommon/PMove.java b/src/lwjake2/qcommon/PMove.java similarity index 97% rename from src/jake2/qcommon/PMove.java rename to src/lwjake2/qcommon/PMove.java index 82543e5..1530766 100644 --- a/src/jake2/qcommon/PMove.java +++ b/src/lwjake2/qcommon/PMove.java @@ -1,32 +1,30 @@ /* * 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 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. + * 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. - * + * 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 25.01.2004 by RST. -// $Id: PMove.java,v 1.8 2006/01/21 21:53:32 salomo Exp $ -package jake2.qcommon; +package lwjake2.qcommon; -import jake2.Defines; -import jake2.Globals; -import jake2.game.*; -import jake2.server.SV; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.csurface_t; +import lwjake2.game.pmove_t; +import lwjake2.game.trace_t; +import lwjake2.server.SV; +import lwjake2.util.Math3D; public class PMove { diff --git a/src/jake2/qcommon/Qcommon.java b/src/lwjake2/qcommon/Qcommon.java similarity index 84% rename from src/jake2/qcommon/Qcommon.java rename to src/lwjake2/qcommon/Qcommon.java index 6de06b2..5cd1b49 100644 --- a/src/jake2/qcommon/Qcommon.java +++ b/src/lwjake2/qcommon/Qcommon.java @@ -1,39 +1,33 @@ /* - * Qcommon.java - * Copyright 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Qcommon.java,v 1.22 2006/02/13 10:05:55 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 -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. +package lwjake2.qcommon; -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 jake2.Globals; -import jake2.Jake2; -import jake2.client.*; -import jake2.game.Cmd; -import jake2.server.SV_MAIN; -import jake2.sys.*; -import jake2.sys.NET; -import jake2.sys.Sys; -import jake2.util.Vargs; +import lwjake2.Globals; +import lwjake2.client.CL; +import lwjake2.client.Key; +import lwjake2.client.SCR; +import lwjake2.game.Cmd; +import lwjake2.server.SV_MAIN; +import lwjake2.sys.NET; +import lwjake2.sys.Sys; +import lwjake2.sys.Timer; +import lwjake2.util.Vargs; import java.io.FileWriter; import java.io.IOException; diff --git a/src/jake2/qcommon/SZ.java b/src/lwjake2/qcommon/SZ.java similarity index 72% rename from src/jake2/qcommon/SZ.java rename to src/lwjake2/qcommon/SZ.java index 22fcfab..67e45eb 100644 --- a/src/jake2/qcommon/SZ.java +++ b/src/lwjake2/qcommon/SZ.java @@ -1,32 +1,25 @@ /* - * SZ.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: SZ.java,v 1.6 2005/12/18 22:10:07 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 -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. +package lwjake2.qcommon; -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 jake2.Defines; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.util.Lib; /** * SZ diff --git a/src/lwjake2/qcommon/cmd_function_t.java b/src/lwjake2/qcommon/cmd_function_t.java new file mode 100644 index 0000000..03bd5cc --- /dev/null +++ b/src/lwjake2/qcommon/cmd_function_t.java @@ -0,0 +1,28 @@ +/* + * 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.qcommon; + +/** + * cmd_function_t + */ +public final class cmd_function_t { + public cmd_function_t next = null; + public String name = null; + public xcommand_t function; +} diff --git a/src/lwjake2/qcommon/longjmpException.java b/src/lwjake2/qcommon/longjmpException.java new file mode 100644 index 0000000..38bd92f --- /dev/null +++ b/src/lwjake2/qcommon/longjmpException.java @@ -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.qcommon; + +/** + * longjmpException is used to replace the setjmp/longjmp code. + */ +public final class longjmpException extends IllegalStateException { + +} diff --git a/src/lwjake2/qcommon/lump_t.java b/src/lwjake2/qcommon/lump_t.java new file mode 100644 index 0000000..cc65368 --- /dev/null +++ b/src/lwjake2/qcommon/lump_t.java @@ -0,0 +1,30 @@ +/* + * 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.qcommon; + +public class lump_t +{ + public lump_t(int offset, int len) + { + this.fileofs = offset; + this.filelen = len; + } + + public int fileofs, filelen; +} diff --git a/src/lwjake2/qcommon/miptex_t.java b/src/lwjake2/qcommon/miptex_t.java new file mode 100644 index 0000000..0c7f5ad --- /dev/null +++ b/src/lwjake2/qcommon/miptex_t.java @@ -0,0 +1,38 @@ +/* + * 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.qcommon; + +import lwjake2.Defines; + +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; +} diff --git a/src/jake2/qcommon/netadr_t.java b/src/lwjake2/qcommon/netadr_t.java similarity index 70% rename from src/jake2/qcommon/netadr_t.java rename to src/lwjake2/qcommon/netadr_t.java index 9a5f778..e099539 100644 --- a/src/jake2/qcommon/netadr_t.java +++ b/src/lwjake2/qcommon/netadr_t.java @@ -1,29 +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 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. + * 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. - * + * 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: netadr_t.java,v 1.6 2005/10/26 12:37:58 cawe Exp $ -package jake2.qcommon; +package lwjake2.qcommon; -import jake2.Defines; -import jake2.sys.NET; +import lwjake2.Defines; +import lwjake2.sys.NET; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/src/jake2/qcommon/netchan_t.java b/src/lwjake2/qcommon/netchan_t.java similarity index 79% rename from src/jake2/qcommon/netchan_t.java rename to src/lwjake2/qcommon/netchan_t.java index 89ef4e8..fc2dd43 100644 --- a/src/jake2/qcommon/netchan_t.java +++ b/src/lwjake2/qcommon/netchan_t.java @@ -1,28 +1,24 @@ /* * 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 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. + * 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. - * + * 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: netchan_t.java,v 1.2 2004/09/22 19:22:09 salomo Exp $ -package jake2.qcommon; +package lwjake2.qcommon; -import jake2.*; +import lwjake2.Defines; public class netchan_t { diff --git a/src/jake2/qcommon/qfiles.java b/src/lwjake2/qcommon/qfiles.java similarity index 94% rename from src/jake2/qcommon/qfiles.java rename to src/lwjake2/qcommon/qfiles.java index 6acbe13..8f97858 100644 --- a/src/jake2/qcommon/qfiles.java +++ b/src/lwjake2/qcommon/qfiles.java @@ -1,33 +1,29 @@ /* - * qfiles.java - * Copyright (C) 2003 - * - * $Id: qfiles.java,v 1.6 2005/05/07 23:40:49 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. */ -/* -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. +package lwjake2.qcommon; -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. +import lwjake2.Defines; -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 jake2.Defines; - -import java.nio.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; /** * qfiles diff --git a/src/lwjake2/qcommon/sizebuf_t.java b/src/lwjake2/qcommon/sizebuf_t.java new file mode 100644 index 0000000..ee279b1 --- /dev/null +++ b/src/lwjake2/qcommon/sizebuf_t.java @@ -0,0 +1,41 @@ +/* + * 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.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; + } +} diff --git a/src/jake2/qcommon/texinfo_t.java b/src/lwjake2/qcommon/texinfo_t.java similarity index 54% rename from src/jake2/qcommon/texinfo_t.java rename to src/lwjake2/qcommon/texinfo_t.java index a800eef..d4e4177 100644 --- a/src/jake2/qcommon/texinfo_t.java +++ b/src/lwjake2/qcommon/texinfo_t.java @@ -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 + * 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. + */ -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. +package lwjake2.qcommon; -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: texinfo_t.java,v 1.2 2004/07/08 15:58:46 hzi Exp $ - -package jake2.qcommon; - -import jake2.util.Lib; +import lwjake2.util.Lib; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/src/lwjake2/qcommon/xcommand_t.java b/src/lwjake2/qcommon/xcommand_t.java new file mode 100644 index 0000000..3d76d6d --- /dev/null +++ b/src/lwjake2/qcommon/xcommand_t.java @@ -0,0 +1,27 @@ +/* + * 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.qcommon; + +/** + * xcommand_t + */ +public abstract class xcommand_t { + + abstract public void execute(); +} diff --git a/src/jake2/render/DummyRenderer.java b/src/lwjake2/render/DummyRenderer.java similarity index 80% rename from src/jake2/render/DummyRenderer.java rename to src/lwjake2/render/DummyRenderer.java index 9e65aee..bc0dbb4 100644 --- a/src/jake2/render/DummyRenderer.java +++ b/src/lwjake2/render/DummyRenderer.java @@ -1,20 +1,31 @@ /* - * DummyRenderer.java - * Copyright (C) 2003 - * - * $Id: DummyRenderer.java,v 1.2 2005/02/07 22:37:55 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; + +package lwjake2.render; + +import lwjake2.client.refdef_t; +import lwjake2.client.refexport_t; +import lwjake2.qcommon.xcommand_t; +import lwjake2.sys.KBD; import java.awt.Dimension; import java.awt.DisplayMode; -import jake2.client.refdef_t; -import jake2.client.refexport_t; -import jake2.qcommon.xcommand_t; -import jake2.sys.KBD; - /** * DummyRenderer * diff --git a/src/jake2/render/LWJGLRenderer.java b/src/lwjake2/render/LWJGLRenderer.java similarity index 82% rename from src/jake2/render/LWJGLRenderer.java rename to src/lwjake2/render/LWJGLRenderer.java index db144a7..c810e4b 100644 --- a/src/jake2/render/LWJGLRenderer.java +++ b/src/lwjake2/render/LWJGLRenderer.java @@ -1,35 +1,30 @@ /* - * LWJGLRenderer.java - * Copyright (C) 2004 - * - * $Id: LWJGLRenderer.java,v 1.3 2004/12/20 21:49:14 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. */ -/* -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. +package lwjake2.render; -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.Defines; -import jake2.client.*; -import jake2.render.lwjgl.Misc; -import jake2.sys.KBD; -import jake2.sys.LWJGLKBD; +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.client.refdef_t; +import lwjake2.client.refexport_t; +import lwjake2.render.lwjgl.Misc; +import lwjake2.sys.KBD; +import lwjake2.sys.LWJGLKBD; import java.awt.Dimension; diff --git a/src/lwjake2/render/Ref.java b/src/lwjake2/render/Ref.java new file mode 100644 index 0000000..1a70248 --- /dev/null +++ b/src/lwjake2/render/Ref.java @@ -0,0 +1,35 @@ +/* + * 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.render; + +import lwjake2.client.refexport_t; + +/** + * Ref + * + * @author cwei + */ +public interface Ref { + + // ============================================================================ + // extensions (cwei) + // ============================================================================ + refexport_t GetRefAPI(); + String getName(); +} diff --git a/src/jake2/render/Renderer.java b/src/lwjake2/render/Renderer.java similarity index 51% rename from src/jake2/render/Renderer.java rename to src/lwjake2/render/Renderer.java index dcd480c..3c29acb 100644 --- a/src/jake2/render/Renderer.java +++ b/src/lwjake2/render/Renderer.java @@ -1,34 +1,27 @@ /* - * Renderer.java - * Copyright (C) 2003 - * - * $Id: Renderer.java,v 1.6 2005/01/12 00:37:13 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. */ -/* -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. +package lwjake2.render; -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 lwjake2.client.refexport_t; import java.util.Vector; -import jake2.client.refexport_t; - /** * Renderer * @@ -36,28 +29,16 @@ import jake2.client.refexport_t; */ public class Renderer { - static Vector drivers = new Vector(3); + static Vector drivers = new Vector(1); static { try { - try { - Class.forName("net.java.games.jogl.GL"); - Class.forName("jake2.render.JoglRenderer"); - } catch (ClassNotFoundException e) { - // ignore the jogl drivers if runtime not in classpath - } try { Class.forName("org.lwjgl.opengl.GL11"); - Class.forName("jake2.render.LWJGLRenderer"); + Class.forName("lwjake2.render.LWJGLRenderer"); } catch (ClassNotFoundException e) { // ignore the lwjgl driver if runtime not in classpath } - try { - Class.forName("net.java.games.jogl.GL"); - Class.forName("jake2.render.FastJoglRenderer"); - } catch (ClassNotFoundException e) { - // ignore the fastjogl drivers if runtime not in classpath - } } catch (Throwable e) { e.printStackTrace(); } diff --git a/src/lwjake2/render/glconfig_t.java b/src/lwjake2/render/glconfig_t.java new file mode 100644 index 0000000..f8b1f45 --- /dev/null +++ b/src/lwjake2/render/glconfig_t.java @@ -0,0 +1,40 @@ +/* + * 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.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; + } +} diff --git a/src/jake2/render/glpoly_t.java b/src/lwjake2/render/glpoly_t.java similarity index 56% rename from src/jake2/render/glpoly_t.java rename to src/lwjake2/render/glpoly_t.java index ce38fb9..6769283 100644 --- a/src/jake2/render/glpoly_t.java +++ b/src/lwjake2/render/glpoly_t.java @@ -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 + * 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. + */ -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. +package lwjake2.render; -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: glpoly_t.java,v 1.3 2005/01/09 22:32:10 cawe Exp $ - -package jake2.render; - -import jake2.util.Lib; +import lwjake2.util.Lib; public abstract class glpoly_t { public final static int STRIDE = 7; diff --git a/src/lwjake2/render/glstate_t.java b/src/lwjake2/render/glstate_t.java new file mode 100644 index 0000000..823e569 --- /dev/null +++ b/src/lwjake2/render/glstate_t.java @@ -0,0 +1,42 @@ +/* + * 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.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]; + +} diff --git a/src/jake2/render/image_t.java b/src/lwjake2/render/image_t.java similarity index 57% rename from src/jake2/render/image_t.java rename to src/lwjake2/render/image_t.java index d6509bb..5d90ba0 100644 --- a/src/jake2/render/image_t.java +++ b/src/lwjake2/render/image_t.java @@ -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 + * 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. + */ -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. +package lwjake2.render; -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: image_t.java,v 1.1.1.1 2004/07/07 19:59:35 hzi Exp $ - -package jake2.render; - -import jake2.Defines; +import lwjake2.Defines; public class image_t { diff --git a/src/jake2/render/lwjgl/Anorms.java b/src/lwjake2/render/lwjgl/Anorms.java similarity index 97% rename from src/jake2/render/lwjgl/Anorms.java rename to src/lwjake2/render/lwjgl/Anorms.java index f57653d..a8acb68 100644 --- a/src/jake2/render/lwjgl/Anorms.java +++ b/src/lwjake2/render/lwjgl/Anorms.java @@ -1,29 +1,22 @@ /* - * Anorms.java - * Copyright (C) 2003 - * - * $Id: Anorms.java,v 1.2 2004/12/14 12:56:59 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. */ -/* -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.lwjgl; +package lwjake2.render.lwjgl; /** * Anorms diff --git a/src/jake2/render/lwjgl/Base.java b/src/lwjake2/render/lwjgl/Base.java similarity index 78% rename from src/jake2/render/lwjgl/Base.java rename to src/lwjake2/render/lwjgl/Base.java index 178aadb..7001425 100644 --- a/src/jake2/render/lwjgl/Base.java +++ b/src/lwjake2/render/lwjgl/Base.java @@ -1,29 +1,22 @@ /* - * Base.java - * Copyright (C) 2003 - * - * $Id: Base.java,v 1.4 2005/06/08 21:24:52 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. */ -/* - 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.lwjgl; + +package lwjake2.render.lwjgl; import org.lwjgl.opengl.GL11; diff --git a/src/jake2/render/lwjgl/Draw.java b/src/lwjake2/render/lwjgl/Draw.java similarity index 90% rename from src/jake2/render/lwjgl/Draw.java rename to src/lwjake2/render/lwjgl/Draw.java index bea6ce3..3313075 100644 --- a/src/jake2/render/lwjgl/Draw.java +++ b/src/lwjake2/render/lwjgl/Draw.java @@ -1,35 +1,28 @@ /* - * Draw.java - * Copyright (C) 2003 - * - * $Id: Draw.java,v 1.3 2005/11/21 21:16:58 cawe 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 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. + */ -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.qcommon.Com; -import jake2.render.image_t; -import jake2.util.Lib; +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.qcommon.Com; +import lwjake2.render.image_t; +import lwjake2.util.Lib; import java.awt.Dimension; import java.nio.ByteBuffer; diff --git a/src/jake2/render/lwjgl/Image.java b/src/lwjake2/render/lwjgl/Image.java similarity index 96% rename from src/jake2/render/lwjgl/Image.java rename to src/lwjake2/render/lwjgl/Image.java index 93f718f..0374fd7 100644 --- a/src/jake2/render/lwjgl/Image.java +++ b/src/lwjake2/render/lwjgl/Image.java @@ -1,48 +1,49 @@ /* - * Image.java - * Copyright (C) 2003 - * - * $Id: Image.java,v 1.3 2005/05/07 17:31:37 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. */ -/* -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.client.particle_t; -import jake2.game.cvar_t; -import jake2.qcommon.*; -import jake2.render.image_t; -import jake2.util.Lib; -import jake2.util.Vargs; +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.client.particle_t; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.qfiles; +import lwjake2.render.image_t; +import lwjake2.util.Lib; +import lwjake2.util.Vargs; import java.awt.Dimension; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; -import java.nio.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; import java.util.Arrays; import org.lwjgl.BufferUtils; -import org.lwjgl.opengl.*; +import org.lwjgl.opengl.ARBImaging; +import org.lwjgl.opengl.ARBMultitexture; +import org.lwjgl.opengl.EXTSharedTexturePalette; +import org.lwjgl.opengl.GL11; /** * Image @@ -540,7 +541,6 @@ public abstract class Image extends Main { int row, column; byte[] raw; ByteBuffer buf_p; - int length; qfiles.tga_t targa_header; byte[] pic = null; @@ -1270,7 +1270,6 @@ public abstract class Image extends Main { } else { int p; - int rgb; for (int i = 0; i < s; i++) { p = data[i] & 0xff; trans[i] = d_8to24table[p]; @@ -1584,13 +1583,11 @@ public abstract class Image extends Main { */ protected void Draw_GetPalette() { int r, g, b; - Dimension dim; - byte[] pic; byte[][] palette = new byte[1][]; //new byte[768]; // get the palette - pic = LoadPCX("pics/colormap.pcx", palette, dim = new Dimension()); + LoadPCX("pics/colormap.pcx", palette, new Dimension()); if (palette[0] == null || palette[0].length != 768) Com.Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); diff --git a/src/jake2/render/lwjgl/LWJGLBase.java b/src/lwjake2/render/lwjgl/LWJGLBase.java similarity index 87% rename from src/jake2/render/lwjgl/LWJGLBase.java rename to src/lwjake2/render/lwjgl/LWJGLBase.java index 5357342..247497f 100644 --- a/src/jake2/render/lwjgl/LWJGLBase.java +++ b/src/lwjake2/render/lwjgl/LWJGLBase.java @@ -1,35 +1,28 @@ /* - * LWJGLBase.java - * Copyright (C) 2004 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: LWJGLBase.java,v 1.2 2004/12/20 21:51:18 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 -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.client.viddef_t; -import jake2.game.cvar_t; -import jake2.qcommon.xcommand_t; +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.client.viddef_t; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.xcommand_t; import java.awt.Dimension; import java.util.LinkedList; diff --git a/src/jake2/render/lwjgl/Light.java b/src/lwjake2/render/lwjgl/Light.java similarity index 94% rename from src/jake2/render/lwjgl/Light.java rename to src/lwjake2/render/lwjgl/Light.java index c360b6c..feb2580 100644 --- a/src/jake2/render/lwjgl/Light.java +++ b/src/lwjake2/render/lwjgl/Light.java @@ -1,38 +1,33 @@ /* - * Light.java - * Copyright (C) 2003 - * - * $Id: Light.java,v 1.4 2005/05/07 17:21:42 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. */ -/* -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.Globals; -import jake2.client.dlight_t; -import jake2.game.cplane_t; -import jake2.qcommon.Com; -import jake2.render.*; -import jake2.util.Math3D; -import jake2.util.Vec3Cache; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.dlight_t; +import lwjake2.game.cplane_t; +import lwjake2.qcommon.Com; +import lwjake2.render.mnode_t; +import lwjake2.render.msurface_t; +import lwjake2.render.mtexinfo_t; +import lwjake2.util.Math3D; +import lwjake2.util.Vec3Cache; import java.nio.ByteBuffer; import java.nio.IntBuffer; @@ -498,7 +493,7 @@ public abstract class Light extends Warp { try { // set to full bright if no light data if (surf.samples == null) { - int maps; + // int maps; for (i = 0; i < size * 3; i++) s_blocklights[i] = 255; diff --git a/src/jake2/render/lwjgl/Main.java b/src/lwjake2/render/lwjgl/Main.java similarity index 96% rename from src/jake2/render/lwjgl/Main.java rename to src/lwjake2/render/lwjgl/Main.java index 808ca1b..9f95b82 100644 --- a/src/jake2/render/lwjgl/Main.java +++ b/src/lwjake2/render/lwjgl/Main.java @@ -1,50 +1,43 @@ /* - * Main.java - * Copyright (C) 2003 - * - * $Id: Main.java,v 1.7 2005/05/07 18:23:25 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. */ -/* -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.Globals; -import jake2.client.VID; -import jake2.client.entity_t; -import jake2.client.particle_t; -import jake2.client.refdef_t; -import jake2.game.Cmd; -import jake2.game.cplane_t; -import jake2.game.cvar_t; -import jake2.qcommon.Com; -import jake2.qcommon.Cvar; -import jake2.qcommon.qfiles; -import jake2.qcommon.xcommand_t; -import jake2.render.glconfig_t; -import jake2.render.glstate_t; -import jake2.render.image_t; -import jake2.render.mleaf_t; -import jake2.render.model_t; -import jake2.util.Math3D; -import jake2.util.Vargs; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.VID; +import lwjake2.client.entity_t; +import lwjake2.client.particle_t; +import lwjake2.client.refdef_t; +import lwjake2.game.Cmd; +import lwjake2.game.cplane_t; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.qfiles; +import lwjake2.qcommon.xcommand_t; +import lwjake2.render.glconfig_t; +import lwjake2.render.glstate_t; +import lwjake2.render.image_t; +import lwjake2.render.mleaf_t; +import lwjake2.render.model_t; +import lwjake2.util.Math3D; +import lwjake2.util.Vargs; import java.awt.Dimension; import java.nio.FloatBuffer; diff --git a/src/jake2/render/lwjgl/Mesh.java b/src/lwjake2/render/lwjgl/Mesh.java similarity index 94% rename from src/jake2/render/lwjgl/Mesh.java rename to src/lwjake2/render/lwjgl/Mesh.java index cfd0c05..f04808b 100644 --- a/src/jake2/render/lwjgl/Mesh.java +++ b/src/lwjake2/render/lwjgl/Mesh.java @@ -1,36 +1,29 @@ /* - * Mesh.java - * Copyright (C) 2003 - * - * $Id: Mesh.java,v 1.8 2005/06/08 21:27:10 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. */ -/* -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.client.entity_t; -import jake2.qcommon.qfiles; -import jake2.render.image_t; -import jake2.util.Math3D; +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.client.entity_t; +import lwjake2.qcommon.qfiles; +import lwjake2.render.image_t; +import lwjake2.util.Math3D; import java.nio.FloatBuffer; import java.nio.IntBuffer; @@ -265,7 +258,7 @@ public abstract class Mesh extends Light { void GL_DrawAliasShadow(qfiles.dmdl_t paliashdr, int posenum) { float lheight = currententity.origin[2] - lightspot[2]; - qfiles.daliasframe_t frame = paliashdr.aliasFrames[currententity.frame]; + // qfiles.daliasframe_t frame = paliashdr.aliasFrames[currententity.frame]; int[] order = paliashdr.glCmds; float height = -lheight + 1.0f; diff --git a/src/jake2/render/lwjgl/Misc.java b/src/lwjake2/render/lwjgl/Misc.java similarity index 87% rename from src/jake2/render/lwjgl/Misc.java rename to src/lwjake2/render/lwjgl/Misc.java index 4ff9a2e..cd32bd7 100644 --- a/src/jake2/render/lwjgl/Misc.java +++ b/src/lwjake2/render/lwjgl/Misc.java @@ -1,41 +1,40 @@ /* - * Misc.java - * Copyright (C) 2003 - * - * $Id: Misc.java,v 1.8 2005/05/11 21:45:02 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. */ -/* -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. +package lwjake2.render.lwjgl; -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. +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.qcommon.FS; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.qcommon.FS; - -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; import java.nio.FloatBuffer; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import org.lwjgl.BufferUtils; -import org.lwjgl.opengl.*; +import org.lwjgl.opengl.ARBMultitexture; +import org.lwjgl.opengl.EXTPointParameters; +import org.lwjgl.opengl.EXTSharedTexturePalette; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; /** * Misc diff --git a/src/jake2/render/lwjgl/Model.java b/src/lwjake2/render/lwjgl/Model.java similarity index 95% rename from src/jake2/render/lwjgl/Model.java rename to src/lwjake2/render/lwjgl/Model.java index 175d877..c1f01eb 100644 --- a/src/jake2/render/lwjgl/Model.java +++ b/src/lwjake2/render/lwjgl/Model.java @@ -1,40 +1,48 @@ /* - * Model.java - * Copyright (C) 2003 - * - * $Id: Model.java,v 1.10 2005/05/15 15:59:57 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. */ -/* -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. +package lwjake2.render.lwjgl; -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. +import lwjake2.Defines; +import lwjake2.client.VID; +import lwjake2.game.cplane_t; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.FS; +import lwjake2.qcommon.lump_t; +import lwjake2.qcommon.qfiles; +import lwjake2.qcommon.texinfo_t; +import lwjake2.render.medge_t; +import lwjake2.render.mleaf_t; +import lwjake2.render.mmodel_t; +import lwjake2.render.mnode_t; +import lwjake2.render.model_t; +import lwjake2.render.msurface_t; +import lwjake2.render.mtexinfo_t; +import lwjake2.render.mvertex_t; +import lwjake2.util.Math3D; +import lwjake2.util.Vargs; -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.lwjgl; - -import jake2.Defines; -import jake2.client.VID; -import jake2.game.cplane_t; -import jake2.game.cvar_t; -import jake2.qcommon.*; -import jake2.render.*; -import jake2.util.Math3D; -import jake2.util.Vargs; - -import java.nio.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; import java.util.Arrays; import java.util.Vector; @@ -347,7 +355,6 @@ public abstract class Model extends Surf { */ void Mod_LoadVisibility(lump_t l) { - int i; if (l.filelen == 0) { @@ -504,7 +511,7 @@ public abstract class Model extends Surf { texinfo_t in; mtexinfo_t[] out; mtexinfo_t step; - int i, j, count; + int i, count; int next; String name; @@ -785,7 +792,7 @@ public abstract class Model extends Surf { { qfiles.dleaf_t in; mleaf_t[] out; - int i, j, count, p; + int i, j, count; if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); @@ -1011,7 +1018,7 @@ public abstract class Model extends Surf { */ void Mod_LoadAliasModel (model_t mod, ByteBuffer buffer) { - int i, j; + int i; qfiles.dmdl_t pheader; qfiles.dstvert_t[] poutst; qfiles.dtriangle_t[] pouttri; @@ -1297,7 +1304,7 @@ public abstract class Model extends Surf { void precompileGLCmds(qfiles.dmdl_t model) { model.textureCoordBuf = globalModelTextureCoordBuf.slice(); model.vertexIndexBuf = globalModelVertexIndexBuf.slice(); - Vector tmp = new Vector(); + Vector tmp = new Vector(); int count = 0; int[] order = model.glCmds; diff --git a/src/jake2/render/lwjgl/Polygon.java b/src/lwjake2/render/lwjgl/Polygon.java similarity index 76% rename from src/jake2/render/lwjgl/Polygon.java rename to src/lwjake2/render/lwjgl/Polygon.java index 6a1fe6e..2904c7c 100644 --- a/src/jake2/render/lwjgl/Polygon.java +++ b/src/lwjake2/render/lwjgl/Polygon.java @@ -1,32 +1,25 @@ /* - * Polygon.java - * Copyright (C) 2003 - * - * $Id: Polygon.java,v 1.2 2005/01/10 00:12:00 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. */ -/* -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. +package lwjake2.render.lwjgl; -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.lwjgl; - -import jake2.render.glpoly_t; -import jake2.util.Lib; +import lwjake2.render.glpoly_t; +import lwjake2.util.Lib; import java.nio.FloatBuffer; diff --git a/src/jake2/render/lwjgl/Surf.java b/src/lwjake2/render/lwjgl/Surf.java similarity index 95% rename from src/jake2/render/lwjgl/Surf.java rename to src/lwjake2/render/lwjgl/Surf.java index 9b11dce..4ecf394 100644 --- a/src/jake2/render/lwjgl/Surf.java +++ b/src/lwjake2/render/lwjgl/Surf.java @@ -1,39 +1,43 @@ /* - * Surf.java - * Copyright (C) 2003 - * - * $Id: Surf.java,v 1.9 2005/06/08 21:27:10 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. */ -/* -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. +package lwjake2.render.lwjgl; -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. +import lwjake2.Defines; +import lwjake2.client.dlight_t; +import lwjake2.client.entity_t; +import lwjake2.client.lightstyle_t; +import lwjake2.game.cplane_t; +import lwjake2.qcommon.Com; +import lwjake2.render.glpoly_t; +import lwjake2.render.image_t; +import lwjake2.render.medge_t; +import lwjake2.render.mleaf_t; +import lwjake2.render.mnode_t; +import lwjake2.render.model_t; +import lwjake2.render.msurface_t; +import lwjake2.render.mtexinfo_t; +import lwjake2.util.Lib; +import lwjake2.util.Math3D; -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.lwjgl; - -import jake2.Defines; -import jake2.client.*; -import jake2.game.cplane_t; -import jake2.qcommon.Com; -import jake2.render.*; -import jake2.util.Lib; -import jake2.util.Math3D; - -import java.nio.*; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; import java.util.Arrays; import org.lwjgl.BufferUtils; @@ -438,7 +442,6 @@ public abstract class Surf extends Draw { } glpoly_t p; - FloatBuffer texCoord = globalPolygonInterleavedBuf; image_t image = R_TextureAnimation( surf.texinfo ); int lmtex = surf.lightmaptexturenum; @@ -1048,8 +1051,6 @@ public abstract class Surf extends Draw { boolean LM_AllocBlock (int w, int h, pos_t pos) { int best = BLOCK_HEIGHT; - int x = pos.x; - int y = pos.y; int best2; int i, j; @@ -1066,8 +1067,8 @@ public abstract class Surf extends Draw { } if (j == w) { // this is a valid spot - pos.x = x = i; - pos.y = y = best = best2; + pos.x = i; + pos.y = best = best2; } } @@ -1075,7 +1076,7 @@ public abstract class Surf extends Draw { return false; for (i=0 ; i eventQueue = new LinkedList(); static void addEvent(Jake2InputEvent ev) { synchronized (eventQueue) { diff --git a/src/jake2/sys/JOGLKBD.java b/src/lwjake2/sys/JOGLKBD.java similarity index 84% rename from src/jake2/sys/JOGLKBD.java rename to src/lwjake2/sys/JOGLKBD.java index 59b3361..0ff40cb 100644 --- a/src/jake2/sys/JOGLKBD.java +++ b/src/lwjake2/sys/JOGLKBD.java @@ -1,9 +1,36 @@ -package jake2.sys; +/* + * 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. + */ -import jake2.client.Key; +package lwjake2.sys; -import java.awt.*; -import java.awt.event.*; +import lwjake2.client.Key; + +import java.awt.AWTException; +import java.awt.Component; +import java.awt.Container; +import java.awt.Cursor; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.ComponentEvent; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseWheelEvent; import javax.swing.ImageIcon; diff --git a/src/lwjake2/sys/Jake2InputEvent.java b/src/lwjake2/sys/Jake2InputEvent.java new file mode 100644 index 0000000..53aa532 --- /dev/null +++ b/src/lwjake2/sys/Jake2InputEvent.java @@ -0,0 +1,42 @@ +/* + * 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.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; + } +} diff --git a/src/lwjake2/sys/KBD.java b/src/lwjake2/sys/KBD.java new file mode 100644 index 0000000..f7dd46e --- /dev/null +++ b/src/lwjake2/sys/KBD.java @@ -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.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(); +} + diff --git a/src/jake2/sys/LWJGLKBD.java b/src/lwjake2/sys/LWJGLKBD.java similarity index 86% rename from src/jake2/sys/LWJGLKBD.java rename to src/lwjake2/sys/LWJGLKBD.java index f39283c..26043ea 100644 --- a/src/jake2/sys/LWJGLKBD.java +++ b/src/lwjake2/sys/LWJGLKBD.java @@ -1,9 +1,27 @@ -package jake2.sys; +/* + * 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. + */ -import jake2.Defines; -import jake2.Globals; -import jake2.client.Key; -import jake2.qcommon.Cbuf; +package lwjake2.sys; + +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.Key; +import lwjake2.qcommon.Cbuf; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; @@ -17,8 +35,6 @@ public class LWJGLKBD extends KBD { private char[] lwjglKeycodeMap = null; private int pressed[] = null; - private boolean mouseHasTwoButtons = false; - public void Init() { try @@ -35,8 +51,6 @@ public class LWJGLKBD extends KBD { if (lwjglKeycodeMap == null) lwjglKeycodeMap = new char[256]; if (pressed == null) pressed = new int[256]; - mouseHasTwoButtons = (Mouse.getButtonCount() == 2); - lastRepeat = Timer.Milliseconds(); } catch (Exception e) {;} } diff --git a/src/jake2/sys/NET.java b/src/lwjake2/sys/NET.java similarity index 93% rename from src/jake2/sys/NET.java rename to src/lwjake2/sys/NET.java index b3951fb..6b02b34 100644 --- a/src/jake2/sys/NET.java +++ b/src/lwjake2/sys/NET.java @@ -1,37 +1,31 @@ -/* - * NET.java Copyright (C) 2003 - * - * $Id: NET.java,v 1.10 2006/01/11 22:04:42 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 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. + * 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. - * + * 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 jake2.Defines; -import jake2.Globals; -import jake2.game.cvar_t; -import jake2.qcommon.Com; -import jake2.qcommon.Cvar; -import jake2.qcommon.netadr_t; -import jake2.qcommon.sizebuf_t; -import jake2.util.Lib; +package lwjake2.sys; + +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.game.cvar_t; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.Cvar; +import lwjake2.qcommon.netadr_t; +import lwjake2.qcommon.sizebuf_t; +import lwjake2.util.Lib; import java.io.IOException; import java.net.DatagramSocket; diff --git a/src/lwjake2/sys/NanoTimer.java b/src/lwjake2/sys/NanoTimer.java new file mode 100644 index 0000000..e3c6ba5 --- /dev/null +++ b/src/lwjake2/sys/NanoTimer.java @@ -0,0 +1,38 @@ +/* + * 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.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); + } + +} diff --git a/src/lwjake2/sys/StandardTimer.java b/src/lwjake2/sys/StandardTimer.java new file mode 100644 index 0000000..5eaaca0 --- /dev/null +++ b/src/lwjake2/sys/StandardTimer.java @@ -0,0 +1,38 @@ +/* + * 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.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; + } + +} diff --git a/src/jake2/sys/Sys.java b/src/lwjake2/sys/Sys.java similarity index 85% rename from src/jake2/sys/Sys.java rename to src/lwjake2/sys/Sys.java index a93cd87..62ccc1a 100644 --- a/src/jake2/sys/Sys.java +++ b/src/lwjake2/sys/Sys.java @@ -1,34 +1,27 @@ /* - * Sys.java - * Copyright (C) 2003 + * Copyright (C) 1997-2001 Id Software, Inc. * - * $Id: Sys.java,v 1.11 2005/07/01 14:20:54 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 - 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. +package lwjake2.sys; - 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 jake2.Defines; -import jake2.Globals; -import jake2.client.CL; -import jake2.qcommon.Com; +import lwjake2.Defines; +import lwjake2.Globals; +import lwjake2.client.CL; +import lwjake2.qcommon.Com; import java.io.File; import java.io.FilenameFilter; diff --git a/src/lwjake2/sys/Timer.java b/src/lwjake2/sys/Timer.java new file mode 100644 index 0000000..a08551f --- /dev/null +++ b/src/lwjake2/sys/Timer.java @@ -0,0 +1,46 @@ +/* + * 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.sys; + +import lwjake2.Globals; +import lwjake2.qcommon.Com; + +public abstract class Timer { + + abstract public long currentTimeMillis(); + + 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()); + } +} diff --git a/src/jake2/util/Lib.java b/src/lwjake2/util/Lib.java similarity index 89% rename from src/jake2/util/Lib.java rename to src/lwjake2/util/Lib.java index 6a6362b..e99d287 100644 --- a/src/jake2/util/Lib.java +++ b/src/lwjake2/util/Lib.java @@ -1,34 +1,35 @@ /* -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 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. + */ -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. +package lwjake2.util; -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. +import lwjake2.Globals; +import lwjake2.qcommon.Com; +import lwjake2.qcommon.FS; -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: Lib.java,v 1.18 2005/12/18 22:10:12 cawe Exp $ - -package jake2.util; - -import jake2.Globals; -import jake2.qcommon.Com; -import jake2.qcommon.FS; - -import java.io.*; -import java.nio.*; +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; public class Lib { diff --git a/src/jake2/util/Math3D.java b/src/lwjake2/util/Math3D.java similarity index 93% rename from src/jake2/util/Math3D.java rename to src/lwjake2/util/Math3D.java index 908d993..fc82cd1 100644 --- a/src/jake2/util/Math3D.java +++ b/src/lwjake2/util/Math3D.java @@ -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 + * 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. + */ -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. +package lwjake2.util; -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: Math3D.java,v 1.9 2005/02/20 21:50:36 salomo Exp $ - -package jake2.util; - -import jake2.Defines; -import jake2.game.cplane_t; -import jake2.qcommon.Com; +import lwjake2.Defines; +import lwjake2.game.cplane_t; +import lwjake2.qcommon.Com; public class Math3D { diff --git a/src/jake2/util/PrintfFormat.java b/src/lwjake2/util/PrintfFormat.java similarity index 99% rename from src/jake2/util/PrintfFormat.java rename to src/lwjake2/util/PrintfFormat.java index 3414239..66741ee 100644 --- a/src/jake2/util/PrintfFormat.java +++ b/src/lwjake2/util/PrintfFormat.java @@ -1,11 +1,8 @@ - -// // (c) 2000 Sun Microsystems, Inc. // ALL RIGHTS RESERVED // // License Grant- // -// // Permission to use, copy, modify, and distribute this Software and its // documentation for NON-COMMERCIAL or COMMERCIAL purposes and without fee is // hereby granted. @@ -24,8 +21,8 @@ // important trademark information and to // http://java.sun.com/nav/business/index.html for further important licensing // information for the Java Technology. -// -package jake2.util; + +package lwjake2.util; import java.util.Enumeration; import java.util.Vector; @@ -533,7 +530,7 @@ public class PrintfFormat { * to the beginning of the control string. */ private String nonControl(String s, int start) { - String ret = ""; + // String ret = ""; cPos = s.indexOf("%", start); if (cPos == -1) cPos = s.length(); @@ -1142,7 +1139,7 @@ public class PrintfFormat { */ private char[] fFormatDigits(double x) { // int defaultDigits=6; - String sx, sxOut; + String sx; // sxOut; int i, j, k; int n1In, n2In; int expon = 0; @@ -1346,7 +1343,7 @@ public class PrintfFormat { * @return the converted double value. */ private String fFormatString(double x) { - boolean noDigits = false; + // boolean noDigits = false; char[] ca6, ca7; if (Double.isInfinite(x)) { if (x == Double.POSITIVE_INFINITY) { @@ -1358,7 +1355,7 @@ public class PrintfFormat { ca6 = "Inf".toCharArray(); } else ca6 = "-Inf".toCharArray(); - noDigits = true; + // noDigits = true; } else if (Double.isNaN(x)) { if (leadingSign) ca6 = "+NaN".toCharArray(); @@ -1366,7 +1363,7 @@ public class PrintfFormat { ca6 = " NaN".toCharArray(); else ca6 = "NaN".toCharArray(); - noDigits = true; + // noDigits = true; } else ca6 = fFormatDigits(x); ca7 = applyFloatPadding(ca6, false); @@ -1405,9 +1402,9 @@ public class PrintfFormat { private char[] eFormatDigits(double x, char eChar) { char[] ca1, ca2, ca3; // int defaultDigits=6; - String sx, sxOut; + String sx; //, sxOut; int i, j, k, p; - int n1In, n2In; + // int n1In, n2In; int expon = 0; int ePos, rPos, eSize; boolean minusSign = false; @@ -1427,6 +1424,7 @@ public class PrintfFormat { if (ePos == -1) ePos = sx.indexOf('e'); rPos = sx.indexOf('.'); + /* Not exactly sure what the point is here - flibit if (rPos != -1) n1In = rPos; else if (ePos != -1) @@ -1440,6 +1438,7 @@ public class PrintfFormat { n2In = sx.length() - rPos - 1; } else n2In = 0; + */ if (ePos != -1) { int ie = ePos + 1; expon = 0; @@ -1800,7 +1799,7 @@ public class PrintfFormat { * @return the converted double value. */ private String eFormatString(double x, char eChar) { - boolean noDigits = false; + // boolean noDigits = false; char[] ca4, ca5; if (Double.isInfinite(x)) { if (x == Double.POSITIVE_INFINITY) { @@ -1812,7 +1811,7 @@ public class PrintfFormat { ca4 = "Inf".toCharArray(); } else ca4 = "-Inf".toCharArray(); - noDigits = true; + // noDigits = true; } else if (Double.isNaN(x)) { if (leadingSign) ca4 = "+NaN".toCharArray(); @@ -1820,7 +1819,7 @@ public class PrintfFormat { ca4 = " NaN".toCharArray(); else ca4 = "NaN".toCharArray(); - noDigits = true; + // noDigits = true; } else ca4 = eFormatDigits(x, eChar); ca5 = applyFloatPadding(ca4, false); @@ -1926,7 +1925,7 @@ public class PrintfFormat { int savePrecision = precision; int i; char[] ca4, ca5; - boolean noDigits = false; + // boolean noDigits = false; if (Double.isInfinite(x)) { if (x == Double.POSITIVE_INFINITY) { if (leadingSign) @@ -1937,7 +1936,7 @@ public class PrintfFormat { ca4 = "Inf".toCharArray(); } else ca4 = "-Inf".toCharArray(); - noDigits = true; + // noDigits = true; } else if (Double.isNaN(x)) { if (leadingSign) ca4 = "+NaN".toCharArray(); @@ -1945,7 +1944,7 @@ public class PrintfFormat { ca4 = " NaN".toCharArray(); else ca4 = "NaN".toCharArray(); - noDigits = true; + // noDigits = true; } else { if (!precisionSet) precision = defaultDigits; diff --git a/src/jake2/util/QuakeFile.java b/src/lwjake2/util/QuakeFile.java similarity index 74% rename from src/jake2/util/QuakeFile.java rename to src/lwjake2/util/QuakeFile.java index 675db54..e1ed90c 100644 --- a/src/jake2/util/QuakeFile.java +++ b/src/lwjake2/util/QuakeFile.java @@ -1,33 +1,33 @@ /* - 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. - + * 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 24.07.2004 by RST. +package lwjake2.util; -// $Id: QuakeFile.java,v 1.6 2005/11/20 22:18:34 salomo Exp $ +import lwjake2.game.GameBase; +import lwjake2.game.GameItemList; +import lwjake2.game.SuperAdapter; +import lwjake2.game.edict_t; +import lwjake2.game.gitem_t; +import lwjake2.qcommon.Com; -package jake2.util; - -import jake2.game.*; -import jake2.qcommon.Com; - -import java.io.*; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; /** * RandomAccessFile, but handles readString/WriteString specially and offers @@ -120,7 +120,7 @@ public class QuakeFile extends RandomAccessFile { writeString(null); else { String str = a.getID(); - if (a == null) { + if (str == null) { Com.DPrintf("writeAdapter: invalid Adapter id for " + a + "\n"); } writeString(str); diff --git a/src/jake2/util/Vargs.java b/src/lwjake2/util/Vargs.java similarity index 62% rename from src/jake2/util/Vargs.java rename to src/lwjake2/util/Vargs.java index 0396db7..dbd8db6 100644 --- a/src/jake2/util/Vargs.java +++ b/src/lwjake2/util/Vargs.java @@ -1,29 +1,22 @@ /* - * Vargs.java - * Copyright (C) 2003 - * - * $Id: Vargs.java,v 1.1.1.1 2004/07/07 19:59:56 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. */ -/* -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.util; +package lwjake2.util; import java.util.Vector; diff --git a/src/lwjake2/util/Vec3Cache.java b/src/lwjake2/util/Vec3Cache.java new file mode 100644 index 0000000..c403069 --- /dev/null +++ b/src/lwjake2/util/Vec3Cache.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2003 Carsten "cwei" Weisse + * + * 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.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."); + } +} \ No newline at end of file