diff options
author | Rene Stoeckel <[email protected]> | 2004-09-22 19:22:16 +0000 |
---|---|---|
committer | Rene Stoeckel <[email protected]> | 2004-09-22 19:22:16 +0000 |
commit | c4fcffe436fbfb5b0f3b7be2e5ee103ec74932f7 (patch) | |
tree | 7c9439ab1d9f5a4fd61bd57c755069007b23e0b6 /src/jake2/game/gitem_t.java | |
parent | bcb4ac6eefb425d5b0a90009da506361d5739e75 (diff) |
major refactoring in game, server and client package
Diffstat (limited to 'src/jake2/game/gitem_t.java')
-rw-r--r-- | src/jake2/game/gitem_t.java | 252 |
1 files changed, 117 insertions, 135 deletions
diff --git a/src/jake2/game/gitem_t.java b/src/jake2/game/gitem_t.java index f478f34..107cca3 100644 --- a/src/jake2/game/gitem_t.java +++ b/src/jake2/game/gitem_t.java @@ -1,145 +1,127 @@ /* -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. +// Created on 20.11.2003 by RST. +// $Id: gitem_t.java,v 1.4 2004-09-22 19:22:04 salomo Exp $ +package jake2.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 jake2.*; +import jake2.*; -See the GNU General Public License for more details. +public class gitem_t { + private static int id = 0; -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + public gitem_t(int xxx) { + index = xxx; + } -*/ + public gitem_t(String classname, EntInteractAdapter pickup, + ItemUseAdapter use, ItemDropAdapter drop, + EntThinkAdapter weaponthink) { + } -// Created on 20.11.2003 by RST. -// $Id: gitem_t.java,v 1.3 2004-08-20 21:29:57 salomo Exp $ + public gitem_t(String classname, EntInteractAdapter pickup, + ItemUseAdapter use, ItemDropAdapter drop, + EntThinkAdapter weaponthink, String pickup_sound, + String world_model, int world_model_flags, String view_model, + String icon, String pickup_name, int count_width, int quantity, + String ammo, int flags, int weapmodel, gitem_armor_t info, int tag, + String precaches) { + this.classname = classname; + this.pickup = pickup; + this.use = use; + this.drop = drop; + this.weaponthink = weaponthink; + this.pickup_sound = pickup_sound; + this.world_model = world_model; + this.world_model_flags = world_model_flags; + this.view_model = view_model; + this.icon = icon; + this.pickup_name = pickup_name; + this.count_width = count_width; + this.quantity = quantity; + this.ammo = ammo; + this.flags = flags; + this.weapmodel = weapmodel; + this.info = info; + this.tag = tag; + this.precaches = precaches; -package jake2.game; + this.index = id++; + } -import jake2.*; -import jake2.*; + String classname; // spawning name + + EntInteractAdapter pickup; + + ItemUseAdapter use; + + ItemDropAdapter drop; + + EntThinkAdapter weaponthink; + + String pickup_sound; + + String world_model; + + int world_model_flags; + + String view_model; + + // client side info + String icon; + + String pickup_name; // for printing on pickup + + int count_width; // number of digits to display by icon + + int quantity; // for ammo how much, for weapons how much is used per shot + + String ammo; // for weapons + + int flags; // IT_* flags + + int weapmodel; // weapon model index (for weapons) + + Object info; + + int tag; + + String precaches; // string of all models, sounds, and images this item will + // use + + public static void main(String args[]) { + gitem_t xxx = new gitem_t(123); + gitem_t i2 = new gitem_t("item_armor_combat", GameAI.Pickup_Armor, + null, null, null, "misc/ar1_pkup.wav", + "models/items/armor/combat/tris.md2", Defines.EF_ROTATE, null, + /* icon */ + "i_combatarmor", + /* pickup */ + "Combat Armor", + /* width */ + 3, 0, null, Defines.IT_ARMOR, 0, GameAI.combatarmor_info, + Defines.ARMOR_COMBAT, + /* precache */ + ""); + } -public class gitem_t -{ - private static int id=0; - public gitem_t(int xxx) - { - index = xxx; - } - - public gitem_t( - String classname, - EntInteractAdapter pickup, - ItemUseAdapter use, - ItemDropAdapter drop, - EntThinkAdapter weaponthink) - {} - - - public gitem_t( - String classname, - EntInteractAdapter pickup, - ItemUseAdapter use, - ItemDropAdapter drop, - EntThinkAdapter weaponthink, - String pickup_sound, - String world_model, - int world_model_flags, - String view_model, - String icon, - String pickup_name, - int count_width, - int quantity, - String ammo, - int flags, - int weapmodel, - gitem_armor_t info, - int tag, - String precaches) - { - this.classname = classname; - this.pickup = pickup; - this.use = use; - this.drop = drop; - this.weaponthink = weaponthink; - this.pickup_sound = pickup_sound; - this.world_model = world_model; - this.world_model_flags = world_model_flags; - this.view_model = view_model; - this.icon = icon; - this.pickup_name = pickup_name; - this.count_width = count_width; - this.quantity = quantity; - this.ammo = ammo; - this.flags = flags; - this.weapmodel = weapmodel; - this.info = info; - this.tag = tag; - this.precaches = precaches; - - this.index = id++; - } - - String classname; // spawning name - EntInteractAdapter pickup; - ItemUseAdapter use; - ItemDropAdapter drop; - EntThinkAdapter weaponthink; - - String pickup_sound; - String world_model; - - int world_model_flags; - - String view_model; - - // client side info - String icon; - String pickup_name; // for printing on pickup - int count_width; // number of digits to display by icon - - int quantity; // for ammo how much, for weapons how much is used per shot - String ammo; // for weapons - int flags; // IT_* flags - - int weapmodel; // weapon model index (for weapons) - - Object info; - int tag; - - String precaches; // string of all models, sounds, and images this item will use - - - public static void main(String args[]) - { - gitem_t xxx = new gitem_t(123); - gitem_t i2 = - new gitem_t( - "item_armor_combat", - GameAIAdapters.Pickup_Armor, - null, - null, - null, - "misc/ar1_pkup.wav", - "models/items/armor/combat/tris.md2", - Defines.EF_ROTATE, - null, - /* icon */ - "i_combatarmor", - /* pickup */ - "Combat Armor", - /* width */ - 3, 0, null, Defines.IT_ARMOR, 0, GameAIAdapters.combatarmor_info, Defines.ARMOR_COMBAT, - /* precache */ - ""); - } - - public int index; -} + public int index; +}
\ No newline at end of file |