From 8d86c2e97df3e55daa210f703eb8c2cc86cca331 Mon Sep 17 00:00:00 2001 From: Lwmte Date: Thu, 16 Sep 2021 05:06:03 +0300 Subject: [PATCH] Rename draw.cpp to animation.cpp which makes more sense, some more edits --- TR5Main/Game/Box.h | 4 +- TR5Main/Game/Lara/lara.cpp | 5 +- TR5Main/Game/Lara/lara_basic.cpp | 2 +- TR5Main/Game/Lara/lara_climb.cpp | 2 +- TR5Main/Game/Lara/lara_collide.cpp | 2 +- TR5Main/Game/Lara/lara_crawl.cpp | 2 +- TR5Main/Game/Lara/lara_fire.cpp | 4 +- TR5Main/Game/Lara/lara_flare.cpp | 2 +- TR5Main/Game/Lara/lara_objects.cpp | 2 +- TR5Main/Game/Lara/lara_one_gun.cpp | 2 +- TR5Main/Game/Lara/lara_swim.cpp | 2 +- TR5Main/Game/Lara/lara_tests.cpp | 2 +- TR5Main/Game/Lara/lara_two_guns.cpp | 2 +- TR5Main/Game/animation.cpp | 323 ++++++++++++++++++ TR5Main/Game/animation.h | 30 ++ TR5Main/Game/box.cpp | 4 +- TR5Main/Game/camera.cpp | 2 +- TR5Main/Game/collide.cpp | 2 +- TR5Main/Game/control.cpp | 246 +------------ TR5Main/Game/control.h | 19 +- TR5Main/Game/control/los.cpp | 2 +- TR5Main/Game/control/volume.cpp | 2 +- TR5Main/Game/draw.cpp | 122 ------- TR5Main/Game/draw.h | 17 - TR5Main/Game/effects/chaffFX.cpp | 2 +- TR5Main/Game/effects/effects.cpp | 2 +- TR5Main/Game/effects/flmtorch.cpp | 2 +- TR5Main/Game/effects/footprint.cpp | 2 +- TR5Main/Game/effects/hair.cpp | 2 +- TR5Main/Game/effects/lightning.cpp | 8 +- TR5Main/Game/effects/tomb4fx.cpp | 4 +- TR5Main/Game/flipeffect.cpp | 2 +- TR5Main/Game/gameflow.cpp | 2 +- TR5Main/Game/health.cpp | 2 +- TR5Main/Game/inventory.cpp | 2 +- TR5Main/Game/{ => itemdata}/creature_info.h | 1 + TR5Main/Game/{ => itemdata}/door_data.h | 0 TR5Main/Game/itemdata/itemdata.h | 4 +- TR5Main/Game/lot.cpp | 3 +- TR5Main/Game/misc.cpp | 4 +- TR5Main/Game/missile.cpp | 2 +- TR5Main/Game/newinv2.cpp | 2 +- TR5Main/Game/objects.cpp | 2 +- TR5Main/Game/people.cpp | 4 +- TR5Main/Game/pickup/pickup.cpp | 2 +- TR5Main/Game/puzzles_keys.cpp | 2 +- TR5Main/Game/rope.cpp | 2 +- TR5Main/Game/savegame.cpp | 2 +- TR5Main/Game/sphere.cpp | 47 +-- TR5Main/Game/sphere.h | 2 - TR5Main/Game/spotcam.cpp | 2 +- TR5Main/Game/switch.cpp | 2 +- TR5Main/Game/text.cpp | 2 +- TR5Main/Game/text.h | 2 +- TR5Main/Game/traps.cpp | 2 +- TR5Main/Objects/Effects/tr4_bubbles.cpp | 2 +- TR5Main/Objects/Effects/tr4_locusts.cpp | 8 +- TR5Main/Objects/Effects/tr5_electricity.cpp | 2 +- .../Objects/Generic/Doors/double_doors.cpp | 2 +- .../Objects/Generic/Doors/generic_doors.cpp | 4 +- .../Generic/Doors/pushpull_kick_door.cpp | 4 +- .../Objects/Generic/Doors/sequence_door.cpp | 4 +- TR5Main/Objects/Generic/Doors/steel_door.cpp | 2 +- .../Objects/Generic/Doors/underwater_door.cpp | 2 +- .../Generic/Object/generic_trapdoor.cpp | 1 + .../Objects/Generic/Switches/cog_switch.cpp | 5 +- .../Generic/Switches/crowbar_switch.cpp | 4 +- .../Generic/Switches/fullblock_switch.cpp | 2 +- .../Generic/Switches/generic_switch.cpp | 2 +- .../Objects/Generic/Switches/rail_switch.cpp | 2 +- .../Objects/Generic/Switches/turn_switch.cpp | 3 +- .../Generic/Switches/underwater_switch.cpp | 4 +- TR5Main/Objects/TR1/Entity/tr1_bear.cpp | 2 +- TR5Main/Objects/TR1/Entity/tr1_centaur.cpp | 2 +- .../Objects/TR1/Entity/tr1_doppelganger.cpp | 2 +- .../Objects/TR1/Entity/tr1_giant_mutant.cpp | 9 +- TR5Main/Objects/TR1/Entity/tr1_natla.cpp | 2 +- TR5Main/Objects/TR1/Entity/tr1_wolf.cpp | 2 +- TR5Main/Objects/TR1/tr1_objects.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_barracuda.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_dragon.cpp | 7 +- .../Objects/TR2/Entity/tr2_eagle_or_crow.cpp | 2 +- .../Objects/TR2/Entity/tr2_knifethrower.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_mercenary.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_monk.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_rat.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_shark.cpp | 3 +- TR5Main/Objects/TR2/Entity/tr2_silencer.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_skidman.cpp | 7 +- .../Objects/TR2/Entity/tr2_spear_guardian.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_spider.cpp | 8 +- .../Objects/TR2/Entity/tr2_sword_guardian.cpp | 2 +- .../TR2/Entity/tr2_worker_dualrevolver.cpp | 2 +- .../TR2/Entity/tr2_worker_flamethrower.cpp | 11 +- .../TR2/Entity/tr2_worker_machinegun.cpp | 2 +- .../Objects/TR2/Entity/tr2_worker_shotgun.cpp | 2 +- TR5Main/Objects/TR2/Entity/tr2_yeti.cpp | 2 +- TR5Main/Objects/TR2/Trap/tr2_killerstatue.cpp | 3 +- .../Objects/TR2/Trap/tr2_spinningblade.cpp | 5 +- TR5Main/Objects/TR2/Trap/tr2_springboard.cpp | 2 +- TR5Main/Objects/TR2/Vehicles/boat.cpp | 7 +- TR5Main/Objects/TR2/Vehicles/snowmobile.cpp | 12 +- TR5Main/Objects/TR2/tr2_objects.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_civvy.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_cobra.cpp | 2 +- .../Objects/TR3/Entity/tr3_fishemitter.cpp | 2 +- .../Objects/TR3/Entity/tr3_flamethrower.cpp | 4 +- TR5Main/Objects/TR3/Entity/tr3_monkey.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_mpgun.cpp | 7 +- TR5Main/Objects/TR3/Entity/tr3_mpstick.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_raptor.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_scuba.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_shiva.cpp | 8 +- TR5Main/Objects/TR3/Entity/tr3_sophia.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_tiger.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_tony.cpp | 4 +- TR5Main/Objects/TR3/Entity/tr3_trex.cpp | 2 +- TR5Main/Objects/TR3/Entity/tr3_tribesman.cpp | 4 +- TR5Main/Objects/TR3/Trap/train.cpp | 5 +- TR5Main/Objects/TR3/Vehicles/biggun.cpp | 2 +- TR5Main/Objects/TR3/Vehicles/kayak.cpp | 2 +- TR5Main/Objects/TR3/Vehicles/minecart.cpp | 2 +- TR5Main/Objects/TR3/Vehicles/quad.cpp | 10 +- TR5Main/Objects/TR3/Vehicles/rubberboat.cpp | 2 +- TR5Main/Objects/TR3/Vehicles/upv.cpp | 2 +- TR5Main/Objects/TR3/tr3_objects.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_ahmet.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_baboon.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_baddy.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_bat.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp | 2 +- .../Objects/TR4/Entity/tr4_bigscorpion.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_demigod.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_dog.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_enemy_jeep.cpp | 26 +- TR5Main/Objects/TR4/Entity/tr4_guide.cpp | 10 +- TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_harpy.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_horseman.cpp | 11 +- TR5Main/Objects/TR4/Entity/tr4_jeanyves.cpp | 1 + .../Objects/TR4/Entity/tr4_knighttemplar.cpp | 10 +- TR5Main/Objects/TR4/Entity/tr4_mummy.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_mutant.cpp | 7 +- TR5Main/Objects/TR4/Entity/tr4_sas.cpp | 14 +- TR5Main/Objects/TR4/Entity/tr4_sentrygun.cpp | 12 +- TR5Main/Objects/TR4/Entity/tr4_setha.cpp | 13 +- TR5Main/Objects/TR4/Entity/tr4_skeleton.cpp | 12 +- .../Objects/TR4/Entity/tr4_smallscorpion.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_sphinx.cpp | 2 +- TR5Main/Objects/TR4/Entity/tr4_troops.cpp | 4 +- TR5Main/Objects/TR4/Entity/tr4_von_croy.cpp | 12 +- TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp | 2 +- .../TR4/Object/tr4_clockwork_beetle.cpp | 2 +- .../Objects/TR4/Object/tr4_element_puzzle.cpp | 2 +- TR5Main/Objects/TR4/Object/tr4_laradouble.cpp | 3 +- TR5Main/Objects/TR4/Object/tr4_mapper.cpp | 2 +- TR5Main/Objects/TR4/Object/tr4_obelisk.cpp | 8 +- TR5Main/Objects/TR4/Object/tr4_scales.cpp | 2 +- TR5Main/Objects/TR4/Trap/tr4_birdblade.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_catwalkblade.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_chain.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_cog.cpp | 10 +- TR5Main/Objects/TR4/Trap/tr4_fourblades.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_hammer.cpp | 2 +- TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp | 4 +- TR5Main/Objects/TR4/Trap/tr4_moving_blade.cpp | 2 +- TR5Main/Objects/TR4/Trap/tr4_plinthblade.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_plough.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_sethblade.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_slicerdicer.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_spikeball.cpp | 1 + TR5Main/Objects/TR4/Trap/tr4_spikyceiling.cpp | 5 +- TR5Main/Objects/TR4/Trap/tr4_stargate.cpp | 5 +- TR5Main/Objects/TR4/Vehicles/jeep.cpp | 11 +- TR5Main/Objects/TR4/Vehicles/motorbike.cpp | 11 +- TR5Main/Objects/TR4/tr4_objects.cpp | 4 +- .../Objects/TR5/Emitter/tr5_bats_emitter.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_autoguns.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_brownbeast.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_chef.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_cyborg.cpp | 4 +- TR5Main/Objects/TR5/Entity/tr5_doberman.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_dog.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_ghost.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_gladiator.cpp | 12 +- TR5Main/Objects/TR5/Entity/tr5_guard.cpp | 4 +- TR5Main/Objects/TR5/Entity/tr5_gunship.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_hydra.cpp | 4 +- TR5Main/Objects/TR5/Entity/tr5_imp.cpp | 4 +- .../Objects/TR5/Entity/tr5_lagoon_witch.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_larson.cpp | 8 +- TR5Main/Objects/TR5/Entity/tr5_laser_head.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_lion.cpp | 2 +- TR5Main/Objects/TR5/Entity/tr5_reaper.cpp | 2 +- .../Objects/TR5/Entity/tr5_roman_statue.cpp | 4 +- TR5Main/Objects/TR5/Entity/tr5_submarine.cpp | 4 +- TR5Main/Objects/TR5/Light/tr5_light.cpp | 11 +- TR5Main/Objects/TR5/Object/tr5_genslot.cpp | 2 +- TR5Main/Objects/TR5/Object/tr5_missile.cpp | 2 +- .../Objects/TR5/Object/tr5_pushableblock.cpp | 2 +- .../Objects/TR5/Object/tr5_rollingball.cpp | 5 +- TR5Main/Objects/TR5/Object/tr5_teleporter.cpp | 2 +- .../TR5/Switch/tr5_crowdove_switch.cpp | 2 +- TR5Main/Objects/TR5/Switch/tr5_raisingcog.cpp | 4 +- TR5Main/Objects/TR5/Trap/tr5_deathslide.cpp | 5 +- TR5Main/Objects/TR5/Trap/tr5_explosion.cpp | 2 +- .../Objects/TR5/Trap/tr5_fallingceiling.cpp | 1 + TR5Main/Objects/TR5/Trap/tr5_teethspike.cpp | 2 +- TR5Main/Objects/TR5/Trap/tr5_ventilator.cpp | 2 +- TR5Main/Objects/TR5/tr5_objects.cpp | 4 +- TR5Main/Renderer/Render11Helper.cpp | 8 +- TR5Main/Renderer/Renderer11Draw.cpp | 5 +- TR5Main/Renderer/Renderer11DrawEffect.cpp | 18 +- TR5Main/Renderer/Renderer11Frame.cpp | 2 +- TR5Main/Renderer/Renderer11Lara.cpp | 8 +- TR5Main/Sound/sound.cpp | 4 +- TR5Main/Sound/sound.h | 2 +- TR5Main/Specific/level.cpp | 4 +- TR5Main/Specific/setup.cpp | 4 +- TR5Main/Specific/trmath.cpp | 45 +++ TR5Main/Specific/trmath.h | 3 +- TR5Main/TombEngine.vcxproj | 8 +- TR5Main/TombEngine.vcxproj.filters | 24 +- 224 files changed, 846 insertions(+), 823 deletions(-) create mode 100644 TR5Main/Game/animation.cpp create mode 100644 TR5Main/Game/animation.h delete mode 100644 TR5Main/Game/draw.cpp delete mode 100644 TR5Main/Game/draw.h rename TR5Main/Game/{ => itemdata}/creature_info.h (99%) rename TR5Main/Game/{ => itemdata}/door_data.h (100%) diff --git a/TR5Main/Game/Box.h b/TR5Main/Game/Box.h index cea86b25d..d15c81a72 100644 --- a/TR5Main/Game/Box.h +++ b/TR5Main/Game/Box.h @@ -1,10 +1,12 @@ #pragma once #include "Specific\phd_global.h" #include "level.h" + struct ITEM_INFO; struct BITE_INFO; struct CREATURE_INFO; struct LOT_INFO; + enum TARGET_TYPE { NO_TARGET, @@ -12,8 +14,6 @@ enum TARGET_TYPE SECONDARY_TARGET }; - - struct OBJECT_BONES { short bone0; diff --git a/TR5Main/Game/Lara/lara.cpp b/TR5Main/Game/Lara/lara.cpp index 2a2162ff0..cdf337c0f 100644 --- a/TR5Main/Game/Lara/lara.cpp +++ b/TR5Main/Game/Lara/lara.cpp @@ -27,6 +27,7 @@ #include "kayak.h" #include "minecart.h" +#include "animation.h" #include "GameFlowScript.h" #include "health.h" #include "flipeffect.h" @@ -34,8 +35,8 @@ #include "savegame.h" #include "rope.h" #include "rubberboat.h" -#include -#include +#include "misc.h" +#include "control\volume.h" #include "Renderer11.h" #include "camera.h" diff --git a/TR5Main/Game/Lara/lara_basic.cpp b/TR5Main/Game/Lara/lara_basic.cpp index 066d4fe1f..444fa7375 100644 --- a/TR5Main/Game/Lara/lara_basic.cpp +++ b/TR5Main/Game/Lara/lara_basic.cpp @@ -8,7 +8,7 @@ #include "input.h" #include "health.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "pickup.h" #include "collide.h" #include "item.h" diff --git a/TR5Main/Game/Lara/lara_climb.cpp b/TR5Main/Game/Lara/lara_climb.cpp index 3dd066b35..19fab465d 100644 --- a/TR5Main/Game/Lara/lara_climb.cpp +++ b/TR5Main/Game/Lara/lara_climb.cpp @@ -2,7 +2,7 @@ #include "lara_climb.h" #include "Lara.h" #include "control.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "camera.h" #include "level.h" diff --git a/TR5Main/Game/Lara/lara_collide.cpp b/TR5Main/Game/Lara/lara_collide.cpp index 0057cb1f7..34d5c6510 100644 --- a/TR5Main/Game/Lara/lara_collide.cpp +++ b/TR5Main/Game/Lara/lara_collide.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "lara.h" #include "input.h" -#include "draw.h" +#include "animation.h" #include "effects\effects.h" #include "collide.h" #include "control.h" diff --git a/TR5Main/Game/Lara/lara_crawl.cpp b/TR5Main/Game/Lara/lara_crawl.cpp index e7ddf19d0..24c1ee74c 100644 --- a/TR5Main/Game/Lara/lara_crawl.cpp +++ b/TR5Main/Game/Lara/lara_crawl.cpp @@ -4,7 +4,7 @@ #include "lara_tests.h" #include "lara_slide.h" #include "lara_collide.h" -#include "draw.h" +#include "animation.h" #include "control\los.h" #include "Lara\lara_flare.h" #include "collide.h" diff --git a/TR5Main/Game/Lara/lara_fire.cpp b/TR5Main/Game/Lara/lara_fire.cpp index 8ba6736f2..dee4568df 100644 --- a/TR5Main/Game/Lara/lara_fire.cpp +++ b/TR5Main/Game/Lara/lara_fire.cpp @@ -8,7 +8,7 @@ #include "objects.h" #include "effects\effects.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "effects\flmtorch.h" #include "level.h" #include "lot.h" @@ -19,7 +19,7 @@ #include "savegame.h" #include "GameFlowScript.h" #include "lara_struct.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" WEAPON_INFO Weapons[NUM_WEAPONS] = { diff --git a/TR5Main/Game/Lara/lara_flare.cpp b/TR5Main/Game/Lara/lara_flare.cpp index 9e14ceeb1..ad9a57b85 100644 --- a/TR5Main/Game/Lara/lara_flare.cpp +++ b/TR5Main/Game/Lara/lara_flare.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "setup.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "items.h" #include "sphere.h" #include "lara_fire.h" diff --git a/TR5Main/Game/Lara/lara_objects.cpp b/TR5Main/Game/Lara/lara_objects.cpp index 5403b4174..d6c3a4d6a 100644 --- a/TR5Main/Game/Lara/lara_objects.cpp +++ b/TR5Main/Game/Lara/lara_objects.cpp @@ -2,7 +2,7 @@ #include "lara.h" #include "input.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "rope.h" #include "lara_tests.h" #include "camera.h" diff --git a/TR5Main/Game/Lara/lara_one_gun.cpp b/TR5Main/Game/Lara/lara_one_gun.cpp index 19cb916cd..918a4040d 100644 --- a/TR5Main/Game/Lara/lara_one_gun.cpp +++ b/TR5Main/Game/Lara/lara_one_gun.cpp @@ -3,7 +3,7 @@ #include "items.h" #include "Lara.h" #include "lara_fire.h" -#include "draw.h" +#include "animation.h" #include "box.h" #include "control.h" #include "effects\effects.h" diff --git a/TR5Main/Game/Lara/lara_swim.cpp b/TR5Main/Game/Lara/lara_swim.cpp index 760ac2940..ce3742722 100644 --- a/TR5Main/Game/Lara/lara_swim.cpp +++ b/TR5Main/Game/Lara/lara_swim.cpp @@ -8,7 +8,7 @@ #include "lara_surface.h" #include "effects\effects.h" #include "lara_fire.h" -#include "draw.h" +#include "animation.h" #include "camera.h" #include "level.h" #include "input.h" diff --git a/TR5Main/Game/Lara/lara_tests.cpp b/TR5Main/Game/Lara/lara_tests.cpp index a26c7c0ce..b8d0d01b9 100644 --- a/TR5Main/Game/Lara/lara_tests.cpp +++ b/TR5Main/Game/Lara/lara_tests.cpp @@ -2,7 +2,7 @@ #include "lara.h" #include "lara_tests.h" #include "input.h" -#include "draw.h" +#include "animation.h" #include "lara_climb.h" #include "lara_collide.h" #include "control.h" diff --git a/TR5Main/Game/Lara/lara_two_guns.cpp b/TR5Main/Game/Lara/lara_two_guns.cpp index 2f0559b88..e115ca519 100644 --- a/TR5Main/Game/Lara/lara_two_guns.cpp +++ b/TR5Main/Game/Lara/lara_two_guns.cpp @@ -3,7 +3,7 @@ #include "lara_fire.h" #include "lara.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "level.h" #include "setup.h" diff --git a/TR5Main/Game/animation.cpp b/TR5Main/Game/animation.cpp new file mode 100644 index 000000000..5defb4219 --- /dev/null +++ b/TR5Main/Game/animation.cpp @@ -0,0 +1,323 @@ +#include "framework.h" +#include "animation.h" +#include "Lara.h" +#include "camera.h" +#include "level.h" +#include "Renderer11.h" +#include "Sound/sound.h" +#include "flipeffect.h" + +using TEN::Renderer::g_Renderer; + +BOUNDING_BOX InterpolatedBounds; + +void AnimateItem(ITEM_INFO* item) +{ + item->touchBits = 0; + item->hitStatus = false; + + item->frameNumber++; + + ANIM_STRUCT* anim = &g_Level.Anims[item->animNumber]; + if (anim->numberChanges > 0 && GetChange(item, anim)) + { + anim = &g_Level.Anims[item->animNumber]; + + item->currentAnimState = anim->currentAnimState; + + if (item->requiredAnimState == item->currentAnimState) + item->requiredAnimState = 0; + } + + if (item->frameNumber > anim->frameEnd) + { + if (anim->numberCommands > 0) + { + short* cmd = &g_Level.Commands[anim->commandIndex]; + for (int i = anim->numberCommands; i > 0; i--) + { + switch (*(cmd++)) + { + case COMMAND_MOVE_ORIGIN: + TranslateItem(item, cmd[0], cmd[1], cmd[2]); + cmd += 3; + break; + + case COMMAND_JUMP_VELOCITY: + item->fallspeed = *(cmd++); + item->speed = *(cmd++); + item->gravityStatus = true; + break; + + case COMMAND_DEACTIVATE: + if (Objects[item->objectNumber].intelligent && !item->afterDeath) + item->afterDeath = 1; + item->status = ITEM_DEACTIVATED; + break; + case COMMAND_SOUND_FX: + case COMMAND_EFFECT: + cmd += 2; + break; + + default: + break; + } + } + } + + item->animNumber = anim->jumpAnimNum; + item->frameNumber = anim->jumpFrameNum; + + anim = &g_Level.Anims[item->animNumber]; + + if (item->currentAnimState != anim->currentAnimState) + { + item->currentAnimState = anim->currentAnimState; + item->goalAnimState = anim->currentAnimState; + } + + if (item->requiredAnimState == item->currentAnimState) + item->requiredAnimState = 0; + } + + if (anim->numberCommands > 0) + { + short* cmd = &g_Level.Commands[anim->commandIndex]; + int flags; + int effectID = 0; + + for (int i = anim->numberCommands; i > 0; i--) + { + switch (*(cmd++)) + { + case COMMAND_MOVE_ORIGIN: + cmd += 3; + break; + + case COMMAND_JUMP_VELOCITY: + cmd += 2; + break; + + case COMMAND_SOUND_FX: + if (item->frameNumber != *cmd) + { + cmd += 2; + break; + } + + flags = cmd[1] & 0xC000; + + if (!Objects[item->objectNumber].waterCreature) + { + if (item->roomNumber == NO_ROOM) + { + item->pos.xPos = LaraItem->pos.xPos; + item->pos.yPos = LaraItem->pos.yPos - 762; + item->pos.zPos = LaraItem->pos.zPos; + + SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); + } + else if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER) + { + if (!flags || flags == SFX_WATERONLY && (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER || Objects[item->objectNumber].intelligent)) + { + SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); + } + } + else if (!flags || flags == SFX_LANDONLY && !(g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER)) + { + SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); + } + } + else + { + if (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER) + SoundEffect(cmd[1] & 0x3FFF, &item->pos, 1); + else + SoundEffect(cmd[1] & 0x3FFF, &item->pos, 0); + } + break; + + case COMMAND_EFFECT: + if (item->frameNumber != *cmd) + { + cmd += 2; + break; + } + + FXType = cmd[1] & 0xC000; + effectID = cmd[1] & 0x3FFF; + DoFlipEffect(effectID, item); + + cmd += 2; + break; + + default: + break; + } + } + } + + int lateral = 0; + + if (item->gravityStatus) + { + item->fallspeed += (item->fallspeed >= 128 ? 1 : 6); + item->pos.yPos += item->fallspeed; + } + else + { + int velocity = anim->velocity; + if (anim->acceleration) + velocity += anim->acceleration * (item->frameNumber - anim->frameBase); + item->speed = velocity >> 16; + + lateral = anim->Xvelocity; + if (anim->Xacceleration) + lateral += anim->Xacceleration * (item->frameNumber - anim->frameBase); + + lateral >>= 16; + } + + item->pos.xPos += item->speed * phd_sin(item->pos.yRot); + item->pos.zPos += item->speed * phd_cos(item->pos.yRot); + + item->pos.xPos += lateral * phd_sin(item->pos.yRot + ANGLE(90)); + item->pos.zPos += lateral * phd_cos(item->pos.yRot + ANGLE(90)); + + // Update matrices + short itemNumber = item - g_Level.Items.data(); + g_Renderer.updateItemAnimations(itemNumber, true); +} + +void TranslateItem(ITEM_INFO* item, int x, int y, int z) +{ + float c = phd_cos(item->pos.yRot); + float s = phd_sin(item->pos.yRot); + + item->pos.xPos += c * x + s * z; + item->pos.yPos += y; + item->pos.zPos += -s * x + c * z; +} + +int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim) +{ + if (item->currentAnimState == item->goalAnimState) + return 0; + + if (anim->numberChanges <= 0) + return 0; + + for (int i = 0; i < anim->numberChanges; i++) + { + CHANGE_STRUCT* change = &g_Level.Changes[anim->changeIndex + i]; + if (change->goalAnimState == item->goalAnimState) + { + for (int j = 0; j < change->numberRanges; j++) + { + RANGE_STRUCT* range = &g_Level.Ranges[change->rangeIndex + j]; + if (item->frameNumber >= range->startFrame && item->frameNumber <= range->endFrame) + { + item->animNumber = range->linkAnimNum; + item->frameNumber = range->linkFrameNum; + + return 1; + } + } + } + } + + return 0; +} + +BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item) +{ + int rate = 0; + ANIM_FRAME* framePtr[2]; + + int frac = GetFrame(item, framePtr, &rate); + if (frac == 0) + return &framePtr[0]->boundingBox; + else + { + InterpolatedBounds.X1 = framePtr[0]->boundingBox.X1 + (framePtr[1]->boundingBox.X1 - framePtr[0]->boundingBox.X1) * frac / rate; + InterpolatedBounds.X2 = framePtr[0]->boundingBox.X2 + (framePtr[1]->boundingBox.X2 - framePtr[0]->boundingBox.X2) * frac / rate; + InterpolatedBounds.Y1 = framePtr[0]->boundingBox.Y1 + (framePtr[1]->boundingBox.Y1 - framePtr[0]->boundingBox.Y1) * frac / rate; + InterpolatedBounds.Y2 = framePtr[0]->boundingBox.Y2 + (framePtr[1]->boundingBox.Y2 - framePtr[0]->boundingBox.Y2) * frac / rate; + InterpolatedBounds.Z1 = framePtr[0]->boundingBox.Z1 + (framePtr[1]->boundingBox.Z1 - framePtr[0]->boundingBox.Z1) * frac / rate; + InterpolatedBounds.Z2 = framePtr[0]->boundingBox.Z2 + (framePtr[1]->boundingBox.Z2 - framePtr[0]->boundingBox.Z2) * frac / rate; + + return &InterpolatedBounds; + } +} + +ANIM_FRAME* GetBestFrame(ITEM_INFO* item) +{ + int rate = 0; + ANIM_FRAME* framePtr[2]; + + int frac = GetFrame(item, framePtr, &rate); + + if (frac <= (rate >> 1)) + return framePtr[0]; + else + return framePtr[1]; +} + +int GetFrame(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate) +{ + ANIM_STRUCT *anim; + int frm; + int first, second; + int interp, rat; + + frm = item->frameNumber; + anim = &g_Level.Anims[item->animNumber]; + framePtr[0] = framePtr[1] = &g_Level.Frames[anim->framePtr]; + rat = *rate = anim->interpolation & 0x00ff; + frm -= anim->frameBase; + first = frm / rat; + interp = frm % rat; + framePtr[0] += first; // Get Frame pointers + framePtr[1] = framePtr[0] + 1; // and store away + if (interp == 0) + return(0); + second = first * rat + rat; + if (second>anim->frameEnd) // Clamp KeyFrame to End if need be + *rate = anim->frameEnd - (second - rat); + return(interp); +} + +void DrawAnimatingItem(ITEM_INFO* item) +{ + // TODO: to refactor + // Empty stub because actually we disable items drawing when drawRoutine pointer is NULL in OBJECT_INFO +} + +void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum) +{ + if (LM_enum >= NUM_LARA_MESHES) + LM_enum = LM_HEAD; + + Vector3 p = Vector3(pos->x, pos->y, pos->z); + g_Renderer.getLaraAbsBonePosition(&p, LM_enum); + + pos->x = p.x; + pos->y = p.y; + pos->z = p.z; +} + +void ClampRotation(PHD_3DPOS* pos, short angle, short rot) +{ + if (angle <= rot) + { + if (angle >= -rot) + pos->yRot += angle; + else + pos->yRot -= rot; + } + else + { + pos->yRot += rot; + } +} \ No newline at end of file diff --git a/TR5Main/Game/animation.h b/TR5Main/Game/animation.h new file mode 100644 index 000000000..cf1db3524 --- /dev/null +++ b/TR5Main/Game/animation.h @@ -0,0 +1,30 @@ +#pragma once +#include "box.h" + +struct PHD_3DPOS; +struct PHD_VECTOR; +struct ANIM_FRAME; +struct ITEM_INFO; + +enum ANIMCOMMAND_TYPES +{ + COMMAND_NULL = 0, + COMMAND_MOVE_ORIGIN, + COMMAND_JUMP_VELOCITY, + COMMAND_ATTACK_READY, + COMMAND_DEACTIVATE, + COMMAND_SOUND_FX, + COMMAND_EFFECT +}; + +void AnimateItem(ITEM_INFO* item); +void TranslateItem(ITEM_INFO* item, int x, int y, int z); +int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim); +int GetFrame(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate); +ANIM_FRAME* GetBestFrame(ITEM_INFO* item); +BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item); +void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum); +void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint); +void ClampRotation(PHD_3DPOS* pos, short angle, short rot); + +void DrawAnimatingItem(ITEM_INFO* item); \ No newline at end of file diff --git a/TR5Main/Game/box.cpp b/TR5Main/Game/box.cpp index 58ad0cddf..98505f8e7 100644 --- a/TR5Main/Game/box.cpp +++ b/TR5Main/Game/box.cpp @@ -3,7 +3,7 @@ #include "effects/tomb4fx.h" #include "lot.h" #include "Lara.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "camera.h" #include "control.h" @@ -11,7 +11,7 @@ #include "setup.h" #include "Specific/trmath.h" #include "objectslist.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define CHECK_CLICK(x) CLICK(x) / 2 #define ESCAPE_DIST SECTOR(5) diff --git a/TR5Main/Game/camera.cpp b/TR5Main/Game/camera.cpp index 6e317ab9e..c7e8cd00e 100644 --- a/TR5Main/Game/camera.cpp +++ b/TR5Main/Game/camera.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "camera.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "effects\effects.h" #include "effects\debris.h" diff --git a/TR5Main/Game/collide.cpp b/TR5Main/Game/collide.cpp index d2104c3ca..c3886d2e4 100644 --- a/TR5Main/Game/collide.cpp +++ b/TR5Main/Game/collide.cpp @@ -2,7 +2,7 @@ #include "control.h" #include "control\los.h" #include "collide.h" -#include "draw.h" +#include "animation.h" #include "Lara.h" #include "items.h" #include "effects\effects.h" diff --git a/TR5Main/Game/control.cpp b/TR5Main/Game/control.cpp index 67372dc75..92d1c4ebd 100644 --- a/TR5Main/Game/control.cpp +++ b/TR5Main/Game/control.cpp @@ -1,15 +1,14 @@ #include "framework.h" #include +#include "winmain.h" #include "collide.h" #include "control.h" #include "pickup.h" #include "camera.h" #include "Lara.h" #include "effects/hair.h" -#include "effects/flmtorch.h" #include "items.h" #include "flipeffect.h" -#include "draw.h" #ifdef NEW_INV #include "newinv2.h" #else @@ -21,10 +20,10 @@ #include "Sound/sound.h" #include "spotcam.h" #include "box.h" +#include "objects.h" #include "sphere.h" #include "level.h" #include "input.h" -#include "winmain.h" #include "setup.h" #include "effects/effects.h" #include "effects/tomb4fx.h" @@ -100,6 +99,13 @@ extern Inventory g_Inventory; short IsRoomOutsideNo; std::vector OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE]; +int DrawPhase() +{ + g_Renderer.Draw(); + Camera.numberFrames = g_Renderer.SyncRenderer(); + return Camera.numberFrames; +} + GAME_STATUS ControlPhase(int numFrames, int demoMode) { short oldLaraFrame; @@ -150,7 +156,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode) { if (TrInput & IN_PAUSE && GLOBAL_invMode != IM_PAUSE && LaraItem->hitPoints > 0) { - SOUND_Stop(); + Sound_Stop(); g_Renderer.DumpGameScene(); GLOBAL_invMode = IM_PAUSE; pause_menu_to_display = pause_main_menu; @@ -159,7 +165,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode) else if ((DbInput & IN_DESELECT || GLOBAL_enterinventory != NO_ITEM) && LaraItem->hitPoints > 0) { // Stop all sounds - SOUND_Stop(); + Sound_Stop(); if (S_CallInventory2()) return GAME_STATUS_LOAD_GAME; @@ -182,7 +188,7 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode) if ((DbInput & IN_DESELECT || g_Inventory.GetEnterObject() != NO_ITEM) && LaraItem->hitPoints > 0) { // Stop all sounds - SOUND_Stop(); + Sound_Stop(); int inventoryResult = g_Inventory.DoInventory(); switch (inventoryResult) { @@ -421,7 +427,6 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode) UpdateShockwaves(); TEN::Entities::TR4::UpdateScarabs(); TEN::Entities::TR4::UpdateLocusts(); - //Legacy_UpdateLightning(); AnimateWaterfalls(); // Rumble screen (like in submarine level of TRC) @@ -496,7 +501,7 @@ GAME_STATUS DoTitle(int index) InitialiseFXArray(true); InitialisePickupDisplay(); InitialiseCamera(); - SOUND_Stop(); + Sound_Stop(); // Run the level script GameScriptLevel* level = g_GameFlow->Levels[index]; @@ -614,7 +619,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame) InitialiseFXArray(true); InitialisePickupDisplay(); InitialiseCamera(); - SOUND_Stop(); + Sound_Stop(); // Run the level script GameScriptLevel* level = g_GameFlow->Levels[index]; @@ -705,7 +710,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame) while (true) { result = ControlPhase(nframes, 0); - nframes = DrawPhaseGame(); + nframes = DrawPhase(); Sound_UpdateScene(); if (result == GAME_STATUS_EXIT_TO_TITLE || @@ -715,7 +720,7 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame) g_GameScript->OnEnd(); g_GameScript->FreeLevelScripts(); // Here is the only way for exiting from the loop - SOUND_Stop(); + Sound_Stop(); StopSoundTracks(); DisableBubbles(); DisableDebris(); @@ -725,16 +730,6 @@ GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame) } } -void TranslateItem(ITEM_INFO *item, int x, int y, int z) -{ - float c = phd_cos(item->pos.yRot); - float s = phd_sin(item->pos.yRot); - - item->pos.xPos += c * x + s * z; - item->pos.yPos += y; - item->pos.zPos += -s * x + c * z; -} - int GetWaterSurface(int x, int y, int z, short roomNumber) { ROOM_INFO *room = &g_Level.Rooms[roomNumber]; @@ -824,36 +819,6 @@ void KillMoveEffects() ItemNewRoomNo = 0; } -int GetChange(ITEM_INFO *item, ANIM_STRUCT *anim) -{ - if (item->currentAnimState == item->goalAnimState) - return 0; - - if (anim->numberChanges <= 0) - return 0; - - for (int i = 0; i < anim->numberChanges; i++) - { - CHANGE_STRUCT *change = &g_Level.Changes[anim->changeIndex + i]; - if (change->goalAnimState == item->goalAnimState) - { - for (int j = 0; j < change->numberRanges; j++) - { - RANGE_STRUCT *range = &g_Level.Ranges[change->rangeIndex + j]; - if (item->frameNumber >= range->startFrame && item->frameNumber <= range->endFrame) - { - item->animNumber = range->linkAnimNum; - item->frameNumber = range->linkFrameNum; - - return 1; - } - } - } - } - - return 0; -} - void AlterFloorHeight(ITEM_INFO *item, int height) { FLOOR_INFO *floor; @@ -926,185 +891,6 @@ int GetCeiling(FLOOR_INFO *floor, int x, int y, int z) return GetCeilingHeight(ROOM_VECTOR{floor->Room, y}, x, z).value_or(NO_HEIGHT); } -void AnimateItem(ITEM_INFO *item) -{ - item->touchBits = 0; - item->hitStatus = false; - - item->frameNumber++; - - ANIM_STRUCT *anim = &g_Level.Anims[item->animNumber]; - if (anim->numberChanges > 0 && GetChange(item, anim)) - { - anim = &g_Level.Anims[item->animNumber]; - - item->currentAnimState = anim->currentAnimState; - - if (item->requiredAnimState == item->currentAnimState) - item->requiredAnimState = 0; - } - - if (item->frameNumber > anim->frameEnd) - { - if (anim->numberCommands > 0) - { - short *cmd = &g_Level.Commands[anim->commandIndex]; - for (int i = anim->numberCommands; i > 0; i--) - { - switch (*(cmd++)) - { - case COMMAND_MOVE_ORIGIN: - TranslateItem(item, cmd[0], cmd[1], cmd[2]); - cmd += 3; - break; - - case COMMAND_JUMP_VELOCITY: - item->fallspeed = *(cmd++); - item->speed = *(cmd++); - item->gravityStatus = true; - break; - - case COMMAND_DEACTIVATE: - if (Objects[item->objectNumber].intelligent && !item->afterDeath) - item->afterDeath = 1; - item->status = ITEM_DEACTIVATED; - break; - case COMMAND_SOUND_FX: - case COMMAND_EFFECT: - cmd += 2; - break; - - default: - break; - } - } - } - - item->animNumber = anim->jumpAnimNum; - item->frameNumber = anim->jumpFrameNum; - - anim = &g_Level.Anims[item->animNumber]; - - if (item->currentAnimState != anim->currentAnimState) - { - item->currentAnimState = anim->currentAnimState; - item->goalAnimState = anim->currentAnimState; - } - - if (item->requiredAnimState == item->currentAnimState) - item->requiredAnimState = 0; - } - - if (anim->numberCommands > 0) - { - short *cmd = &g_Level.Commands[anim->commandIndex]; - int flags; - int effectID = 0; - - for (int i = anim->numberCommands; i > 0; i--) - { - switch (*(cmd++)) - { - case COMMAND_MOVE_ORIGIN: - cmd += 3; - break; - - case COMMAND_JUMP_VELOCITY: - cmd += 2; - break; - - case COMMAND_SOUND_FX: - if (item->frameNumber != *cmd) - { - cmd += 2; - break; - } - - flags = cmd[1] & 0xC000; - - if (!Objects[item->objectNumber].waterCreature) - { - if (item->roomNumber == NO_ROOM) - { - item->pos.xPos = LaraItem->pos.xPos; - item->pos.yPos = LaraItem->pos.yPos - 762; - item->pos.zPos = LaraItem->pos.zPos; - - SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); - } - else if (g_Level.Rooms[item->roomNumber].flags & ENV_FLAG_WATER) - { - if (!flags || flags == SFX_WATERONLY && (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER || Objects[item->objectNumber].intelligent)) - { - SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); - } - } - else if (!flags || flags == SFX_LANDONLY && !(g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER)) - { - SoundEffect(cmd[1] & 0x3FFF, &item->pos, 2); - } - } - else - { - if (g_Level.Rooms[Camera.pos.roomNumber].flags & ENV_FLAG_WATER) - SoundEffect(cmd[1] & 0x3FFF, &item->pos, 1); - else - SoundEffect(cmd[1] & 0x3FFF, &item->pos, 0); - } - break; - - case COMMAND_EFFECT: - if (item->frameNumber != *cmd) - { - cmd += 2; - break; - } - - FXType = cmd[1] & 0xC000; - effectID = cmd[1] & 0x3FFF; - DoFlipEffect(effectID, item); - - cmd += 2; - break; - - default: - break; - } - } - } - - int lateral = 0; - - if (item->gravityStatus) - { - item->fallspeed += (item->fallspeed >= 128 ? 1 : 6); - item->pos.yPos += item->fallspeed; - } - else - { - int velocity = anim->velocity; - if (anim->acceleration) - velocity += anim->acceleration * (item->frameNumber - anim->frameBase); - item->speed = velocity >> 16; - - lateral = anim->Xvelocity; - if (anim->Xacceleration) - lateral += anim->Xacceleration * (item->frameNumber - anim->frameBase); - - lateral >>= 16; - } - - item->pos.xPos += item->speed * phd_sin(item->pos.yRot); - item->pos.zPos += item->speed * phd_cos(item->pos.yRot); - - item->pos.xPos += lateral * phd_sin(item->pos.yRot + ANGLE(90)); - item->pos.zPos += lateral * phd_cos(item->pos.yRot + ANGLE(90)); - - // Update matrices - short itemNumber = item - g_Level.Items.data(); - g_Renderer.updateItemAnimations(itemNumber, true); -} - void RumbleScreen() { if (!(GlobalCounter & 0x1FF)) diff --git a/TR5Main/Game/control.h b/TR5Main/Game/control.h index 35418b3f3..c329ae86a 100644 --- a/TR5Main/Game/control.h +++ b/TR5Main/Game/control.h @@ -33,17 +33,6 @@ enum HEADINGS WEST }; -enum COMMAND_TYPES -{ - COMMAND_NULL = 0, - COMMAND_MOVE_ORIGIN, - COMMAND_JUMP_VELOCITY, - COMMAND_ATTACK_READY, - COMMAND_DEACTIVATE, - COMMAND_SOUND_FX, - COMMAND_EFFECT -}; - #define OUTSIDE_Z 64 #define OUTSIDE_SIZE 108 @@ -84,6 +73,8 @@ extern int LastInventoryItem; extern std::vector OutsideRoomTable[OUTSIDE_SIZE][OUTSIDE_SIZE]; extern short IsRoomOutsideNo; +int DrawPhase(); + GAME_STATUS DoTitle(int index); GAME_STATUS DoLevel(int index, std::string ambient, bool loadFromSavegame); GAME_STATUS ControlPhase(int numFrames, int demoMode); @@ -91,9 +82,6 @@ GAME_STATUS ControlPhase(int numFrames, int demoMode); int GetRandomControl(); int GetRandomDraw(); -int GetChange(ITEM_INFO* item, ANIM_STRUCT* anim); -void AnimateItem(ITEM_INFO* item); -void TranslateItem(ITEM_INFO* item, int x, int y, int z); void KillMoveItems(); void KillMoveEffects(); void UpdateShatters(); @@ -106,8 +94,6 @@ void RefreshCamera(short type, short* data); void ResetGlobals(); -void AnimateWaterfalls(); - void AlterFloorHeight(ITEM_INFO* item, int height); int GetFloorHeight(FLOOR_INFO* floor, int x, int y, int z); FLOOR_INFO* GetFloor(int x, int y, int z, short* roomNumber); @@ -118,5 +104,4 @@ int ExplodeItemNode(ITEM_INFO* item, int Node, int NoXZVel, int bits); int GetWaterSurface(int x, int y, int z, short roomNumber); int GetWaterHeight(int x, int y, int z, short roomNumber); - unsigned CALLBACK GameMain(void*); \ No newline at end of file diff --git a/TR5Main/Game/control/los.cpp b/TR5Main/Game/control/los.cpp index d11392f5c..d3937b468 100644 --- a/TR5Main/Game/control/los.cpp +++ b/TR5Main/Game/control/los.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "los.h" -#include "draw.h" +#include "animation.h" #include "Sound/sound.h" #include "objects.h" #include "switch.h" diff --git a/TR5Main/Game/control/volume.cpp b/TR5Main/Game/control/volume.cpp index 7bf38d6ff..1c214bbb5 100644 --- a/TR5Main/Game/control/volume.cpp +++ b/TR5Main/Game/control/volume.cpp @@ -2,7 +2,7 @@ #include "room.h" #include "setup.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "savegame.h" #include "RenderEnums.h" #include "Renderer11.h" diff --git a/TR5Main/Game/draw.cpp b/TR5Main/Game/draw.cpp deleted file mode 100644 index e0fc163b2..000000000 --- a/TR5Main/Game/draw.cpp +++ /dev/null @@ -1,122 +0,0 @@ -#include "framework.h" -#include "draw.h" -#include "Lara.h" -#include "camera.h" -#include "level.h" -#include "Renderer11.h" - -using TEN::Renderer::g_Renderer; - -BITE_INFO EnemyBites[9] = -{ - { 20, -95, 240, 13 }, - { 48, 0, 180, -11 }, - { -48, 0, 180, 14 }, - { -48, 5, 225, 14 }, - { 15, -60, 195, 13 }, - { -30, -65, 250, 18 }, - { 0, -110, 480, 13 }, - { -20, -80, 190, -10 }, - { 10, -60, 200, 13 } -}; - -BOUNDING_BOX InterpolatedBounds; - -int DrawPhaseGame() -{ - g_Renderer.Draw(); - Camera.numberFrames = g_Renderer.SyncRenderer(); - return Camera.numberFrames; -} - -BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item) -{ - int rate = 0; - ANIM_FRAME* framePtr[2]; - - int frac = GetFrame_D2(item, framePtr, &rate); - if (frac == 0) - return &framePtr[0]->boundingBox; - else - { - InterpolatedBounds.X1 = framePtr[0]->boundingBox.X1 + (framePtr[1]->boundingBox.X1 - framePtr[0]->boundingBox.X1) * frac / rate; - InterpolatedBounds.X2 = framePtr[0]->boundingBox.X2 + (framePtr[1]->boundingBox.X2 - framePtr[0]->boundingBox.X2) * frac / rate; - InterpolatedBounds.Y1 = framePtr[0]->boundingBox.Y1 + (framePtr[1]->boundingBox.Y1 - framePtr[0]->boundingBox.Y1) * frac / rate; - InterpolatedBounds.Y2 = framePtr[0]->boundingBox.Y2 + (framePtr[1]->boundingBox.Y2 - framePtr[0]->boundingBox.Y2) * frac / rate; - InterpolatedBounds.Z1 = framePtr[0]->boundingBox.Z1 + (framePtr[1]->boundingBox.Z1 - framePtr[0]->boundingBox.Z1) * frac / rate; - InterpolatedBounds.Z2 = framePtr[0]->boundingBox.Z2 + (framePtr[1]->boundingBox.Z2 - framePtr[0]->boundingBox.Z2) * frac / rate; - - return &InterpolatedBounds; - } -} - -ANIM_FRAME* GetBestFrame(ITEM_INFO* item) -{ - int rate = 0; - ANIM_FRAME* framePtr[2]; - - int frac = GetFrame_D2(item, framePtr, &rate); - - if (frac <= (rate >> 1)) - return framePtr[0]; - else - return framePtr[1]; -} - -int GetFrame_D2(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate) -{ - ANIM_STRUCT *anim; - int frm; - int first, second; - int interp, rat; - - frm = item->frameNumber; - anim = &g_Level.Anims[item->animNumber]; - framePtr[0] = framePtr[1] = &g_Level.Frames[anim->framePtr]; - rat = *rate = anim->interpolation & 0x00ff; - frm -= anim->frameBase; - first = frm / rat; - interp = frm % rat; - framePtr[0] += first; // Get Frame pointers - framePtr[1] = framePtr[0] + 1; // and store away - if (interp == 0) - return(0); - second = first * rat + rat; - if (second>anim->frameEnd) // Clamp KeyFrame to End if need be - *rate = anim->frameEnd - (second - rat); - return(interp); -} - -void DrawAnimatingItem(ITEM_INFO* item) -{ - // TODO: to refactor - // Empty stub because actually we disable items drawing when drawRoutine pointer is NULL in OBJECT_INFO -} - -void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum) -{ - if (LM_enum >= NUM_LARA_MESHES) - LM_enum = LM_HEAD; - - Vector3 p = Vector3(pos->x, pos->y, pos->z); - g_Renderer.getLaraAbsBonePosition(&p, LM_enum); - - pos->x = p.x; - pos->y = p.y; - pos->z = p.z; -} - -void ClampRotation(PHD_3DPOS* pos, short angle, short rot) -{ - if (angle <= rot) - { - if (angle >= -rot) - pos->yRot += angle; - else - pos->yRot -= rot; - } - else - { - pos->yRot += rot; - } -} diff --git a/TR5Main/Game/draw.h b/TR5Main/Game/draw.h deleted file mode 100644 index e928d2490..000000000 --- a/TR5Main/Game/draw.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include "Box.h" - -struct PHD_3DPOS; -struct PHD_VECTOR; -struct ANIM_FRAME; -struct ITEM_INFO; - -extern BITE_INFO EnemyBites[9]; - -int DrawPhaseGame(); -int GetFrame_D2(ITEM_INFO* item, ANIM_FRAME* framePtr[], int* rate); -BOUNDING_BOX* GetBoundsAccurate(ITEM_INFO* item); -ANIM_FRAME* GetBestFrame(ITEM_INFO* item); -void DrawAnimatingItem(ITEM_INFO* item); -void GetLaraJointPosition(PHD_VECTOR* pos, int LM_enum); -void ClampRotation(PHD_3DPOS* pos, short angle, short rot); \ No newline at end of file diff --git a/TR5Main/Game/effects/chaffFX.cpp b/TR5Main/Game/effects/chaffFX.cpp index 213672948..5326611ac 100644 --- a/TR5Main/Game/effects/chaffFX.cpp +++ b/TR5Main/Game/effects/chaffFX.cpp @@ -4,7 +4,7 @@ #include "effects\tomb4fx.h" #include "control.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "smoke.h" #include "spark.h" diff --git a/TR5Main/Game/effects/effects.cpp b/TR5Main/Game/effects/effects.cpp index 9f7160002..d5b577949 100644 --- a/TR5Main/Game/effects/effects.cpp +++ b/TR5Main/Game/effects/effects.cpp @@ -1,5 +1,5 @@ #include "framework.h" -#include "draw.h" +#include "animation.h" #include "effects.h" #include "lara.h" #include "effects\tomb4fx.h" diff --git a/TR5Main/Game/effects/flmtorch.cpp b/TR5Main/Game/effects/flmtorch.cpp index 0fdadf545..235a86917 100644 --- a/TR5Main/Game/effects/flmtorch.cpp +++ b/TR5Main/Game/effects/flmtorch.cpp @@ -3,7 +3,7 @@ #include "effects/effects.h" #include "lara_flare.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "items.h" #include "level.h" #include "setup.h" diff --git a/TR5Main/Game/effects/footprint.cpp b/TR5Main/Game/effects/footprint.cpp index 0df52eadf..c10d77db0 100644 --- a/TR5Main/Game/effects/footprint.cpp +++ b/TR5Main/Game/effects/footprint.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "control.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "effects\groundfx.h" #include "effects\footprint.h" #include "level.h" diff --git a/TR5Main/Game/effects/hair.cpp b/TR5Main/Game/effects/hair.cpp index 71a1964ec..406c0b393 100644 --- a/TR5Main/Game/effects/hair.cpp +++ b/TR5Main/Game/effects/hair.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "hair.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "control.h" #include "GameFlowScript.h" diff --git a/TR5Main/Game/effects/lightning.cpp b/TR5Main/Game/effects/lightning.cpp index 8606c3480..ead4c75ad 100644 --- a/TR5Main/Game/effects/lightning.cpp +++ b/TR5Main/Game/effects/lightning.cpp @@ -2,7 +2,7 @@ #include "effects\tomb4fx.h" #include "lara.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "level.h" #include "Sound\sound.h" @@ -11,10 +11,10 @@ #include "GameFlowScript.h" #include "smoke.h" #include "drip.h" -#include +#include "effects.h" #include "Renderer11.h" -#include -#include +#include "effects.h" +#include "animation.h" using std::vector; using TEN::Renderer::g_Renderer; diff --git a/TR5Main/Game/effects/tomb4fx.cpp b/TR5Main/Game/effects/tomb4fx.cpp index feb51d3dc..1f6dc634f 100644 --- a/TR5Main/Game/effects/tomb4fx.cpp +++ b/TR5Main/Game/effects/tomb4fx.cpp @@ -2,7 +2,7 @@ #include "effects\tomb4fx.h" #include "lara.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "level.h" #include "gameflow.h" @@ -16,7 +16,7 @@ #include "Renderer11.h" #include "effects/effects.h" #include "effects/weather.h" -#include "draw.h" +#include "animation.h" using std::vector; using TEN::Renderer::g_Renderer; diff --git a/TR5Main/Game/flipeffect.cpp b/TR5Main/Game/flipeffect.cpp index cefef3c63..86f636b01 100644 --- a/TR5Main/Game/flipeffect.cpp +++ b/TR5Main/Game/flipeffect.cpp @@ -3,7 +3,7 @@ #include "Lara.h" #include "lot.h" #include "effects\hair.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "level.h" #include "setup.h" diff --git a/TR5Main/Game/gameflow.cpp b/TR5Main/Game/gameflow.cpp index 6409870cf..defff2d32 100644 --- a/TR5Main/Game/gameflow.cpp +++ b/TR5Main/Game/gameflow.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "gameflow.h" -#include "draw.h" +#include "animation.h" #include "savegame.h" #include "input.h" diff --git a/TR5Main/Game/health.cpp b/TR5Main/Game/health.cpp index 1e18ca638..739ce2589 100644 --- a/TR5Main/Game/health.cpp +++ b/TR5Main/Game/health.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "health.h" -#include "draw.h" +#include "animation.h" #include "pickup.h" #include "lara.h" #include "camera.h" diff --git a/TR5Main/Game/inventory.cpp b/TR5Main/Game/inventory.cpp index cc333d387..c738aae6d 100644 --- a/TR5Main/Game/inventory.cpp +++ b/TR5Main/Game/inventory.cpp @@ -1,7 +1,7 @@ #include "framework.h" #ifndef NEW_INV #include "inventory.h" -#include "draw.h" +#include "animation.h" #include "control.h" #include "lara_fire.h" #include "gameflow.h" diff --git a/TR5Main/Game/creature_info.h b/TR5Main/Game/itemdata/creature_info.h similarity index 99% rename from TR5Main/Game/creature_info.h rename to TR5Main/Game/itemdata/creature_info.h index f90684097..8b72a00be 100644 --- a/TR5Main/Game/creature_info.h +++ b/TR5Main/Game/itemdata/creature_info.h @@ -1,6 +1,7 @@ #pragma once #include "phd_global.h" #include + struct BOX_NODE { int exitBox; int searchNumber; diff --git a/TR5Main/Game/door_data.h b/TR5Main/Game/itemdata/door_data.h similarity index 100% rename from TR5Main/Game/door_data.h rename to TR5Main/Game/itemdata/door_data.h diff --git a/TR5Main/Game/itemdata/itemdata.h b/TR5Main/Game/itemdata/itemdata.h index be2a2df8f..86cdaa90c 100644 --- a/TR5Main/Game/itemdata/itemdata.h +++ b/TR5Main/Game/itemdata/itemdata.h @@ -4,7 +4,7 @@ #include #include "upv_info.h" #include "skidoo_info.h" -#include "door_data.h" +#include "itemdata/door_data.h" #include "kayak_info.h" #include "lara_struct.h" #include "jeep_info.h" @@ -13,7 +13,7 @@ #include "biggun_info.h" #include "quad_info.h" #include "tr5_laserhead_info.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "boat_info.h" #include "rubberboat_info.h" #include diff --git a/TR5Main/Game/lot.cpp b/TR5Main/Game/lot.cpp index c7265d833..9479b201b 100644 --- a/TR5Main/Game/lot.cpp +++ b/TR5Main/Game/lot.cpp @@ -5,7 +5,8 @@ #include "camera.h" #include "lara.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" + #define DEFAULT_FLY_UPDOWN_SPEED 16 #define DEFAULT_SWIM_UPDOWN_SPEED 32 diff --git a/TR5Main/Game/misc.cpp b/TR5Main/Game/misc.cpp index e48842473..df1a0717a 100644 --- a/TR5Main/Game/misc.cpp +++ b/TR5Main/Game/misc.cpp @@ -3,8 +3,8 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "draw.h" -#include "creature_info.h" +#include "animation.h" +#include "itemdata/creature_info.h" using std::vector; short GF(short animIndex, short frameToStart) { diff --git a/TR5Main/Game/missile.cpp b/TR5Main/Game/missile.cpp index 18b028cb4..4ef0d7b36 100644 --- a/TR5Main/Game/missile.cpp +++ b/TR5Main/Game/missile.cpp @@ -3,7 +3,7 @@ #include "Sound\sound.h" #include "items.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "effects\debris.h" #include "level.h" #include "setup.h" diff --git a/TR5Main/Game/newinv2.cpp b/TR5Main/Game/newinv2.cpp index 07d103b8c..981e6aa18 100644 --- a/TR5Main/Game/newinv2.cpp +++ b/TR5Main/Game/newinv2.cpp @@ -1,7 +1,7 @@ #include "framework.h" #ifdef NEW_INV #include "newinv2.h" -#include "draw.h" +#include "animation.h" #include "control.h" #include "lara_fire.h" #include "gameflow.h" diff --git a/TR5Main/Game/objects.cpp b/TR5Main/Game/objects.cpp index 79aecf933..12bee1f45 100644 --- a/TR5Main/Game/objects.cpp +++ b/TR5Main/Game/objects.cpp @@ -2,7 +2,7 @@ #include "objects.h" #include "items.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "Lara.h" #include "sphere.h" #include "effects\debris.h" diff --git a/TR5Main/Game/people.cpp b/TR5Main/Game/people.cpp index d705ba0dd..649203b79 100644 --- a/TR5Main/Game/people.cpp +++ b/TR5Main/Game/people.cpp @@ -1,13 +1,13 @@ #include "framework.h" #include "people.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "control\los.h" #include "sphere.h" #include "effects\debris.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" int ShotLara(ITEM_INFO* item, AI_INFO* info, BITE_INFO* gun, short extra_rotation, int damage) { diff --git a/TR5Main/Game/pickup/pickup.cpp b/TR5Main/Game/pickup/pickup.cpp index 5752d645c..83c6dc155 100644 --- a/TR5Main/Game/pickup/pickup.cpp +++ b/TR5Main/Game/pickup/pickup.cpp @@ -2,7 +2,7 @@ #include "pickup.h" #include "Specific/phd_global.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #ifdef NEW_INV #include "newinv2.h" #else diff --git a/TR5Main/Game/puzzles_keys.cpp b/TR5Main/Game/puzzles_keys.cpp index a2f6f2190..f603a1922 100644 --- a/TR5Main/Game/puzzles_keys.cpp +++ b/TR5Main/Game/puzzles_keys.cpp @@ -9,7 +9,7 @@ #endif #include "switch.h" #include "pickup.h" -#include "draw.h" +#include "animation.h" #include "control.h" #include "puzzles_keys.h" #include "generic_switch.h" diff --git a/TR5Main/Game/rope.cpp b/TR5Main/Game/rope.cpp index cafa21e8e..6b2e8d734 100644 --- a/TR5Main/Game/rope.cpp +++ b/TR5Main/Game/rope.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "rope.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "level.h" #include "input.h" diff --git a/TR5Main/Game/savegame.cpp b/TR5Main/Game/savegame.cpp index a14efa348..08277002e 100644 --- a/TR5Main/Game/savegame.cpp +++ b/TR5Main/Game/savegame.cpp @@ -15,7 +15,7 @@ #include "tr5_bats_emitter.h" #include "tr5_spider_emitter.h" #include "fullblock_switch.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" using namespace TEN::Entities::Switches; diff --git a/TR5Main/Game/sphere.cpp b/TR5Main/Game/sphere.cpp index 3f14ca09c..6c33551b8 100644 --- a/TR5Main/Game/sphere.cpp +++ b/TR5Main/Game/sphere.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "level.h" #include "setup.h" @@ -111,51 +111,6 @@ int TestCollision(ITEM_INFO* item, ITEM_INFO* l) } } -void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index) -{ - short* ptr = &frameptr[0]; - - ptr += 9; - for (int i = 0; i < index; i++) - { - ptr += ((*ptr & 0xc000) == 0 ? 2 : 1); - } - - int rot0 = *ptr++; - int frameMode = (rot0 & 0xc000); - - int rot1; - int rotX; - int rotY; - int rotZ; - - switch (frameMode) - { - case 0: - rot1 = *ptr++; - rotX = ((rot0 & 0x3ff0) >> 4); - rotY = (((rot1 & 0xfc00) >> 10) | ((rot0 & 0xf) << 6) & 0x3ff); - rotZ = ((rot1) & 0x3ff); - - *matrix = Matrix::CreateFromYawPitchRoll(rotY * (360.0f / 1024.0f) * RADIAN, - rotX * (360.0f / 1024.0f) * RADIAN, - rotZ * (360.0f / 1024.0f) * RADIAN); - break; - - case 0x4000: - *matrix = Matrix::CreateRotationX((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); - break; - - case 0x8000: - *matrix = Matrix::CreateRotationY((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); - break; - - case 0xc000: - *matrix = Matrix::CreateRotationZ((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); - break; - } -} - void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint) { // Get the real item number diff --git a/TR5Main/Game/sphere.h b/TR5Main/Game/sphere.h index ea3703d46..c42102296 100644 --- a/TR5Main/Game/sphere.h +++ b/TR5Main/Game/sphere.h @@ -20,5 +20,3 @@ extern SPHERE CreatureSpheres[MAX_SPHERES]; int TestCollision(ITEM_INFO* item, ITEM_INFO* l); int GetSpheres(ITEM_INFO* item, SPHERE* ptr, int worldSpace, Matrix local); -void GetJointAbsPosition(ITEM_INFO* item, PHD_VECTOR* vec, int joint); -void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index); diff --git a/TR5Main/Game/spotcam.cpp b/TR5Main/Game/spotcam.cpp index e2e50f7f9..3834b7b50 100644 --- a/TR5Main/Game/spotcam.cpp +++ b/TR5Main/Game/spotcam.cpp @@ -2,7 +2,7 @@ #include "spotcam.h" #include "camera.h" #include "control.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "lara.h" #include "input.h" diff --git a/TR5Main/Game/switch.cpp b/TR5Main/Game/switch.cpp index f0c1674e3..75e2d4f07 100644 --- a/TR5Main/Game/switch.cpp +++ b/TR5Main/Game/switch.cpp @@ -9,7 +9,7 @@ #else #include "inventory.h" #endif -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "camera.h" #include "setup.h" diff --git a/TR5Main/Game/text.cpp b/TR5Main/Game/text.cpp index cdc24426f..fef985276 100644 --- a/TR5Main/Game/text.cpp +++ b/TR5Main/Game/text.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "text.h" -#include "draw.h" +#include "animation.h" #include "Renderer11.h" namespace TEN::Renderer { void PrintString(int x, int y, int unk1, char* string, int unk2) { diff --git a/TR5Main/Game/text.h b/TR5Main/Game/text.h index 0c8014b60..bcf3f359b 100644 --- a/TR5Main/Game/text.h +++ b/TR5Main/Game/text.h @@ -1,4 +1,4 @@ #pragma once -#include "draw.h" +#include "animation.h" void PrintString(int x, int y, int unk1, char* string, int unk2); diff --git a/TR5Main/Game/traps.cpp b/TR5Main/Game/traps.cpp index 7e5ce5a89..1cfe83f7e 100644 --- a/TR5Main/Game/traps.cpp +++ b/TR5Main/Game/traps.cpp @@ -9,7 +9,7 @@ #include "sphere.h" #include "camera.h" #include "tr5_light.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "input.h" #include "Sound/sound.h" diff --git a/TR5Main/Objects/Effects/tr4_bubbles.cpp b/TR5Main/Objects/Effects/tr4_bubbles.cpp index 4ed26dd4a..be92b0a62 100644 --- a/TR5Main/Objects/Effects/tr4_bubbles.cpp +++ b/TR5Main/Objects/Effects/tr4_bubbles.cpp @@ -3,7 +3,7 @@ #include "effects\debris.h" #include "items.h" #include "traps.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "effects\effects.h" #include "level.h" diff --git a/TR5Main/Objects/Effects/tr4_locusts.cpp b/TR5Main/Objects/Effects/tr4_locusts.cpp index 0858907b3..03559dbfc 100644 --- a/TR5Main/Objects/Effects/tr4_locusts.cpp +++ b/TR5Main/Objects/Effects/tr4_locusts.cpp @@ -1,12 +1,12 @@ #include "framework.h" #include "tr4_locusts.h" -#include "Sound\sound.h" -#include "Specific\trmath.h" +#include "Sound/sound.h" +#include "Specific/trmath.h" #include "sphere.h" -#include "misc.h" #include "lara.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "collide.h" +#include "animation.h" namespace TEN::Entities::TR4 { LOCUST_INFO Locusts[MAX_LOCUSTS]; diff --git a/TR5Main/Objects/Effects/tr5_electricity.cpp b/TR5Main/Objects/Effects/tr5_electricity.cpp index bfef6f7b2..0996b1b7a 100644 --- a/TR5Main/Objects/Effects/tr5_electricity.cpp +++ b/TR5Main/Objects/Effects/tr5_electricity.cpp @@ -3,7 +3,7 @@ #include "effects\effects.h" #include "control.h" #include "setup.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "lara_collide.h" #include "Sound\sound.h" diff --git a/TR5Main/Objects/Generic/Doors/double_doors.cpp b/TR5Main/Objects/Generic/Doors/double_doors.cpp index e162bca6a..26f8e4835 100644 --- a/TR5Main/Objects/Generic/Doors/double_doors.cpp +++ b/TR5Main/Objects/Generic/Doors/double_doors.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "lara_struct.h" #include "lara.h" diff --git a/TR5Main/Objects/Generic/Doors/generic_doors.cpp b/TR5Main/Objects/Generic/Doors/generic_doors.cpp index d035e7cc0..a7a3362c1 100644 --- a/TR5Main/Objects/Generic/Doors/generic_doors.cpp +++ b/TR5Main/Objects/Generic/Doors/generic_doors.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "cog_switch.h" #include "objectslist.h" @@ -17,7 +17,7 @@ #include "lara.h" #include "trmath.h" #include "misc.h" -#include "door_data.h" +#include "itemdata/door_data.h" #include "collide.h" #include "itemdata/itemdata.h" diff --git a/TR5Main/Objects/Generic/Doors/pushpull_kick_door.cpp b/TR5Main/Objects/Generic/Doors/pushpull_kick_door.cpp index ee5c0d543..c6d078b0d 100644 --- a/TR5Main/Objects/Generic/Doors/pushpull_kick_door.cpp +++ b/TR5Main/Objects/Generic/Doors/pushpull_kick_door.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "lara_struct.h" #include "lara.h" @@ -17,7 +17,7 @@ #include "misc.h" #include "pushpull_kick_door.h" #include "collide.h" -#include "door_data.h" +#include "itemdata/door_data.h" namespace TEN::Entities::Doors { diff --git a/TR5Main/Objects/Generic/Doors/sequence_door.cpp b/TR5Main/Objects/Generic/Doors/sequence_door.cpp index 22350de74..b83ce1c63 100644 --- a/TR5Main/Objects/Generic/Doors/sequence_door.cpp +++ b/TR5Main/Objects/Generic/Doors/sequence_door.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "lara_struct.h" #include "lara.h" @@ -17,7 +17,7 @@ #include "misc.h" #include "sequence_door.h" #include "fullblock_switch.h" -#include "door_data.h" +#include "itemdata/door_data.h" using namespace TEN::Entities::Switches; diff --git a/TR5Main/Objects/Generic/Doors/steel_door.cpp b/TR5Main/Objects/Generic/Doors/steel_door.cpp index 2b326c1ba..98eb8027e 100644 --- a/TR5Main/Objects/Generic/Doors/steel_door.cpp +++ b/TR5Main/Objects/Generic/Doors/steel_door.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "lara_struct.h" #include "lara.h" diff --git a/TR5Main/Objects/Generic/Doors/underwater_door.cpp b/TR5Main/Objects/Generic/Doors/underwater_door.cpp index c282217c8..d44a1e92a 100644 --- a/TR5Main/Objects/Generic/Doors/underwater_door.cpp +++ b/TR5Main/Objects/Generic/Doors/underwater_door.cpp @@ -9,7 +9,7 @@ #include "input.h" #include "pickup.h" #include "sound.h" -#include "draw.h" +#include "animation.h" #include "sphere.h" #include "lara_struct.h" #include "lara.h" diff --git a/TR5Main/Objects/Generic/Object/generic_trapdoor.cpp b/TR5Main/Objects/Generic/Object/generic_trapdoor.cpp index 5af8b7663..a9428c977 100644 --- a/TR5Main/Objects/Generic/Object/generic_trapdoor.cpp +++ b/TR5Main/Objects/Generic/Object/generic_trapdoor.cpp @@ -5,6 +5,7 @@ #include "camera.h" #include "control.h" #include "level.h" +#include "animation.h" OBJECT_COLLISION_BOUNDS CeilingTrapDoorBounds = {-256, 256, 0, 900, -768, -256, -1820, 1820, -5460, 5460, -1820, 1820}; static PHD_VECTOR CeilingTrapDoorPos = {0, 1056, -480}; diff --git a/TR5Main/Objects/Generic/Switches/cog_switch.cpp b/TR5Main/Objects/Generic/Switches/cog_switch.cpp index bbcc2429b..f4c0e3098 100644 --- a/TR5Main/Objects/Generic/Switches/cog_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/cog_switch.cpp @@ -4,10 +4,11 @@ #include "input.h" #include "lara.h" #include "generic_switch.h" -#include "door_data.h" -#include "Box.h" +#include "itemdata/door_data.h" +#include "box.h" #include "generic_doors.h" #include "collide.h" +#include "animation.h" using namespace TEN::Entities::Doors; diff --git a/TR5Main/Objects/Generic/Switches/crowbar_switch.cpp b/TR5Main/Objects/Generic/Switches/crowbar_switch.cpp index 5e05ce010..61bf0f571 100644 --- a/TR5Main/Objects/Generic/Switches/crowbar_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/crowbar_switch.cpp @@ -1,14 +1,14 @@ #include "framework.h" #include "generic_switch.h" -#include "control.h" #include "input.h" #include "lara.h" #include "crowbar_switch.h" #include "newinv2.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "pickup.h" #include "level.h" #include "collide.h" +#include "animation.h" namespace TEN::Entities::Switches { diff --git a/TR5Main/Objects/Generic/Switches/fullblock_switch.cpp b/TR5Main/Objects/Generic/Switches/fullblock_switch.cpp index e5a7ba2be..bc416fa1d 100644 --- a/TR5Main/Objects/Generic/Switches/fullblock_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/fullblock_switch.cpp @@ -1,12 +1,12 @@ #include "framework.h" #include "fullblock_switch.h" -#include "control.h" #include "input.h" #include "lara.h" #include "generic_switch.h" #include "setup.h" #include "collide.h" #include "level.h" +#include "animation.h" namespace TEN::Entities::Switches { diff --git a/TR5Main/Objects/Generic/Switches/generic_switch.cpp b/TR5Main/Objects/Generic/Switches/generic_switch.cpp index b3477b104..b5d5db8b9 100644 --- a/TR5Main/Objects/Generic/Switches/generic_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/generic_switch.cpp @@ -4,7 +4,7 @@ #include "lara.h" #include "generic_switch.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "collide.h" #include "floordata.h" diff --git a/TR5Main/Objects/Generic/Switches/rail_switch.cpp b/TR5Main/Objects/Generic/Switches/rail_switch.cpp index dbc6592a6..e5589855d 100644 --- a/TR5Main/Objects/Generic/Switches/rail_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/rail_switch.cpp @@ -1,11 +1,11 @@ #include "framework.h" #include "rail_switch.h" -#include "control.h" #include "input.h" #include "lara.h" #include "generic_switch.h" #include "level.h" #include "collide.h" +#include "animation.h" namespace TEN::Entities::Switches { diff --git a/TR5Main/Objects/Generic/Switches/turn_switch.cpp b/TR5Main/Objects/Generic/Switches/turn_switch.cpp index 210886e65..362553f87 100644 --- a/TR5Main/Objects/Generic/Switches/turn_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/turn_switch.cpp @@ -3,13 +3,12 @@ #include "control.h" #include "input.h" #include "lara.h" -#include "generic_switch.h" #include "sound.h" -#include "switch.h" #include "setup.h" #include "camera.h" #include "level.h" #include "collide.h" +#include "animation.h" namespace TEN::Entities::Switches { diff --git a/TR5Main/Objects/Generic/Switches/underwater_switch.cpp b/TR5Main/Objects/Generic/Switches/underwater_switch.cpp index 3a543a237..c50da28d4 100644 --- a/TR5Main/Objects/Generic/Switches/underwater_switch.cpp +++ b/TR5Main/Objects/Generic/Switches/underwater_switch.cpp @@ -1,14 +1,12 @@ #include "framework.h" -#include "control.h" #include "input.h" #include "lara.h" #include "underwater_switch.h" -#include "newinv2.h" -#include "Sound\sound.h" #include "generic_switch.h" #include "camera.h" #include "collide.h" #include "level.h" +#include "animation.h" namespace TEN::Entities::Switches { diff --git a/TR5Main/Objects/TR1/Entity/tr1_bear.cpp b/TR5Main/Objects/TR1/Entity/tr1_bear.cpp index 0a5aa6120..0f023bc79 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_bear.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_bear.cpp @@ -6,7 +6,7 @@ #include "level.h" #include "control.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO bearBite = { 0, 96, 335, 14 }; diff --git a/TR5Main/Objects/TR1/Entity/tr1_centaur.cpp b/TR5Main/Objects/TR1/Entity/tr1_centaur.cpp index ab6ecdcb5..ddc41ad17 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_centaur.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_centaur.cpp @@ -10,7 +10,7 @@ #include "sphere.h" #include "lara_one_gun.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "collide.h" #include "item.h" #include "setup.h" diff --git a/TR5Main/Objects/TR1/Entity/tr1_doppelganger.cpp b/TR5Main/Objects/TR1/Entity/tr1_doppelganger.cpp index 7f8dfb6c7..6e9f3e95f 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_doppelganger.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_doppelganger.cpp @@ -1,12 +1,12 @@ #include "framework.h" #include "tr1_doppelganger.h" -#include "box.h" #include "items.h" #include "lara_fire.h" #include "misc.h" #include "level.h" #include "lara.h" #include "control.h" +#include "animation.h" // TODO: Evil lara is not targetable and cant move like lara. diff --git a/TR5Main/Objects/TR1/Entity/tr1_giant_mutant.cpp b/TR5Main/Objects/TR1/Entity/tr1_giant_mutant.cpp index 101ffbcbf..c481b8532 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_giant_mutant.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_giant_mutant.cpp @@ -1,14 +1,15 @@ #include "framework.h" #include "box.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "items.h" #include "camera.h" #include "setup.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" +#include "animation.h" enum abortion_anims { ABORT_EMPTY, ABORT_STOP, ABORT_TURNL, ABORT_TURNR, ABORT_ATTACK1, ABORT_ATTACK2, diff --git a/TR5Main/Objects/TR1/Entity/tr1_natla.cpp b/TR5Main/Objects/TR1/Entity/tr1_natla.cpp index 2ca69cf1a..9322afbef 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_natla.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_natla.cpp @@ -8,7 +8,7 @@ #include "Sound\sound.h" #include "effects\effects.h" #include "Specific\trmath.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define NATLA_NEAR_DEATH 200 diff --git a/TR5Main/Objects/TR1/Entity/tr1_wolf.cpp b/TR5Main/Objects/TR1/Entity/tr1_wolf.cpp index 2ab0bdd14..60c062aba 100644 --- a/TR5Main/Objects/TR1/Entity/tr1_wolf.cpp +++ b/TR5Main/Objects/TR1/Entity/tr1_wolf.cpp @@ -7,7 +7,7 @@ #include "setup.h" #include "control.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO wolfBite = { 0, -14, 174, 6 }; diff --git a/TR5Main/Objects/TR1/tr1_objects.cpp b/TR5Main/Objects/TR1/tr1_objects.cpp index 6a80fda68..653ca6a23 100644 --- a/TR5Main/Objects/TR1/tr1_objects.cpp +++ b/TR5Main/Objects/TR1/tr1_objects.cpp @@ -19,7 +19,7 @@ #include "setup.h" #include "level.h" #include "object_helper.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" static void StartBaddy(OBJECT_INFO* obj) { diff --git a/TR5Main/Objects/TR2/Entity/tr2_barracuda.cpp b/TR5Main/Objects/TR2/Entity/tr2_barracuda.cpp index 8ad5e2806..037371d27 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_barracuda.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_barracuda.cpp @@ -5,7 +5,7 @@ #include "lara.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO barracudaBite = { 2, -60, 121, 7 }; void BarracudaControl(short itemNum) diff --git a/TR5Main/Objects/TR2/Entity/tr2_dragon.cpp b/TR5Main/Objects/TR2/Entity/tr2_dragon.cpp index e6ed7b9d4..0dcf49bd6 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_dragon.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_dragon.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "tr2_dragon.h" #include "lara.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "items.h" #include "collide.h" #include "box.h" @@ -11,8 +11,9 @@ #include "level.h" #include "setup.h" #include "input.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "animation.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" #define DRAGON_SWIPE_DAMAGE 250 #define DRAGON_TOUCH_DAMAGE 10 diff --git a/TR5Main/Objects/TR2/Entity/tr2_eagle_or_crow.cpp b/TR5Main/Objects/TR2/Entity/tr2_eagle_or_crow.cpp index e8f05f7ed..4826f4966 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_eagle_or_crow.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_eagle_or_crow.cpp @@ -6,7 +6,7 @@ #include "items.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO eagleBite = { 15, 46, 21, 6 }; BITE_INFO crowBite = { 2, 10, 60, 14 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_knifethrower.cpp b/TR5Main/Objects/TR2/Entity/tr2_knifethrower.cpp index bfb2b2dbf..2c8985b84 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_knifethrower.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_knifethrower.cpp @@ -8,7 +8,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "floordata.h" #include "collide.h" diff --git a/TR5Main/Objects/TR2/Entity/tr2_mercenary.cpp b/TR5Main/Objects/TR2/Entity/tr2_mercenary.cpp index b1ce381a2..60143a671 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_mercenary.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_mercenary.cpp @@ -6,7 +6,7 @@ #include "level.h" #include "control.h" #include "Specific\trmath.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO mercUziBite = { 0, 150, 19, 17 }; BITE_INFO mercAutoPistolBite = { 0, 230, 9, 17 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_monk.cpp b/TR5Main/Objects/TR2/Entity/tr2_monk.cpp index 21c6d52e3..562fe24b9 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_monk.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_monk.cpp @@ -6,7 +6,7 @@ #include "Sound\sound.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO monkBite = { -23,16,265, 14 }; extern bool MonksAttackLara; diff --git a/TR5Main/Objects/TR2/Entity/tr2_rat.cpp b/TR5Main/Objects/TR2/Entity/tr2_rat.cpp index 11fd2ad7c..df095af46 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_rat.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_rat.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "control.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO ratBite = { 0, 0, 57, 2 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_shark.cpp b/TR5Main/Objects/TR2/Entity/tr2_shark.cpp index 071e883f2..38d2734db 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_shark.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_shark.cpp @@ -1,11 +1,12 @@ #include "framework.h" #include "tr2_shark.h" #include "box.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "lara.h" #include "setup.h" #include "level.h" #include "control.h" +#include "animation.h" BITE_INFO sharkBite = { 17, -22, 344, 12 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_silencer.cpp b/TR5Main/Objects/TR2/Entity/tr2_silencer.cpp index 02faf671e..1211dff03 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_silencer.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_silencer.cpp @@ -5,7 +5,7 @@ #include "setup.h" #include "level.h" #include "control.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO silencerGun = { 3, 331, 56, 10 }; void SilencerControl(short itemNum) diff --git a/TR5Main/Objects/TR2/Entity/tr2_skidman.cpp b/TR5Main/Objects/TR2/Entity/tr2_skidman.cpp index 101c8438b..255f28b2c 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_skidman.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_skidman.cpp @@ -9,10 +9,13 @@ #include "sphere.h" #include "setup.h" #include "level.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "snowmobile.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "skidoo_info.h" +#include "animation.h" + + enum SKIDMAN_STATE { SMAN_EMPTY, SMAN_WAIT, SMAN_MOVING, SMAN_STARTLEFT, SMAN_STARTRIGHT, SMAN_LEFT, SMAN_RIGHT, SMAN_DEATH }; #define SMAN_MIN_TURN (ANGLE(6.0f)/3) diff --git a/TR5Main/Objects/TR2/Entity/tr2_spear_guardian.cpp b/TR5Main/Objects/TR2/Entity/tr2_spear_guardian.cpp index eb2381b8d..ba6d19777 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_spear_guardian.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_spear_guardian.cpp @@ -7,7 +7,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO spearLeftBite = { 0, 0, 920, 11 }; BITE_INFO spearRightBite = { 0, 0, 920, 18 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_spider.cpp b/TR5Main/Objects/TR2/Entity/tr2_spider.cpp index 5b515a899..e7a2eba9e 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_spider.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_spider.cpp @@ -1,16 +1,16 @@ #include "framework.h" #include "tr2_spider.h" -#include "effects\effects.h" -#include "sphere.h" +#include "effects/effects.h" #include "box.h" #include "items.h" #include "lot.h" #include "lara.h" #include "setup.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" +#include "animation.h" BITE_INFO spiderBite = { 0, 0, 41, 1 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_sword_guardian.cpp b/TR5Main/Objects/TR2/Entity/tr2_sword_guardian.cpp index e767758c0..d834ba737 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_sword_guardian.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_sword_guardian.cpp @@ -8,7 +8,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO swordBite = { 0, 37, 550, 15 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_worker_dualrevolver.cpp b/TR5Main/Objects/TR2/Entity/tr2_worker_dualrevolver.cpp index ad8213387..c9db958d1 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_worker_dualrevolver.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_worker_dualrevolver.cpp @@ -5,7 +5,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO workerDualGunL = { -2, 275, 23, 6 }; BITE_INFO workerDualGunR = { 2, 275, 23, 10 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_worker_flamethrower.cpp b/TR5Main/Objects/TR2/Entity/tr2_worker_flamethrower.cpp index 6da1be912..c74de63fd 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_worker_flamethrower.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_worker_flamethrower.cpp @@ -1,18 +1,17 @@ #include "framework.h" #include "tr2_worker_flamethrower.h" #include "box.h" -#include "sphere.h" #include "people.h" #include "items.h" #include "missile.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "setup.h" #include "level.h" #include "control.h" -#include "effects\effects.h" -#include "Specific\trmath.h" -#include "creature_info.h" -#include "control.h" +#include "animation.h" +#include "effects/effects.h" +#include "Specific/trmath.h" +#include "itemdata/creature_info.h" BITE_INFO workerFlameThrower = { 0, 250, 32, 9 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_worker_machinegun.cpp b/TR5Main/Objects/TR2/Entity/tr2_worker_machinegun.cpp index 155924edd..e11019d08 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_worker_machinegun.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_worker_machinegun.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "level.h" #include "control.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO workerMachineGun = { 0, 308, 32, 9 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_worker_shotgun.cpp b/TR5Main/Objects/TR2/Entity/tr2_worker_shotgun.cpp index 85cd62af8..d94d93d3b 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_worker_shotgun.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_worker_shotgun.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "level.h" #include "control.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO workerShotgun = { 0, 281, 40, 9 }; diff --git a/TR5Main/Objects/TR2/Entity/tr2_yeti.cpp b/TR5Main/Objects/TR2/Entity/tr2_yeti.cpp index a0867aa6b..06fe6c281 100644 --- a/TR5Main/Objects/TR2/Entity/tr2_yeti.cpp +++ b/TR5Main/Objects/TR2/Entity/tr2_yeti.cpp @@ -6,7 +6,7 @@ #include "lara.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO yetiBiteR = { 12, 101, 19, 10 }; diff --git a/TR5Main/Objects/TR2/Trap/tr2_killerstatue.cpp b/TR5Main/Objects/TR2/Trap/tr2_killerstatue.cpp index 338abe370..7353adaf1 100644 --- a/TR5Main/Objects/TR2/Trap/tr2_killerstatue.cpp +++ b/TR5Main/Objects/TR2/Trap/tr2_killerstatue.cpp @@ -4,7 +4,8 @@ #include "setup.h" #include "control.h" #include "lara.h" -#include "effects\effects.h" +#include "effects/effects.h" +#include "animation.h" void InitialiseKillerStatue(short itemNumber) { diff --git a/TR5Main/Objects/TR2/Trap/tr2_spinningblade.cpp b/TR5Main/Objects/TR2/Trap/tr2_spinningblade.cpp index c4e0c9ee7..163f6e7ee 100644 --- a/TR5Main/Objects/TR2/Trap/tr2_spinningblade.cpp +++ b/TR5Main/Objects/TR2/Trap/tr2_spinningblade.cpp @@ -4,9 +4,10 @@ #include "control.h" #include "lara.h" #include "setup.h" -#include "effects\effects.h" -#include "Sound\sound.h" +#include "effects/effects.h" +#include "Sound/sound.h" #include "items.h" +#include "animation.h" void InitialiseSpinningBlade(short itemNumber) { diff --git a/TR5Main/Objects/TR2/Trap/tr2_springboard.cpp b/TR5Main/Objects/TR2/Trap/tr2_springboard.cpp index 9f4e9f263..7124bc83f 100644 --- a/TR5Main/Objects/TR2/Trap/tr2_springboard.cpp +++ b/TR5Main/Objects/TR2/Trap/tr2_springboard.cpp @@ -2,7 +2,7 @@ #include "tr2_springboard.h" #include "level.h" #include "lara.h" -#include "control.h" +#include "animation.h" void SpringBoardControl(short itemNumber) { diff --git a/TR5Main/Objects/TR2/Vehicles/boat.cpp b/TR5Main/Objects/TR2/Vehicles/boat.cpp index b008ff0c8..21627303e 100644 --- a/TR5Main/Objects/TR2/Vehicles/boat.cpp +++ b/TR5Main/Objects/TR2/Vehicles/boat.cpp @@ -8,9 +8,10 @@ #include "setup.h" #include "level.h" #include "input.h" -#include "Sound\sound.h" -#include "effects\effects.h" -#include "particle\SimpleParticle.h" +#include "animation.h" +#include "Sound/sound.h" +#include "effects/effects.h" +#include "particle/SimpleParticle.h" #include "boat_info.h" enum BOAT_STATE diff --git a/TR5Main/Objects/TR2/Vehicles/snowmobile.cpp b/TR5Main/Objects/TR2/Vehicles/snowmobile.cpp index abe1a9695..937cbb27a 100644 --- a/TR5Main/Objects/TR2/Vehicles/snowmobile.cpp +++ b/TR5Main/Objects/TR2/Vehicles/snowmobile.cpp @@ -5,17 +5,17 @@ #include "collide.h" #include "lara_fire.h" #include "lara_one_gun.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "lara_flare.h" -#include "lot.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "sphere.h" #include "setup.h" #include "level.h" #include "input.h" -#include "Sound\sound.h" -#include "particle\SimpleParticle.h" -#include "Specific\prng.h" +#include "animation.h" +#include "Sound/sound.h" +#include "particle/SimpleParticle.h" +#include "Specific/prng.h" #include "camera.h" #include "skidoo_info.h" diff --git a/TR5Main/Objects/TR2/tr2_objects.cpp b/TR5Main/Objects/TR2/tr2_objects.cpp index 9462a15a0..61a962e38 100644 --- a/TR5Main/Objects/TR2/tr2_objects.cpp +++ b/TR5Main/Objects/TR2/tr2_objects.cpp @@ -34,7 +34,7 @@ #include "box.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" static void StartBaddy(OBJECT_INFO* obj) { diff --git a/TR5Main/Objects/TR3/Entity/tr3_civvy.cpp b/TR5Main/Objects/TR3/Entity/tr3_civvy.cpp index c08edaaff..2c0458c17 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_civvy.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_civvy.cpp @@ -7,7 +7,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO civvy_hit = { 0,0,0, 13 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_cobra.cpp b/TR5Main/Objects/TR3/Entity/tr3_cobra.cpp index c9eaafb4b..387b9dd92 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_cobra.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_cobra.cpp @@ -6,7 +6,7 @@ #include "lara.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO cobraBite = { 0, 0, 0, 13 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_fishemitter.cpp b/TR5Main/Objects/TR3/Entity/tr3_fishemitter.cpp index a9aeaf339..872b23232 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_fishemitter.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_fishemitter.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "tr3_fishemitter.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "lara.h" #include "fish.h" diff --git a/TR5Main/Objects/TR3/Entity/tr3_flamethrower.cpp b/TR5Main/Objects/TR3/Entity/tr3_flamethrower.cpp index f1d2d6e7c..fa5bb0650 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_flamethrower.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_flamethrower.cpp @@ -5,13 +5,13 @@ #include "effects\effects.h" #include "people.h" #include "items.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "lot.h" #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO flamerBite = { 0, 340, 64, 7 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_monkey.cpp b/TR5Main/Objects/TR3/Entity/tr3_monkey.cpp index 528ae105a..4af4821f3 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_monkey.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_monkey.cpp @@ -7,7 +7,7 @@ #include "setup.h" #include "lot.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO monkeyBite = { 10, 10, 11, 13 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_mpgun.cpp b/TR5Main/Objects/TR3/Entity/tr3_mpgun.cpp index 4852ee07d..3ea7abfd4 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_mpgun.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_mpgun.cpp @@ -2,14 +2,15 @@ #include "tr3_mpgun.h" #include "box.h" #include "sphere.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "people.h" #include "setup.h" #include "lot.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "animation.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" enum MPGUN_STATES { diff --git a/TR5Main/Objects/TR3/Entity/tr3_mpstick.cpp b/TR5Main/Objects/TR3/Entity/tr3_mpstick.cpp index 5daf15312..f33c56147 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_mpstick.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_mpstick.cpp @@ -9,7 +9,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO mpstickBite1 = { 247, 10, 11, 13 }; BITE_INFO mpstickBite2 = { 0, 0, 100, 6 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_raptor.cpp b/TR5Main/Objects/TR3/Entity/tr3_raptor.cpp index 13e9aa5b4..07f0c9b24 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_raptor.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_raptor.cpp @@ -6,7 +6,7 @@ #include "lot.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" static BITE_INFO raptorBite = { 0, 66, 318, 22 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_scuba.cpp b/TR5Main/Objects/TR3/Entity/tr3_scuba.cpp index 8b26bf6de..d8977d2aa 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_scuba.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_scuba.cpp @@ -5,7 +5,7 @@ #include "lara.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" #include "control\los.h" #include "effects\effects.h" diff --git a/TR5Main/Objects/TR3/Entity/tr3_shiva.cpp b/TR5Main/Objects/TR3/Entity/tr3_shiva.cpp index e592a237b..55cd79166 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_shiva.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_shiva.cpp @@ -1,14 +1,14 @@ #include "framework.h" #include "tr3_shiva.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "box.h" -#include "sphere.h" #include "items.h" #include "setup.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "animation.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" BITE_INFO shivaLeftBite = { 0, 0, 920, 13 }; BITE_INFO shivaRightBite = { 0, 0, 920, 22 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_sophia.cpp b/TR5Main/Objects/TR3/Entity/tr3_sophia.cpp index 643c0c2bb..6d2135e68 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_sophia.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_sophia.cpp @@ -7,7 +7,7 @@ #include "box.h" #include "sphere.h" #include "people.h" -#include "draw.h" +#include "animation.h" #include "misc.h" #include "setup.h" #include "level.h" diff --git a/TR5Main/Objects/TR3/Entity/tr3_tiger.cpp b/TR5Main/Objects/TR3/Entity/tr3_tiger.cpp index ab56daa6f..dcf9b53a7 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_tiger.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_tiger.cpp @@ -6,7 +6,7 @@ #include "level.h" #include "control.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO tigerBite = { 19, -13, 3, 26 }; diff --git a/TR5Main/Objects/TR3/Entity/tr3_tony.cpp b/TR5Main/Objects/TR3/Entity/tr3_tony.cpp index 38af4719d..96011853d 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_tony.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_tony.cpp @@ -6,13 +6,13 @@ #include "lot.h" #include "boss.h" #include "box.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "setup.h" #include "lara.h" #include "traps.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "collide.h" enum TonyFlameType diff --git a/TR5Main/Objects/TR3/Entity/tr3_trex.cpp b/TR5Main/Objects/TR3/Entity/tr3_trex.cpp index e8ee2a853..0713c2bdc 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_trex.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_trex.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" void LaraTyrannosaurDeath(ITEM_INFO* item) { diff --git a/TR5Main/Objects/TR3/Entity/tr3_tribesman.cpp b/TR5Main/Objects/TR3/Entity/tr3_tribesman.cpp index f8bd845b1..77db6f3fa 100644 --- a/TR5Main/Objects/TR3/Entity/tr3_tribesman.cpp +++ b/TR5Main/Objects/TR3/Entity/tr3_tribesman.cpp @@ -7,10 +7,10 @@ #include "lara.h" #include "Sound\sound.h" #include "people.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO tribesmanAxeBite = { 0, 16, 265, 13 }; BITE_INFO tribesmanDartsBite1 = { 0, 0, -200, 13 }; diff --git a/TR5Main/Objects/TR3/Trap/train.cpp b/TR5Main/Objects/TR3/Trap/train.cpp index e8ac6c80b..b025f09cb 100644 --- a/TR5Main/Objects/TR3/Trap/train.cpp +++ b/TR5Main/Objects/TR3/Trap/train.cpp @@ -3,12 +3,13 @@ #include "floordata.h" #include "control.h" #include "level.h" -#include "effects\effects.h" -#include "Sound\sound.h" +#include "effects/effects.h" +#include "Sound/sound.h" #include "camera.h" #include "sphere.h" #include "lara.h" #include "collide.h" +#include "animation.h" #define TRAIN_VEL 260 #define LARA_TRAIN_DEATH_ANIM 3; diff --git a/TR5Main/Objects/TR3/Vehicles/biggun.cpp b/TR5Main/Objects/TR3/Vehicles/biggun.cpp index 744844dce..da9a84d42 100644 --- a/TR5Main/Objects/TR3/Vehicles/biggun.cpp +++ b/TR5Main/Objects/TR3/Vehicles/biggun.cpp @@ -11,7 +11,7 @@ #include "effects\effects.h" #include "lara_struct.h" #include "effects\tomb4fx.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "camera.h" #include "biggun_info.h" diff --git a/TR5Main/Objects/TR3/Vehicles/kayak.cpp b/TR5Main/Objects/TR3/Vehicles/kayak.cpp index df1293939..463c19a54 100644 --- a/TR5Main/Objects/TR3/Vehicles/kayak.cpp +++ b/TR5Main/Objects/TR3/Vehicles/kayak.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "kayak.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "camera.h" #include "Lara.h" #include "collide.h" diff --git a/TR5Main/Objects/TR3/Vehicles/minecart.cpp b/TR5Main/Objects/TR3/Vehicles/minecart.cpp index 4e536aa19..8d7233110 100644 --- a/TR5Main/Objects/TR3/Vehicles/minecart.cpp +++ b/TR5Main/Objects/TR3/Vehicles/minecart.cpp @@ -6,7 +6,7 @@ #include "lara_flare.h" #include "items.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "misc.h" #include "camera.h" #include "level.h" diff --git a/TR5Main/Objects/TR3/Vehicles/quad.cpp b/TR5Main/Objects/TR3/Vehicles/quad.cpp index bef1dfc7e..b10e17743 100644 --- a/TR5Main/Objects/TR3/Vehicles/quad.cpp +++ b/TR5Main/Objects/TR3/Vehicles/quad.cpp @@ -1,20 +1,20 @@ #include "framework.h" #include "quad.h" #include "lara.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "items.h" -#include "sphere.h" #include "collide.h" #include "camera.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "lara_flare.h" #include "lara_one_gun.h" #include "misc.h" #include "setup.h" #include "level.h" #include "input.h" -#include "Sound\sound.h" -#include "Specific\prng.h" +#include "animation.h" +#include "Sound/sound.h" +#include "Specific/prng.h" #include "quad_info.h" using std::vector; diff --git a/TR5Main/Objects/TR3/Vehicles/rubberboat.cpp b/TR5Main/Objects/TR3/Vehicles/rubberboat.cpp index f6a064185..2c7e70cb3 100644 --- a/TR5Main/Objects/TR3/Vehicles/rubberboat.cpp +++ b/TR5Main/Objects/TR3/Vehicles/rubberboat.cpp @@ -8,7 +8,7 @@ #include "sphere.h" #include "Sound\sound.h" #include "effects\bubble.h" -#include "draw.h" +#include "animation.h" #include "camera.h" #include "setup.h" #include "rubberboat_info.h" diff --git a/TR5Main/Objects/TR3/Vehicles/upv.cpp b/TR5Main/Objects/TR3/Vehicles/upv.cpp index e6cbebc98..2f97f1eb1 100644 --- a/TR5Main/Objects/TR3/Vehicles/upv.cpp +++ b/TR5Main/Objects/TR3/Vehicles/upv.cpp @@ -7,7 +7,7 @@ #include "collide.h" #include "box.h" #include "lara_flare.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "misc.h" #include "camera.h" diff --git a/TR5Main/Objects/TR3/tr3_objects.cpp b/TR5Main/Objects/TR3/tr3_objects.cpp index 39878c8ce..45de2bead 100644 --- a/TR5Main/Objects/TR3/tr3_objects.cpp +++ b/TR5Main/Objects/TR3/tr3_objects.cpp @@ -33,8 +33,8 @@ #include "collide.h" #include "setup.h" #include "level.h" -#include "creature_info.h" -#include "Box.h" +#include "itemdata/creature_info.h" +#include "box.h" static void StartBaddy(OBJECT_INFO* obj) { obj = &Objects[ID_TONY_BOSS]; diff --git a/TR5Main/Objects/TR4/Entity/tr4_ahmet.cpp b/TR5Main/Objects/TR4/Entity/tr4_ahmet.cpp index 053c34a21..efff448bb 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_ahmet.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_ahmet.cpp @@ -13,7 +13,7 @@ #include "people.h" #include "items.h" #include "lot.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" using namespace TEN::Effects::Environment; diff --git a/TR5Main/Objects/TR4/Entity/tr4_baboon.cpp b/TR5Main/Objects/TR4/Entity/tr4_baboon.cpp index f9916cc0c..33df479d5 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_baboon.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_baboon.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "tr4_baboon.h" -#include "Box.h" +#include "box.h" #include "lot.h" #include "setup.h" #include "control.h" @@ -9,7 +9,7 @@ #include "effects\effects.h" #include "effects\weather.h" #include "effects\tomb4fx.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" using std::vector; using namespace TEN::Effects::Environment; diff --git a/TR5Main/Objects/TR4/Entity/tr4_baddy.cpp b/TR5Main/Objects/TR4/Entity/tr4_baddy.cpp index 7ec100c25..0d32674e5 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_baddy.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_baddy.cpp @@ -9,9 +9,9 @@ #include "setup.h" #include "level.h" #include "control.h" -#include +#include "animation.h" #include -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" /* diff --git a/TR5Main/Objects/TR4/Entity/tr4_bat.cpp b/TR5Main/Objects/TR4/Entity/tr4_bat.cpp index 491d3eac9..c40cc3f95 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_bat.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_bat.cpp @@ -8,7 +8,7 @@ #include "lot.h" #include "setup.h" #include "Specific\trmath.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp b/TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp index c94d79ad1..3e21df3a8 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp @@ -10,7 +10,7 @@ #include "Sound\sound.h" #include #include -#include "creature_info.h" +#include "itemdata/creature_info.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Entity/tr4_bigscorpion.cpp b/TR5Main/Objects/TR4/Entity/tr4_bigscorpion.cpp index 54253c162..9d3946616 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_bigscorpion.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_bigscorpion.cpp @@ -7,7 +7,7 @@ #include "lot.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" int CutSeqNum; diff --git a/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp b/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp index 71abff157..b0c26e0e5 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_crocodile.cpp @@ -8,9 +8,9 @@ #include "level.h" #include "control.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "misc.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "collide.h" #include "control.h" diff --git a/TR5Main/Objects/TR4/Entity/tr4_demigod.cpp b/TR5Main/Objects/TR4/Entity/tr4_demigod.cpp index 65bbbc40b..b908a4bab 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_demigod.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_demigod.cpp @@ -5,14 +5,14 @@ #include "people.h" #include "sphere.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "camera.h" #include "setup.h" #include "level.h" #include "lara.h" #include "control.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" extern SMOKE_SPARKS SmokeSparks[MAX_SPARKS_SMOKE]; diff --git a/TR5Main/Objects/TR4/Entity/tr4_dog.cpp b/TR5Main/Objects/TR4/Entity/tr4_dog.cpp index 9b554ceb6..bcd88765f 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_dog.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_dog.cpp @@ -5,7 +5,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" namespace TEN::Entities::TR4 diff --git a/TR5Main/Objects/TR4/Entity/tr4_enemy_jeep.cpp b/TR5Main/Objects/TR4/Entity/tr4_enemy_jeep.cpp index 4951fb1fd..ec953d916 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_enemy_jeep.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_enemy_jeep.cpp @@ -1,16 +1,16 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Sound\sound.h" -#include -#include "creature_info.h" +#include "framework.h" +#include "tr4_enemy_jeep.h" +#include "items.h" +#include "level.h" +#include "box.h" +#include "Specific/trmath.h" +#include "control.h" +#include "lara.h" +#include "sphere.h" +#include "lot.h" +#include "Sound/sound.h" +#include "animation.h" +#include "itemdata/creature_info.h" #include "setup.h" #include "control/trigger.h" #include "effects/effects.h" diff --git a/TR5Main/Objects/TR4/Entity/tr4_guide.cpp b/TR5Main/Objects/TR4/Entity/tr4_guide.cpp index d04073135..2ec5a4a7b 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_guide.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_guide.cpp @@ -2,15 +2,15 @@ #include "tr4_guide.h" #include "items.h" #include "box.h" -#include "sphere.h" #include "lot.h" -#include "effects\effects.h" -#include "effects\tomb4fx.h" +#include "effects/effects.h" +#include "effects/tomb4fx.h" #include "setup.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "animation.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" #define STATE_GUIDE_STOP 1 #define STATE_GUIDE_WALK 2 diff --git a/TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp b/TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp index 1c47bba58..441e3cc4a 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp @@ -7,9 +7,9 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "misc.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" #define STATE_HAMMERHEAD_STOP 0 diff --git a/TR5Main/Objects/TR4/Entity/tr4_harpy.cpp b/TR5Main/Objects/TR4/Entity/tr4_harpy.cpp index 526f89f7d..ee1567c66 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_harpy.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_harpy.cpp @@ -5,12 +5,12 @@ #include "effects\effects.h" #include "items.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "lot.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO harpyBite1 = { 0, 0, 0, 4 }; diff --git a/TR5Main/Objects/TR4/Entity/tr4_horseman.cpp b/TR5Main/Objects/TR4/Entity/tr4_horseman.cpp index 1991b9a4e..f2bda157a 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_horseman.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_horseman.cpp @@ -1,15 +1,16 @@ #include "framework.h" #include "tr4_horseman.h" #include "items.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "setup.h" #include "level.h" #include "control.h" -#include "Specific\trmath.h" -#include -#include "Sound\sound.h" -#include +#include "Specific/trmath.h" +#include "lara.h" +#include "Sound/sound.h" +#include "sphere.h" #include "box.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Entity/tr4_jeanyves.cpp b/TR5Main/Objects/TR4/Entity/tr4_jeanyves.cpp index eeee1fd8f..4da8a1a4d 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_jeanyves.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_jeanyves.cpp @@ -4,6 +4,7 @@ #include "level.h" #include "lara.h" #include "control.h" +#include "animation.h" void InitialiseJeanYves(short itemNumber) { diff --git a/TR5Main/Objects/TR4/Entity/tr4_knighttemplar.cpp b/TR5Main/Objects/TR4/Entity/tr4_knighttemplar.cpp index 8e32389dc..81d01ded5 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_knighttemplar.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_knighttemplar.cpp @@ -2,14 +2,14 @@ #include "tr4_knighttemplar.h" #include "items.h" #include "box.h" -#include "sphere.h" -#include "effects\effects.h" -#include "effects\debris.h" +#include "effects/effects.h" +#include "effects/debris.h" #include "setup.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "animation.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" BITE_INFO knightTemplarBite = { 0, 0, 0, 11 }; diff --git a/TR5Main/Objects/TR4/Entity/tr4_mummy.cpp b/TR5Main/Objects/TR4/Entity/tr4_mummy.cpp index f948fbcf9..b7829a405 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_mummy.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_mummy.cpp @@ -8,7 +8,7 @@ #include "setup.h" #include "control.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" enum MUMMY_STATES { diff --git a/TR5Main/Objects/TR4/Entity/tr4_mutant.cpp b/TR5Main/Objects/TR4/Entity/tr4_mutant.cpp index 86bfce518..65f646b2d 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_mutant.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_mutant.cpp @@ -1,15 +1,16 @@ #include "framework.h" #include "tr4_mutant.h" #include "tr4_locusts.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "misc.h" #include "lara.h" #include "setup.h" #include "sphere.h" #include "objectslist.h" -#include "Specific\trmath.h" -#include "creature_info.h" +#include "Specific/trmath.h" +#include "itemdata/creature_info.h" #include "control.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Entity/tr4_sas.cpp b/TR5Main/Objects/TR4/Entity/tr4_sas.cpp index d090d9185..5cf16169e 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_sas.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_sas.cpp @@ -1,6 +1,5 @@ #include "framework.h" #include "tr4_sas.h" -#include "sphere.h" #include "box.h" #include "items.h" #include "people.h" @@ -8,12 +7,13 @@ #include "setup.h" #include "level.h" #include "control.h" -#include "effects\effects.h" -#include "effects\tomb4fx.h" -#include -#include -#include "creature_info.h" -#include "control.h" +#include "animation.h" +#include "effects/effects.h" +#include "effects/tomb4fx.h" +#include "Specific/input.h" +#include "Lara/lara_one_gun.h" +#include "itemdata/creature_info.h" + namespace TEN::Entities::TR4 { enum SAS_STATES diff --git a/TR5Main/Objects/TR4/Entity/tr4_sentrygun.cpp b/TR5Main/Objects/TR4/Entity/tr4_sentrygun.cpp index 58e858133..4a1453e72 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_sentrygun.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_sentrygun.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "tr4_sentrygun.h" #include "box.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "items.h" #ifdef NEW_INV #include "newinv2.h" @@ -10,13 +10,13 @@ #endif #include "level.h" #include "lot.h" -#include "effects\tomb4fx.h" -#include "sphere.h" +#include "effects/tomb4fx.h" #include "people.h" -#include "Sound\sound.h" -#include "Specific\trmath.h" +#include "Sound/sound.h" +#include "Specific/trmath.h" #include "objectslist.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" +#include "animation.h" #ifndef NEW_INV extern Inventory g_Inventory; diff --git a/TR5Main/Objects/TR4/Entity/tr4_setha.cpp b/TR5Main/Objects/TR4/Entity/tr4_setha.cpp index 130acbb8a..11f7b3fa9 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_setha.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_setha.cpp @@ -1,16 +1,15 @@ #include "framework.h" #include "tr4_setha.h" #include "items.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "setup.h" #include "level.h" #include "control.h" -#include "Specific\trmath.h" -#include -#include "Sound\sound.h" -#include -#include -#include "creature_info.h" +#include "Specific/trmath.h" +#include "lara.h" +#include "people.h" +#include "itemdata/creature_info.h" +#include "animation.h" BITE_INFO SethaBite1 = { 0,220,50,17 }; BITE_INFO SethaBite2 = { 0,220,50,13 }; diff --git a/TR5Main/Objects/TR4/Entity/tr4_skeleton.cpp b/TR5Main/Objects/TR4/Entity/tr4_skeleton.cpp index e9e02bc5f..8cc90d13d 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_skeleton.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_skeleton.cpp @@ -3,16 +3,16 @@ #include "items.h" #include "box.h" #include "people.h" -#include "effects\effects.h" -#include "sphere.h" -#include "effects\debris.h" +#include "effects/effects.h" +#include "effects/debris.h" #include "lot.h" #include "lara.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "setup.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "level.h" -#include "creature_info.h" +#include "animation.h" +#include "itemdata/creature_info.h" #include "floordata.h" #include "collide.h" diff --git a/TR5Main/Objects/TR4/Entity/tr4_smallscorpion.cpp b/TR5Main/Objects/TR4/Entity/tr4_smallscorpion.cpp index e6098aa29..8738dac2a 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_smallscorpion.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_smallscorpion.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO smallScorpionBiteInfo1 = { 0, 0, 0, 0 }; diff --git a/TR5Main/Objects/TR4/Entity/tr4_sphinx.cpp b/TR5Main/Objects/TR4/Entity/tr4_sphinx.cpp index d99780258..f99fa0c61 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_sphinx.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_sphinx.cpp @@ -8,7 +8,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" enum SPHIX_STATES { SPHINX_EMPTY, diff --git a/TR5Main/Objects/TR4/Entity/tr4_troops.cpp b/TR5Main/Objects/TR4/Entity/tr4_troops.cpp index 1df410212..b8090d642 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_troops.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_troops.cpp @@ -9,8 +9,10 @@ #include "setup.h" #include "lot.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" +#include "animation.h" + BITE_INFO TroopsBite1 = { 0, 300, 64, 7 }; #define STATE_TROOPS_STOP 1 diff --git a/TR5Main/Objects/TR4/Entity/tr4_von_croy.cpp b/TR5Main/Objects/TR4/Entity/tr4_von_croy.cpp index 9905a2b6e..091f25d33 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_von_croy.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_von_croy.cpp @@ -1,17 +1,15 @@ #include "framework.h" -#include "tr4_guide.h" #include "items.h" #include "box.h" -#include "sphere.h" #include "lot.h" -#include "effects\effects.h" -#include "effects\tomb4fx.h" +#include "effects/effects.h" +#include "effects/tomb4fx.h" #include "setup.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include -#include "creature_info.h" +#include "Sound/sound.h" +#include "animation.h" +#include "itemdata/creature_info.h" #define STATE_VON_CROY_STOP 1 #define STATE_VON_CROY_WALK 2 diff --git a/TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp b/TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp index 7e2405204..437f86dbe 100644 --- a/TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp +++ b/TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp @@ -7,7 +7,7 @@ #include "lot.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO wildboardBiteInfo = { 0, 0, 0, 14 }; diff --git a/TR5Main/Objects/TR4/Object/tr4_clockwork_beetle.cpp b/TR5Main/Objects/TR4/Object/tr4_clockwork_beetle.cpp index 0ca214a66..2f15b9d2b 100644 --- a/TR5Main/Objects/TR4/Object/tr4_clockwork_beetle.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_clockwork_beetle.cpp @@ -3,7 +3,7 @@ #include "items.h" #include "level.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "Sound\sound.h" #include "collide.h" diff --git a/TR5Main/Objects/TR4/Object/tr4_element_puzzle.cpp b/TR5Main/Objects/TR4/Object/tr4_element_puzzle.cpp index f4fba4325..a915af2d7 100644 --- a/TR5Main/Objects/TR4/Object/tr4_element_puzzle.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_element_puzzle.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control.h" #include "Sound\sound.h" -#include +#include "animation.h" #include #include #include diff --git a/TR5Main/Objects/TR4/Object/tr4_laradouble.cpp b/TR5Main/Objects/TR4/Object/tr4_laradouble.cpp index 73852d542..929921df5 100644 --- a/TR5Main/Objects/TR4/Object/tr4_laradouble.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_laradouble.cpp @@ -2,9 +2,10 @@ #include "tr4_laradouble.h" #include "items.h" #include "level.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "box.h" #include "lara.h" +#include "animation.h" void InitialiseLaraDouble(short itemNum) { diff --git a/TR5Main/Objects/TR4/Object/tr4_mapper.cpp b/TR5Main/Objects/TR4/Object/tr4_mapper.cpp index 0b60c960e..447676a7c 100644 --- a/TR5Main/Objects/TR4/Object/tr4_mapper.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_mapper.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control.h" #include "Sound\sound.h" -#include +#include "animation.h" #include #include #include diff --git a/TR5Main/Objects/TR4/Object/tr4_obelisk.cpp b/TR5Main/Objects/TR4/Object/tr4_obelisk.cpp index eaaf13807..19c5970c1 100644 --- a/TR5Main/Objects/TR4/Object/tr4_obelisk.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_obelisk.cpp @@ -4,12 +4,12 @@ #include "level.h" #include "setup.h" #include "control.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "lara.h" -#include "effects\effects.h" -#include "items.h" -#include "effects\tomb4fx.h" +#include "effects/effects.h" +#include "effects/tomb4fx.h" #include "input.h" +#include "animation.h" void InitialiseObelisk(short itemNumber) { diff --git a/TR5Main/Objects/TR4/Object/tr4_scales.cpp b/TR5Main/Objects/TR4/Object/tr4_scales.cpp index a656ef3dc..669f39d65 100644 --- a/TR5Main/Objects/TR4/Object/tr4_scales.cpp +++ b/TR5Main/Objects/TR4/Object/tr4_scales.cpp @@ -7,7 +7,7 @@ #include "lara.h" #include "switch.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "tr4_ahmet.h" #include "generic_switch.h" diff --git a/TR5Main/Objects/TR4/Trap/tr4_birdblade.cpp b/TR5Main/Objects/TR4/Trap/tr4_birdblade.cpp index 2156e1502..a354ac19c 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_birdblade.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_birdblade.cpp @@ -2,6 +2,7 @@ #include "tr4_birdblade.h" #include "level.h" #include "control.h" +#include "animation.h" void BirdBladeControl(short itemNum) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_catwalkblade.cpp b/TR5Main/Objects/TR4/Trap/tr4_catwalkblade.cpp index d81699b17..fa9426346 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_catwalkblade.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_catwalkblade.cpp @@ -2,6 +2,7 @@ #include "tr4_catwalkblade.h" #include "level.h" #include "control.h" +#include "animation.h" void CatwalkBladeControl(short itemNum) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_chain.cpp b/TR5Main/Objects/TR4/Trap/tr4_chain.cpp index e2f0261a6..294a4d60f 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_chain.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_chain.cpp @@ -2,6 +2,7 @@ #include "tr4_chain.h" #include "level.h" #include "control.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Trap/tr4_cog.cpp b/TR5Main/Objects/TR4/Trap/tr4_cog.cpp index c2fbfa0d2..14c5a03b4 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_cog.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_cog.cpp @@ -2,11 +2,11 @@ #include "tr4_cog.h" #include "level.h" #include "control.h" -#include "sphere.h" -#include "Sound\sound.h" -#include "Game\collide.h" -#include "Game\effects\effects.h" -#include +#include "Sound/sound.h" +#include "collide.h" +#include "effects/effects.h" +#include "Lara/lara.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Trap/tr4_fourblades.cpp b/TR5Main/Objects/TR4/Trap/tr4_fourblades.cpp index 0c6af272f..a466a4464 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_fourblades.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_fourblades.cpp @@ -2,6 +2,7 @@ #include "tr4_fourblades.h" #include "level.h" #include "control.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Trap/tr4_hammer.cpp b/TR5Main/Objects/TR4/Trap/tr4_hammer.cpp index 62fd18fe8..de7686551 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_hammer.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_hammer.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control.h" #include "Sound\sound.h" -#include +#include "animation.h" #include #include #include diff --git a/TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp b/TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp index 4d4145ba2..966a0782e 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "effects\effects.h" @@ -36,7 +36,7 @@ void JobySpikesControl(short itemNumber) int rate; SoundEffect(SFX_TR4_METAL_SCRAPE_LOOP1, &item->pos, 0); - GetFrame_D2(LaraItem, &framePtr, &rate); + GetFrame(LaraItem, &framePtr, &rate); int dy = LaraItem->pos.yPos + framePtr->boundingBox.Y1; int dl = 3328 * item->itemFlags[1] / 4096; diff --git a/TR5Main/Objects/TR4/Trap/tr4_moving_blade.cpp b/TR5Main/Objects/TR4/Trap/tr4_moving_blade.cpp index fcb46dd35..8687e30c0 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_moving_blade.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_moving_blade.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control.h" #include "Sound\sound.h" -#include +#include "animation.h" #include #include #include diff --git a/TR5Main/Objects/TR4/Trap/tr4_plinthblade.cpp b/TR5Main/Objects/TR4/Trap/tr4_plinthblade.cpp index c0ca7f2bc..c7a903549 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_plinthblade.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_plinthblade.cpp @@ -2,6 +2,7 @@ #include "tr4_plinthblade.h" #include "level.h" #include "control.h" +#include "animation.h" void PlinthBladeControl(short itemNum) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_plough.cpp b/TR5Main/Objects/TR4/Trap/tr4_plough.cpp index 77a7fd2dd..c23ea6a5e 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_plough.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_plough.cpp @@ -2,6 +2,7 @@ #include "tr4_plough.h" #include "level.h" #include "control.h" +#include "animation.h" void PloughControl(short itemNum) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_sethblade.cpp b/TR5Main/Objects/TR4/Trap/tr4_sethblade.cpp index 0c8c80c9d..3c3114932 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_sethblade.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_sethblade.cpp @@ -3,6 +3,7 @@ #include "level.h" #include "setup.h" #include "control.h" +#include "animation.h" void InitialiseSethBlade(short itemNum) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_slicerdicer.cpp b/TR5Main/Objects/TR4/Trap/tr4_slicerdicer.cpp index e6e8f0ff1..232e43384 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_slicerdicer.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_slicerdicer.cpp @@ -3,6 +3,7 @@ #include "level.h" #include "Sound\sound.h" #include "items.h" +#include "animation.h" #include "Specific\trmath.h" void InitialiseSlicerDicer(short itemNum) diff --git a/TR5Main/Objects/TR4/Trap/tr4_spikeball.cpp b/TR5Main/Objects/TR4/Trap/tr4_spikeball.cpp index 36b33f5f3..fa24cd6ec 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_spikeball.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_spikeball.cpp @@ -2,6 +2,7 @@ #include "tr4_spikeball.h" #include "level.h" #include "control.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Trap/tr4_spikyceiling.cpp b/TR5Main/Objects/TR4/Trap/tr4_spikyceiling.cpp index 338e1965d..d97fafd3a 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_spikyceiling.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_spikyceiling.cpp @@ -2,10 +2,11 @@ #include "tr4_spikyceiling.h" #include "level.h" #include "control.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "items.h" #include "lara.h" -#include "effects\effects.h" +#include "effects/effects.h" +#include "animation.h" void ControlSpikyCeiling(short itemNumber) { diff --git a/TR5Main/Objects/TR4/Trap/tr4_stargate.cpp b/TR5Main/Objects/TR4/Trap/tr4_stargate.cpp index 0963c6b10..c95e8985b 100644 --- a/TR5Main/Objects/TR4/Trap/tr4_stargate.cpp +++ b/TR5Main/Objects/TR4/Trap/tr4_stargate.cpp @@ -2,11 +2,12 @@ #include "tr4_stargate.h" #include "level.h" #include "control.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "collide.h" #include "sphere.h" #include "lara.h" -#include "effects\effects.h" +#include "effects/effects.h" +#include "animation.h" namespace TEN::Entities::TR4 { diff --git a/TR5Main/Objects/TR4/Vehicles/jeep.cpp b/TR5Main/Objects/TR4/Vehicles/jeep.cpp index f5f3ba9fe..6adb253d8 100644 --- a/TR5Main/Objects/TR4/Vehicles/jeep.cpp +++ b/TR5Main/Objects/TR4/Vehicles/jeep.cpp @@ -6,22 +6,21 @@ #else #include "inventory.h" #endif -#include "effects\effects.h" +#include "effects/effects.h" #include "collide.h" #include "lara_one_gun.h" #include "items.h" #include "camera.h" -#include "effects\tomb4fx.h" -#include "sphere.h" +#include "effects/tomb4fx.h" #include "lara_flare.h" #include "input.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "setup.h" #include "level.h" -#include "Box.h" +#include "animation.h" #include "jeep_info.h" -using std::vector; +using std::vector; enum JEEP_STATES { diff --git a/TR5Main/Objects/TR4/Vehicles/motorbike.cpp b/TR5Main/Objects/TR4/Vehicles/motorbike.cpp index cc16158f3..0510a4de3 100644 --- a/TR5Main/Objects/TR4/Vehicles/motorbike.cpp +++ b/TR5Main/Objects/TR4/Vehicles/motorbike.cpp @@ -1,9 +1,8 @@ #include "framework.h" #include "motorbike.h" #include "level.h" -#include "sphere.h" #include "control.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "lara.h" #ifdef NEW_INV #include "newinv2.h" @@ -14,13 +13,13 @@ #include "lara_flare.h" #include "setup.h" #include "lara_one_gun.h" -#include "effects\tomb4fx.h" +#include "effects/tomb4fx.h" #include "items.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "health.h" #include "camera.h" -#include "Specific\prng.h" -#include "Box.h" +#include "animation.h" +#include "Specific/prng.h" #include "motorbike_info.h" using namespace TEN::Math::Random; diff --git a/TR5Main/Objects/TR4/tr4_objects.cpp b/TR5Main/Objects/TR4/tr4_objects.cpp index f3e568f2a..7fbbdd802 100644 --- a/TR5Main/Objects/TR4/tr4_objects.cpp +++ b/TR5Main/Objects/TR4/tr4_objects.cpp @@ -71,8 +71,8 @@ #include "setup.h" #include "level.h" #include "tr4_enemy_jeep.h" -#include "creature_info.h" -#include "Box.h" +#include "itemdata/creature_info.h" +#include "box.h" using namespace TEN::Entities::TR4; diff --git a/TR5Main/Objects/TR5/Emitter/tr5_bats_emitter.cpp b/TR5Main/Objects/TR5/Emitter/tr5_bats_emitter.cpp index 12055ba3e..c88684be8 100644 --- a/TR5Main/Objects/TR5/Emitter/tr5_bats_emitter.cpp +++ b/TR5Main/Objects/TR5/Emitter/tr5_bats_emitter.cpp @@ -7,7 +7,7 @@ #include "effects\tomb4fx.h" #include "Sound\sound.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include int NextBat; diff --git a/TR5Main/Objects/TR5/Entity/tr5_autoguns.cpp b/TR5Main/Objects/TR5/Entity/tr5_autoguns.cpp index d1f9cb800..41a764bf9 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_autoguns.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_autoguns.cpp @@ -2,7 +2,7 @@ #include "tr5_autoguns.h" #include "sphere.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "control\los.h" #include "effects\effects.h" #include "effects\tomb4fx.h" diff --git a/TR5Main/Objects/TR5/Entity/tr5_brownbeast.cpp b/TR5Main/Objects/TR5/Entity/tr5_brownbeast.cpp index 02e49edd0..c11ace2bf 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_brownbeast.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_brownbeast.cpp @@ -8,7 +8,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO BrownBeastBite1 = { 0, 0, 0, 16 }; BITE_INFO BrownBeastBite2 = { 0, 0, 0, 22 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_chef.cpp b/TR5Main/Objects/TR5/Entity/tr5_chef.cpp index 17a2a5d18..fcead406c 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_chef.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_chef.cpp @@ -11,7 +11,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define STATE_CHEF_COOKING 1 #define STATE_CHEF_TURN_180 2 diff --git a/TR5Main/Objects/TR5/Entity/tr5_cyborg.cpp b/TR5Main/Objects/TR5/Entity/tr5_cyborg.cpp index 7e63c5a5d..3d22488fd 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_cyborg.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_cyborg.cpp @@ -5,14 +5,14 @@ #include "box.h" #include "effects\effects.h" #include "people.h" -#include "draw.h" +#include "animation.h" #include "effects\tomb4fx.h" #include "lara.h" #include "traps.h" #include "setup.h" #include "level.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define STATE_HITMAN_STOP 1 #define STATE_HITMAN_WALK 2 diff --git a/TR5Main/Objects/TR5/Entity/tr5_doberman.cpp b/TR5Main/Objects/TR5/Entity/tr5_doberman.cpp index 162fadb2f..a01174cb4 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_doberman.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_doberman.cpp @@ -5,7 +5,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO DobermanBite = { 0, 0x1E, 0x8D, 0x14 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_dog.cpp b/TR5Main/Objects/TR5/Entity/tr5_dog.cpp index 836b1c4d9..746bac306 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_dog.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_dog.cpp @@ -6,7 +6,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" static BYTE DogAnims[] = { 20, 21, 22, 20 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_ghost.cpp b/TR5Main/Objects/TR5/Entity/tr5_ghost.cpp index 6209643dc..c67d7ae87 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_ghost.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_ghost.cpp @@ -7,7 +7,7 @@ #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO InvisibleGhostBite = { 0, 0, 0, 17 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_gladiator.cpp b/TR5Main/Objects/TR5/Entity/tr5_gladiator.cpp index c56e107b8..474c0a572 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_gladiator.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_gladiator.cpp @@ -2,15 +2,15 @@ #include "tr5_gladiator.h" #include "items.h" #include "box.h" -#include "sphere.h" -#include "effects\debris.h" -#include "effects\effects.h" -#include "effects\tomb4fx.h" +#include "effects/debris.h" +#include "effects/effects.h" +#include "effects/tomb4fx.h" #include "setup.h" #include "level.h" #include "lara.h" -#include "Sound\sound.h" -#include "creature_info.h" +#include "Sound/sound.h" +#include "itemdata/creature_info.h" +#include "animation.h" BITE_INFO GladiatorBite = { 0, 0, 0, 16 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_guard.cpp b/TR5Main/Objects/TR5/Entity/tr5_guard.cpp index ce448f420..ba05e1242 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_guard.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_guard.cpp @@ -8,11 +8,11 @@ #include "effects\tomb4fx.h" #include "control\los.h" #include "setup.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" BITE_INFO SwatGun = { 80, 200, 13, 0 }; BITE_INFO SniperGun = { 0, 480, 110, 13 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_gunship.cpp b/TR5Main/Objects/TR5/Entity/tr5_gunship.cpp index 4a2503860..704e86d43 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_gunship.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_gunship.cpp @@ -3,7 +3,7 @@ #include "level.h" #include "control\los.h" #include "Sound\sound.h" -#include "draw.h" +#include "animation.h" #include "camera.h" #include "effects\effects.h" #include "effects\debris.h" diff --git a/TR5Main/Objects/TR5/Entity/tr5_hydra.cpp b/TR5Main/Objects/TR5/Entity/tr5_hydra.cpp index 028268d88..a0ebd2544 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_hydra.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_hydra.cpp @@ -6,11 +6,11 @@ #include "effects\effects.h" #include "setup.h" #include "people.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define STATE_HYDRA_STOP 0 #define STATE_HYDRA_BITE_ATTACK1 1 diff --git a/TR5Main/Objects/TR5/Entity/tr5_imp.cpp b/TR5Main/Objects/TR5/Entity/tr5_imp.cpp index 75cf66542..28e2b36cb 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_imp.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_imp.cpp @@ -3,13 +3,13 @@ #include "items.h" #include "sphere.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "effects\effects.h" #include "effects\flmtorch.h" #include "box.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" #define STATE_IMP_WALK 0 diff --git a/TR5Main/Objects/TR5/Entity/tr5_lagoon_witch.cpp b/TR5Main/Objects/TR5/Entity/tr5_lagoon_witch.cpp index 40e387477..0adb8b268 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_lagoon_witch.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_lagoon_witch.cpp @@ -12,7 +12,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define STATE_LAGOON_WITCH_SWIM 1 #define STATE_LAGOON_WITCH_STOP 2 diff --git a/TR5Main/Objects/TR5/Entity/tr5_larson.cpp b/TR5Main/Objects/TR5/Entity/tr5_larson.cpp index 46130305e..efecf8a1a 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_larson.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_larson.cpp @@ -2,15 +2,15 @@ #include "tr5_larson.h" #include "items.h" #include "box.h" -#include "sphere.h" -#include "effects\effects.h" +#include "effects/effects.h" #include "people.h" -#include "lot.h" #include "lara.h" #include "setup.h" #include "level.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" +#include "animation.h" + #define STATE_TR5_LARSON_STOP 1 #define STATE_TR5_LARSON_WALK 2 #define STATE_TR5_LARSON_RUN 3 diff --git a/TR5Main/Objects/TR5/Entity/tr5_laser_head.cpp b/TR5Main/Objects/TR5/Entity/tr5_laser_head.cpp index 0eac920f0..a99bef8b1 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_laser_head.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_laser_head.cpp @@ -7,7 +7,7 @@ #include "box.h" #include "people.h" #include "effects\debris.h" -#include "draw.h" +#include "animation.h" #include "control\los.h" #include "traps.h" #include "setup.h" diff --git a/TR5Main/Objects/TR5/Entity/tr5_lion.cpp b/TR5Main/Objects/TR5/Entity/tr5_lion.cpp index 9be3f7f91..64046ec6e 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_lion.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_lion.cpp @@ -9,7 +9,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" BITE_INFO LionBite1 = { -2, -10, 250, 21 }; diff --git a/TR5Main/Objects/TR5/Entity/tr5_reaper.cpp b/TR5Main/Objects/TR5/Entity/tr5_reaper.cpp index 224c6c68d..dd663d4f1 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_reaper.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_reaper.cpp @@ -5,7 +5,7 @@ #include "setup.h" #include "level.h" #include "lara.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "control.h" void InitialiseReaper(short itemNum) { diff --git a/TR5Main/Objects/TR5/Entity/tr5_roman_statue.cpp b/TR5Main/Objects/TR5/Entity/tr5_roman_statue.cpp index 168674038..0d81098fe 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_roman_statue.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_roman_statue.cpp @@ -7,13 +7,13 @@ #include "box.h" #include "people.h" #include "effects\debris.h" -#include "draw.h" +#include "animation.h" #include "control.h" #include "setup.h" #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #define STATE_ROMAN_STATUE_STOP 1 #define STATE_ROMAN_STATUE_SCREAMING 2 diff --git a/TR5Main/Objects/TR5/Entity/tr5_submarine.cpp b/TR5Main/Objects/TR5/Entity/tr5_submarine.cpp index f9634f0a8..c500526fb 100644 --- a/TR5Main/Objects/TR5/Entity/tr5_submarine.cpp +++ b/TR5Main/Objects/TR5/Entity/tr5_submarine.cpp @@ -7,13 +7,13 @@ #include "effects\tomb4fx.h" #include "effects\effects.h" #include "lara_fire.h" -#include "draw.h" +#include "animation.h" #include "lara_one_gun.h" #include "setup.h" #include "level.h" #include "lara.h" #include "Sound\sound.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "collide.h" #include "control\los.h" diff --git a/TR5Main/Objects/TR5/Light/tr5_light.cpp b/TR5Main/Objects/TR5/Light/tr5_light.cpp index 825c90519..108858fd1 100644 --- a/TR5Main/Objects/TR5/Light/tr5_light.cpp +++ b/TR5Main/Objects/TR5/Light/tr5_light.cpp @@ -1,12 +1,11 @@ #include "framework.h" #include "tr5_light.h" -#include "items.h" #include "level.h" -#include "control\los.h" -#include "effects\effects.h" -#include "Sound\sound.h" -#include "sphere.h" -#include "Specific\trmath.h" +#include "control/los.h" +#include "effects/effects.h" +#include "Sound/sound.h" +#include "Specific/trmath.h" +#include "animation.h" void PulseLightControl(short itemNumber) { diff --git a/TR5Main/Objects/TR5/Object/tr5_genslot.cpp b/TR5Main/Objects/TR5/Object/tr5_genslot.cpp index 8e3cd2ee3..b5b751a2e 100644 --- a/TR5Main/Objects/TR5/Object/tr5_genslot.cpp +++ b/TR5Main/Objects/TR5/Object/tr5_genslot.cpp @@ -5,7 +5,7 @@ #include "control.h" #include "effects\effects.h" #include "sphere.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "lara_collide.h" diff --git a/TR5Main/Objects/TR5/Object/tr5_missile.cpp b/TR5Main/Objects/TR5/Object/tr5_missile.cpp index d4fe15070..b0ff2837e 100644 --- a/TR5Main/Objects/TR5/Object/tr5_missile.cpp +++ b/TR5Main/Objects/TR5/Object/tr5_missile.cpp @@ -6,7 +6,7 @@ #include "sphere.h" #include "effects\tomb4fx.h" #include "effects\effects.h" -#include "draw.h" +#include "animation.h" #include "traps.h" #include "level.h" #include "effects\debris.h" diff --git a/TR5Main/Objects/TR5/Object/tr5_pushableblock.cpp b/TR5Main/Objects/TR5/Object/tr5_pushableblock.cpp index babd784d0..1beac1b38 100644 --- a/TR5Main/Objects/TR5/Object/tr5_pushableblock.cpp +++ b/TR5Main/Objects/TR5/Object/tr5_pushableblock.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "tr5_pushableblock.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "items.h" #include "collide.h" #include "flipeffect.h" diff --git a/TR5Main/Objects/TR5/Object/tr5_rollingball.cpp b/TR5Main/Objects/TR5/Object/tr5_rollingball.cpp index 644fea1a8..0b3aa21eb 100644 --- a/TR5Main/Objects/TR5/Object/tr5_rollingball.cpp +++ b/TR5Main/Objects/TR5/Object/tr5_rollingball.cpp @@ -5,9 +5,10 @@ #include "control.h" #include "lara.h" #include "setup.h" -#include "Sound\sound.h" -#include "effects\effects.h" +#include "Sound/sound.h" +#include "effects/effects.h" #include "level.h" +#include "animation.h" void RollingBallCollision(short itemNumber, ITEM_INFO* l, COLL_INFO* coll) { diff --git a/TR5Main/Objects/TR5/Object/tr5_teleporter.cpp b/TR5Main/Objects/TR5/Object/tr5_teleporter.cpp index 34c82ba63..7d3f9c758 100644 --- a/TR5Main/Objects/TR5/Object/tr5_teleporter.cpp +++ b/TR5Main/Objects/TR5/Object/tr5_teleporter.cpp @@ -7,7 +7,7 @@ #include "effects\weather.h" #include "lara.h" #include "camera.h" -#include "Box.h" +#include "box.h" using namespace TEN::Effects::Environment; diff --git a/TR5Main/Objects/TR5/Switch/tr5_crowdove_switch.cpp b/TR5Main/Objects/TR5/Switch/tr5_crowdove_switch.cpp index 3d97c95c4..544ddd15a 100644 --- a/TR5Main/Objects/TR5/Switch/tr5_crowdove_switch.cpp +++ b/TR5Main/Objects/TR5/Switch/tr5_crowdove_switch.cpp @@ -5,7 +5,7 @@ #include "lara.h" #include "generic_switch.h" #include "Sound\sound.h" -#include "box.h" +#include "animation.h" using namespace TEN::Entities::Switches; diff --git a/TR5Main/Objects/TR5/Switch/tr5_raisingcog.cpp b/TR5Main/Objects/TR5/Switch/tr5_raisingcog.cpp index 65e49a656..b0ce33d38 100644 --- a/TR5Main/Objects/TR5/Switch/tr5_raisingcog.cpp +++ b/TR5Main/Objects/TR5/Switch/tr5_raisingcog.cpp @@ -1,13 +1,13 @@ #include "framework.h" #include "tr5_raisingcog.h" #include "level.h" -#include "switch.h" #include "control.h" #include "items.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "spotcam.h" #include "objectslist.h" #include "generic_switch.h" +#include "animation.h" using namespace TEN::Entities::Switches; diff --git a/TR5Main/Objects/TR5/Trap/tr5_deathslide.cpp b/TR5Main/Objects/TR5/Trap/tr5_deathslide.cpp index 920cfd729..621ec5416 100644 --- a/TR5Main/Objects/TR5/Trap/tr5_deathslide.cpp +++ b/TR5Main/Objects/TR5/Trap/tr5_deathslide.cpp @@ -1,11 +1,12 @@ #include "framework.h" #include "tr5_deathslide.h" #include "input.h" -#include "Specific\trmath.h" +#include "Specific/trmath.h" #include "lara.h" #include "setup.h" -#include "Sound\sound.h" +#include "Sound/sound.h" #include "box.h" +#include "animation.h" OBJECT_COLLISION_BOUNDS DeathSlideBounds = { -256, 256, -100, 100, 256, 512, 0, 0, -ANGLE(25.0f), ANGLE(25.0f), 0, 0 }; PHD_VECTOR DeathSlidePosition(0, 0, 371); diff --git a/TR5Main/Objects/TR5/Trap/tr5_explosion.cpp b/TR5Main/Objects/TR5/Trap/tr5_explosion.cpp index 2cebf235c..272c3f85f 100644 --- a/TR5Main/Objects/TR5/Trap/tr5_explosion.cpp +++ b/TR5Main/Objects/TR5/Trap/tr5_explosion.cpp @@ -5,7 +5,7 @@ #include "Sound\sound.h" #include "effects\effects.h" #include "effects\tomb4fx.h" -#include "draw.h" +#include "animation.h" #include "traps.h" #include "lara.h" #include "tr5_smashobject.h" diff --git a/TR5Main/Objects/TR5/Trap/tr5_fallingceiling.cpp b/TR5Main/Objects/TR5/Trap/tr5_fallingceiling.cpp index da99757f7..d2c8ca7ce 100644 --- a/TR5Main/Objects/TR5/Trap/tr5_fallingceiling.cpp +++ b/TR5Main/Objects/TR5/Trap/tr5_fallingceiling.cpp @@ -4,6 +4,7 @@ #include "level.h" #include "lara.h" #include "control.h" +#include "animation.h" void FallingCeilingControl(short itemNumber) { diff --git a/TR5Main/Objects/TR5/Trap/tr5_teethspike.cpp b/TR5Main/Objects/TR5/Trap/tr5_teethspike.cpp index 02b288356..79212b4a9 100644 --- a/TR5Main/Objects/TR5/Trap/tr5_teethspike.cpp +++ b/TR5Main/Objects/TR5/Trap/tr5_teethspike.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "tr5_teethspike.h" #include "control.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "level.h" #include "Sound\sound.h" diff --git a/TR5Main/Objects/TR5/Trap/tr5_ventilator.cpp b/TR5Main/Objects/TR5/Trap/tr5_ventilator.cpp index f56bbd18e..3a83bbd30 100644 --- a/TR5Main/Objects/TR5/Trap/tr5_ventilator.cpp +++ b/TR5Main/Objects/TR5/Trap/tr5_ventilator.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "tr5_ventilator.h" -#include "draw.h" +#include "animation.h" #include "level.h" #include "control.h" #include "lara.h" diff --git a/TR5Main/Objects/TR5/tr5_objects.cpp b/TR5Main/Objects/TR5/tr5_objects.cpp index 5c00512ac..392b7d6bf 100644 --- a/TR5Main/Objects/TR5/tr5_objects.cpp +++ b/TR5Main/Objects/TR5/tr5_objects.cpp @@ -67,8 +67,8 @@ #include "level.h" /// register objects #include "object_helper.h" -#include "creature_info.h" -#include "Box.h" +#include "itemdata/creature_info.h" +#include "box.h" using namespace TEN::Entities::TR5; static void StartBaddy(OBJECT_INFO *obj) diff --git a/TR5Main/Renderer/Render11Helper.cpp b/TR5Main/Renderer/Render11Helper.cpp index 90bd50a23..9d78d66a2 100644 --- a/TR5Main/Renderer/Render11Helper.cpp +++ b/TR5Main/Renderer/Render11Helper.cpp @@ -2,7 +2,7 @@ #include "Renderer11.h" #include "configuration.h" #include "camera.h" -#include "draw.h" +#include "animation.h" #include "setup.h" #include "level.h" #include "control.h" @@ -17,7 +17,7 @@ #include "jeep.h" #include "motorbike.h" #include -#include "creature_info.h" +#include "itemdata/creature_info.h" #include "quad_info.h" #include "jeep_info.h" #include "motorbike_info.h" @@ -192,7 +192,7 @@ namespace TEN::Renderer item.animNumber = animation; item.frameNumber = frame; - return GetFrame_D2(&item, framePtr, rate); + return GetFrame(&item, framePtr, rate); } void Renderer11::updateItemAnimations(int itemNumber, bool force) @@ -294,7 +294,7 @@ namespace TEN::Renderer ANIM_FRAME* framePtr[2]; int rate; - int frac = GetFrame_D2(item, framePtr, &rate); + int frac = GetFrame(item, framePtr, &rate); updateAnimation(itemToDraw, moveableObj, framePtr, frac, rate, 0xFFFFFFFF); diff --git a/TR5Main/Renderer/Renderer11Draw.cpp b/TR5Main/Renderer/Renderer11Draw.cpp index 24f03961f..e73461f77 100644 --- a/TR5Main/Renderer/Renderer11Draw.cpp +++ b/TR5Main/Renderer/Renderer11Draw.cpp @@ -4,7 +4,7 @@ #include "savegame.h" #include "health.h" #include "camera.h" -#include "draw.h" +#include "animation.h" #ifdef NEW_INV #include "newinv2.h" #else @@ -3518,8 +3518,7 @@ namespace TEN::Renderer } void Renderer11::Draw() -{ - + { renderToCubemap(m_reflectionCubemap, Vector3(LaraItem->pos.xPos, LaraItem->pos.yPos - 1024, LaraItem->pos.zPos), LaraItem->roomNumber); renderScene(m_backBufferRTV, m_depthStencilView, gameCamera); m_context->ClearState(); diff --git a/TR5Main/Renderer/Renderer11DrawEffect.cpp b/TR5Main/Renderer/Renderer11DrawEffect.cpp index 3998ec06c..cb65ee846 100644 --- a/TR5Main/Renderer/Renderer11DrawEffect.cpp +++ b/TR5Main/Renderer/Renderer11DrawEffect.cpp @@ -5,7 +5,7 @@ #include "sphere.h" #include "effects\tomb4fx.h" #include "lara.h" -#include "draw.h" +#include "animation.h" #include "camera.h" #include "control.h" #include "effects\debris.h" @@ -33,7 +33,21 @@ extern SPLASH_STRUCT Splashes[MAX_SPLASHES]; extern RIPPLE_STRUCT Ripples[MAX_RIPPLES]; extern ENERGY_ARC EnergyArcs[MAX_ENERGYARCS]; -namespace TEN::Renderer { +BITE_INFO EnemyBites[9] = +{ + { 20, -95, 240, 13 }, + { 48, 0, 180, -11 }, + { -48, 0, 180, 14 }, + { -48, 5, 225, 14 }, + { 15, -60, 195, 13 }, + { -30, -65, 250, 18 }, + { 0, -110, 480, 13 }, + { -20, -80, 190, -10 }, + { 10, -60, 200, 13 } +}; + +namespace TEN::Renderer +{ using namespace TEN::Effects::Footprints; using std::vector; diff --git a/TR5Main/Renderer/Renderer11Frame.cpp b/TR5Main/Renderer/Renderer11Frame.cpp index 63a82c538..0aaca1d6f 100644 --- a/TR5Main/Renderer/Renderer11Frame.cpp +++ b/TR5Main/Renderer/Renderer11Frame.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "Renderer11.h" -#include "draw.h" +#include "animation.h" #include "lara.h" #include "effects\effects.h" #include "camera.h" diff --git a/TR5Main/Renderer/Renderer11Lara.cpp b/TR5Main/Renderer/Renderer11Lara.cpp index b44a200ff..c680e877b 100644 --- a/TR5Main/Renderer/Renderer11Lara.cpp +++ b/TR5Main/Renderer/Renderer11Lara.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "Renderer11.h" -#include "draw.h" +#include "animation.h" #include "effects\hair.h" #include "lara.h" #include "control.h" @@ -80,7 +80,7 @@ void Renderer11::updateLaraAnimations(bool force) ANIM_FRAME* framePtr[2]; int rate, frac; - frac = GetFrame_D2(LaraItem, framePtr, &rate); + frac = GetFrame(LaraItem, framePtr, &rate); updateAnimation(item, laraObj, framePtr, frac, rate, mask); // Then the arms, based on current weapon status @@ -88,7 +88,7 @@ void Renderer11::updateLaraAnimations(bool force) { // Both arms mask = MESH_BITS(LM_LINARM) | MESH_BITS(LM_LOUTARM) | MESH_BITS(LM_LHAND) | MESH_BITS(LM_RINARM) | MESH_BITS(LM_ROUTARM) | MESH_BITS(LM_RHAND); - frac = GetFrame_D2(LaraItem, framePtr, &rate); + frac = GetFrame(LaraItem, framePtr, &rate); updateAnimation(item, laraObj, framePtr, frac, rate, mask); } else @@ -187,7 +187,7 @@ void Renderer11::updateLaraAnimations(bool force) // Right arm mask = MESH_BITS(LM_RINARM) | MESH_BITS(LM_ROUTARM) | MESH_BITS(LM_RHAND); - frac = GetFrame_D2(LaraItem, framePtr, &rate); + frac = GetFrame(LaraItem, framePtr, &rate); updateAnimation(item, laraObj, framePtr, frac, rate, mask); break; } diff --git a/TR5Main/Sound/sound.cpp b/TR5Main/Sound/sound.cpp index 88b22c61b..c3e081305 100644 --- a/TR5Main/Sound/sound.cpp +++ b/TR5Main/Sound/sound.cpp @@ -283,7 +283,7 @@ void StopSoundEffect(short effectID) Sound_FreeSlot(i, SOUND_XFADETIME_CUTSOUND); } -void SOUND_Stop() +void Sound_Stop() { for (int i = 0; i < SOUND_MAX_CHANNELS; i++) if (SoundSlot[i].channel != NULL && BASS_ChannelIsActive(SoundSlot[i].channel)) @@ -293,7 +293,7 @@ void SOUND_Stop() void Sound_FreeSamples() { - SOUND_Stop(); + Sound_Stop(); for (int i = 0; i < SOUND_MAX_SAMPLES; i++) Sound_FreeSample(i); } diff --git a/TR5Main/Sound/sound.h b/TR5Main/Sound/sound.h index 75db6f768..6e84a366d 100644 --- a/TR5Main/Sound/sound.h +++ b/TR5Main/Sound/sound.h @@ -121,7 +121,7 @@ long SoundEffect(int effectID, PHD_3DPOS* position, int env_flags); void StopSoundEffect(short effectID); bool Sound_LoadSample(char *buffer, int compSize, int uncompSize, int currentIndex); void Sound_FreeSamples(); -void SOUND_Stop(); +void Sound_Stop(); void PlaySoundTrack(short track, short flags); void S_CDPlay(std::string trackName, unsigned int mode); diff --git a/TR5Main/Specific/level.cpp b/TR5Main/Specific/level.cpp index 9a1b119d4..52e060b8d 100644 --- a/TR5Main/Specific/level.cpp +++ b/TR5Main/Specific/level.cpp @@ -1,7 +1,7 @@ #include "framework.h" #include "level.h" #include "setup.h" -#include "draw.h" +#include "animation.h" #include "lot.h" #include "Lara.h" #include "savegame.h" @@ -1172,7 +1172,7 @@ int S_LoadLevelFile(int levelIndex) //DB_Log(2, "S_LoadLevelFile - DLL"); printf("S_LoadLevelFile\n"); - SOUND_Stop(); + Sound_Stop(); Sound_FreeSamples(); if (!g_FirstLevel) FreeLevel(); diff --git a/TR5Main/Specific/setup.cpp b/TR5Main/Specific/setup.cpp index 4825a6821..4d2e37258 100644 --- a/TR5Main/Specific/setup.cpp +++ b/TR5Main/Specific/setup.cpp @@ -1,6 +1,6 @@ #include "framework.h" #include "setup.h" -#include "draw.h" +#include "animation.h" #include "collide.h" #include "flipeffect.h" #include "effects/effects.h" @@ -25,7 +25,7 @@ #include "object_helper.h" #include "fullblock_switch.h" -#include "creature_info.h" +#include "itemdata/creature_info.h" using namespace TEN::Entities::Switches; diff --git a/TR5Main/Specific/trmath.cpp b/TR5Main/Specific/trmath.cpp index 198c213ed..7db6ffd3b 100644 --- a/TR5Main/Specific/trmath.cpp +++ b/TR5Main/Specific/trmath.cpp @@ -122,6 +122,51 @@ void InterpolateAngle(short angle, short* rotation, short* outAngle, int shift) *rotation += static_cast(deltaAngle >> shift); } +void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index) +{ + short* ptr = &frameptr[0]; + + ptr += 9; + for (int i = 0; i < index; i++) + { + ptr += ((*ptr & 0xc000) == 0 ? 2 : 1); + } + + int rot0 = *ptr++; + int frameMode = (rot0 & 0xc000); + + int rot1; + int rotX; + int rotY; + int rotZ; + + switch (frameMode) + { + case 0: + rot1 = *ptr++; + rotX = ((rot0 & 0x3ff0) >> 4); + rotY = (((rot1 & 0xfc00) >> 10) | ((rot0 & 0xf) << 6) & 0x3ff); + rotZ = ((rot1) & 0x3ff); + + *matrix = Matrix::CreateFromYawPitchRoll(rotY * (360.0f / 1024.0f) * RADIAN, + rotX * (360.0f / 1024.0f) * RADIAN, + rotZ * (360.0f / 1024.0f) * RADIAN); + break; + + case 0x4000: + *matrix = Matrix::CreateRotationX((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); + break; + + case 0x8000: + *matrix = Matrix::CreateRotationY((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); + break; + + case 0xc000: + *matrix = Matrix::CreateRotationZ((rot0 & 0xfff) * (360.0f / 4096.0f) * RADIAN); + break; + } +} + BoundingOrientedBox TO_DX_BBOX(PHD_3DPOS pos, BOUNDING_BOX* box) { Vector3 boxCentre = Vector3((box->X2 + box->X1) / 2.0f, (box->Y2 + box->Y1) / 2.0f, (box->Z2 + box->Z1) / 2.0f); diff --git a/TR5Main/Specific/trmath.h b/TR5Main/Specific/trmath.h index 16b12520d..d918b20a3 100644 --- a/TR5Main/Specific/trmath.h +++ b/TR5Main/Specific/trmath.h @@ -53,4 +53,5 @@ int phd_atan(int dz, int dx); void phd_GetVectorAngles(int x, int y, int z, short* angles); void phd_RotBoundingBoxNoPersp(PHD_3DPOS* pos, BOUNDING_BOX* bounds, BOUNDING_BOX* tbounds); -void InterpolateAngle(short angle, short* rotation, short* outAngle, int shift); \ No newline at end of file +void InterpolateAngle(short angle, short* rotation, short* outAngle, int shift); +void GetMatrixFromTrAngle(Matrix* matrix, short* frameptr, int index); \ No newline at end of file diff --git a/TR5Main/TombEngine.vcxproj b/TR5Main/TombEngine.vcxproj index 30348e3c6..6e4556971 100644 --- a/TR5Main/TombEngine.vcxproj +++ b/TR5Main/TombEngine.vcxproj @@ -143,7 +143,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\" - + @@ -153,7 +153,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\" - + @@ -474,7 +474,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\" - + @@ -774,7 +774,7 @@ xcopy /Y "$(ProjectDir)Shaders\HUD\*.hlsl" "$(TargetDir)\Shaders\HUD\" - + diff --git a/TR5Main/TombEngine.vcxproj.filters b/TR5Main/TombEngine.vcxproj.filters index ebf9dc30f..d099f3455 100644 --- a/TR5Main/TombEngine.vcxproj.filters +++ b/TR5Main/TombEngine.vcxproj.filters @@ -27,9 +27,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -1029,9 +1026,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -1041,9 +1035,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -1182,6 +1173,15 @@ File di intestazione + + File di intestazione + + + File di intestazione + + + File di intestazione + @@ -1196,9 +1196,6 @@ File di origine - - File di origine - File di origine @@ -2123,6 +2120,9 @@ File di origine + + File di origine +