示例#1
0
文件: sounds.py 项目: jmtd/deh9000
class sfxinfo_t(c.Struct):
    """Struct type representing the sound effects played in game.

	Each sound effect that can be played has an entry in the S_sfx table.
	In Dehacked these are the "Sound" sections.
	"""
    DEHACKED_NAME = "Sound"

    name = c.StructField(None)  # "Offset"
    singularity = c.StructField("Zero/One")
    priority = c.StructField("Value")
    link = c.StructField(None)  # "Zero 1"
    pitch = c.StructField("Zero 2")
    volume = c.StructField("Zero 3")
    data = c.StructField("Zero 4")
    usefulness = c.StructField("Neg. One 1")
    lumpnum = c.StructField("Neg. One 2")
示例#2
0
class weaponinfo_t(c.Struct):
    """Struct type controlling weapon properties.

	Every weapon in the game has an entry in the weaponinfo[] table that is
	of this type. Fields control the type of ammo used by the weapon and
	the states used to animate the weapon.
	"""
    DEHACKED_NAME = "Weapon"

    ammo = c.StructField("Ammo type")
    upstate = c.StructField("Deselect frame")
    downstate = c.StructField("Select frame")
    readystate = c.StructField("Bobbing frame")
    atkstate = c.StructField("Shooting frame")
    flashstate = c.StructField("Firing frame")

    state_fields = ("upstate", "downstate", "readystate", "atkstate",
                    "flashstate")

    def clear_states(self):
        """Clear all the fields in the state_fields array.

		This is useful before calling states.parse() as it will
		free back all states being used by a weapon before redefining
		its states.
		"""
        for f in weaponinfo_t.state_fields:
            setattr(self, f, 0)
示例#3
0
class state_t(c.Struct):
    """Struct type for the state table that controls AI and animations.

	Every in-game object has a current state that controls how it currently
	appears (sprite number and frame). Animation occurs by jumping to a new
	state (nextstate) after a delay (tics), and AI is implemented by
	invoking an action pointer that is associated with the state.

	In Dehacked these are called "Frames".
	"""
    DEHACKED_NAME = "Frame"

    sprite = c.StructField("Sprite number")
    frame = c.StructField("Sprite subnumber")
    tics = c.StructField("Duration")
    action = c.StructField(None)
    nextstate = c.StructField("Next frame")
    misc1 = c.StructField("Unknown 1")
    misc2 = c.StructField("Unknown 2")
示例#4
0
class weaponinfo_t(c.Struct):
    """Struct type controlling weapon properties.

	Every weapon in the game has an entry in the weaponinfo[] table that is
	of this type. Fields control the type of ammo used by the weapon and
	the states used to animate the weapon.
	"""
    DEHACKED_NAME = "Weapon"

    ammo = c.StructField("Ammo type")
    upstate = c.StructField("Deselect frame")
    downstate = c.StructField("Select frame")
    readystate = c.StructField("Bobbing frame")
    atkstate = c.StructField("Shooting frame")
    flashstate = c.StructField("Firing frame")

    state_fields = ("upstate", "downstate", "readystate", "atkstate",
                    "flashstate")
示例#5
0
文件: mobjs.py 项目: jmtd/deh9000
class mobjinfo_t(c.Struct):
    """Struct type containing properties for a given thing type.

	Doom has an table of objects of this type named mobjinfo[]. In Dehacked
	these are "Thing" sections. Each represents a type of object that can
	exist in-game, including players, monsters, projectiles, ammo/power-ups
	and decorations.
	"""
    DEHACKED_NAME = "Thing"

    doomednum = c.StructField("ID #")
    spawnstate = c.StructField("Initial frame")
    spawnhealth = c.StructField("Hit points")
    seestate = c.StructField("First moving frame")
    seesound = c.StructField("Alert sound")
    reactiontime = c.StructField("Reaction time")
    attacksound = c.StructField("Attack sound")
    painstate = c.StructField("Injury frame")
    painchance = c.StructField("Pain chance")
    painsound = c.StructField("Pain sound")
    meleestate = c.StructField("Close attack frame")
    missilestate = c.StructField("Far attack frame")
    deathstate = c.StructField("Death frame")
    xdeathstate = c.StructField("Exploding frame")
    deathsound = c.StructField("Death sound")
    speed = c.StructField("Speed")
    radius = c.StructField("Width")
    height = c.StructField("Height")
    mass = c.StructField("Mass")
    damage = c.StructField("Missile damage")
    activesound = c.StructField("Action sound")
    flags = c.StructField("Bits")
    raisestate = c.StructField("Respawn frame")

    # Which fields are references to entries in the states table?
    state_fields = ("spawnstate", "seestate", "painstate", "meleestate",
                    "missilestate", "deathstate", "xdeathstate", "raisestate")

    # Which fields are references to entries in the S_sfx table?
    sound_fields = ("seesound", "attacksound", "painsound", "deathsound",
                    "activesound")
示例#6
0
文件: misc.py 项目: jmtd/deh9000
class deh_misc_t(c.Struct):
	DEHACKED_NAME = "Misc"

	# This is the initial health a player has when starting anew.
	# See G_PlayerReborn in g_game.c
	initial_health = c.StructField("Initial Health")

	# This is the number of bullets the player has when starting anew.
	# See G_PlayerReborn in g_game.c
	initial_bullets = c.StructField("Initial Bullets")

	# This is the maximum health that can be reached using medikits
	# alone.  See P_TouchSpecialThing in p_inter.c
	max_health = c.StructField("Max Health")

	# This is the maximum armor which can be reached by picking up
	# armor helmets. See P_TouchSpecialThing in p_inter.c
	max_armor = c.StructField("Max Armor")

	# This is the armor class that is given when picking up the green
	# armor or an armor helmet. See P_TouchSpecialThing in p_inter.c
	#
	# DOS dehacked only modifies the behavior of the green armor shirt,
	# the armor class set by armor helmets is not affected.
	green_armor_class = c.StructField("Green Armor Class")

	# This is the armor class that is given when picking up the blue
	# armor or a megasphere. See P_TouchSpecialThing in p_inter.c
	#
	# DOS dehacked only modifies the MegaArmor behavior and not
	# the MegaSphere, which always gives armor type 2.
	blue_armor_class = c.StructField("Blue Armor Class")

	# The maximum health which can be reached by picking up the
	# soulsphere.  See P_TouchSpecialThing in p_inter.c
	max_soulsphere = c.StructField("Max Soulsphere")

	# The amount of health bonus that picking up a soulsphere
	# gives.  See P_TouchSpecialThing in p_inter.c
	soulsphere_health = c.StructField("Soulsphere Health")

	# This is what the health is set to after picking up a
	# megasphere.  See P_TouchSpecialThing in p_inter.c
	megasphere_health = c.StructField("Megasphere Health")

	# This is what the health value is set to when cheating using
	# the IDDQD god mode cheat.  See ST_Responder in st_stuff.c
	god_mode_health = c.StructField("God Mode Health")

	# This is what the armor is set to when using the IDFA cheat.
	# See ST_Responder in st_stuff.c
	idfa_armor = c.StructField("IDFA Armor")

	# This is what the armor class is set to when using the IDFA cheat.
	# See ST_Responder in st_stuff.c
	idfa_armor_class = c.StructField("IDFA Armor Class")

	# This is what the armor is set to when using the IDKFA cheat.
	# See ST_Responder in st_stuff.c
	idkfa_armor = c.StructField("IDKFA Armor")

	# This is what the armor class is set to when using the IDKFA cheat.
	# See ST_Responder in st_stuff.c
	idkfa_armor_class = c.StructField("IDKFA Armor Class")

	# This is the number of CELLs firing the BFG uses up.
	# See P_CheckAmmo and A_FireBFG in p_pspr.c
	bfg_cells_per_shot = c.StructField("BFG Cells/Shot")

	# This controls whether monsters can harm other monsters of the same
	# species.  For example, whether an imp fireball will damage other
	# imps.  The value of this in dehacked patches is weird - '202' means
	# off, while '221' means on.
	#
	# See PIT_CheckThing in p_map.c
	species_infighting = c.StructField("Monsters infight")
示例#7
0
文件: ammo.py 项目: jmtd/deh9000
class ammodata_t(c.Struct):
	DEHACKED_NAME = "Ammo"
	clipammo = c.StructField("Per ammo")
	maxammo  = c.StructField("Max ammo")