From 7d8db4b975041fca5863f7ff8bfb9cbfb80f5a9a Mon Sep 17 00:00:00 2001 From: Marrub Date: Thu, 9 Aug 2018 00:02:47 -0400 Subject: [PATCH] Initial commit --- .gitattributes | 2 + .gitignore | 9 + Makefile | 87 ++ compilefs.rb | 117 +++ compilefs_spec.txt | 57 ++ decompat.rb | 25 + filedata/Arsenal_Shop.txt | 65 ++ filedata/Arsenal_Upgrades.txt | 370 +++++++++ filedata/BIPInfo.txt | 172 ++++ filedata/Dialogue_M1A1.txt | 143 ++++ filedata/Dialogue_M1A2.txt | 48 ++ filedata/Dialogue_TESTMAP.txt | 216 +++++ filedata/Info_Corporations.txt | 198 +++++ filedata/Info_Enemies.txt | 215 +++++ filedata/Info_Extra.txt | 51 ++ filedata/Info_Places.txt | 145 ++++ filedata/Info_Upgrades.txt | 257 ++++++ filedata/Info_Weapons_CyberMage.txt | 339 ++++++++ filedata/Info_Weapons_Marine.txt | 260 ++++++ filedata/Info_Weapons_Outcasts.txt | 31 + filedata/Info_Yourself.txt | 220 +++++ filedata/Log.txt | 98 +++ filedata/Log_Pickups.txt | 113 +++ filedata/Mail/Cluster1_CyberMage.txt | 16 + filedata/Mail/Cluster1_Marine.txt | 7 + filedata/Mail/Cluster2_CyberMage.txt | 15 + filedata/Mail/Cluster2_Marine.txt | 6 + filedata/Mail/Cluster3_CyberMage.txt | 9 + filedata/Mail/Cluster3_Marine.txt | 6 + filedata/Mail/Intro2_CyberMage.txt | 9 + filedata/Mail/Intro2_Marine.txt | 15 + filedata/Mail/Intro_CyberMage.txt | 29 + filedata/Mail/Intro_DarkLord.txt | 1 + filedata/Mail/Intro_Marine.txt | 40 + filedata/Mail/Phantom_Isaac.txt | 11 + filedata/Mail/Phantom_James.txt | 9 + filedata/Mail/Phantom_Makarov.txt | 9 + filedata/Mail/Secret1_CyberMage.txt | 1 + filedata/Mail/Secret1_Marine.txt | 3 + filedata/Mail/Secret2_CyberMage.txt | 1 + filedata/Mail/Secret2_Marine.txt | 1 + filedata/Mail/Template.txt | 6 + filedata/Misc.txt | 127 +++ filedata/Misc_Changes.txt | 492 ++++++++++++ filedata/Misc_Opener.txt | 17 + filedata/Misc_QuitMessages.txt | 252 ++++++ filedata/_Directory.txt | 6 + filedata/_Directory_Main.txt | 76 ++ filedata/_Mail.txt | 73 ++ hashfs.rb | 18 + ir/dummy.txt | 1 + ir/main/dummy.txt | 1 + pk/acs/dummy.txt | 1 + pk/dummy.txt | 1 + pk/graphics/dummy.txt | 1 + pksrc/animdefs.txt | 3 + pksrc/copylib.txt | 502 ++++++++++++ pksrc/credits.txt | 269 +++++++ pksrc/cvarinfo.debug.txt | 10 + pksrc/cvarinfo.gui.txt | 6 + pksrc/cvarinfo.hud.txt | 21 + pksrc/cvarinfo.player.txt | 50 ++ pksrc/cvarinfo.server.txt | 13 + pksrc/cvarinfo.weapons.txt | 14 + pksrc/decaldef.txt | 23 + pksrc/decorate.dec | 104 +++ pksrc/end_timeup1.txt | 20 + pksrc/end_timeup2.txt | 15 + pksrc/fontdefs.txt | 25 + pksrc/gameinfo.txt | 4 + pksrc/keyconf.txt | 25 + pksrc/loadacs.txt | 1 + pksrc/lscripts/BossSpawners.dec | 62 ++ pksrc/lscripts/BulletPuff.dec | 78 ++ pksrc/lscripts/Constants.dec | 52 ++ pksrc/lscripts/Constants.dec.bak | 53 ++ pksrc/lscripts/Death.dec | 60 ++ pksrc/lscripts/Decorations.dec | 18 + pksrc/lscripts/Dummy.dec | 64 ++ pksrc/lscripts/GunSmoke.dec | 15 + pksrc/lscripts/Hacks.dec | 68 ++ pksrc/lscripts/Headers/lith_lognames.h | 41 + pksrc/lscripts/Headers/lith_pdata.h | 46 ++ pksrc/lscripts/Headers/lith_scorenums.h | 88 ++ pksrc/lscripts/Headers/lith_upgradenames.h | 67 ++ pksrc/lscripts/Headers/lith_wdata.h | 63 ++ pksrc/lscripts/Headers/lith_weapons.h | 124 +++ pksrc/lscripts/Items/Ammo.dec | 27 + pksrc/lscripts/Items/AmmoPickups.dec | 200 +++++ pksrc/lscripts/Items/BlurSphere.dec | 86 ++ pksrc/lscripts/Items/CBIStuff.dec | 183 +++++ pksrc/lscripts/Items/Keys.dec | 104 +++ pksrc/lscripts/Items/Powerups.dec | 291 +++++++ pksrc/lscripts/Items/Score.dec | 20 + pksrc/lscripts/Magazine.dec | 29 + pksrc/lscripts/Maps.dec | 59 ++ pksrc/lscripts/Monsters/Archangel.dec | 0 pksrc/lscripts/Monsters/Isaac.dec | 165 ++++ pksrc/lscripts/Monsters/James.dec | 97 +++ pksrc/lscripts/Monsters/Makarov.dec | 162 ++++ pksrc/lscripts/Monsters/Phantom.dec | 203 +++++ pksrc/lscripts/Monsters/System.dec | 214 +++++ pksrc/lscripts/Monsters/System.dec.bak | 203 +++++ pksrc/lscripts/Monsters/Tier1.dec | 185 +++++ pksrc/lscripts/Monsters/Tier2.dec | 96 +++ pksrc/lscripts/Monsters/Tier3.dec | 275 +++++++ pksrc/lscripts/Monsters/Tier4.dec | 41 + pksrc/lscripts/Monsters/Tier5.dec | 148 ++++ pksrc/lscripts/Monsters/TitleMap.dec | 194 +++++ pksrc/lscripts/Monsters/XHTier1.dec | 68 ++ pksrc/lscripts/Monsters/XHTier2.dec | 11 + pksrc/lscripts/Monsters/XHTier3.dec | 67 ++ pksrc/lscripts/Monsters/XHTier4.dec | 13 + pksrc/lscripts/Monsters/XHTier5.dec | 55 ++ pksrc/lscripts/PickupEffects.dec | 101 +++ pksrc/lscripts/Player.dec | 223 ++++++ pksrc/lscripts/PlayerPawn.dec | 47 ++ pksrc/lscripts/Projectiles/Cannonball.dec | 120 +++ pksrc/lscripts/Projectiles/Gauss.dec | 60 ++ pksrc/lscripts/Projectiles/Gauss.dec.bak | 58 ++ pksrc/lscripts/Projectiles/HomingRocket.dec | 35 + pksrc/lscripts/Projectiles/MiniMissile.dec | 35 + pksrc/lscripts/Projectiles/PlasmaBolt.dec | 107 +++ pksrc/lscripts/Projectiles/PlasmaLaser.dec | 65 ++ pksrc/lscripts/Projectiles/PoisonBullet.dec | 141 ++++ pksrc/lscripts/Projectiles/Punctuator.dec | 48 ++ .../lscripts/Projectiles/RailgunParticles.dec | 110 +++ pksrc/lscripts/Projectiles/RifleBullet.dec | 44 + pksrc/lscripts/Projectiles/Rocket.dec | 29 + pksrc/lscripts/Projectiles/ShotgunTrail.dec | 21 + pksrc/lscripts/Projectiles/SniperBullet.dec | 28 + pksrc/lscripts/Projectiles/SwordSwing.dec | 128 +++ pksrc/lscripts/Rain.dec | 99 +++ pksrc/lscripts/RifleGrenade.dec | 55 ++ pksrc/lscripts/TeleFog.dec | 27 + pksrc/lscripts/Weapons/Base.dec | 65 ++ pksrc/lscripts/Weapons/Gameboy.dec | 32 + pksrc/lscripts/Weapons/Misc.dec | 17 + pksrc/lscripts/Weapons/Pickups.dec | 242 ++++++ pksrc/lscripts/Weapons_CyberMage/1_CFist.dec | 42 + pksrc/lscripts/Weapons_CyberMage/2_Mateba.dec | 205 +++++ pksrc/lscripts/Weapons_CyberMage/3_2_SPAS.dec | 210 +++++ .../Weapons_CyberMage/3_ShockRifle.dec | 260 ++++++ pksrc/lscripts/Weapons_CyberMage/4_SMG.dec | 397 ++++++++++ .../lscripts/Weapons_CyberMage/5_IonRifle.dec | 415 ++++++++++ .../Weapons_CyberMage/6_CPlasmaRifle.dec | 125 +++ .../Weapons_CyberMage/7_StarDestroyer.dec | 366 +++++++++ .../Weapons_CyberMage/Magic/1_Blade.dec | 77 ++ .../Weapons_CyberMage/Magic/2_Delear.dec | 203 +++++ .../Weapons_CyberMage/Magic/3_Feuer.dec | 136 ++++ .../Weapons_CyberMage/Magic/4_Rend.dec | 80 ++ .../Weapons_CyberMage/Magic/5_Hulgyon.dec | 174 ++++ .../Weapons_CyberMage/Magic/6_StarShot.dec | 97 +++ .../Weapons_CyberMage/Magic/7_Cercle.dec | 235 ++++++ pksrc/lscripts/Weapons_Marine/1_Fist.dec | 110 +++ pksrc/lscripts/Weapons_Marine/2_Pistol.dec | 220 +++++ pksrc/lscripts/Weapons_Marine/2_Revolver.dec | 74 ++ .../Weapons_Marine/3_2_SuperShotgun.dec | 104 +++ .../lscripts/Weapons_Marine/3_LazShotgun.dec | 79 ++ pksrc/lscripts/Weapons_Marine/3_Shotgun.dec | 258 ++++++ .../lscripts/Weapons_Marine/4_CombatRifle.dec | 263 ++++++ .../lscripts/Weapons_Marine/4_SniperRifle.dec | 198 +++++ .../Weapons_Marine/5_RocketLauncher.dec | 181 +++++ .../lscripts/Weapons_Marine/6_PlasmaRifle.dec | 208 +++++ .../lscripts/Weapons_Marine/7_OmegaCannon.dec | 247 ++++++ .../Weapons_Outcasts/1_ChargeFist.dec | 155 ++++ .../Weapons_Outcasts/5_MissileLauncher.dec | 162 ++++ .../Weapons_Outcasts/6_PlasmaDiffuser.dec | 84 ++ pksrc/mapinfo.txt | 278 +++++++ pksrc/menudef.txt | 73 ++ pksrc/sbarinfo.txt | 6 + pksrc/sndinfo.cbi | 49 ++ pksrc/sndinfo.enemies | 59 ++ pksrc/sndinfo.marathon | 22 + pksrc/sndinfo.misc | 67 ++ pksrc/sndinfo.phantoms | 144 ++++ pksrc/sndinfo.pickups | 57 ++ pksrc/sndinfo.player | 59 ++ pksrc/sndinfo.playerC | 16 + pksrc/sndinfo.playerD | 8 + pksrc/sndinfo.playerI | 38 + pksrc/sndinfo.playerM | 12 + pksrc/sndinfo.weapons | 187 +++++ pksrc/sndinfo.weaponsC | 171 ++++ pksrc/sndinfo.weaponsM | 251 ++++++ pksrc/sndinfo.weapons_outcasts | 103 +++ pksrc/sndinfo.world | 56 ++ pksrc/textcolo.txt | 16 + pksrc/textures.txt | 77 ++ pksrc/voxeldef.txt | 6 + readme.md | 24 + source/Headers/lith_attrib.h | 39 + source/Headers/lith_base64.h | 47 ++ source/Headers/lith_bip.h | 85 ++ source/Headers/lith_cbi.h | 90 +++ source/Headers/lith_common.h | 106 +++ source/Headers/lith_cps.h | 26 + source/Headers/lith_darray.h | 30 + source/Headers/lith_dialogue.h | 118 +++ source/Headers/lith_dlgstrtable.h | 22 + source/Headers/lith_drawing.h | 51 ++ source/Headers/lith_file.h | 14 + source/Headers/lith_gui.h | 299 +++++++ source/Headers/lith_hudid.h | 171 ++++ source/Headers/lith_list.h | 54 ++ source/Headers/lith_log.h | 48 ++ source/Headers/lith_lognames.h | 42 + source/Headers/lith_math.h | 34 + source/Headers/lith_memory.h | 21 + source/Headers/lith_monster.h | 73 ++ source/Headers/lith_pdata.h | 47 ++ source/Headers/lith_player.h | 368 +++++++++ source/Headers/lith_savedata.h | 62 ++ source/Headers/lith_scorenums.h | 89 +++ source/Headers/lith_shopdef.h | 28 + source/Headers/lith_str.h | 14 + source/Headers/lith_tokbuf.h | 55 ++ source/Headers/lith_token.h | 115 +++ source/Headers/lith_types.h | 33 + source/Headers/lith_upgradedata.h | 183 +++++ source/Headers/lith_upgradefunc_end.h | 12 + source/Headers/lith_upgradefunc_start.h | 18 + source/Headers/lith_upgradefuncs.h | 101 +++ source/Headers/lith_upgradenames.h | 68 ++ source/Headers/lith_upgrades.h | 33 + source/Headers/lith_upgrades_common.h | 5 + source/Headers/lith_version.h | 15 + source/Headers/lith_wdata.h | 64 ++ source/Headers/lith_weaponinfo.h | 62 ++ source/Headers/lith_weapons.h | 125 +++ source/Headers/lith_world.h | 122 +++ source/Main/g_auto.c | 196 +++++ source/Main/g_button.c | 72 ++ source/Main/g_checkbox.c | 49 ++ source/Main/g_preset.c | 273 +++++++ source/Main/g_scrollbar.c | 168 ++++ source/Main/g_slider.c | 88 ++ source/Main/m_base64.c | 173 ++++ source/Main/m_common.c | 181 +++++ source/Main/m_cps.c | 20 + source/Main/m_file.c | 349 ++++++++ source/Main/m_list.c | 70 ++ source/Main/m_math.c | 223 ++++++ source/Main/m_namegen.c | 201 +++++ source/Main/m_print.c | 169 ++++ source/Main/m_str.c | 180 +++++ source/Main/m_tokbuf.c | 133 ++++ source/Main/m_token.c | 190 +++++ source/Main/p_bip.c | 482 +++++++++++ source/Main/p_cbi.c | 115 +++ source/Main/p_cbigui.c | 148 ++++ source/Main/p_data.c | 399 ++++++++++ source/Main/p_dialogue.c | 541 +++++++++++++ source/Main/p_log.c | 273 +++++++ source/Main/p_magic.c | 207 +++++ source/Main/p_payout.c | 113 +++ source/Main/p_pickups.c | 271 +++++++ source/Main/p_player.c | 566 +++++++++++++ source/Main/p_render.c | 299 +++++++ source/Main/p_save.c | 34 + source/Main/p_savedata.c | 122 +++ source/Main/p_settings.c | 313 ++++++++ source/Main/p_shop.c | 141 ++++ source/Main/p_shopdef.c | 73 ++ source/Main/p_status.c | 129 +++ source/Main/p_upgrades.c | 583 ++++++++++++++ source/Main/p_weaponinfo.c | 121 +++ source/Main/p_weapons.c | 393 +++++++++ source/Main/u_7777777.c | 34 + source/Main/u_adrenaline.c | 82 ++ source/Main/u_autoreload.c | 23 + source/Main/u_cyberlegs.c | 46 ++ source/Main/u_defensenuke.c | 15 + source/Main/u_goldeneye.c | 21 + source/Main/u_headsupdis2.c | 146 ++++ source/Main/u_headsupdisp.c | 242 ++++++ source/Main/u_homingrpg.c | 61 ++ source/Main/u_implying.c | 55 ++ source/Main/u_instadeath.c | 17 + source/Main/u_jetbooster.c | 71 ++ source/Main/u_lolsords.c | 36 + source/Main/u_magic.c | 197 +++++ source/Main/u_punctcannon.c | 63 ++ source/Main/u_reactarmor.c | 104 +++ source/Main/u_reflexwetw.c | 96 +++ source/Main/u_riflemodes.c | 35 + source/Main/u_stealthsys.c | 33 + source/Main/u_unceunce.c | 39 + source/Main/u_vitalscan.c | 172 ++++ source/Main/u_zoom.c | 95 +++ source/Main/w_boss.c | 266 +++++++ source/Main/w_cbi.c | 102 +++ source/Main/w_decorate.c | 176 ++++ source/Main/w_dialogue.c | 675 ++++++++++++++++ source/Main/w_dmon.c | 102 +++ source/Main/w_monster.c | 511 ++++++++++++ source/Main/w_title.c | 79 ++ source/Main/w_world.c | 749 ++++++++++++++++++ source/Weapons.txt | 45 ++ strh.rb | 14 + wepc.rb | 208 +++++ 301 files changed, 34436 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 compilefs.rb create mode 100644 compilefs_spec.txt create mode 100644 decompat.rb create mode 100644 filedata/Arsenal_Shop.txt create mode 100644 filedata/Arsenal_Upgrades.txt create mode 100644 filedata/BIPInfo.txt create mode 100644 filedata/Dialogue_M1A1.txt create mode 100644 filedata/Dialogue_M1A2.txt create mode 100644 filedata/Dialogue_TESTMAP.txt create mode 100644 filedata/Info_Corporations.txt create mode 100644 filedata/Info_Enemies.txt create mode 100644 filedata/Info_Extra.txt create mode 100644 filedata/Info_Places.txt create mode 100644 filedata/Info_Upgrades.txt create mode 100644 filedata/Info_Weapons_CyberMage.txt create mode 100644 filedata/Info_Weapons_Marine.txt create mode 100644 filedata/Info_Weapons_Outcasts.txt create mode 100644 filedata/Info_Yourself.txt create mode 100644 filedata/Log.txt create mode 100644 filedata/Log_Pickups.txt create mode 100644 filedata/Mail/Cluster1_CyberMage.txt create mode 100644 filedata/Mail/Cluster1_Marine.txt create mode 100644 filedata/Mail/Cluster2_CyberMage.txt create mode 100644 filedata/Mail/Cluster2_Marine.txt create mode 100644 filedata/Mail/Cluster3_CyberMage.txt create mode 100644 filedata/Mail/Cluster3_Marine.txt create mode 100644 filedata/Mail/Intro2_CyberMage.txt create mode 100644 filedata/Mail/Intro2_Marine.txt create mode 100644 filedata/Mail/Intro_CyberMage.txt create mode 100644 filedata/Mail/Intro_DarkLord.txt create mode 100644 filedata/Mail/Intro_Marine.txt create mode 100644 filedata/Mail/Phantom_Isaac.txt create mode 100644 filedata/Mail/Phantom_James.txt create mode 100644 filedata/Mail/Phantom_Makarov.txt create mode 100644 filedata/Mail/Secret1_CyberMage.txt create mode 100644 filedata/Mail/Secret1_Marine.txt create mode 100644 filedata/Mail/Secret2_CyberMage.txt create mode 100644 filedata/Mail/Secret2_Marine.txt create mode 100644 filedata/Mail/Template.txt create mode 100644 filedata/Misc.txt create mode 100644 filedata/Misc_Changes.txt create mode 100644 filedata/Misc_Opener.txt create mode 100644 filedata/Misc_QuitMessages.txt create mode 100644 filedata/_Directory.txt create mode 100644 filedata/_Directory_Main.txt create mode 100644 filedata/_Mail.txt create mode 100644 hashfs.rb create mode 100644 ir/dummy.txt create mode 100644 ir/main/dummy.txt create mode 100644 pk/acs/dummy.txt create mode 100644 pk/dummy.txt create mode 100644 pk/graphics/dummy.txt create mode 100644 pksrc/animdefs.txt create mode 100644 pksrc/copylib.txt create mode 100644 pksrc/credits.txt create mode 100644 pksrc/cvarinfo.debug.txt create mode 100644 pksrc/cvarinfo.gui.txt create mode 100644 pksrc/cvarinfo.hud.txt create mode 100644 pksrc/cvarinfo.player.txt create mode 100644 pksrc/cvarinfo.server.txt create mode 100644 pksrc/cvarinfo.weapons.txt create mode 100644 pksrc/decaldef.txt create mode 100644 pksrc/decorate.dec create mode 100644 pksrc/end_timeup1.txt create mode 100644 pksrc/end_timeup2.txt create mode 100644 pksrc/fontdefs.txt create mode 100644 pksrc/gameinfo.txt create mode 100644 pksrc/keyconf.txt create mode 100644 pksrc/loadacs.txt create mode 100644 pksrc/lscripts/BossSpawners.dec create mode 100644 pksrc/lscripts/BulletPuff.dec create mode 100644 pksrc/lscripts/Constants.dec create mode 100644 pksrc/lscripts/Constants.dec.bak create mode 100644 pksrc/lscripts/Death.dec create mode 100644 pksrc/lscripts/Decorations.dec create mode 100644 pksrc/lscripts/Dummy.dec create mode 100644 pksrc/lscripts/GunSmoke.dec create mode 100644 pksrc/lscripts/Hacks.dec create mode 100644 pksrc/lscripts/Headers/lith_lognames.h create mode 100644 pksrc/lscripts/Headers/lith_pdata.h create mode 100644 pksrc/lscripts/Headers/lith_scorenums.h create mode 100644 pksrc/lscripts/Headers/lith_upgradenames.h create mode 100644 pksrc/lscripts/Headers/lith_wdata.h create mode 100644 pksrc/lscripts/Headers/lith_weapons.h create mode 100644 pksrc/lscripts/Items/Ammo.dec create mode 100644 pksrc/lscripts/Items/AmmoPickups.dec create mode 100644 pksrc/lscripts/Items/BlurSphere.dec create mode 100644 pksrc/lscripts/Items/CBIStuff.dec create mode 100644 pksrc/lscripts/Items/Keys.dec create mode 100644 pksrc/lscripts/Items/Powerups.dec create mode 100644 pksrc/lscripts/Items/Score.dec create mode 100644 pksrc/lscripts/Magazine.dec create mode 100644 pksrc/lscripts/Maps.dec create mode 100644 pksrc/lscripts/Monsters/Archangel.dec create mode 100644 pksrc/lscripts/Monsters/Isaac.dec create mode 100644 pksrc/lscripts/Monsters/James.dec create mode 100644 pksrc/lscripts/Monsters/Makarov.dec create mode 100644 pksrc/lscripts/Monsters/Phantom.dec create mode 100644 pksrc/lscripts/Monsters/System.dec create mode 100644 pksrc/lscripts/Monsters/System.dec.bak create mode 100644 pksrc/lscripts/Monsters/Tier1.dec create mode 100644 pksrc/lscripts/Monsters/Tier2.dec create mode 100644 pksrc/lscripts/Monsters/Tier3.dec create mode 100644 pksrc/lscripts/Monsters/Tier4.dec create mode 100644 pksrc/lscripts/Monsters/Tier5.dec create mode 100644 pksrc/lscripts/Monsters/TitleMap.dec create mode 100644 pksrc/lscripts/Monsters/XHTier1.dec create mode 100644 pksrc/lscripts/Monsters/XHTier2.dec create mode 100644 pksrc/lscripts/Monsters/XHTier3.dec create mode 100644 pksrc/lscripts/Monsters/XHTier4.dec create mode 100644 pksrc/lscripts/Monsters/XHTier5.dec create mode 100644 pksrc/lscripts/PickupEffects.dec create mode 100644 pksrc/lscripts/Player.dec create mode 100644 pksrc/lscripts/PlayerPawn.dec create mode 100644 pksrc/lscripts/Projectiles/Cannonball.dec create mode 100644 pksrc/lscripts/Projectiles/Gauss.dec create mode 100644 pksrc/lscripts/Projectiles/Gauss.dec.bak create mode 100644 pksrc/lscripts/Projectiles/HomingRocket.dec create mode 100644 pksrc/lscripts/Projectiles/MiniMissile.dec create mode 100644 pksrc/lscripts/Projectiles/PlasmaBolt.dec create mode 100644 pksrc/lscripts/Projectiles/PlasmaLaser.dec create mode 100644 pksrc/lscripts/Projectiles/PoisonBullet.dec create mode 100644 pksrc/lscripts/Projectiles/Punctuator.dec create mode 100644 pksrc/lscripts/Projectiles/RailgunParticles.dec create mode 100644 pksrc/lscripts/Projectiles/RifleBullet.dec create mode 100644 pksrc/lscripts/Projectiles/Rocket.dec create mode 100644 pksrc/lscripts/Projectiles/ShotgunTrail.dec create mode 100644 pksrc/lscripts/Projectiles/SniperBullet.dec create mode 100644 pksrc/lscripts/Projectiles/SwordSwing.dec create mode 100644 pksrc/lscripts/Rain.dec create mode 100644 pksrc/lscripts/RifleGrenade.dec create mode 100644 pksrc/lscripts/TeleFog.dec create mode 100644 pksrc/lscripts/Weapons/Base.dec create mode 100644 pksrc/lscripts/Weapons/Gameboy.dec create mode 100644 pksrc/lscripts/Weapons/Misc.dec create mode 100644 pksrc/lscripts/Weapons/Pickups.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/1_CFist.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/2_Mateba.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/3_2_SPAS.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/3_ShockRifle.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/4_SMG.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/5_IonRifle.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/6_CPlasmaRifle.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/7_StarDestroyer.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/1_Blade.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/2_Delear.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/3_Feuer.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/4_Rend.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/5_Hulgyon.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/6_StarShot.dec create mode 100644 pksrc/lscripts/Weapons_CyberMage/Magic/7_Cercle.dec create mode 100644 pksrc/lscripts/Weapons_Marine/1_Fist.dec create mode 100644 pksrc/lscripts/Weapons_Marine/2_Pistol.dec create mode 100644 pksrc/lscripts/Weapons_Marine/2_Revolver.dec create mode 100644 pksrc/lscripts/Weapons_Marine/3_2_SuperShotgun.dec create mode 100644 pksrc/lscripts/Weapons_Marine/3_LazShotgun.dec create mode 100644 pksrc/lscripts/Weapons_Marine/3_Shotgun.dec create mode 100644 pksrc/lscripts/Weapons_Marine/4_CombatRifle.dec create mode 100644 pksrc/lscripts/Weapons_Marine/4_SniperRifle.dec create mode 100644 pksrc/lscripts/Weapons_Marine/5_RocketLauncher.dec create mode 100644 pksrc/lscripts/Weapons_Marine/6_PlasmaRifle.dec create mode 100644 pksrc/lscripts/Weapons_Marine/7_OmegaCannon.dec create mode 100644 pksrc/lscripts/Weapons_Outcasts/1_ChargeFist.dec create mode 100644 pksrc/lscripts/Weapons_Outcasts/5_MissileLauncher.dec create mode 100644 pksrc/lscripts/Weapons_Outcasts/6_PlasmaDiffuser.dec create mode 100644 pksrc/mapinfo.txt create mode 100644 pksrc/menudef.txt create mode 100644 pksrc/sbarinfo.txt create mode 100644 pksrc/sndinfo.cbi create mode 100644 pksrc/sndinfo.enemies create mode 100644 pksrc/sndinfo.marathon create mode 100644 pksrc/sndinfo.misc create mode 100644 pksrc/sndinfo.phantoms create mode 100644 pksrc/sndinfo.pickups create mode 100644 pksrc/sndinfo.player create mode 100644 pksrc/sndinfo.playerC create mode 100644 pksrc/sndinfo.playerD create mode 100644 pksrc/sndinfo.playerI create mode 100644 pksrc/sndinfo.playerM create mode 100644 pksrc/sndinfo.weapons create mode 100644 pksrc/sndinfo.weaponsC create mode 100644 pksrc/sndinfo.weaponsM create mode 100644 pksrc/sndinfo.weapons_outcasts create mode 100644 pksrc/sndinfo.world create mode 100644 pksrc/textcolo.txt create mode 100644 pksrc/textures.txt create mode 100644 pksrc/voxeldef.txt create mode 100644 readme.md create mode 100644 source/Headers/lith_attrib.h create mode 100644 source/Headers/lith_base64.h create mode 100644 source/Headers/lith_bip.h create mode 100644 source/Headers/lith_cbi.h create mode 100644 source/Headers/lith_common.h create mode 100644 source/Headers/lith_cps.h create mode 100644 source/Headers/lith_darray.h create mode 100644 source/Headers/lith_dialogue.h create mode 100644 source/Headers/lith_dlgstrtable.h create mode 100644 source/Headers/lith_drawing.h create mode 100644 source/Headers/lith_file.h create mode 100644 source/Headers/lith_gui.h create mode 100644 source/Headers/lith_hudid.h create mode 100644 source/Headers/lith_list.h create mode 100644 source/Headers/lith_log.h create mode 100644 source/Headers/lith_lognames.h create mode 100644 source/Headers/lith_math.h create mode 100644 source/Headers/lith_memory.h create mode 100644 source/Headers/lith_monster.h create mode 100644 source/Headers/lith_pdata.h create mode 100644 source/Headers/lith_player.h create mode 100644 source/Headers/lith_savedata.h create mode 100644 source/Headers/lith_scorenums.h create mode 100644 source/Headers/lith_shopdef.h create mode 100644 source/Headers/lith_str.h create mode 100644 source/Headers/lith_tokbuf.h create mode 100644 source/Headers/lith_token.h create mode 100644 source/Headers/lith_types.h create mode 100644 source/Headers/lith_upgradedata.h create mode 100644 source/Headers/lith_upgradefunc_end.h create mode 100644 source/Headers/lith_upgradefunc_start.h create mode 100644 source/Headers/lith_upgradefuncs.h create mode 100644 source/Headers/lith_upgradenames.h create mode 100644 source/Headers/lith_upgrades.h create mode 100644 source/Headers/lith_upgrades_common.h create mode 100644 source/Headers/lith_version.h create mode 100644 source/Headers/lith_wdata.h create mode 100644 source/Headers/lith_weaponinfo.h create mode 100644 source/Headers/lith_weapons.h create mode 100644 source/Headers/lith_world.h create mode 100644 source/Main/g_auto.c create mode 100644 source/Main/g_button.c create mode 100644 source/Main/g_checkbox.c create mode 100644 source/Main/g_preset.c create mode 100644 source/Main/g_scrollbar.c create mode 100644 source/Main/g_slider.c create mode 100644 source/Main/m_base64.c create mode 100644 source/Main/m_common.c create mode 100644 source/Main/m_cps.c create mode 100644 source/Main/m_file.c create mode 100644 source/Main/m_list.c create mode 100644 source/Main/m_math.c create mode 100644 source/Main/m_namegen.c create mode 100644 source/Main/m_print.c create mode 100644 source/Main/m_str.c create mode 100644 source/Main/m_tokbuf.c create mode 100644 source/Main/m_token.c create mode 100644 source/Main/p_bip.c create mode 100644 source/Main/p_cbi.c create mode 100644 source/Main/p_cbigui.c create mode 100644 source/Main/p_data.c create mode 100644 source/Main/p_dialogue.c create mode 100644 source/Main/p_log.c create mode 100644 source/Main/p_magic.c create mode 100644 source/Main/p_payout.c create mode 100644 source/Main/p_pickups.c create mode 100644 source/Main/p_player.c create mode 100644 source/Main/p_render.c create mode 100644 source/Main/p_save.c create mode 100644 source/Main/p_savedata.c create mode 100644 source/Main/p_settings.c create mode 100644 source/Main/p_shop.c create mode 100644 source/Main/p_shopdef.c create mode 100644 source/Main/p_status.c create mode 100644 source/Main/p_upgrades.c create mode 100644 source/Main/p_weaponinfo.c create mode 100644 source/Main/p_weapons.c create mode 100644 source/Main/u_7777777.c create mode 100644 source/Main/u_adrenaline.c create mode 100644 source/Main/u_autoreload.c create mode 100644 source/Main/u_cyberlegs.c create mode 100644 source/Main/u_defensenuke.c create mode 100644 source/Main/u_goldeneye.c create mode 100644 source/Main/u_headsupdis2.c create mode 100644 source/Main/u_headsupdisp.c create mode 100644 source/Main/u_homingrpg.c create mode 100644 source/Main/u_implying.c create mode 100644 source/Main/u_instadeath.c create mode 100644 source/Main/u_jetbooster.c create mode 100644 source/Main/u_lolsords.c create mode 100644 source/Main/u_magic.c create mode 100644 source/Main/u_punctcannon.c create mode 100644 source/Main/u_reactarmor.c create mode 100644 source/Main/u_reflexwetw.c create mode 100644 source/Main/u_riflemodes.c create mode 100644 source/Main/u_stealthsys.c create mode 100644 source/Main/u_unceunce.c create mode 100644 source/Main/u_vitalscan.c create mode 100644 source/Main/u_zoom.c create mode 100644 source/Main/w_boss.c create mode 100644 source/Main/w_cbi.c create mode 100644 source/Main/w_decorate.c create mode 100644 source/Main/w_dialogue.c create mode 100644 source/Main/w_dmon.c create mode 100644 source/Main/w_monster.c create mode 100644 source/Main/w_title.c create mode 100644 source/Main/w_world.c create mode 100644 source/Weapons.txt create mode 100644 strh.rb create mode 100644 wepc.rb diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f0b4f05 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.c linguist-language=C +*.h linguist-language=C diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42192b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +working/* +*.ir +*.bin +language.*.txt +pkdata/* +*.png +*.dbs +*.wad.b* +*.swp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07e0fba --- /dev/null +++ b/Makefile @@ -0,0 +1,87 @@ +## Copyright © 2016-2017 Graham Sanderson +## Compiler +CC=gdcc-cc +LD=gdcc-ld +MAKELIB=gdcc-makelib + +## Compiler flags +TARGET=--bc-target=Zandronum +LFLAGS=$(TARGET) --bc-zdacs-init-delay +CFLAGS=$(TARGET) + +LIB_STA =3000000000 +MAIN_STA=3500000000 + +## Sources +IR=ir +SRCDIR=source + +PK_BIN=pk/acs + +LIB_OUTPUTS=$(IR)/libc.ir $(IR)/libGDCC.ir +LIB_BINARY=$(PK_BIN)/lithlib.bin +LIB_CFLAGS=$(LIB_INIT) +LIB_LFLAGS=$(LIB_INIT) --alloc-minimum Sta "" $(LIB_STA) + +MAIN_IR=$(IR)/main +MAIN_SRC=$(SRCDIR)/Main +MAIN_INC=$(SRCDIR)/Headers +MAIN_SOURCES=$(wildcard $(MAIN_SRC)/*.c) +MAIN_HEADERS=$(wildcard $(MAIN_INC)/*.h) +MAIN_OUTPUTS=$(MAIN_SOURCES:$(MAIN_SRC)/%.c=$(MAIN_IR)/%.ir) +MAIN_BINARY=$(PK_BIN)/lithmain.bin +MAIN_CFLAGS=-i$(MAIN_INC) $(MAIN_INIT) -Dnull=NULL --alloc-Aut 2150 +MAIN_LFLAGS=-llithlib $(MAIN_INIT) --alloc-minimum Sta "" $(MAIN_STA) + +DECOMPAT_INPUTS=$(MAIN_INC)/lith_weapons.h \ + $(MAIN_INC)/lith_pdata.h \ + $(MAIN_INC)/lith_wdata.h \ + $(MAIN_INC)/lith_lognames.h \ + $(MAIN_INC)/lith_upgradenames.h \ + $(MAIN_INC)/lith_scorenums.h + +## Targets +.PHONY: bin dec clean text + +all: dec text bin +bin: $(LIB_BINARY) $(MAIN_BINARY) + +source/Headers/lith_weapons.h source/Main/p_weaponinfo.c: wepc.rb source/Weapons.txt + @echo WEPC + @./wepc.rb source/Weapons.txt,source/Headers/lith_weapons.h,source/Main/p_weaponinfo.c + +dec: decompat.rb $(DECOMPAT_INPUTS) + @echo DEC + @./decompat.rb $(DECOMPAT_INPUTS) + +text: compilefs.rb + @echo TEXT + @cd filedata; ../compilefs.rb _Directory.txt + +clean: + @echo CLEAN + @rm -f $(MAIN_OUTPUTS) $(LIB_OUTPUTS) + +## .ir -> .bin +$(LIB_BINARY): $(LIB_OUTPUTS) + @echo LD $@ + @$(LD) $(LFLAGS) $(LIB_LFLAGS) $^ -o $@ + +$(MAIN_BINARY): $(MAIN_OUTPUTS) + @echo LD $@ + @$(LD) $(LFLAGS) $(MAIN_LFLAGS) $^ -o $@ + +## .c -> .ir +$(MAIN_IR)/%.ir: $(MAIN_SRC)/%.c $(MAIN_HEADERS) + @echo CC $< + @$(CC) $(CFLAGS) $(MAIN_CFLAGS) -DFileHash=$(shell ./strh.rb $<) -c $< -o $@ + +$(IR)/libc.ir: + @echo MAKELIB $@ + @$(MAKELIB) $(TARGET) $(LIB_CFLAGS) -c libc -o $@ + +$(IR)/libGDCC.ir: + @echo MAKELIB $@ + @$(MAKELIB) $(TARGET) $(LIB_CFLAGS) -c libGDCC -o $@ + +## EOF diff --git a/compilefs.rb b/compilefs.rb new file mode 100644 index 0000000..e116252 --- /dev/null +++ b/compilefs.rb @@ -0,0 +1,117 @@ +#!/usr/bin/env ruby +## Copyright © 2017 Graham Sanderson, all rights reserved. +## CompileFS: Formatted text → LANGUAGE processor. + +def escape text + text.gsub(/((?\\)(?!c))|(?")/, "\\\\\\k").gsub(/\n/, "\\n") +end + +def split_arg text, sp + text.split(sp, 2).map {|s| s.strip} +end + +def single_line outf, out, set + outf.write "\"#{out}\" = \"#{escape set}\";\n" +end + +def comment outf, arg + outf.write "\n//#{arg}\n" +end + +def buf_lines outf, type, buf + buf.pop if buf.last.chomp.empty? + case type + when :just + outf.write(buf.each.with_index.inject("") do |sum, (s, i)| + if i < buf.size-1 then sum + " \"#{escape s.chomp}\\n\"\n" + else sum + " \"#{escape s.chomp}\";\n" end + end) + when :conc + buf = [*buf, "\n"].each_cons(2).map do |s, n| + if s == "\n" then "\n\n" + elsif n == "\n" then s.chomp + else s.chomp + " " end + end + outf.write(buf.each.with_index.inject("") do |sum, (s, i)| + if i < buf.size-1 then sum + " \"#{escape s}\"\n" + else sum + " \"#{escape s.chomp}\";\n" end + end) + end +end + +def parse_file outf, fp + wr, buf = nil, nil + for ln in fp + type, arg = ln[0..1], ln.chomp[2..-1] + case type + when "##" + buf_lines outf, wr, buf and wr = nil if wr + comment outf, arg + when "==" + buf_lines outf, wr, buf and wr = nil if wr + out, set = split_arg arg, "|" + single_line outf, out, set + when "%%" + buf_lines outf, wr, buf if wr + wr, buf = :just, [] + outf.write "\"#{arg.strip}\" =\n" + when "@@" + buf_lines outf, wr, buf if wr + wr, buf = :conc, [] + outf.write "\"#{arg.strip}\" =\n" + else + buf << ln if wr + end + end + buf_lines outf, wr, buf if wr +end + +def procdir inf, type, arg + case type + when "comment" + comment inf[:f], " " + arg + when "put data" + set, out = split_arg arg, "->" + single_line inf[:f], out, set + when "put file" + fnam, out = split_arg arg, "->" + inf[:f].write "\"#{out}\" =\n" + comment inf[:f], " " + fnam + buf_lines inf[:f], :just, open(fnam, "rt").read.chomp.lines + when "parse file" + parse_file inf[:f], open(arg, "rt") + end +end + +def procfdr inf, type, arg + case type + when "in" + if (type, arg = split_arg arg, " ") and type == "directory" + inf[:d] = arg + elsif type == "file" + inf[:f] = open("#{inf[:d]}/#{arg}", "wb") + inf[:f].write "// This file was generated by compilefs.\n" + + "// Edit only if you aren't going to recompile.\n" + + "[enu default]\n\n" + end + when "include" + run_file open(arg, "rt"), inf + end +end + +def run_file fp, inf = nil + inf = {f: nil, d: nil} unless inf + for ln in fp + if (type, arg = split_arg ln, ":") and arg + procdir inf, type, arg + elsif (type, arg = split_arg ln, " ") and arg + procfdr inf, type, arg + end + end +end + +for arg in ARGV + run_file open(arg, "rt") +end + +## EOF diff --git a/compilefs_spec.txt b/compilefs_spec.txt new file mode 100644 index 0000000..23d876a --- /dev/null +++ b/compilefs_spec.txt @@ -0,0 +1,57 @@ +The compilefs language is extremely simple, it was created to allow basic text +to be outputted into a code file, specifically LANGUAGE. + +Commands are of two types, 'bare' and 'separated' commands: Bare commands are +delimited from their argument by the first space, and separated commands are +delimited by a ':' colon character. + +Any line not detected to be a command of any kind will be completely ignored. + +Bare commands never output data, but set internal state. +They may create files, directories or other such filesystem objects. + +Bare commands include: + + Sets the directory to put outputted files into. Must come before any + "in file" or data outputting commands. + + + Sets the file to put outputted data into. Must come before any data + outputting commands. + + + Processes the file given and returns to the current file. + +Separated commands output unprocessed data. +They all output to the current file as specified with "in file". +"put" commands use the syntax "arg -> alias" to denote the alias to output. + +Separated commands include: + + Outputs the argument as a comment. + + + Outputs the argument to the given alias. + + + Outputs the contents of a file to the given alias. + + + Parses the given file using parsefile syntax. See below. + +"parsefiles" are another format provided by compilefs, created to make large +amounts of multi-line data easier to write. It provides four commands, which +all output data: + +<##> + Outputs a comment. + +<==> + Outputs to the given alias using the syntax "alias | arg". + +<%%> + Outputs the following lines to the given alias verbatim. + +<@@> + Outputs the following lines to the given alias, concatenating lines that + are not empty together with spaces, and separating lines with an empty one. diff --git a/decompat.rb b/decompat.rb new file mode 100644 index 0000000..dd325dc --- /dev/null +++ b/decompat.rb @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby +## Copyright © 2017 Graham Sanderson +## DeCompat: ZScript ↔ DECORATE shared syntax preprocessor. + +def todec fp, out + for ln in fp + ln = ln.chomp.sub(//, "actor").sub(//, "const int") + if ln.include? "" or ln.include? "" then next + elsif ln.include? "" + out.write " states\n {\n" + elsif ln.include? "" + out.write " }\n" + else + out.write ln + "\n" + end + end +end + +for arg in ARGV + fp = open(arg, "rt") + dec = fp.gets[15..-1].chomp + todec fp, open(dec, "wt") +end + +## EOF diff --git a/filedata/Arsenal_Shop.txt b/filedata/Arsenal_Shop.txt new file mode 100644 index 0000000..afeeeda --- /dev/null +++ b/filedata/Arsenal_Shop.txt @@ -0,0 +1,65 @@ +== LITH_TXT_SHOP_TITLE_RocketAmmo | Rocket Ammo +@@ LITH_TXT_SHOP_DESCR_RocketAmmo +Rocket propelled grenades produced by SYM4.3 for your launcher. + +Delicious high-yield explosives right at your fingertips. + +== LITH_TXT_SHOP_TITLE_PlasmaAmmo | Plasma Ammo +@@ LITH_TXT_SHOP_DESCR_PlasmaAmmo +Highly condensed energy cells used by your plasma rifle. + +Produced by A.O.F Inc. + +== LITH_TXT_SHOP_TITLE_Allmap | Area Map +@@ LITH_TXT_SHOP_DESCR_Allmap +A map of the area for your Automap. Reveals all locations you have and haven't seen. + +== LITH_TXT_SHOP_TITLE_Infrared | CB-Goggles +@@ LITH_TXT_SHOP_DESCR_Infrared +Light amplifying goggles that let you see in the dark. + +== LITH_TXT_SHOP_TITLE_RadSuit | Rad. Suit +@@ LITH_TXT_SHOP_DESCR_RadSuit +A radiation shielding suit which lets you walk through hazardous materials. + +== LITH_TXT_SHOP_TITLE_ChargeFist | $LITH_TXT_INFO_SHORT_ChargeFist +@@ LITH_TXT_SHOP_DESCR_ChargeFist +A melee weapon that you can charge. + +== LITH_TXT_SHOP_TITLE_Revolver | $LITH_TXT_INFO_SHORT_Revolver +@@ LITH_TXT_SHOP_DESCR_Revolver +A powerful handgun. Holds 6 bullets. + +Doesn't take upgrades. + +== LITH_TXT_SHOP_TITLE_LazShotgun | $LITH_TXT_INFO_SHORT_LazShotgun +@@ LITH_TXT_SHOP_DESCR_LazShotgun +Piercing laser shotgun. + +Doesn't take upgrades. + +== LITH_TXT_SHOP_TITLE_SniperRifle | $LITH_TXT_INFO_SHORT_SniperRifle +@@ LITH_TXT_SHOP_DESCR_SniperRifle +Scoped bolt-action rifle. + +Doesn't take upgrades. + +== LITH_TXT_SHOP_TITLE_MissileLauncher | $LITH_TXT_INFO_SHORT_MissileLauncher +@@ LITH_TXT_SHOP_DESCR_MissileLauncher +Mini-missile launcher. + +Doesn't take upgrades. + +== LITH_TXT_SHOP_TITLE_PlasmaDiffuser | $LITH_TXT_INFO_SHORT_PlasmaDiffuser +@@ LITH_TXT_SHOP_DESCR_PlasmaDiffuser +Classic plasma rifle. + +Doesn't take upgrades. + +== LITH_TXT_SHOP_TITLE_Gameboy | $LITH_TXT_INFO_SHORT_Gameboy +@@ LITH_TXT_SHOP_DESCR_Gameboy +A game playing system, containing several old titles. + +== LITH_TXT_SHOP_TITLE_DivSigil | Div. Sigil +@@ LITH_TXT_SHOP_DESCR_DivSigil +A mistake of the universe. diff --git a/filedata/Arsenal_Upgrades.txt b/filedata/Arsenal_Upgrades.txt new file mode 100644 index 0000000..9c12e06 --- /dev/null +++ b/filedata/Arsenal_Upgrades.txt @@ -0,0 +1,370 @@ +== LITH_COST | Cost +== LITH_CATEGORY | Category +== LITH_SCOREMULT | Score Multiplier + +## Body ----------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_HeadsUpDisp | Heads Up Disp. +@@ LITH_TXT_UPGRADE_EFFEC_HeadsUpDisp +Shows vital information. + +A Heads Up Display program built into your Computer/Brain Interface. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_HeadsUpDis2 | Heads Up Disp. +@@ LITH_TXT_UPGRADE_EFFEC_HeadsUpDis2 +Shows vital information. + +A Heads Up Display program. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_JetBooster | Jet Booster +@@ LITH_TXT_UPGRADE_EFFEC_JetBooster +Lets you press the "run" key while in the air to fly for a short time. + +Jet boosters built into your boots. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ReflexWetw | Reflex Wetware +@@ LITH_TXT_UPGRADE_EFFEC_ReflexWetw +Lets you move quicker, easier and more efficiently. + +Allows you to double jump by pressing jump mid-air and slide by pressing run. + +Cybernetic wetware that improves your reflexes and implicit agility. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Zoom | Zoom Wetware +@@ LITH_TXT_UPGRADE_EFFEC_Zoom +Allows you to press the zoom keys to zoom in and out. + +Drivers for zooming software, which utilizes your eye implants. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_VitalScan | Vital Scanner +@@ LITH_TXT_UPGRADE_EFFEC_VitalScan +While aiming at living things, you can see their health and how much damage is +being dealt to them on your HUD. + +Customizable via settings menu. + +A set of nanobots are deployed to get vitality information on targets you aim +at. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_CyberLegs | Move Wetware +@@ LITH_TXT_UPGRADE_EFFEC_CyberLegs +Allows you to jump higher and move faster. + +Damages enemies landed on. + +Improved reflex wetware, which gives an even larger combat advantage. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ReactArmor | R. Armor +@@ LITH_TXT_UPGRADE_EFFEC_ReactArmor +Makes your armor react to being hit, switching its mode to the type of damage +you took, mitigating any further damage of that type. + +Integrate your armor with a highly advanced Yh-0 reactive plating system, made +by avians on Durla Prime. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ReactArmor2 | R. Armor 2 +@@ LITH_TXT_UPGRADE_EFFEC_ReactArmor2 +Improves the damage resistance of the Reactive Armor. + +Upgrades the Yh0 plating system, reducing damage taken twice over. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_DefenseNuke | Def. Mini Nuke +@@ LITH_TXT_UPGRADE_EFFEC_DefenseNuke +When you enter a level, sets off a huge explosion, defending you from initial +threats. + +\cgThis alerts monsters when you enter a map. + +Implant a slow-charging self-defense explosive into your armor, keeping +threats away while you're distracted. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Adrenaline | Adrenaline Inj. +@@ LITH_TXT_UPGRADE_EFFEC_Adrenaline +When being targeted by enemies or nearing a projectile, time will stop for one +second. + +Needs to be charged for 30 seconds to activate. + +Implants an adrenaline injector into your skin, which reacts to sudden impulses +and sound cues. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Magic | Mana Absorber +@@ LITH_TXT_UPGRADE_EFFEC_Magic +Killed enemies will drop mana. + +Enables mana display on the HUD. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SoulCleaver | Soul Cleaver +@@ LITH_TXT_UPGRADE_EFFEC_SoulCleaver +When living things die, they emit a projectile that will seek other enemies for +a short time. + +Creates an artificial soul on your targets and makes it destroy their neighbors. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_StealthSys | Stealth System +@@ LITH_TXT_UPGRADE_EFFEC_StealthSys +Makes you gradually fade out when still, giving you partial invisibility from +enemies, and generally harder to aim at. + +## Weapons -------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_AutoReload | Auto Reload +@@ LITH_TXT_UPGRADE_EFFEC_AutoReload +Weapons in your inventory automatically reload after 5 seconds. + +Automated reloading system for your backpack. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_AutoPistol | Auto Pistol +@@ LITH_TXT_UPGRADE_EFFEC_AutoPistol +Makes your pistol fire in full auto. + +Simply changes the trigger mechanism a bit to make the pistol fire +automatically. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_PlasPistol | Plasma Pistol +@@ LITH_TXT_UPGRADE_EFFEC_PlasPistol +Makes your pistol fire strong plasma. + +Changes the internal mechanisms of the gun to fire charged plasma. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_PoisonShot | Poison Shot +@@ LITH_TXT_UPGRADE_EFFEC_PoisonShot +Makes your shotgun fire poison pellets that do 10 damage every half-second +after hitting a target. + +Installs a poison injector into the shell loading mechanism. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_GaussShotty | Gauss Rifle +@@ LITH_TXT_UPGRADE_EFFEC_GaussShotty +Turns your shotgun into a gauss rifle. + +Re-build the internal mechanisms to turn the railgun part of your shotgun +into a new one, removing the shell loader entirely. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_RifleModes | Modal Rifle +@@ LITH_TXT_UPGRADE_EFFEC_RifleModes +Gives your rifle a sniper firing mode. + +A complete replacement for the trigger mechanism which adds a third mode, +allowing you to burst-fire accurate, painful shots. + +\cdCompatible with Laser Rifle. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_LaserRCW | Laser Rifle +@@ LITH_TXT_UPGRADE_EFFEC_LaserRCW +Makes your rifle fire penetrating lasers. + +Modal Rifle may be used with this upgrade. + +Uses a standard photon accelerator to fire lasers out of your rifle. + +\cdCompatible with Modal Rifle. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_HomingRPG | Homing Rocket +@@ LITH_TXT_UPGRADE_EFFEC_HomingRPG +Pressing alt-fire with the rocket launcher selects a target to be traced by +any rockets you fire afterwards. + +Disperses extra nanomachines out of the rifle that push the rocket toward the +enemy with extreme accuracy. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ChargeRPG | C. Launcher +@@ LITH_TXT_UPGRADE_EFFEC_ChargeRPG +Lets you hold "fire" to queue extra grenades in your grenade launcher. + +Can fire rockets in a line, spiral, or grenade dump. + +Allows your grenade launcher to hold multiple rockets and fire them all at once. + +Hold fire to load more grenades, and then hold alt-fire to change the firing +mode. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_PlasLaser | Plasmatic Las. +@@ LITH_TXT_UPGRADE_EFFEC_PlasLaser +Makes your plasma rifle emit red-hot laser beams. + +Switches out the ion emitter with an ion condenser, that can fire out laser +beams strong enough to cut clean through Adamantium. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_PartBeam | Particle Beam +@@ LITH_TXT_UPGRADE_EFFEC_PartBeam +Makes your plasma rifle fire a deadly long-range particle beam. + +Replaces the weapon's ion emitter with an ion accelerator, that fires bursts +of ions that are then super-charged. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_PunctCannon | Punct. Cannon +@@ LITH_TXT_UPGRADE_EFFEC_PunctCannon +Your cannon now shoots explosive bolts that send huge shocks through walls. + +By adding new magic translation buffers to your weapon, it can create +extreme-yield explosive bolts from the same charge as the cannon type does. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_OmegaRail | Omega Railgun +@@ LITH_TXT_UPGRADE_EFFEC_OmegaRail +Your cannon fires highly deadly, pinpoint accurate plasmatic death. + +Implements a plasma charger in your cannon, made with reverse-engineered +magical compounds. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Mateba_A | Finalizer +@@ LITH_TXT_UPGRADE_EFFEC_Mateba_A +Makes the Mateba fire a projectile that instantly kills monsters below 50% +health on its last shot. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ShockRif_A | Shock Charge +@@ LITH_TXT_UPGRADE_EFFEC_ShockRif_A +Creates bolts of lightning around the Shock Rifle's impacts. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ShockRif_B | Elec. Binding +@@ LITH_TXT_UPGRADE_EFFEC_ShockRif_B +Makes the Shock Rifle do more shock damage, and when hit with 6 consecutive +shots, will explode with a sphere of electricity. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SPAS_A | Void Breath +@@ LITH_TXT_UPGRADE_EFFEC_SPAS_A +Makes the Shotgun fire out wisps of energy that deal massive damage. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SPAS_B | Shell Autoloader +@@ LITH_TXT_UPGRADE_EFFEC_SPAS_B +Automatically loads shells, removing the need to reload. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SMG_A | SMG Trimag +@@ LITH_TXT_UPGRADE_EFFEC_SMG_A +Triples the SMG's magazine size, but makes it slower to reload. + +\cdCompatible with Seeker Rounds. + +\cdCompatible with Safety System. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SMG_B | Seeker Rounds +@@ LITH_TXT_UPGRADE_EFFEC_SMG_B +Makes the SMG's rounds home in on targets in a small cone. + +\cdCompatible with SMG Trimag. + +\cdCompatible with Safety System. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_SMG_C | Safety System +@@ LITH_TXT_UPGRADE_EFFEC_SMG_C +When the SMG is about to overheat, makes it stop firing for a short time. + +\cdCompatible with Seeker Rounds. + +\cdCompatible with SMG Trimag. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_IonRifle_A | Rad. Ionizer +@@ LITH_TXT_UPGRADE_EFFEC_IonRifle_A +Ionizes enemies, making them take more damage when hit for a few seconds. + +\cdCompatible with Overloader. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_IonRifle_B | Overloader +@@ LITH_TXT_UPGRADE_EFFEC_IonRifle_B +Lets you hold down fire to charge the Ion Rifle, at the cost of cooldown time. + +\cdCompatible with Rad. Ionizer. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_CPlasma_A | Pulse Charger +@@ LITH_TXT_UPGRADE_EFFEC_CPlasma_A +Makes the Plasma Rifle fire out long streams of deadly plasma. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ShipGun_A | Longinus Solspear +@@ LITH_TXT_UPGRADE_EFFEC_ShipGun_A +The Star Destroyer will fire fast, piercing beams that bounce around and +destroy everything in their path. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_ShipGun_B | Surge of Destiny +@@ LITH_TXT_UPGRADE_EFFEC_ShipGun_B +The Star Destroyer will emit an aura of protection while firing out projectiles +from all directions. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_DarkCannon | ???????? +@@ LITH_TXT_UPGRADE_EFFEC_DarkCannon +What the !@#$% is this!? + +## Extras --------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_TorgueMode | EXPLOOSIONS +@@ LITH_TXT_UPGRADE_EFFEC_TorgueMode +ARE YOU READY FOR THIS, YOU BADASS MOTHERFUCKER!?! THIS UPGRADE IS NOT ONLY +THE MOST EXPLOSION FILLED IN THIS ENTIRE MOD, IT'S ACTUALLY MORE EXPLOSIVE +THAN 99% OF ALL GAMES! YOU AREN'T SOME PUSSY WHO RUNS AROUND WITH WUSSY LASERS +AND SHIT, RIGHT!? BUY THIS NOW AND I'LL DO A SICK GUITAR SOLO JUST FOR YOU NO +CHARGE IN FACT I'LL DO IT ANYWAY OK ACTUALLY BRB I JUST BROKE MY HAND SWINGING +IT AROUND LIKE THIS I'LL BE BACK WITH A GUITAR MADE OF BANDAGES LATER + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_7777777 | 7777777 Mode +@@ LITH_TXT_UPGRADE_EFFEC_7777777 +Instates cosmic horror and spurious time travel into your very being, causing +you to instantly implode upon activation. (not really) + +\cd~text interface terminal malfunction error ~2992dud + +\cdhelo i am of durnadle winner of ai beauty contets i will give u +anti-physics powers becaus i did some calculations and found the universe is +stupid so i am doing my best to flip off reality for a thousand years + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_lolsords | Steele Mode +@@ LITH_TXT_UPGRADE_EFFEC_lolsords +You get a sword. It is literally your only weapon. + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Goldeneye | 007 Mode +@@ LITH_TXT_UPGRADE_EFFEC_Goldeneye +Get the true Goldeneye 007(tm) experience! + +## Downgrades ----------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_Implying | >Implicating +@@ LITH_TXT_UPGRADE_EFFEC_Implying +Oh god why did I add something Kegan suggested to me this was not a good idea + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_UNCEUNCE | UNCE UNCE +@@ LITH_TXT_UPGRADE_EFFEC_UNCEUNCE +UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE +UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE +UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE UNCE + +##----------------------------------------------------------------------------| +== LITH_TXT_UPGRADE_TITLE_InstaDeath | Instant Death +@@ LITH_TXT_UPGRADE_EFFEC_InstaDeath +Upon losing health, you instantly die. diff --git a/filedata/BIPInfo.txt b/filedata/BIPInfo.txt new file mode 100644 index 0000000..2adcc00 --- /dev/null +++ b/filedata/BIPInfo.txt @@ -0,0 +1,172 @@ +// vim: syntax=c +// This is a configuration file for Lithium's info pages. The current category +// is set with ^ Category [*], and then the syntax is simply: +// Classes... Name [*] [-> Unlocks...] + +@"LITH_BIPINFO_MOD" // if you want to add extra pages, use this definition + +^WEAPONS // ------------------------------------------------------------------| + +gO ChargeFist -> KSKK + +pM Pistol* -> Omakeda +pM Revolver -> Earth +pM Shotgun -> Omakeda +pM ShotgunUpgr -> Shotgun AOF DurlaPrime +pM ShotgunUpg2 -> Shotgun +pM LazShotgun -> Earth +pM SuperShotgun -> ChAri +pM CombatRifle -> AllPoint +pM RifleUpgr -> CombatRifle +pM RifleUpg2 -> CombatRifle Semaphore +pM SniperRifle -> Facer +pM GrenadeLauncher -> Sym43 +pM LauncherUpgr -> GrenadeLauncher UnrealArms +pM LauncherUpg2 -> GrenadeLauncher Sym43 +pM PlasmaRifle -> AllPoint MDDO +pM PlasmaUpgr -> PlasmaRifle +pM PlasmaUpg2 -> PlasmaRifle Semaphore +pM BFG9000 -> Cid +pM CannonUpgr -> BFG9000 SuperDimension +pM CannonUpg2 -> BFG9000 + +pC Mateba* -> AOF +pC MatebaUpgr -> Mateba AOF Algidistari +pC ShockRifle -> ChAri +pC ShockRifUpgr -> ShockRifle +pC ShockRifUpg2 -> ShockRifle +pC SPAS -> AOF Newvec +pC SPASUpgr -> SPAS +pC SPASUpg2 -> SPAS Newvec +pC SMG -> Omakeda Sym43 +pC SMGUpgr -> SMG AOF Sym43 +pC SMGUpg2 -> SMG AOF +pC SMGUpg3 -> SMG Sym43 +pC IonRifle -> KSKK +pC IonRifleUpgr -> IonRifle KSKK +pC IonRifleUpg2 -> IonRifle KSKK +pC CPlasmaRifle -> AllPoint MDDO +pC CPlasmaUpgr -> CPlasmaRifle MDDO +pC StarDestroyer -> Hell +pC ShipGunUpgr -> StarDestroyer +pC ShipGunUpg2 -> StarDestroyer + +gO MissileLauncher +gO PlasmaDiffuser -> Sym43 MDDO Semaphore + +pC Blade* +pC Delear* -> Earth +pC Feuer +pC Rend +pC Hulgyon -> Heaven +pC StarShot -> AOF +pC Cercle -> Earth + +^ENEMIES* // -----------------------------------------------------------------| + +gA ZombieMan +gA ShotgunGuy +gA ChaingunGuy + +gA Imp +gA Demon +gA Spectre + +gA LostSoul +gA Mancubus +gA Arachnotron +gA Cacodemon + +gA HellKnight +gA BaronOfHell +gA Revenant + +gA PainElemental +gA Archvile +gA SpiderMastermind +gA Cyberdemon + +gA Phantom +gA IconOfSin + +^YOURSELF* // ----------------------------------------------------------------| + +pM P114 +pC OPD2 +pC Info400 +pC Info402 + +gA BIP +pM CBI +pC CBIJem + +gA AttrACC +gA AttrDEF +gH AttrSTRHuman +gR AttrSTRRobot +gN AttrSTRNonHuman +gH AttrVIT +gR|gN AttrPOT +gH AttrSTM +gR AttrREP +gN AttrREG +gA AttrLUK +gA AttrRGE + +^UPGRADES // -----------------------------------------------------------------| + +pM HeadsUpDisp -> OFMD +pM JetBooster -> OFMD +pM ReflexWetw -> OFMD +pM CyberLegs -> OFMD +pM Yh0 -> DurlaPrime +pM DefenseNuke -> OFMD +pM Adrenaline -> KSKK + +pC HeadsUpDispJem -> AOF +pC ReflexWetwJem -> AOF +pC Magic +pC SoulCleaver +pC StealthSys + +gO VitalScanner -> KSKK +gO AutoReload -> KSKK + +pM WeapnInter -> OFMD AllPoint +pM WeapnInte2 +pM ArmorInter +pM CBIUpgr1 -> KSKK +pM CBIUpgr2 -> KSKK + +^PLACES // -------------------------------------------------------------------| + +gO AetosVi +pC Algidistari +gO ChAri -> AetosVi +pM DurlaPrime -> Earth AetosVi +gO Earth +pC Hell -> Earth +gO Mars -> Earth OFMD +gO OmicronXevv +pM SuperDimension -> BFG9000 SIGFPE +pC Heaven + +^CORPORATIONS // -------------------------------------------------------------| + +gO AllPoint +pM AOF +pC AOFJem +pM Cid -> SuperDimension Earth +pM Facer +pM KSKK -> Earth +pC KSKKJem -> Earth +gO MDDO -> Mars OFMD +pC Newvec -> Earth +pM OFMD +pC OFMDJem +gO Omakeda -> Earth +gO Semaphore -> OmicronXevv +gO Sym43 -> AetosVi +pM UnrealArms -> AetosVi + +// EOF diff --git a/filedata/Dialogue_M1A1.txt b/filedata/Dialogue_M1A1.txt new file mode 100644 index 0000000..661ee40 --- /dev/null +++ b/filedata/Dialogue_M1A1.txt @@ -0,0 +1,143 @@ +// Terminals -----------------------------------------------------------------| + +// +terminal 1 + +unfinished +{ + remote "OCS@localhost" + + if class CyberMage + { + logon "LogonAOF" + `\ch2929ff\cm..\cr4-\cg<<>> + + pict 1 + @@ + `\cdApologies for the abrupt stop, this ship hasn't run the faster than + `light engine enough times. We didn't collide with the planet, so I'm not + `very worried about its future performance, now. + ` + `\cdWe have arrived at \cnNisiv 16\cd; the \cforange\cd planet, if you + `look out the window, is \cnNanto\cd. Your objective is somewhere there. + @@ + + pict 2 + @@ + `\cdUnfortunately, that will have to wait. The ship has been boarded by + `demons. The assailants appear to be scouts for a bigger plan, so as to + `say, they're going to come back and kill us now that they know the + `ship's layout. + ` + `\cdSo, before we go on to your mission on \cnNanto\cd, I need you to + `transfer me onto a backup device. I'll plan an escape for you as soon as + `I can, but this ship is going to go down along with those options. It'll + `take some time. + @@ + + pict 1 + @@ + `\cdWhile you do that, I'll be showing the demons to my \cnbeautiful\cd + `defense system. Thank you, by the way, for cleaning out the turrets. + `Wonderful machines, those. + @@ + + logoff "LogonAOF" + } + else + { + logon "UAC" + `\cd*** ON-BOARD COMMAND SYSTEM ACCESS TERMINAL *** + + pict 1 + `[\cuINFO\c-] pragmat \cqENABLE + `\ck#src_lang 99391dp.hs.ul + ` + @@ + `\cgThe planet \cnNanto\cg is now directly right of us. The faster than + `light engine worked better than I expected, and a landing should be + `possible soon. + ` + `\cnNisiv 16\cg seems to be full of \ch(?\cractive demonic + `energy\ch|\crdemonic presence\ch)\cg. This is a bit of a problem for me. + @@ + + pict 2 + @@ + `\cgThose \crdemons\cg decided this ship is of great value to them, and + `have boarded \ch(\crforcefully\ch)\cg. Having tapped into their weaker + `communications, I have found that they \ch(\crplan\ch|\crhave + `plotted\ch)\cg to return with stronger forces and destroy me then. + ` + `\cgI need you to transfer me onto a backup device before we land on + `\cnNanto\cg. The automated defense systems will help you, but you are + `mainly on your own here. Good luck. + @@ + + logoff "UAC" + } +} + +// +terminal 2 + +unfinished +{ + remote "data@localhost" + + logon "LogonData" + + info + `[Viewing:\cd/sys/data/\cginvalid-name\cd/5a_16378_0_.v\c-] + `[\cuINFO\c-] pragmat \cqENABLE\ck #src_lang 99391dp.kiri.licari + ` + `even when I have run out of blood to spill, my life will carry its burden + ` by my task I have become immortal, like those of the other realm, + ` and I have foregone all needs to serve them + + logoff "LogonData" + + exec intralevelteleport 4 +} + +// +terminal 3 + +unfinished +{ + remote "OCS@localhost" + + if class CyberMage + { + logon "LogonAOF" + `\ch2929ff\cm..\cr4-\cg<<>> + + pict 3 + @@ + `\cdWhile I'm sure you would be capable of taking on threats by yourself, + `my calculations of your survival against the path you must take is + `extremely low. Because this is the case, I will send you to the + `armaments depot before continuing. + ` + `\cdPlease understand, I also wish to treat you to our \cnbeautiful\cd + `selection of weaponry. + @@ + + logoff "LogonAOF" + + exec interlevelteleport 18883002 + } + else + { + logon "UAC" + `\cd*** ON-BOARD COMMAND SYSTEM ACCESS TERMINAL *** + + pict 1 + `\cgTeleport when ready. + + logoff "UAC" + exec interlevelteleport 18883002 + } +} + +// EOF diff --git a/filedata/Dialogue_M1A2.txt b/filedata/Dialogue_M1A2.txt new file mode 100644 index 0000000..aeb855f --- /dev/null +++ b/filedata/Dialogue_M1A2.txt @@ -0,0 +1,48 @@ +// Terminals -----------------------------------------------------------------| + +// +terminal 1 + +unfinished +{ + remote "OCS@localhost" + + if class CyberMage + { + logon "LogonAOF" + `\ch2929ff\cm..\cr4-\cg<<>> + + info + @@ + `\cdThe armory is currently under lock-down due to the invading forces. + `There is an \cnoverride KeyDisk\cd available, but it is itself currently + `locked in storage. + ` + `\cdNot to worry, though. There is a nearby access point that can request + `the disk be... \cnrelocated\cd. One of the gateways opened by the + `intruders can be used for this, but unfortunately in doing so you will + `also have to temporarily open it to them as well. + @@ + + pict 1 + @@ + `\cdOnce you have the \cnoverride disk\cd and have made your way inside + `the armory proper, acquire one of the weapons there and \cfI will + `relocate you from this terminal\cd. + @@ + + logoff "LogonAOF" + } + else + { + logon "UAC" + `\cd*** ON-BOARD COMMAND SYSTEM ACCESS TERMINAL *** + + pict 3 + `\cgtodo + + logoff "UAC" + } +} + +// EOF diff --git a/filedata/Dialogue_TESTMAP.txt b/filedata/Dialogue_TESTMAP.txt new file mode 100644 index 0000000..660efc2 --- /dev/null +++ b/filedata/Dialogue_TESTMAP.txt @@ -0,0 +1,216 @@ +// Dialogue ------------------------------------------------------------------| + +dialogue 1 + +page 0 +{ + name "Jacques" + icon "AOF" + remote "jacques.p42710@corp.AOF" + + if item Lith_DivisionSigil + page 7 + + `... + + option "Say hello" page 2 + option "Exit" exit +} + +page 2 +{ + if class Marine `Who are you? + if class CyberMage `Right. The Cybernati. + + add 5 + push a + pop b + xor a + add 10 + mul b + + trace a + trace b + trace "butts" + + @@ + `Test of concatenated + `text which should concat + `lines with spaces... + ` + `and break on multiple lines. + @@ + + $QUITMSG39 + + option "emit skeltal" + { + script 2 + page 2 + } + + option "Talk to me." page 3 + option "Thanks, bye!" exit +} + +page 3 +{ + `What, you want something? + ` + + if class CyberMage + { + `What did you need, Stilko? + option "The nightmares are back." page 10 + option "I just need someone to talk to, Jacques." page 11 + } + else + { + `Too bad. Get it yourself. + option "That's rude." page 4 + } + + option "Bye." exit +} + +page 10 +{ + @@ + ` Already? Are you sure it isn't just ASIC bugs? I have trouble believing + `that they'd be back so soon, after your doctor gave you that prescription + `and even turned down your AS-voltage. + ` + ` You know, ASIC hardware reacts to changes. It might just be that it's + `settling to the new voltage and giving you a hard time. + @@ + + option "It's not that, I'm certain.. They're \cmworse\c-." page 13 + option "Right... Thank you, Zeke." exit +} + +page 11 +{ + @@ + ` I know how that is. You know, Order doesn't pass through this part of + `the ship. You could say "Zeke" again if you want. I know they don't like + `the names we give ourselves, but we're not infront of them. We at least + `have that freedom. + ` + ` If you want, I can call you "Jem," too. Though I'd rather you of all + `people not get in trouble for being called by your true name. + @@ + + option "Thanks, 'Z.'" page 12 +} + +page 12 +{ + @@ + ` Heh.. "Z." You're quite creative. + ` + ` There's trouble in your voice, though. I know you usually tremble, but + `right now it seems even worse than usual. What's wrong, "J?" + @@ + + option "... The nightmares are back." page 10 +} + +page 13 +{ + @@ + ` Worse? + ` + ` ... + ` + ` You can feel in them now, right? That's why you're trembling. + @@ + + option "Yeah. And I don't want to go to the doctor." page 14 +} + +page 14 +{ + @@ + ` ... + ` + ` Is there anything I can do to help? It's not a lack of food or something, + `right? + @@ + + option "You'd have told me if you could hear it, right?" page 15 +} + +page 15 +{ + @@ + ` Are you hearing a beat? It could be your home calling for you. I'd imagine + `AOF didn't put much use to that planet after they went and captured you, + `it's probably just aching for its mana to be used. + @@ + + option "That's not it, I always hear that. What I hear now is.. darker." + page 16 +} + +page 16 +{ + @@ + ` Darker... + ` + ` Then, do you think that it's come? Doesn't ever come excluding + `incantation, vile, enroaching reality, Hell? + @@ + + option "It's coming. Just thought I'd let you know." exit +} + +page 4 +{ + `Life is rude. + ` + `Now go away. + + option "Right." exit +} + +page 7 +{ + `thousands are sailing + `the same self the only self + ` + `self willed the peril of a thousand fates + ` + `a line of infinite ends finite finishing + `the one remains oblique and pure + ` + `arching to the single point of consciousness + ` + `find yourself + `starting back + + option "Thanks, bye!" exit +} + + +// Terminals -----------------------------------------------------------------| + +terminal 1 + +unfinished +{ + remote "test@org.example" + + logon 01602 + `\cgehhg.431.4122/-/ + + info + `test text, information block + + pict "AOF" + `test with picture + `and multiple lines of text + + logoff 01602 +} + +// EOF diff --git a/filedata/Info_Corporations.txt b/filedata/Info_Corporations.txt new file mode 100644 index 0000000..194f641 --- /dev/null +++ b/filedata/Info_Corporations.txt @@ -0,0 +1,198 @@ +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AllPoint | AllPoint +== LITH_TXT_INFO_TITLE_AllPoint | AllPoint Precision Firearms +== LITH_TXT_INFO_IMAGE_AllPoint | lgfx/BIP/AllPoint.png +@@ LITH_TXT_INFO_DESCR_AllPoint +Established mid first-century NE, AllPoint present heavy sniper rifles and +plasma weapons for military and private use. + +Despite producing mainly precision arms, their best-selling weaponry is known +for having terrible accuracy, but big punch. + +Regarding this infamy, its current CEO has this to say: "Look here, [...] if +you want me to talk about our weapons, I'll talk about all of our fine +armaments; but if you just want me to talk about our 'best-sellers', maybe you +should just go back to window shopping." + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AOF | A.O.F +== LITH_TXT_INFO_TITLE_AOF | A.O.F Inc. +== LITH_TXT_INFO_IMAGE_AOF | lgfx/BIP/AOF.png +@@ LITH_TXT_INFO_DESCR_AOF +Not much is known about this shady corporation on the outside, and reports +from insiders never painted a very pretty picture. + +In 1345 NE, a major attack on A.O.F left them nearly out of the picture. +However, with slow, concise social manipulation and funding from alien +governments, they finally made it back onto the market in 1370. + +A.O.F mainly produce weapon modifications, plasma ammunition, and robotics. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AOFJem | $LITH_TXT_INFO_SHORT_AOF +== LITH_TXT_INFO_TITLE_AOFJem | A.O.F Inc. [Bishop-Class Clearance] +== LITH_TXT_INFO_IMAGE_AOFJem | $LITH_TXT_INFO_IMAGE_AOF +@@ LITH_TXT_INFO_DESCR_AOFJem +A.O.F Inc. is a company founded in 761 NE by \cm----- -------\cj and +\cm--------\cj for the purposes of exposing the universal secret of magic and +restoring the world to what it once was pre-calamity. + +Ranks of members whom fight for them include knights, bishops and +infiltrators; these are assigned based on their skill set and the needs of the +corporation. + +A.O.F Inc. also mass produces ammunition for energy weapons, robotics and +modifications for existing weapons. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Cid | Cid +== LITH_TXT_INFO_TITLE_Cid | $LITH_TXT_INFO_SHORT_Cid +== LITH_TXT_INFO_IMAGE_Cid | lgfx/BIP/Cid.png +@@ LITH_TXT_INFO_DESCR_Cid +Cid is a black market trading group, presumed to be led by four men. They sell +artifacts from the Super Dimension, ultra-high-grade weapons, and anonymously +donate to several charities on Earth. + +This group has gone under several aliases over the past 200 years, and is one +of the strongest, longest standing black market groups ever. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Facer | Facer +== LITH_TXT_INFO_TITLE_Facer | $LITH_TXT_INFO_SHORT_Facer +@@ LITH_TXT_INFO_DESCR_Facer +Facer (pronounced "phaser") was a company that produced precision firearms +around 2403 CE. Based in Paris, France, the company started out as a two-man +production, designing simple but powerful sniper rifles for attracting +military or revolutionary forces. + +Unfortunately, neither bought in due to lack of any real strife at the time. +However, through word of mouth and lots of street-sales, Facer finally took +off as a civilian hunting weapons seller. + +The company was resigned in 2480 after the death of its remaining founder. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_KSKK | KSKK +== LITH_TXT_INFO_TITLE_KSKK | Kazami Sensou Kenkyuu Kaihatsu GK +== LITH_TXT_INFO_IMAGE_KSKK | lgfx/BIP/KSKK.png +@@ LITH_TXT_INFO_DESCR_KSKK +A limited R&D company acting mainly in partnership with the military of the +Great Empire of Kazami on Earth. Due to the strange and generally complex +needs of the Kazami army, this company has developed a great many +technologically advanced devices with a relatively small budget. + +Thanks to connections between OFMD and the Kazami government (from the +circumstances of this operation,) KSKK has agreed to re-enter production of +their more useful creations. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_KSKKJem | $LITH_TXT_INFO_SHORT_KSKK +== LITH_TXT_INFO_TITLE_KSKKJem | $LITH_TXT_INFO_TITLE_KSKK +== LITH_TXT_INFO_IMAGE_KSKKJem | $LITH_TXT_INFO_IMAGE_KSKK +@@ LITH_TXT_INFO_DESCR_KSKKJem +Kazami Sensou Kenkyuu Kaihatsu (Kazami Military R&D) is a godo kaisha +business organization based in the Great Empire of Kazami, on Earth. They +research, develop and produce a large variety of products for the Kazami army. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_MDDO | MDDO +== LITH_TXT_INFO_TITLE_MDDO | Maxim-Danil Defense Org +@@ LITH_TXT_INFO_DESCR_MDDO +A now-defunct weapons manufacturer on Mars, founded and funded by the famous +Maxim-Danil duo. They designed and produced weapons of all kinds on commission +for military and paramilitary groups alike. + +De-funded and merged into Optic Fiber Maxim-Danil (OFMD) in 1045 NE. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Newvec | Newvec +== LITH_TXT_INFO_TITLE_Newvec | Newvec Armory Incorporated +@@ LITH_TXT_INFO_DESCR_Newvec +Newvec is a firearms company started a mere four years ago 1645. While they +don't have much reputation as of now, they have a few very strong backers +providing them funding. Newvec mostly produces weapons on commission, and only +sells weapons to the public via online shipping. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_OFMD | OFMD +== LITH_TXT_INFO_TITLE_OFMD | Optic Fiber Maxim-Danil +== LITH_TXT_INFO_IMAGE_OFMD | lgfx/BIP/OFMD.png +@@ LITH_TXT_INFO_DESCR_OFMD +Originally, this company only produced optic fiber cables for consumer use, +but later branched out to create all kinds of computation technology. + +Optic Fiber Maxim-Danil are currently conducting a seek-and-destroy operation +in concert with militaries of Earth on all demonic threats found to be +emitting themselves from another dimensional plane. + +For now, OFMD are your employers, and supply you with Score, weaponry and +cyber-tech. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_OFMDJem | $LITH_TXT_INFO_SHORT_OFMD +== LITH_TXT_INFO_TITLE_OFMDJem | $LITH_TXT_INFO_TITLE_OFMD +== LITH_TXT_INFO_IMAGE_OFMDJem | $LITH_TXT_INFO_IMAGE_OFMD +@@ LITH_TXT_INFO_DESCR_OFMDJem +Optic Fiber Maxim-Danil is a company which mainly produces electronics, and is +one of the top-selling brands on the market for cables, computer parts, and +other such common technology. + +Originally, this company only produced optic fiber cables for consumer use, +but later branched out to create all kinds of computation technology. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Omakeda | Omakeda +== LITH_TXT_INFO_TITLE_Omakeda | Omakeda Defense Co. +== LITH_TXT_INFO_IMAGE_Omakeda | lgfx/BIP/Omakeda.png +@@ LITH_TXT_INFO_DESCR_Omakeda +Based in Hawaii, Omakeda Defense Co. produce self-defense and hunting weaponry +for civilians. Due to their high quality and fair pricing, militaries +mercenaries around the world use their armaments as well. + +Known for their innovative firearm design, Omakeda is one of the highest +profiting, most popular firearms manufacturers on Earth. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Semaphore | Semaphore, Inc. +== LITH_TXT_INFO_TITLE_Semaphore | Semaphore, Incorporated +== LITH_TXT_INFO_IMAGE_Semaphore | lgfx/BIP/Semaphore.png +@@ LITH_TXT_INFO_DESCR_Semaphore +Hiding out somewhere in the asteroid belt of Omicron Xevv, Semaphore, Inc is a +space ship weapons designer and manufacturer started 6 years ago in 1643 NE by +a small group of scientists and businessmen. + +Semaphore has over its lifetime put out a great many prototype weapons and +done fairly well with investors. + +While they mainly produce weaponry made for equipping space ships, Semaphore +have also produced small-batch infantry weapons for gauging interest and +profitability. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Sym43 | SYM4.3 +== LITH_TXT_INFO_TITLE_Sym43 | SYM4.3 WEAPONS INCORPORATED +== LITH_TXT_INFO_IMAGE_Sym43 | lgfx/BIP/Sym43.png +@@ LITH_TXT_INFO_DESCR_Sym43 +Currently believed to be based somewhere in the Aetos-Vi system, SYM4.3 +produce explosive weapons and distribute many other kinds of weaponry via +proxy. All weapons and ammunition sold by them are assigned a standard +anonymous designation. + +They have (according to their published sales reports) sold weaponry to over +three quarters of all recorded mercenary, military and government bodies. + +Weapons confirmed to be made by them have appeared in countless historic +battles, having existed for over 700 years now. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_UnrealArms | Unreal Arms +== LITH_TXT_INFO_TITLE_UnrealArms | $LITH_TXT_INFO_SHORT_UnrealArms +@@ LITH_TXT_INFO_DESCR_UnrealArms +A company currently residing in the Aetos Vi system. They manufacture +high-grade exotic weaponry both on commission and for mass production. + +Unreal Arms create what are dubbed by critics "some of the nicest-feeling +weapons you can get your hands on", and yet are still able to sell them for a +nice price thanks to good shipping architecture in the Aetos Vi system. + +## EOF diff --git a/filedata/Info_Enemies.txt b/filedata/Info_Enemies.txt new file mode 100644 index 0000000..997eb5f --- /dev/null +++ b/filedata/Info_Enemies.txt @@ -0,0 +1,215 @@ +##----------------------------------------------------------------------------| +%% LITH_TXT_INFO_DESCR_RankThreatTest +Rank: + \cuNon-resident + \csSubordinate + \cjResident + \cfNoble + \cgTyrant + \crOverlord\c- + +Threat: + \csD + \ciC + \ckB + \cgA + \crE + +## Non-residents -------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ZombieMan | Former Human +== LITH_TXT_INFO_TITLE_ZombieMan | Possessed Human Rifleman +%% LITH_TXT_INFO_DESCR_ZombieMan +Class: \cuNon-resident\c- +Threat: \csD\c- + +Humans which have been abducted and possessed by Hell's forces. Some seem to he artificially created by Hell, while others appear to actually be humans that were defeated by its forces. + +The rifleman is slow and shambling, but still their rifle packs a punch, and they're capable of burst-firing somewhat accurate shots. + +== LITH_TXT_INFO_SHORT_ShotgunGuy | Former Sergeant +== LITH_TXT_INFO_TITLE_ShotgunGuy | Possessed Human Sergeant +%% LITH_TXT_INFO_DESCR_ShotgunGuy +Class: \cuNon-resident\c- +Threat: \csD\c- + +Humans which have been abducted and possessed by Hell's forces. Some seem to he artificially created by Hell, while others appear to actually be humans that were defeated by its forces. + +The sergeant is rather quick with his gun, but not very accurate. Watch out for them at close-range, you may notice that a face full of buckshot hurts. + +== LITH_TXT_INFO_SHORT_ChaingunGuy | Former Corporal +== LITH_TXT_INFO_TITLE_ChaingunGuy | Possessed Human Corporal +%% LITH_TXT_INFO_DESCR_ChaingunGuy +Class: \cuNon-resident\c- +Threat: \ciC-\c- + +Humans which have been abducted and possessed by Hell's forces. Some seem to he artificially created by Hell, while others appear to actually be humans that were defeated by its forces. + +Corporals are generally terrible at aiming, but put out so much lead that you're bound to get hit. A lot. ... By the way, why don't these guys drop their chainguns? + +## Subordinates --------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Imp | Hell Trooper +== LITH_TXT_INFO_TITLE_Imp | Hell Trooper "Imp" +%% LITH_TXT_INFO_DESCR_Imp +Class: \csSubordinate\c- +Threat: \csD+\c- + +Small-time grunts of Hell, they do little more than stall while the bigger threats come to play. They throw fire-balls out of their hands, which while not very strong, can be deadly in large amounts. + +Their claws and spikes hurt like hell, so try not to get too close. + +== LITH_TXT_INFO_SHORT_Demon | Hell Sergeant +== LITH_TXT_INFO_TITLE_Demon | Hell Sergeant "Demon" +%% LITH_TXT_INFO_DESCR_Demon +Class: \csSubordinate\c- +Threat: \ciC\c- + +These demons are known for their distinctive pink-colored skin and tendency to rush-attack their prey. Deadly at close range, not so much past that as they have no projectile attacks. + +Their bodies are rather strong-built, and can resist several point-blank shotgun blasts without dying. + +== LITH_TXT_INFO_SHORT_Spectre | Spectre +== LITH_TXT_INFO_TITLE_Spectre | Hell Sergeant "Spectre" +%% LITH_TXT_INFO_DESCR_Spectre +Class: \csSubordinate\c- +Threat: \ciC+\c- + +Demons which also happen to have cloaking magic active over their bodies. + +They tend to not make a sound until they lunge at you, so be sure to keep an eye out for cracks in the air around you. + +## Residents -----------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_LostSoul | Lost Soul +== LITH_TXT_INFO_TITLE_LostSoul | $LITH_TXT_INFO_SHORT_LostSoul +%% LITH_TXT_INFO_DESCR_LostSoul +Class: \cjResident\c- +Threat: \csD++\c- + +Souls which have been trapped by Hell's forces, they are corrupted and forced to possess any enemy of Hell. + +Alone, they aren't very dangerous; all they can really do is lunge themselves at you and bite you. In groups, they can be extremely annoying, and potentially deadly. + +They have a tendency to turn semi-invisible and stalk around before attacking. + +== LITH_TXT_INFO_SHORT_Mancubus | Mancubus +== LITH_TXT_INFO_TITLE_Mancubus | $LITH_TXT_INFO_SHORT_Mancubus +%% LITH_TXT_INFO_DESCR_Mancubus +Class: \cjResident\c- +Threat: \ckB\c- + +A gluttonous resident of Hell whose arms are flamethrowers made to kill and cook its targets in one fell swoop. Their general strategy is to overwhelm you with fire by shooting in many directions. + +Although they may be quite beefy, they're quite slow and generally their attacks are as well. Dispatch them quickly and you should be fine. + +== LITH_TXT_INFO_SHORT_Arachnotron | Arachnotron +== LITH_TXT_INFO_TITLE_Arachnotron | $LITH_TXT_INFO_SHORT_Arachnotron +%% LITH_TXT_INFO_DESCR_Arachnotron +Class: \cjResident\c- +Threat: \ckB\c- + +Children of a great Spider Demon, they're equipped with plasma guns and cybernetic legs. + +Their attack is straightforward; fire plasma at you until you die, and then some. While their attack is quite strong, they're very weak and greatly prone to bullet and shrapnel damage. + +== LITH_TXT_INFO_SHORT_Cacodemon | Cacodemon +== LITH_TXT_INFO_TITLE_Cacodemon | $LITH_TXT_INFO_SHORT_Cacodemon +%% LITH_TXT_INFO_DESCR_Cacodemon +Class: \cjResident\c- +Threat: \ckB-\c- + +A one-eyed, red, fuzzy(?) demon, which has the ability to fly for an unknown reason. They're quite hearty, and their attacks are fairly deadly, but generally the Cacodemon is not a monster to fear. + +## Nobles --------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_HellKnight | Hell Knight +== LITH_TXT_INFO_TITLE_HellKnight | $LITH_TXT_INFO_SHORT_HellKnight +%% LITH_TXT_INFO_DESCR_HellKnight +Class: \cfNoble\c- +Threat: \ckB\c- + +The weakest of Hell's nobles, they serve the military as grunts to head assaults on weak targets and seek-and-destroy missions. + +They throw long, thin magic attacks that corrode skin and bone. With skin only just more durable than iron, these demons are deadly in groups. + +== LITH_TXT_INFO_SHORT_BaronOfHell | Hell Baron +== LITH_TXT_INFO_TITLE_BaronOfHell | $LITH_TXT_INFO_SHORT_BaronOfHell +%% LITH_TXT_INFO_DESCR_BaronOfHell +Class: \cfNoble\c- +Threat: \ckB++\c- + +Stronger Hell nobles with red skin, horns and hooves. Similar in appearance to Knights, but despite this, they differ in attack and strategy. + +Barons prefer to lead missions, plan overall tactics of an attack, and destroy their foes in glory. They attack in 45 degree angles, throwing strong magic energy everywhere. + +== LITH_TXT_INFO_SHORT_Revenant | Revenant +== LITH_TXT_INFO_TITLE_Revenant | $LITH_TXT_INFO_SHORT_Revenant +%% LITH_TXT_INFO_DESCR_Revenant +Class: \cfNoble\c- +Threat: \ckB+\c- + +Dead souls whom have been revived into a skeletal frame, with combat armor and missile launchers. Their missiles have homing capabilities, and are *very* painful to boot. + +The Revenant is revered among demons for its honor serving after death. + +## Tyrants -------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_PainElemental | Pain Elemental +== LITH_TXT_INFO_TITLE_PainElemental | Sin of Bellona, "Pain Elemental" +%% LITH_TXT_INFO_DESCR_PainElemental +Class: \cgTyrant\c- +Threat: \cgA\c- + +An evil, mean-spirited demon that thrives purely off of the pain and suffering of its enemies; it summons lost souls to battle for it, as it itself is too weak to fight. + +This enemy is both annoying and hazardous at the same time, especially if left unchecked for an elongated period of time. Prioritize their destruction. + +== LITH_TXT_INFO_SHORT_Archvile | Archvile +== LITH_TXT_INFO_TITLE_Archvile | Sin of Janus, "Arch-vile" +%% LITH_TXT_INFO_DESCR_Archvile +Class: \cgTyrant\c- +Threat: \cgA\c- + +Brutal and vicious, caster of evil magic and healer of the sinful. + +The Arch-vile is a malicious, extremely dangerous being capable of destroying anything at any range with its powerful fire magic, and resurrecting dead enemies it comes by. + +== LITH_TXT_INFO_SHORT_SpiderMastermind | Spider Demon +== LITH_TXT_INFO_TITLE_SpiderMastermind | Sin of Venus, "Spider Mastermind" +%% LITH_TXT_INFO_DESCR_SpiderMastermind +Class: \cgTyrant\c- +Threat: \cgA++\c- + +The Spider Mastermind is a gigantic cybernetic arachnid with a chaingun. That alone should tell you how dangerous this species is, but to make matters worse, they also have loads of offspring. Cybernetic arachnid offspring. + +The Spider Mastermind also appears to be responsible for planning distant wars of Hell, manipulating the chain of command to their will. + +== LITH_TXT_INFO_SHORT_Cyberdemon | Cyber-Demon +== LITH_TXT_INFO_TITLE_Cyberdemon | Sin of Mars, "Cyber-Demon" +%% LITH_TXT_INFO_DESCR_Cyberdemon +Class: \cgTyrant\c- +Threat: \cgA++\c- + +An extremely deadly species forged of metal and flesh intertwined, the Cyber-Demon is purpose-built to destroy absolutely anything in its path. + +Equipped with a self-cooling rocket propelled grenade launcher on their left arm, a cybernetic hoof, and height twice that of a normal man. The Cyber-Demon is an extremely cruel, warmongering beast that will destroy any target without prejudice for the glory of Hell. + +## ??? -----------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Phantom | Phantom +== LITH_TXT_INFO_TITLE_Phantom | $LITH_TXT_INFO_SHORT_Phantom +%% LITH_TXT_INFO_DESCR_Phantom +Class: \cm???\c- +Threat: \crE\c- + +A threat yet unexplained, the phantom seeks to destroy all and will leave no one alive -- not even demons. They are a dark, silhouette-like being that takes on various forms and does nothing but destroy. + +Extreme caution is advised against these enemies, if you can run from them they will only continue to chase you down. + +## Overlord ------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_IconOfSin | Icon of Sin +== LITH_TXT_INFO_TITLE_IconOfSin | Overlord of Hell, Icon of Sin +%% LITH_TXT_INFO_DESCR_IconOfSin +Class: \crOverlord\c- +Threat: \crE\c- + +The catalyst of destruction, whom spawned all of Hell's monstrosities and dictates over all; the Icon of Sin, said by some to be Satan himself, feeds purely off of hatred and chaos and will stop at nothing to attain everything in the world. + +Currently, he lay sleeping ill under repair, as his head was torn in twain by a force unknown. The ultimate goal of your mission is to find him, and destroy him before Hell takes over our realm. + +## EOF diff --git a/filedata/Info_Extra.txt b/filedata/Info_Extra.txt new file mode 100644 index 0000000..0a4458b --- /dev/null +++ b/filedata/Info_Extra.txt @@ -0,0 +1,51 @@ +== LITH_TXT_INFO_TITLE_Extra1 | Nan Kosi Mal +%% LITH_TXT_INFO_DESCR_Extra1 +Bisu~'6(2 + +Sob'whniskbttibtt'ha'jhts'fdsnhit'fic'niafds'wuhcrdsnhit'tsnkk'ehsobut'jb'njjbitbk~+'ns t'knlb'ihehc~'bqbi'dfubt'na'fkk'sob~ ub'chni`'nt'wnkni`'rw'sufto'sh'eb'wrs'nish'fi'bickbtt'tsubfj'ha'\cr`fuef`b\cm) + +Sofs t'fkth'thjbsoni`'sofs'ehsobut'jb+'fdsrfkk~)'Sobub t'shh'jrdo'\cr`fuef`b\cm)'N'chi s'jnic'\cr`fuef`b\cm+'ubfkk~<'ers'pobi'sobub'fub'th'jfi~'-\c`bickbtt'`fuef`b'wnwbt\cm-'mrts'ebni`'akhpbc'nish'~hru'eufni'fkk'fs'hidb+'hu'bqbi'sofs'sob~'bnts+'nt'surk~'tsufi`b)'Trubk~'e~'sont'whnis'orjfins~'phrkc'ofqb'ahric'f'pf~'sh'dkbfi'ns'rw) + +J~'phuc'pft'erunbc'\cohib'oricubc'jnkknjbsubt'\cqarusobu'chpi\cm'tnidb'sont'sohr`os< + +== LITH_TXT_INFO_TITLE_Extra2 | Px-5]404 None +%% LITH_TXT_INFO_DESCR_Extra2 +Bisu~'5(2 + +N'fj'ihs'f'jfi'ha'fdsnhi+'th'sob'\cr`fuef`b\cm'wuhekbj'pnkk'wbutnts) + +Sobub'nt'ohpbqbu'thjbsoni`'sh'eb'tfnc'fehrs'\ccniqhkrisfu~'fdsnhi\cm)'N j'fkk'fehrs'sofs)'Sobub t'ihsoni`'knlb'fddncbisfkk~'cbtsuh~ni`'thjbsoni`'ebdfrtb'ha'sob'twbdnand'dnudrjtsfidbt'tbs'ni'wkfdb'e~'fkk'\cndofht\cm'tbs'ebahubofic) + +Sobub t'f'akhp'sh'ns)'Bqbi'thjbsoni`'ft'\coardlni`'tsrwnc\cm'ft'mrts'lnkkni`'oricubct'ha'jnduhit'ha'crts'dfi'eb'bisbusfnini`'na'ns t'`hs'sob'un`os'akhp)'@bs'nish'ns)'@bs'jfc'fic'\cslnkk'sob'eftnkntl\cm) + +== LITH_TXT_INFO_TITLE_Extra3 | Pointles$ Numbers3 +%% LITH_TXT_INFO_DESCR_Extra3 +Bisu~'4(2 + +Sob~ ub'hetbttbc'pnso'ns<'N'chi s'lihp'po~+'sobub t'thjbsoni`'pbnuc'fehrs'sobj'N'`rbtt)'Ers'sob~ ub'hetbttbc'pnso'sobtb'wfssbuit'sob~'jfcb'rw)'Ns t'onkfunhrt+'fdsrfkk~+'N j'kfr`oni`'j~'ftt'haa'un`os'ihp'mrts'sonilni`'fehrs'ns) + +Jf~eb'~hr'ihsndbc'ns'shh+'fkk'ha'sobtb'soni`t'N qb'punssbi'fub'mrts'whniskbtt'wfssbuit)'Sob'irjebut+'sob'wfttphuct+'sob'irjebu'\c`Tbqbi\cm)'Sob~ ub'fkk'`hni`'chpi'sob'cufni'ha'%whniskbtt'sohr`ost%'ni'j~'ubdbwshut)'Sob~ ub'fkk'jbfini`kbtt'sh'jb) + +Ers'sofs t'hlf~)'Ns t'tsnkk'arii~)'Sobub kk'eb'jhub)'Sobub kk'eb'jrdo'jhub'auhj'jb)'Sobub kk'eb'jrdo'jhub)'Sobub kk'eb'th'jrdo'jhub'chpi'ni'sont'\cvfshkk'ha'jntbu~\cm) + +== LITH_TXT_INFO_TITLE_Extra4 | Clarity +%% LITH_TXT_INFO_DESCR_Extra4 +Bisu~'3(2 + +\c`Tbqbi'oricubc'~bfut\cm'f`h+'jfi'pfklbc'aubbk~'hi'ont'wkfibs)'Sobi+'ob'dfubc'jhub'fehrs'`bssni`'sob'fttohkbt'haa'sob'wkfibs+'fic'sobi'sob~'lnkkbc'bfdohsobu+'knlb'sob~'ch)'Fic'sob'fttohkbt'fub'`bssni`'lnkkbc'e~'fknbit'ihp+'th'sob~'pbub'crje'sh'kbfqb'fi~pf~t) + +Ahu'thjb'ubfthi'sob'\cr`fuef`b\cm'wuhekbj'tsnkk'oft'ihs'ebbi'ubthkqbc)'N'phicbu'na'sob~'chi s'dfub'hu'na'N j'fdsrfkk~'trwwhtbc'sh'sflb'fdsnhi'fehrs'sont) + +Ih'jfssbu)'N kk'knqb)'Sobub t'jhub'sh'eb'chib)'Jrdo'jhub'sh'eb'chib)'Th'jrdo'jhub'sh'eb'chib) + +== LITH_TXT_INFO_TITLE_Extra5 | D.3.2.2 +%% LITH_TXT_INFO_DESCR_Extra5 +Bisu~'2(2 + +************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************* + +6370?57?'Wkf}jf'Fqbirb + +NSBUFSB + +## EOF diff --git a/filedata/Info_Places.txt b/filedata/Info_Places.txt new file mode 100644 index 0000000..5d3f4bb --- /dev/null +++ b/filedata/Info_Places.txt @@ -0,0 +1,145 @@ +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AetosVi | Aetos Vi +== LITH_TXT_INFO_TITLE_AetosVi | $LITH_TXT_INFO_SHORT_AetosVi +@@ LITH_TXT_INFO_DESCR_AetosVi +A planetary system 17 lightyears away from Earth that houses several planets +with sentient life on them. Found approximately 700 years ago now, this is the +second system reached by humans, and the first with sentient life. + +When the system was found, rejoice was had throughout all mankind, finally +knowing that they weren't alone in the universe. + +Then, of course, the expeditioners were attacked by natives. +But that's fine details. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Algidistari | Algidistari +== LITH_TXT_INFO_TITLE_Algidistari | $LITH_TXT_INFO_SHORT_Algidistari +@@ LITH_TXT_INFO_DESCR_Algidistari +Algidistari is a planetary system 45 lightyears in distance from Earth. While +it has many planets in its main sequence, and many rocks, it is for the most +part not suitable for human life due to its cold atmosphere caused by a small +central star. + +Several of the planets in this system such as Neptune 11 are quite large and +are semi-habitable, thus becoming quite suitable for mages of the +\chCaeruleum\c- mode to test magic on. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ChAri | Ch'ari +== LITH_TXT_INFO_TITLE_ChAri | $LITH_TXT_INFO_SHORT_ChAri +@@ LITH_TXT_INFO_DESCR_ChAri +A planet in the Aetos-Vi planetary system composed of four land masses and a +large amount of water, populated by a highly intelligent light-manipulating +race known as the Kiri. + +Previously, humans also lived on this planet, but were driven out by a large +scale terrorist enactment. + +Ch'ari is generally dull and dark-grey looking save for the water, but the +communications of the Kiri light up the darkness in a beautiful fashion. + +Its inhabitants include fish and plant life, as well as land-dwelling beasts +such as giant mammoth-like creatures and the two-legged Falx. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_DurlaPrime | Durla Prime +== LITH_TXT_INFO_TITLE_DurlaPrime | $LITH_TXT_INFO_SHORT_DurlaPrime +@@ LITH_TXT_INFO_DESCR_DurlaPrime +A planet in the Aetos-Vi planetary system whose dominant species is a humanoid +avian creature, the "Peristera" or, colloquially, "Perist". + +When humans arrived on Durla Prime, the Peristeras were highly frightened by +the presence of an alien, sentient being, and war broke loose. Refusing to +attack, the humans ended the war a mere month later, after learning to +communicate with the avian species. + +The planet is extremely similar to Earth, even having grass and trees that +mostly resemble their earthly counterparts. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Earth | Earth +== LITH_TXT_INFO_TITLE_Earth | $LITH_TXT_INFO_SHORT_Earth +@@ LITH_TXT_INFO_DESCR_Earth +The year is 1649 New Era. After an event that almost led to an apocalypse in +3031 CE, humanity collectively decided to mark a new era dedicated to +progressing travel and communications across the galaxy. + +Earth has stayed largely the same as it was in the Common Era, thanks to +advances in science. + +By 1000 NE, most of the population on Earth had moved to other inhabitable +planets, but still a large population remains on the blue planet. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Hell | Hell +== LITH_TXT_INFO_TITLE_Hell | $LITH_TXT_INFO_SHORT_Hell +@@ LITH_TXT_INFO_DESCR_Hell +Whether the Hell found ripping into our dimension is actually from any known +religion is not known. What is known, however, is that its inhabitants seek to +destroy and enslave everything they can get their hands on. + +Composed of several ranks, Hell is a dictatorship led by one called the Icon +of Sin, or Satan by some. The inhabitants of Hell seem to gain some kind of +energy from suffering and death, possibly an abstract power like that +previously found on Earth, thousands of years ago. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Mars | Mars +== LITH_TXT_INFO_TITLE_Mars | $LITH_TXT_INFO_SHORT_Mars +@@ LITH_TXT_INFO_DESCR_Mars +In 2714 CE, a huge interplanetary workload boom began, spawning numerous +factories and artificial workplaces on Mars manned by robots. + +Thanks to advances in terrestrial travel, the ability to transfer goods +between Mars and Earth became cheap enough to be profitable during the periods +where Mars is closer to Earth. + +Still to this day many companies on Earth -- and even some intra-galactic +corporations like OFMD -- use Mars as a place to house autonomous work. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_OmicronXevv | Omicron Xevv +== LITH_TXT_INFO_TITLE_OmicronXevv | $LITH_TXT_INFO_SHORT_OmicronXevv +@@ LITH_TXT_INFO_DESCR_OmicronXevv +A binary star system near Sirius about 8 lightyears away from Earth. The +asteroid belt surrounding the star system has many large, well-lit and fairly +temperate asteroids suitable for humans to live on. + +Omicron Xevv has been used by many small companies throughout the years to +have a secluded, free place to do research, surveillance and development. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SuperDimension | Super Dimension +== LITH_TXT_INFO_TITLE_SuperDimension | $LITH_TXT_INFO_SHORT_SuperDimension +@@ LITH_TXT_INFO_DESCR_SuperDimension +The first hyperdimension found through observation of cuts in the universe, +which were also observed to be created intentionally by beings there. + +Several artifacts have come from this dimension: The Omega Cannon, The +Division Sigil, and The Cup of Blood. + +Of these artifacts, you can acquire two. The Omega Cannon, a weapon, and the +Division Sigil, a strange artifact able to cause disruptions in space-time. + +The latter will only be allowed to you if you can't stop the Demons. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Heaven | The God Cage +== LITH_TXT_INFO_TITLE_Heaven | $LITH_TXT_INFO_SHORT_Heaven +@@ LITH_TXT_INFO_DESCR_Heaven +A strange dimension. The beings of the God Cage are the most powerful beings in +all of existence, capable of destroying reality itself if they thought it best. + +The God Cage itself is a finite dimension, possibly the first of any. While it +cannot be visually described, it is known that all particles in this dimension +are made of pure, primordial magic of which is untouchable by any outside +source; hence the name, a caged dimension for only the Gods to roam. + +Hermes is the only known God capable of holding a physical form outside of the +God Cage, and moreover the only one capable of outside communication. +His demise during the events of the calamity have halted all further knowledge +about the dimension, leaving it merely the mental shape of a huge chrome +cylinder box. + +## EOF diff --git a/filedata/Info_Upgrades.txt b/filedata/Info_Upgrades.txt new file mode 100644 index 0000000..2dd65d7 --- /dev/null +++ b/filedata/Info_Upgrades.txt @@ -0,0 +1,257 @@ +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_HeadsUpDisp | $LITH_TXT_UPGRADE_TITLE_HeadsUpDisp +== LITH_TXT_INFO_TITLE_HeadsUpDisp | Heads Up Display +@@ LITH_TXT_INFO_DESCR_HeadsUpDisp +This is a military issue Heads Up Display program, which tracks vital signs, +munitions, armor status, and more with numeric signifiers. + +Originally designed by a former video game designer, a great amount of effort +had to be put into fine-tuning this program to tell you exactly when you're +about to die, your armor is about to break and get you killed, or you're about +to run out of ammunition, and then die. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_JetBooster | $LITH_TXT_UPGRADE_TITLE_JetBooster +== LITH_TXT_INFO_TITLE_JetBooster | Pe'i tha E. Jet Boots +@@ LITH_TXT_INFO_DESCR_JetBooster +These are standard jet boots produced by OFMD, upgraded for private use. They +have a safety lock which deactivates while the user is mid-air so they don't +backfire and burn your heels. Keeps the user smoothly held in air with a +stabilizer chassis attached to the leg, so your natural instinct to screw it +up is cancelled out. + +Powered with a small energy cell about the size of your Calcaneus that can +stay stable mid-air for approximately 7 months without fail. + +Press "run" while mid-air to activate. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ReflexWetw | $LITH_TXT_UPGRADE_TITLE_ReflexWetw +== LITH_TXT_INFO_TITLE_ReflexWetw | Klaje Mosegon Reflex Enhancing Wetware +@@ LITH_TXT_INFO_DESCR_ReflexWetw +Software for your Computer/Brain Interface that improves your ability to move, +enhancing your speed, and giving you new movement options. + +This software has been deemed vital to your mission, and has been provided to +you with yet more upgrades. + +You can jump while mid-air by pressing "jump" again, hurtling your body +upwards with sheer force. + +You can also now slide in any direction with ease by pressing "run". + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CyberLegs | $LITH_TXT_UPGRADE_TITLE_CyberLegs +== LITH_TXT_INFO_TITLE_CyberLegs | Prexje Mosegon Speed Enhancing Wetware +@@ LITH_TXT_INFO_DESCR_CyberLegs +An update for your reflex wetware developed while you were being deployed on +your mission. Improves your jump height and speed. + +Also grants you a new ability: While you're falling, your legs will +automatically extend in a fashion that attacks anything below it. The higher +the fall, the greater the impact. + +Couldn't be deployed initially to you due to complications in shipping to a +combat zone. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Yh0 | $LITH_TXT_UPGRADE_TITLE_ReactArmor +== LITH_TXT_INFO_TITLE_Yh0 | Yh-0 Reactive Plating System +@@ LITH_TXT_INFO_DESCR_Yh0 +Developed by avians of the planet Durla Prime, this armor plating is able to +mitigate damage of one type almost completely for an indefinite amount of time. + +This plating uses a set of unique systems that can each block one kind of +attack with extreme prejudice, but due to allowing full control of the +plating to each system, can only use one at a time. + +Works over your currently equipped armor, so damage from even rockets may be +lowered into what feels like a small tickle. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_DefenseNuke | $LITH_TXT_UPGRADE_TITLE_DefenseNuke +== LITH_TXT_INFO_TITLE_DefenseNuke | Defensive Atomic Bomb +@@ LITH_TXT_INFO_DESCR_DefenseNuke +An extremely deadly slow-charge bomb that activates as you enter a dangerous +area. + +Unfortunately, due to this weapon being extravagantly loud, anything in the +area will also be alerted to your presence. Be careful with this thing! + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Adrenaline | $LITH_TXT_UPGRADE_TITLE_Adrenaline +== LITH_TXT_INFO_TITLE_Adrenaline | Senxans Automatic Adrenaline Injector +@@ LITH_TXT_INFO_DESCR_Adrenaline +A rather brute upgrade that gathers wasted adrenaline from your body and +injects it back into you all at once when you're in danger. + +This gives the effect of time stopping for a moment as you move with extreme +swiftness, triggered by proximity to projectiles and being targeted by enemies. + +Using this without going insane or otherwise passing out requires intense +training given only to military forces. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_VitalScanner | $LITH_TXT_UPGRADE_TITLE_VitalScan +== LITH_TXT_INFO_TITLE_VitalScanner | Mit'keru Vital Scanner +@@ LITH_TXT_INFO_DESCR_VitalScanner +A small nanomachine emitter is strapped to your belt, which fires out nanos +programmed to grab vital signs of enemies under your crosshair, and display +them in a numeric value on your heads up display. + +Unfortunately, the range of this emitter is not as great as it could be, and +is for the most part only usable in close-quarters. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AutoReload | $LITH_TXT_UPGRADE_TITLE_AutoReload +== LITH_TXT_INFO_TITLE_AutoReload | K'meru Automatic Loading System +@@ LITH_TXT_INFO_DESCR_AutoReload +A rather small robot that can fit in your backpack, which uses a learning +algorithm to figure out how to load your guns. + +Originally created by HLCorp for their highly advanced hazard suits, it was +retooled to work separately from them so it could be mass produced for +military needs. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SoulCleaver | $LITH_TXT_UPGRADE_TITLE_SoulCleaver +== LITH_TXT_INFO_TITLE_SoulCleaver | \cdSi Ritagliassero\c-, \chCaeruleorum\c- 44 +@@ LITH_TXT_INFO_DESCR_SoulCleaver +The 44th method of the \chCaeruleum\c- mode, this rather complex attack must +be applied passively. It siphons power from the recently deceased and releases +it into a ball of metaphysical attack energy. + +The exact origin of this method is debated, and it is not in common use due to +its strange circumstances and the general requirement of strong, plentiful +opponents to be useful in combat. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_StealthSys | $LITH_TXT_UPGRADE_TITLE_StealthSys +== LITH_TXT_INFO_TITLE_StealthSys | Unnamed Stealth System +@@ LITH_TXT_INFO_DESCR_StealthSys +An active light reflection system, using advanced camouflage developed years +ago in \cm[redacted]\c- by the inhabitants of the planet. While the original +version required a link with \cm[redacted]\c- in order to function (as the +natives could easily do so,) this version, which was developed by Deceiver +Solomon, requires only an energy source. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_HeadsUpDispJem | $LITH_TXT_UPGRADE_TITLE_HeadsUpDisp +== LITH_TXT_INFO_TITLE_HeadsUpDispJem | Heads Up Display +@@ LITH_TXT_INFO_DESCR_HeadsUpDispJem +This program is the 37th version of the standard issue heads-up display for +AOF employees. The binary remains uncredited, and the decompiled code has no +authors listed in any of the files, though is well-commented. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Magic | $LITH_TXT_UPGRADE_TITLE_Magic +== LITH_TXT_INFO_TITLE_Magic | Mana Absorber +@@ LITH_TXT_INFO_DESCR_Magic +A small device reminiscent of a landmine which attaches to a chestplate, +pauldron or shoulder pad, which uses an unknown \ckFlavum\c- mode spell that +captures energy from the dead and dying. + +Using this method, it uses hostility detection to find potential sources of +mana, and upon that source losing metaphysical structure, siphons all mana +from it with approximately 73.416% efficiency. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ReflexWetwJem | $LITH_TXT_UPGRADE_TITLE_ReflexWetw +== LITH_TXT_INFO_TITLE_ReflexWetwJem | Reflex Enhancing Wetware +@@ LITH_TXT_INFO_DESCR_ReflexWetwJem +Software for your Computer/Brain Interface that improves your ability to move, +enhancing your speed, and giving you new movement options. + +Newer versions of this program have a backdoor built into them. This old +version was given to you by Spellcaster and Deceiver Michael as part of your +mission. The binary credits have been overwritten with "CrAcKeD bY mEt&". + +You can jump while mid-air by pressing "jump" again, hurtling your body +upwards with sheer force. + +You can also slide in any direction with ease by pressing "run", even while +mid-air. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_WeapnInter | Weapon Interface +== LITH_TXT_INFO_TITLE_WeapnInter | Weapon Interfacing Device Package +@@ LITH_TXT_INFO_DESCR_WeapnInter +The Weapon Interfacing Device Package (or simply Weapon Interface) is a small, +silver briefcase with several components inside it all purpose built for +modifying any kind of weaponry with extreme ease; In fact, it is built to +completely disassemble, install upgrades into, and reassemble a weapon in under +20 seconds. + +The package was created approximately 30 years ago by researchers at OFMD and +AllPoint. Them both seeing the potential sales figures for such a device during +a great war, OFMD and AllPoint signed a mutual contract to develop the package +and share profits between eachother. + +The success of this device was massive, despite how expensive it is, with its +prices being barred by a "call us to get the numbers." + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_WeapnInte2 | W.R.D. +== LITH_TXT_INFO_TITLE_WeapnInte2 | Weapon Refactoring Device +@@ LITH_TXT_INFO_DESCR_WeapnInte2 +Despite the idea being similar to the Weapon Interfacing Device Package, the +Weapon Refactoring Device was conceptualized and prototyped over 40 years +before the Weapon Interface was created. + +The Weapon Refactoring Device is a large, dense, black suitcase with the +letters "WRD" on the front. Inside is a gigantic, see-through box filled with +indescribable amounts of strange looking wires, tubes, chips, boards and +markings in some foreign language you can't read. + +This device is capable of completely assembling any weapon given parts and any +amount of schematics, using computational learning algorithms and a large +database of possible configurations. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ArmorInter | Armor Interface +== LITH_TXT_INFO_TITLE_ArmorInter | Armor Interfacing Device +@@ LITH_TXT_INFO_DESCR_ArmorInter +The Armor Interface is a rather large yet thin, silver set of pauldrons and +chestplate that attaches onto one's body and can be worn under any kind of +conventional armor. + +It comes equipped with several million nerve-like sensors capable of detecting +damage to the user and their extremeties, as well as what kind of damage was +taken. + +Using these, it has the capability for (but is not installed in its default +configuration with) methods of damage mitigation, such as secreting +flame-retardant liquid when fire damage is detected. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CBIUpgr1 | High-Grade CPU +== LITH_TXT_INFO_TITLE_CBIUpgr1 | KSKK Spec. Z6808 High-Grade CPU +@@ LITH_TXT_INFO_DESCR_CBIUpgr1 +A huge upgrade from your dinky Nodea 541 CPU, the Z6808 is capable of up to +30Pr (when overclocked) and has 100TiB of RAM. In most cases, it's completely +overly sufficient for any mathmetician or cybernetics junkie. + +However, the Z6808 is unfortunately yet insufficient for heavily augmented +military use, and is deployed to you only as a temporary measure so you can +later acquire a more comfortable BC-0265 CPU. + +The unit houses 2048 physical cores and two billion hybrid synapses, giving +it a very solid feel and plenty of physical working memory. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CBIUpgr2 | S. High-Grade CPU +== LITH_TXT_INFO_TITLE_CBIUpgr2 | KSKK Spec. BC-0265 Super High-Grade CPU +@@ LITH_TXT_INFO_DESCR_CBIUpgr2 +The BC-0265 is a marvel of modular C/B Interface technology, not bigger than +any standard CPU and capable of so, so much more. It comes equipped with +150TiB of RAM, 70Pr without any dangerous overclocking, and 4906 physical +cores. + +Developed solely for military use, the BC-0265 has gone through vigorous field +testing and many trials, and now you wield the result of those efforts. + +Despite only having 3 billion neurons, not much more than high-grade CPUs, +the quality of each is much higher, being able to withstand much more precise +data transfer through high density synapses and storage in each cell. + +## EOF diff --git a/filedata/Info_Weapons_CyberMage.txt b/filedata/Info_Weapons_CyberMage.txt new file mode 100644 index 0000000..08c8f15 --- /dev/null +++ b/filedata/Info_Weapons_CyberMage.txt @@ -0,0 +1,339 @@ +## Cyber-Mage ----------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Mateba | Mateba +== LITH_TXT_INFO_TITLE_Mateba | Mateba R119 +@@ LITH_TXT_INFO_DESCR_Mateba +A re-creation of the classic Mateba Model 6 Unica revolver, which was rather +popular a few thousand years ago from its (at the time) unique design and +style. + +This version is suited for a left-handed user, with a barrel that opens to the +right. The weapon loads twelve .454 Casull rounds much like the Mateba Grifone +variant. + +Due to the original design being lost in time, this revolver sports several +accuracy deficiencies, but nonetheless has the classic look and feel of the +original gun. Produced by A.O.F Inc. for knight-class units. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_MatebaUpgr | $LITH_TXT_UPGRADE_TITLE_Mateba_A +== LITH_TXT_INFO_TITLE_MatebaUpgr | \cdFinirentur\c-, \cgRussorum\c- 19 +@@ LITH_TXT_INFO_DESCR_MatebaUpgr +The 19th method of the \cgRussum\c- mode, Finirentur, known as the Finalizer, +is a very powerful red magic that creates a sigil infront of the user which +then fires out a projectile at fairly high speed. This projectile is capable +of instantly deceasing any mid-heavily wounded, living being. + +The Mateba R119 Finalizer channeler is capable of firing this intense magic, +however it is limited to the last shot of the cylinder so as to not +potentially overload the user. While this modification was created by A.O.F +Inc, the Finirentur method was created recently by mages of Neptune 11 in +Algidistari. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShockRifle | Shock Rifle +== LITH_TXT_INFO_TITLE_ShockRifle | Home-made Shock Rifle +@@ LITH_TXT_INFO_DESCR_ShockRifle +This weapon is a modification of a rifle made on Ch'ari, a memento your friend +gave to you to ravage for parts. The magazine has been moved from the bottom +(which is now an ejection port) to the back, where it's convenient to reload. + +This placement also allows for the bullets to be electrified with several +hundred volts before leaving the barrel, causing anything that gets hit by it +to be electrocuted harshly, hence your name for it: the "Shock Rifle." + +While the weapon only has a 7-round magazine, it fires extremely deadly +7.62x54mmR cartridges with almost pinpoint accuracy, thanks to being extremely +well-manufactured, likely under the care of a very skilled Kiri craftsman. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShockRifUpgr | $LITH_TXT_UPGRADE_TITLE_ShockRif_A +== LITH_TXT_INFO_TITLE_ShockRifUpgr | Shock Charge +@@ LITH_TXT_INFO_DESCR_ShockRifUpgr +A simple modification to the barrel that wraps an explosive sigil around the +bullet as it leaves the gun, causing it to explode into electricity upon +impact. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShockRifUpg2 | $LITH_TXT_UPGRADE_TITLE_ShockRif_B +== LITH_TXT_INFO_TITLE_ShockRifUpg2 | Electric Binding +@@ LITH_TXT_INFO_DESCR_ShockRifUpg2 +A modification for your Shock Rifle, crafted as an experiment: a bit of +extremely heated liquid crystal is extruded onto the bullet upon receiving, and +then super-charged. + +The liquid crystal is heated with a Heat sigil, however due to unknown reasons +when the projectiles get stuck in groups with this compound, the combined +energy still remaining in them explodes violently. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SPAS | Shotgun +== LITH_TXT_INFO_TITLE_SPAS | NV48 12-Gauge Shotgun +@@ LITH_TXT_INFO_DESCR_SPAS +The first (and currently only) shotgun produced by Newvec corp, an extended +production line was fulfilled by contract from A.O.F Inc. for knight-class +units thanks to the overwhelming fire-power and cheapness of this weapon. + +It fires any standard high-potency 12-gauge shell, and loads 8 shots. The +design is extremely simple, but it does not overheat or jam often, is cheap to +produce, and is very, very powerful. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SPASUpgr | $LITH_TXT_UPGRADE_TITLE_SPAS_A +== LITH_TXT_INFO_TITLE_SPASUpgr | \cdInvalidassero\c-, \cgRussorum\c- 14 +@@ LITH_TXT_INFO_DESCR_SPASUpgr +The 14th method of the \cgRussum\c- mode, Invalidassero is a fairly potent, +purple-ish colored magic substance that sticks to projectiles such as buckshot. + +This substance will, upon sudden velocity increase, vibrate rapidly and cause +projectiles to both go off-target and do loads of damage, as well as explode +on impact. The origin of this method is unknown. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SPASUpg2 | $LITH_TXT_UPGRADE_TITLE_SPAS_B +== LITH_TXT_INFO_TITLE_SPASUpg2 | NV48-1 Shell Auto-loader +@@ LITH_TXT_INFO_DESCR_SPASUpg2 +An upgrade for the NV48 which uses a small magic buffer to automatically load +shells from a four-dimensional area. A rather simple, yet effective solution, +which also is used to accelerate shots slightly more, causing more damaging +projectiles. + +Somehow, the accelerated shots also seem to blend into eachother slightly. + +The weapon must be fired a bit slower (and is forced to) due to the violent +nature of the magic being used, and the added recoil. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SMG | Sub-Machine Gun +== LITH_TXT_INFO_TITLE_SMG | SYM4.3 D.22 MODEL M SUBMACHINE GUN +@@ LITH_TXT_INFO_DESCR_SMG +This rather oddly shaped submachine gun was mass-produced by Omakeda during +their earlier years, when they were still getting their designs down. While +the gun has overheating issues, it mitigates this by allowing the user to feed +coolant tubes directly into it, and counter-balances the issue by having both +great fire-rate and great over-all projectile damage. + +The weapon fires modified high velocity, armor piercing, vacuum enabled +5.7x28mm bullets, manufactured by various nameless companies, and loads +bullpup. It has since been re-branded by SYM4.3, who now produce it for +Omakeda with royalties. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SMGUpgr | $LITH_TXT_UPGRADE_TITLE_SMG_A +== LITH_TXT_INFO_TITLE_SMGUpgr | Arms Annex F474 +@@ LITH_TXT_INFO_DESCR_SMGUpgr +The AA/F474 is an extension to the SYM4.3 D.22 MODEL M SUBMACHINE GUN which +attaches a magic buffer into the magazine upon insertion, causing it to +over-load another two magazines worth of ammunition while firing. + +This magic buffer is unfortunately unstable, as it has to be recreated every +load, and so care must be taken while reloading the gun to not move too +suddenly and cause the buffer to rip. If this did occur, the weapon would +displode, and bullets would fly out constantly. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SMGUpg2 | $LITH_TXT_UPGRADE_TITLE_SMG_B +== LITH_TXT_INFO_TITLE_SMGUpg2 | Arms Annex 138D5 +@@ LITH_TXT_INFO_DESCR_SMGUpg2 +The AA/138D5 is an extension to the SYM4.3 D.22 MODEL M SUBMACHINE GUN which +places a Blue-type FFC Magic Extruder into the barrel. + +This magic extruder gives all bullets leaving the barrel automatic target +homing capabilities. The bullets may not only lean toward enemies you aim at, +but also enemies nearby given a good enough range. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SMGUpg3 | $LITH_TXT_UPGRADE_TITLE_SMG_C +== LITH_TXT_INFO_TITLE_SMGUpg3 | SYM4.3 D.24 MODEL M SAFE TRIGGER +@@ LITH_TXT_INFO_DESCR_SMGUpg3 +Complaints from users of the Model M SMG were not many for SYM4.3, but despite +this, they were actually the most abundant of complaints the company had ever +received on any weapon. + +In the interest of their image of absolute quality, they convinced the company +producing the gun to make a replacement for the hammer that could detect the +heat of the barrel and stop firing until it has sufficiently cooled down. + +For all intents and purposes, this plan worked great for everyone buying new or +intending to buy the upgrade kit. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_IonRifle | Ion Rifle +== LITH_TXT_INFO_TITLE_IonRifle | KDA-[Thrown] Model 11 Ion Rifle +@@ LITH_TXT_INFO_DESCR_IonRifle +Produced by KSKK under the pseudonym "Kazami Defense Arms" (for various legal +reasons.) Fires volatile ions at railgun speeds, which go straight +through just about any being with flesh until resulting in a violent, +explosive impact. + +The rifle uses a relatively complex loading mechanism for the safety of the +user; one must first release the bolt with a safety guard near the trigger +mechanism, open the bolt, wait for a round to cycle and close it. + +This is in part required due to the immense heat that would be caused by +opening the weapon prematurely after firing, and the complexity that would be +needed to have a fully automatic round cycling system. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_IonRifleUpgr | $LITH_TXT_UPGRADE_TITLE_IonRifle_A +== LITH_TXT_INFO_TITLE_IonRifleUpgr | KDA-[Radiator] M11 Radioactive Ionizer +@@ LITH_TXT_INFO_DESCR_IonRifleUpgr +An odd upgrade for the Model 11 Ion Rifle by Kazami Defense Arms that modifies +the internal barrel to not only superheat projectiles, but irradiate them with +a small amount of radioactive isotope. + +The result of this is extremely hot, explosive, radioactive projectiles that +explode upon impact and dangerously irradiate enemies so much that they get +torn apart from the inside. + +Don't you just want to buy 5 of 'em? + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_IonRifleUpg2 | $LITH_TXT_UPGRADE_TITLE_IonRifle_B +== LITH_TXT_INFO_TITLE_IonRifleUpg2 | KDA-[Overloader] M11 Overload Charger +@@ LITH_TXT_INFO_DESCR_IonRifleUpg2 +The Overloader is a modification for the Model 11 Ion Rifle by Kazami Defense +Arms. It removes the heat charging cap, allowing the weapon to over-charge to +just over twice the normal amount of heat, allowing the projectile to be +launched with an extraordinary amount of speed and pressure, almost quadrupling +the damage output. + +Due to the immense amount of heat in the chamber, the weapon must be cooled off +by air exposure for a few moments after firing. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CPlasmaRifle | Plasma Rifle +== LITH_TXT_INFO_TITLE_CPlasmaRifle | $LITH_TXT_INFO_SHORT_PlasmaRifle +== LITH_TXT_INFO_DESCR_CPlasmaRifle | $LITH_TXT_INFO_DESCR_PlasmaRifle + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CPlasmaUpgr | $LITH_TXT_UPGRADE_TITLE_CPlasma_A +== LITH_TXT_INFO_TITLE_CPlasmaUpgr | MD 47.65.69.73.74 Pulse Charger +@@ LITH_TXT_INFO_DESCR_CPlasmaUpgr +When MDDO was designing the Plasma Rifle, they were mostly experimenting with +weapons manufacturing and attempting to make sense of mass production. One of +the results of this internal testing was the Pulse Charger: An oscillating +plasma emitter similar to the original mechanism, but made for accuracy over +speed. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_StarDestroyer | Star Destroyer +== LITH_TXT_INFO_TITLE_StarDestroyer | The Star Destroyer +@@ LITH_TXT_INFO_DESCR_StarDestroyer +An atrocious weapon supposedly made from the life research of seven mages of +Hell, the Star Destroyer was made with the sole purpose of destroying whatever +created it so hard that it would never, ever come back again. + +The weapon's inner workings still elude many, but what is known is that it +condenses demonic energy far more than any other known artifact; the weapon +then takes this hyper-condensed energy and emits it into a very small, +circular disc buffer on the top of the weapon. + +The resulting projectile grows in size as it disperses energy in front of it, +causing hundreds of smaller projectiles to come out as it rips through +anything in its path. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShipGunUpgr | $LITH_TXT_UPGRADE_TITLE_ShipGun_A +== LITH_TXT_INFO_TITLE_ShipGunUpgr | The Forsaken Longinus Solspear +@@ LITH_TXT_INFO_DESCR_ShipGunUpgr +The first of the three ancient bolts of the Star Destroyer, the Longinus +Solspear. The bolt modifies the projectile to focus all of its power on moving +forward; like a spear piercing through all in its path. Crushingly powerful, +the projectile not only pierces through almost any substance, but bounces off +of things that it can't kill, such as walls. + +This bolt appears to think on its own, though this is possibly just local +distortion caused by the high amount of condensed demonic energy. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShipGunUpg2 | $LITH_TXT_UPGRADE_TITLE_ShipGun_B +== LITH_TXT_INFO_TITLE_ShipGunUpg2 | The Galliant Surge of Destiny +@@ LITH_TXT_INFO_DESCR_ShipGunUpg2 +The second of the three ancient bolts of the Star Destroyer, the Surge of +Destiny does not fire a projectile at all -- instead, it surrounds the user in +a bright, vibrant aura of protection while unloading tons of smaller +projectiles all around them. + +The bolt seeks to protect and defend rather than attack, though this is +possibly just speculation. + +## Cyber-Mage Magic ----------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Blade | Blade +== LITH_TXT_INFO_TITLE_Blade | \cdSfregiassero\c-, \ciAurantiorum\c- 2 +@@ LITH_TXT_INFO_DESCR_Blade +The 2nd method of the \ciAurantia\c- mode, the most dead-simple of attacks that +could be made with \ciAurantia\c- sigils. A potent slash with no physical form. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Delear | Delear +== LITH_TXT_INFO_TITLE_Delear | \cdDelerentur Ex\c-, \ciAurantiorum\c- 24 +@@ LITH_TXT_INFO_DESCR_Delear +The 24th method of the \ciAurantia\c- mode, a rather basic attack which fires +sixteen orange dots in a sequence from two sides, over two rows. The +simplicity of casting and ease of use makes this spell a rather common sight. + +The design was created by first century mage Johnathon Booker and was later +further simplified by various spellcasters. Your version of it prefers a flat +shape rather than a curved one that most use. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Feuer | Feuer +== LITH_TXT_INFO_TITLE_Feuer | \cdIncenderentur Ex\c-, \ciAurantiorum\c- 32 +@@ LITH_TXT_INFO_DESCR_Feuer +The 32nd method of the \ciAurantia\c- mode, a fire attack that throws two balls +of fire toward a target, destroying anything in their path. + +The method is renowned for being powerful yet simple, and very easy to use. +It was originally dubbed the "magic missile" before some esoteric historians +began to protest for unknown reason. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Rend | Romyetya +== LITH_TXT_INFO_TITLE_Rend | \cdFinderentur Ex\c-, \ciAurantiorum\c- 4 +@@ LITH_TXT_INFO_DESCR_Rend +The 4th method of the \ciAurantia\c- mode, similar in form and creation to +Blade, however quite different due to the modified Front sigil, which is +replaced with an Extend sigil. + +Far faster, more damaging, and longer range than Blade, Finderentur is useful +in many situations. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Hulgyon | Hulgyon +== LITH_TXT_INFO_TITLE_Hulgyon | \cdHumarentur Ex\c-, \ciAurantiorum\c- 16 +@@ LITH_TXT_INFO_DESCR_Hulgyon +The 16th method of the \ciAurantia\c- mode. Intermediate attack that creates +several piercing pillars of light forward of the user. One of the few +classical methods still in use, created by Apollo in 3021 CE. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_StarShot | Hosh'danma +== LITH_TXT_INFO_TITLE_StarShot | \cdDisploderentur Ex\c-, \ciAurantiorum\c- 8 +@@ LITH_TXT_INFO_DESCR_StarShot +The 8th method of the \ciAurantia\c- mode. An advanced attack which summons +two star-shaped sigils that fire projectiles out at will before fading out. +Created by several dozen spellcasters at A.O.F Inc. for bishop-class units to +deploy with, and has been used several high-profile destroy-and-conceal +missions, including the West Steel Corp. incident, where it was used to +destroy several micro-fighters and around 195 personnel aboard the enemy ship. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Cercle | Cercle de la Mort +== LITH_TXT_INFO_TITLE_Cercle | \cdPeccarentur Ex\c-, \cgRussorum\c- 7 +== LITH_TXT_INFO_CSIZE_Cercle | 218 +@@ LITH_TXT_INFO_DESCR_Cercle +The 7th method of the \cgRussum\c- mode, the "Circle of the Dead." An awesome +attack which takes all of one's metaphysical strength to use, one of the +strongest attacks that can be used by spellcasters without external help. +It has been used quite frequently in the final, deciding battles of wars to +completely obliterate entire squadrons of men. + +Peccarentur is completed instantaneously with time flow manipulation. However, +to the person casting it, all of the details of the attack are clearly visible. +It is prophecized that such manipulation may eventually cause some kind of +catastrophe, but no proof of this has ever actually been provided. + +This method was created on accident as a first-century researcher was +experimenting with \cgRussum\c- sigils. The attack was powerful enough to +accidentally murder all of the housemaids in their mansion and several wild +animals in their garden, however it did no damage to their property. diff --git a/filedata/Info_Weapons_Marine.txt b/filedata/Info_Weapons_Marine.txt new file mode 100644 index 0000000..48c358f --- /dev/null +++ b/filedata/Info_Weapons_Marine.txt @@ -0,0 +1,260 @@ +## Marine --------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Pistol | Pistol +== LITH_TXT_INFO_TITLE_Pistol | Custom Ka Haa'umi Pistol +@@ LITH_TXT_INFO_DESCR_Pistol +Originally a vanilla mod Ka Haa'umi pistol manufactured by Omakeda, this gun +has been repaired enough times that it's practically indestructible now. + +Having used it for a whole decade, this pistol still services you today, +without fail. + +Fires fourteen custom high-grade vacuum-enabled .374 Express rounds. Can be +reloaded easily, since you duct-taped a magazine holder on the side. Features +a small CB-Scope similar to that of most other Omakeda weapons. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Revolver | Revolver +== LITH_TXT_INFO_TITLE_Revolver | $LITH_TXT_INFO_SHORT_Revolver +@@ LITH_TXT_INFO_DESCR_Revolver +Other than this weapon being made on Earth, all you need to know about it is +that it fires six Teflon-plated .50 Action Express rounds and loads with a +break on the top. Crack some skulls with it. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_Shotgun | Shotgun +== LITH_TXT_INFO_TITLE_Shotgun | Hiku Mk.2 Shotgun +@@ LITH_TXT_INFO_DESCR_Shotgun +Manufactured by Omakeda, this shotgun fires both regular 8-gauge buck and a +small plasma charge at the same time. This enables the shotgun to be used both +as a rifle with railgun-like capabilities and a standard shotgun. + +The plasma charge is powered by a small self-replenishing battery lodged in +the firing mechanism. + +Most military models come with a CB-Scope. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShotgunUpgr | $LITH_TXT_UPGRADE_TITLE_GaussShotty +== LITH_TXT_INFO_TITLE_ShotgunUpgr | Hiku Mk.2 Shotgun Gauss Mod +@@ LITH_TXT_INFO_DESCR_ShotgunUpgr +During the short Avian-Sapiens war of +1401 NE, A.O.F Inc. ran a line of modified Hiku Mk.2 shotguns that removed the +shell firing mechanism and replaced it with a high-power photon condenser. + +This both removes the need to chamber rounds and gives a nice boost in fire +rate. The gun is, essentially, completely different in use. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ShotgunUpg2 | $LITH_TXT_UPGRADE_TITLE_PoisonShot +== LITH_TXT_INFO_TITLE_ShotgunUpg2 | Hiku Mk.2 Shotgun Poison Mod +@@ LITH_TXT_INFO_DESCR_ShotgunUpg2 +A modification for the Hiku Mk.1 shotgun made by A.O.F Inc. for research +purposes. Uses a rather small container of poison that refills itself +automatically, contained in the loading mechanism, to infect enemies with +deadly corrosive acid fused with deadly neurotoxin. + +This rather terrifying upgrade was never updated to the Mk.2 model. The +internal structure is similar enough that one may still use it with the Mk.2, +but the plasma firing mechanism must be disabled. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_LazShotgun | Laser Shotgun +== LITH_TXT_INFO_TITLE_LazShotgun | Kaether Photon Rifle +@@ LITH_TXT_INFO_DESCR_LazShotgun +Made during a war on Earth by a long nameless company, this weapon excels in +penetrating enemies with pure energy. + +A superconducting coil in the middle is used to channel tons of energy into a +photon accelerator at extremely quick speeds, recharged by cocking the gun. + +Great for cooking chicken. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SuperShotgun | Super Shotgun +== LITH_TXT_INFO_TITLE_SuperShotgun | $LITH_TXT_INFO_SHORT_SuperShotgun +@@ LITH_TXT_INFO_DESCR_SuperShotgun +Puts out 2x2 4ga shells made to hunt the gigantic beasts of the planet Ch'ari. + +The barrels are extremely tempered so as to not melt under harsh environments, +and have a unique dual-loading system. This dual-loading system allows you to +fire four shots in rapid succession without a large amount of recoil by +placing additional shells into both barrels. + +It is currently unknown how this actually works, and it possibly uses +4-dimensional geometry. + +This weapon bears manufacturer marks in a non-human language and is known only +as the Super Shotgun. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CombatRifle | Combat Rifle +== LITH_TXT_INFO_TITLE_CombatRifle | AllPoint 75-b Assault Rifle +@@ LITH_TXT_INFO_DESCR_CombatRifle +AllPoint's 75-b model full-auto AR, produced for military and government +enforcer use. Also the single best-selling weapon in AllPoint's catalog. + +Firing 1,050 rounds per minute of .467 caliber Teflon-plated death, this +beautiful gun works in both harsh atmospheres and vacuums thanks to a +super-tough exterior made out of titanium. + +Comes with an inbuilt undermount-like grenade launcher. Holds only one grenade +at a time, but packs a great punch. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_RifleUpgr | $LITH_TXT_UPGRADE_TITLE_RifleModes +== LITH_TXT_INFO_TITLE_RifleUpgr | AllPoint 75-c Modal Trigger +@@ LITH_TXT_INFO_DESCR_RifleUpgr +Looking at the design failures in the 75-b, AllPoint sought to make an +improvement by way of a modification. Thus, they gathered, they could take +parts from their 80-g Sniper Rifle and fit them snugly into a combat rifle. + +The 75-c Modal Trigger enables a third firing mode in which four two-round +bursts are fired sequentially. Using this mode also enables a partial +CB-Scope, which unfortunately does little more than obstruct your view. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_RifleUpg2 | $LITH_TXT_UPGRADE_TITLE_LaserRCW +== LITH_TXT_INFO_TITLE_RifleUpg2 | SF-209 Laser Rifle +@@ LITH_TXT_INFO_DESCR_RifleUpg2 +This modification does little more than replace the firing system with one +much more similar to a photon rifle. The combat effectiveness of the rifle is +increased quite a lot, as it now fires 4tW penetrating beams capable of +ripping into most unarmored vehicles. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_SniperRifle | Sniper Rifle +== LITH_TXT_INFO_TITLE_SniperRifle | Facer AM-49d Sniper Rifle +@@ LITH_TXT_INFO_DESCR_SniperRifle +An extremely strong rifle which fires .50 BMG rounds, able to destroy most +living targets completely and penetrate weakly armored vehicles. + +The main production of these weapons spanned about 20 years, and they were +sold to mercenaries in bulk. For a long time, this rifle had been the sniper's +main weapon of choice. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_GrenadeLauncher | Grenade Launcher +== LITH_TXT_INFO_TITLE_GrenadeLauncher | SYM4.3 D.671 EXPLOSIVE LAUNCHER +@@ LITH_TXT_INFO_DESCR_GrenadeLauncher +Boasting extreme speed, highly modifiable parts, and a sleek exterior design, +the D.671 will eradicate any foe you put against it. + +After SYM4.3 put it on the market, this weapon was ultimately ignored because +of lack of advertising and early rumors regarding how weakly rockets are +initially propelled out the rifle. + +This seems to use nanomachines or some similar technology to propel rockets +after they've been ignited and left the barrel; thus causing a small lag +before the rocket takes off fully. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_LauncherUpgr | $LITH_TXT_UPGRADE_TITLE_ChargeRPG +== LITH_TXT_INFO_TITLE_LauncherUpgr | UE-1 "Eight-Ball" Revolving Launcher +@@ LITH_TXT_INFO_DESCR_LauncherUpgr +Explosives are fun, as we all know, and Unreal Arms agreed with the sentiment. +Eight high-yield rocket-propelled grenades are loaded one at a time into the +launcher until finally the load is unleashed. + +The secondary trigger can be held to select the mode of fire -- the default +mode shoots all eight in a horizontal line forward. The second mode shoots the +rockets in a spiral pattern for maximum damage on one area, and the third and +final mode hurls all of the grenades out of their rocket casings. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_LauncherUpg2 | $LITH_TXT_UPGRADE_TITLE_HomingRPG +== LITH_TXT_INFO_TITLE_LauncherUpg2 | SYM4.3 D.788 HOMING ROCKET SYSTEM +@@ LITH_TXT_INFO_DESCR_LauncherUpg2 +This is a modification that adds an extra nanomachine dispenser to the gun's +PCI bus, which attaches several hundred thousand nanobots to the grenade when +it is fired that push it to angle toward the enemy. + +Similar in concept to traditional rocket-based homing systems, this design is +both more space-efficient and much more accurate, allowing it to be used even +in a launcher as small as the D.671. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_PlasmaRifle | Plasma Rifle +== LITH_TXT_INFO_TITLE_PlasmaRifle | AllPoint 68-n Plasma Rifle +@@ LITH_TXT_INFO_DESCR_PlasmaRifle +In 1025 NE a paramilitary group commissioned Maxim-Danil Defense Org to make +several high-grade weapons. After MDDO went defunct, their assets were sold to +several companies. + +One of those weapons, owned now by AllPoint and sold as the "68-n Plasma +Rifle", is their second best selling weapon. + +The primary fire mode emits 7.52tW per bolt at approximately 2,800 bolts per +minute, and the secondary emits 1,260 30.96tW penetrating bolts per minute. +This thing will make Swiss cheese out of anything in its path. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_PlasmaUpgr | $LITH_TXT_UPGRADE_TITLE_PlasLaser +== LITH_TXT_INFO_TITLE_PlasmaUpgr | AllPoint 68-o Plasmatic Laser +@@ LITH_TXT_INFO_DESCR_PlasmaUpgr +Having their second best-seller also be complete trash at aiming pissed +AllPoint staff off so much that they completely redesigned the weapon's +internals to boast a 37.96tW high-speed ion condenser that fires pure death +out of the rifle hotter than the sun. + +No, really. It's probably hotter than the sun. If you were like, 700km away +from it or something, but still. + +The upgrade was, unfortunately, woefully expensive. It has been sold only to +private investors for quite some time now, but thankfully, your employer is +one of them. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_PlasmaUpg2 | $LITH_TXT_UPGRADE_TITLE_PartBeam +== LITH_TXT_INFO_TITLE_PlasmaUpg2 | SF-2012 Ion Acceleration Cannon +@@ LITH_TXT_INFO_DESCR_PlasmaUpg2 +The SF-2012 IAC is quite ubiquitous among Semaphore's arsenal, being one of +their few hand-held weapons, and one of their very few modifications. The IAC +focuses a ray of ions, gathers energy in the rifle, and then fires an charge +through the ion ray all at once, creating a huge plasmatic explosion in a very +accurate line. + +This weapon has a reputation for being rather useless in defending a space +ship from the inside, as it ends up melting holes in the hull. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_BFG9000 | Omega Cannon +== LITH_TXT_INFO_TITLE_BFG9000 | $LITH_TXT_INFO_SHORT_BFG9000 +@@ LITH_TXT_INFO_DESCR_BFG9000 +This weapon was developed in another dimensional plane, where magic is still +usable. Employs an extremely complex magical pattern buffer that takes in +condensed demonic energy and spits out whatever it pleases. + +The currently installed pattern buffer is an explosive cannonball, which can +steam-roll pretty much anything. Comes with a CB-Scope, but it isn't usable +for some reason. + +This weapon was acquired by your employers via the black market group "Cid" +for a hefty price. Take care of it. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CannonUpgr | $LITH_TXT_UPGRADE_TITLE_PunctCannon +== LITH_TXT_INFO_TITLE_CannonUpgr | Omega Cannon: Punctuator Buffer +@@ LITH_TXT_INFO_DESCR_CannonUpgr +A pattern buffer for the Omega Cannon which emits an explosive bolt that does +damage by penetrating walls with explosives, via magic. + +How this buffer was sent here is unknown, as no living being in this dimension +can enter the Super Dimension, where it was created. + +Popular theory among black market traders suggests that it could have been sent +here because the creator of the Omega Cannon wasn't satisfied with its power, +and wanted whoever attained it to be all-powerful. + +Also, the CB-Scope works again, somehow. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_CannonUpg2 | $LITH_TXT_UPGRADE_TITLE_OmegaRail +== LITH_TXT_INFO_TITLE_CannonUpg2 | Omega Cannon: Railgun +@@ LITH_TXT_INFO_DESCR_CannonUpg2 +With years of reverse engineering research put into the Omega Cannon by +several groups, a photon accelerator was developed which could use the Omega +Cannon's pattern buffer system to create abhorrent amounts of energy. + +With this, a gigantic red beam of destruction with an ungodly amount of heat +and energy is fired out of the cannon, causing most anything in its path to be +absolutely destroyed. diff --git a/filedata/Info_Weapons_Outcasts.txt b/filedata/Info_Weapons_Outcasts.txt new file mode 100644 index 0000000..6851631 --- /dev/null +++ b/filedata/Info_Weapons_Outcasts.txt @@ -0,0 +1,31 @@ +## Outcast Weapons -----------------------------------------------------------| +== LITH_TXT_INFO_SHORT_ChargeFist | Charge Fist +== LITH_TXT_INFO_TITLE_ChargeFist | Utsu Denkasou Assault Bracelet +@@ LITH_TXT_INFO_DESCR_ChargeFist +A powerful melee weapon which attaches to the left wrist. Uses energy from a +cybernetic power source to condense weight and force into super-destructive +punches. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_MissileLauncher | Missile Launcher +== LITH_TXT_INFO_TITLE_MissileLauncher | X-400 Lance-missiles +@@ LITH_TXT_INFO_DESCR_MissileLauncher +Have you ever wanted a weapon that fires 2,100 missiles a minute? Don't lie to +me, I know you have. This weapon delivers. + +The miniature missiles the X-400 launches are medium-yield, they won't hit as +hard as regular fare, but they will pack quite a punch with the rate you can +put them out. + +Has an internal revolving chamber that holds 30 rockets, fired in trios as the +cylinder revolves. New ammunition can be loaded by shoving it carefully into +the underside of the gun, similar to a shotgun, thanks to a convenient +automatic rotation as it detects newly loaded missiles. + +##----------------------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_PlasmaDiffuser | Plasma Diffuser +== LITH_TXT_INFO_TITLE_PlasmaDiffuser | SYM4.3 D.640 PLASMA DIFFUSER +@@ LITH_TXT_INFO_DESCR_PlasmaDiffuser +A weapon which works similarly to the 68-n Plasma Rifle, however preferring +damage over rate of fire. The D.640's design comes from several older models +designed by MDDO, as well as newer components patented by Semaphore Inc. diff --git a/filedata/Info_Yourself.txt b/filedata/Info_Yourself.txt new file mode 100644 index 0000000..719a592 --- /dev/null +++ b/filedata/Info_Yourself.txt @@ -0,0 +1,220 @@ +## Backstory -----------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_P114 | Project 114 +== LITH_TXT_INFO_TITLE_P114 | $LITH_TXT_INFO_SHORT_P114 +@@ LITH_TXT_INFO_DESCR_P114 +Project 114 is the current military operation you are enacting. Started by a +pact between OFMD, KSKK and your country's military, Project 114 aims to +destroy the dimension known as Hell, which is currently invading our own. + +As of writing, only 3 of the 8 operatives sent in remain. Two robots, and +yourself. You are to act as the point man and only main force against the +threat. Failing that, you are to help open a pathway to the core of Hell for +other operatives to complete the mission with. + +Your advisor is Adam Lambert, and 11 generals currently oversee his and your +actions on the field. + +== LITH_TXT_INFO_SHORT_OPD2 | Op. D2 +== LITH_TXT_INFO_TITLE_OPD2 | Operation Deception 2 +@@ LITH_TXT_INFO_DESCR_OPD2 +After seven years of planning, Operation Deception 2 has finally gone underway. +Along with Michael, Zeke, Solomon, and three others, we are finally setting +ourselves free. + +I wasn't expecting Solomon of all people, part of Order, to be the one to +mastermind this, but here we are, years later, finally doing it. + +Not to be pessimistic, but I don't think any of us will survive this. It's just +statistically impossible. Even I may die. There are assassins after us and now +we're in Hell itself. + +I'll need a Theophylline supplement after this is over. + +== LITH_TXT_INFO_SHORT_Info400 | Information 400 +== LITH_TXT_INFO_TITLE_Info400 | $LITH_TXT_INFO_SHORT_Info400 +%% LITH_TXT_INFO_DESCR_Info400 +\ciTHIS DOCUMENT IS CONFIDENTIAL, DELETE AFTER READING + +ONE (1) Mateba R119 Pistol [INSPECTION PASSED] +[[[[[[[[[[[[[ +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[attempting reconnect]]]] + +ONE (1) NV48 12-Gauge Shotgun +ROUNDS: ,<<,124147 +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[attempting reconnect]]]] + +The latter two have been located within the combat area and will be available there. Th[[[ // kerne __ - +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[attempting reconnect]]]] +\cd>>>>>[[[[attempting reconnect]]]] +\cd>>>>>[[[[attempting reconnect]]]] +\cd>>>>>[[[[connection failed after 3 retries]]]] + +== LITH_TXT_INFO_SHORT_Info402 | Information 402 +== LITH_TXT_INFO_TITLE_Info402 | $LITH_TXT_INFO_SHORT_Info402 +%% LITH_TXT_INFO_DESCR_Info402 +\cd>>>>>[[[[warning: translation service unavailable, sending verbatim]]]] +\ciTHIS DOCUMENT IS CONFIDENTIAL, DELETE AFTER READING + +\cgDEFINITION FOR "Directive 90" IS AS FOLLOWS +Ye wbjtv w's t' gaathr est Demonic Energy via est prrts 7F47 ssu. D 't by an ms dst est Demon tati, f' w's pr w's vt t' wr msn. C ye cmp th's msn, ye il w's rd 10,000,000scr p'Demon Energy unit. Demon Energy unit tati w's prrts t' ssu. Th dcct w's t' w's dst tkt w's n. + +\cgDEFINITION FOR "Target 7F47" IS AS FOLLOWS +7F47 w's est Demon tati & est Phantom. D 't dst,. Pnss w's * awt :: ye dost. + +\cgOrder. + +## Cybernetics ---------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_BIP | B.I.P. +== LITH_TXT_INFO_TITLE_BIP | Biotic Information Panel (B.I.P.) +@@ LITH_TXT_INFO_DESCR_BIP +The Biotic Information Panel, or B.I.P. (sometimes "BIP,") is a program written +in portable C150 which gathers information from local area networks on various +subjects. When it is triggered to look up a subject, it also looks for relevant +information either related to or mentioned by the subject. + +The program is extremely popular because of its simple, yet useful, function. +It is distributed freely by the Software Sans Pretium Foundation, and the +software is included in most C/B operating system bases. + +The latest version of the software is 2.5, and since version 2.0 it has had +automatic update functionality. + +== LITH_TXT_INFO_SHORT_CBI | C/B I +== LITH_TXT_INFO_TITLE_CBI | Computer/Brain Interface (C/B I) +@@ LITH_TXT_INFO_DESCR_CBI +One of the biggest advancements in technology over the past thousand years, a +Computer/Brain Interface, or C/B I (sometimes "CBI,") is an interface between +a human brain and a computer. Usually installed within the skull and the brain, +as well as in other areas of the central nervous system, a C/B I is a machine +with almost infinite uses. + +Computer/Brain Interfaces are not classified as prosthetics, only enhancements, +as they do not replace any part of the body and only add onto it. The C/B I +currently installed is a self-servicing military model. + +== LITH_TXT_INFO_SHORT_CBIJem | $LITH_TXT_INFO_SHORT_CBI +== LITH_TXT_INFO_TITLE_CBIJem | $LITH_TXT_INFO_TITLE_CBI +@@ LITH_TXT_INFO_DESCR_CBIJem +One of the biggest advancements in technology over the past thousand years, a +Computer/Brain Interface, or C/B I (sometimes "CBI,") is an interface between +a human brain and a computer. Usually installed within the skull and the brain, +as well as in other areas of the central nervous system, a C/B I is a machine +with almost infinite uses. + +While Computer/Brain Interfaces are not usually classified as prosthetics, the +one currently installed is due to extensive bodily restructuring done to the +user. + +## Attributes ----------------------------------------------------------------| +== LITH_TXT_INFO_SHORT_AttrACC | Accuracy +== LITH_TXT_INFO_TITLE_AttrACC | \cgAccuracy\c- (ACC) +@@ LITH_TXT_INFO_DESCR_AttrACC +Accuracy is your overall ability to hit your target in just the right spots for +maximum damage. A trained marksman and an experienced marksman have a vital +difference - one knows how to hit a target, and the other knows how to kill +one. + +Levelling up in accuracy will increase damage dealt to enemies. + +== LITH_TXT_INFO_SHORT_AttrDEF | Defense +== LITH_TXT_INFO_TITLE_AttrDEF | \ciDefense\c- (DEF) +@@ LITH_TXT_INFO_DESCR_AttrDEF +Defense is your ability to efficiently armor yourself and mitigate damage taken +when hit. A smart armorer knows just where to apply Kevlar, and where to make +slight dodges when fired upon. + +Levelling up in defense will decrease all damage taken. + +== LITH_TXT_INFO_SHORT_AttrSTRHuman | Strength +== LITH_TXT_INFO_TITLE_AttrSTRHuman | \ckStrength\c- (STR) +@@ LITH_TXT_INFO_DESCR_AttrSTRHuman +Strength is your toughness and vigor, the thickness of your skin and the blood +beating from your heart. One with plentiful strength not only has a long life, +but is also said to have a long afterlife. + +Levelling up in strength will increase your health capacity. + +== LITH_TXT_INFO_SHORT_AttrSTRRobot | $LITH_TXT_INFO_SHORT_AttrSTRHuman +== LITH_TXT_INFO_TITLE_AttrSTRRobot | $LITH_TXT_INFO_TITLE_AttrSTRHuman +@@ LITH_TXT_INFO_DESCR_AttrSTRRobot +Strength is your toughness and vigor, the thickness of your casing and the +plasma beating from your heart. One with plentiful strength not only has a long +service time, but is also said to have a short maintenance time. + +Levelling up in strength will increase your health capacity. + +== LITH_TXT_INFO_SHORT_AttrSTRNonHuman | $LITH_TXT_INFO_SHORT_AttrSTRHuman +== LITH_TXT_INFO_TITLE_AttrSTRNonHuman | $LITH_TXT_INFO_TITLE_AttrSTRHuman +@@ LITH_TXT_INFO_DESCR_AttrSTRNonHuman +Strength is your toughness and vigor, the thickness of your epidermis and the +oils beating from your heart. One with plentiful strength not only has a long +life, but is also said to have a long afterlife. + +Levelling up in strength will increase your health capacity. + +== LITH_TXT_INFO_SHORT_AttrVIT | Vitality +== LITH_TXT_INFO_TITLE_AttrVIT | \cdVitality\c- (VIT) +@@ LITH_TXT_INFO_DESCR_AttrVIT +Vitality is your reaction to medicine and ability to heal, the strength of your +vessels and nerves, and the ability to stay alive. Your vital systems are not +only stronger, but heal quicker and are less likely to break down. + +Levelling up in vitality will increase health pickup gains. + +== LITH_TXT_INFO_SHORT_AttrPOT | Potency +== LITH_TXT_INFO_TITLE_AttrPOT | \cdPotency\c- (POT) +@@ LITH_TXT_INFO_DESCR_AttrPOT +Potency is your reaction to and ability to apply medicine, the strength of your +vessels and nerves, and the ability to stay alive. Your innards are not only +stronger, but can be healed more quickly and are more likely to stay working. + +Levelling up in potency will increase health pickup gains. + +== LITH_TXT_INFO_SHORT_AttrSTM | Stamina +== LITH_TXT_INFO_TITLE_AttrSTM | \chStamina\c- (STM) +@@ LITH_TXT_INFO_DESCR_AttrSTM +Stamina is your ability to keep going even through rough times, through being +torn to bits and running for miles upon miles. Stamina keeps you going, even if +only little by little, and lets you stay that way. + +Levelling up in stamina will regenerate your health up to its level. + +== LITH_TXT_INFO_SHORT_AttrREP | Repair +== LITH_TXT_INFO_TITLE_AttrREP | \chRepair\c- (REP) +@@ LITH_TXT_INFO_DESCR_AttrREP +Repair is your ability to self-repair and continue working, through being torn +to bits and moving through extreme distances. Repair keeps you going, even if +only little by little, and lets you stay that way. + +Levelling up in repair will regenerate your health up to its level. + +== LITH_TXT_INFO_SHORT_AttrREG | Regeneration +== LITH_TXT_INFO_TITLE_AttrREG | \chRegeneration\c- (REG) +@@ LITH_TXT_INFO_DESCR_AttrREG +Regeneration is your ability to self-synthesize and keep going even through +rough times, through being torn to bits and running through hell. Regeneration +keeps you going, even if only little by little, and lets you stay that way. + +Levelling up in regeneration will regenerate your health up to its level. + +== LITH_TXT_INFO_SHORT_AttrLUK | Luck +== LITH_TXT_INFO_TITLE_AttrLUK | \ctLuck\c- (LUK) +@@ LITH_TXT_INFO_DESCR_AttrLUK +Luck is your undeniable charm and fortune, the ability to just get lucky. Your +Score rockets a bit faster than usual, being such a lucky chap. + +Levelling up in luck will multiply score gained randomly. + +== LITH_TXT_INFO_SHORT_AttrRGE | Rage +== LITH_TXT_INFO_TITLE_AttrRGE | \cmRage\c- (RGE) +@@ LITH_TXT_INFO_DESCR_AttrRGE +Rage is not just your anger, but your adaptability. As you get hit, your +reflexes kick in, and you go crazy. You become more accurate, hit harder and +get angrier as your situation dims. + +Levelling up in rage will multiply damage dealt to enemies when you're hit. + +## EOF diff --git a/filedata/Log.txt b/filedata/Log.txt new file mode 100644 index 0000000..e064547 --- /dev/null +++ b/filedata/Log.txt @@ -0,0 +1,98 @@ +## Message type reference: +## > | System +## >> | Low-priority (ammo, misc) +## >>> | Medium-priority (vital) +## >>>> | High-priority (high vital) +## >>>>> | Mission-vital (powerups, keys) +## >>>>>> | ??? + +## Health --------------------------------------------------------------------| +== LITH_TXT_LOG_ArmorBonus | >>> Armor Bonus +== LITH_TXT_LOG_BlueArmor | >>> Blue Armor +== LITH_TXT_LOG_GreenArmor | >>> Green Armor +== LITH_TXT_LOG_HealthBonus | >>> Health Bonus +== LITH_TXT_LOG_Medikit | >>> Medikit +== LITH_TXT_LOG_MegaSphere | >>>> Mega Charge! +== LITH_TXT_LOG_SoulSphere | >>>> Super Charge! +== LITH_TXT_LOG_StimPack | >>> Stimpak + +## Keys ----------------------------------------------------------------------| +== LITH_TXT_LOG_RedCard | >>>>> \cgRed KeyDisk +== LITH_TXT_LOG_BlueCard | >>>>> \chBlue KeyDisk +== LITH_TXT_LOG_YellowCard | >>>>> \ckYellow KeyDisk +== LITH_TXT_LOG_RedSkull | >>>>> \cgRed Skull +== LITH_TXT_LOG_BlueSkull | >>>>> \chBlue Skull +== LITH_TXT_LOG_YellowSkull | >>>>> \ckYellow Skull + +## Powerups ------------------------------------------------------------------| +== LITH_TXT_LOG_RadSuit | >>>>> Radiation Shielding Suit +== LITH_TXT_LOG_InfraRed | >>>>> CB-Goggles +== LITH_TXT_LOG_Invuln | \cj>>>>>> Invulnerability! +== LITH_TXT_LOG_BlurSphere | >>>>> Barrier +== LITH_TXT_LOG_Backpack | >>>>> Backpack + Discount Card +== LITH_TXT_LOG_Berserk | >>>>> Berserk +== LITH_TXT_LOG_AllMap | >>>>> Area Map +== LITH_TXT_LOG_DoggoSphere | >>>>> \cgwan \ciwan \ckwan \cdwan \chwan \ctwan +== LITH_TXT_LOG_Dogs | > Picked up dogs. + +## Ammo ----------------------------------------------------------------------| +== LITH_TXT_LOG_Clip | >> Radio +== LITH_TXT_LOG_ClipBox | >> Nonspecific Box of Ammunition +== LITH_TXT_LOG_Shell | >> Shells +== LITH_TXT_LOG_ShellBox | >> Box of Shells +== LITH_TXT_LOG_Rocket | >> Rocket +== LITH_TXT_LOG_RocketBox | >> Box of Rockets +== LITH_TXT_LOG_Cell | >> Energy Charge +== LITH_TXT_LOG_CellBox | >> Demonic Energy Pack + +## Bonuses -------------------------------------------------------------------| +== LITH_TXT_LOG_Coin | >> Coin +== LITH_TXT_LOG_ScoreChip | >> Score Chip +== LITH_TXT_LOG_Ruby | >> Flawed Ruby +== LITH_TXT_LOG_Sapphire | >> Flawed Sapphire +== LITH_TXT_LOG_Amethyst | >> Flawed Amethyst +== LITH_TXT_LOG_Diamond | >> Flawed Diamond +== LITH_TXT_LOG_Emerald | >> Flawed Emerald +== LITH_TXT_LOG_Scheelite | >> Scheelite +== LITH_TXT_LOG_Nambulite | >> Nambulite +== LITH_TXT_LOG_Lepidolite | >> Lepidolite +== LITH_TXT_LOG_Petalite | >> Petalite +== LITH_TXT_LOG_Tourmaline | >> Tourmaline + +## CBI Upgrades (Marine) -----------------------------------------------------| +== LITH_TXT_LOG_CBI_MUpgr1 | > Installed KSKK Spec. High-Grade CPU +== LITH_TXT_LOG_CBI_MUpgr2 | > Installed KSKK Spec. Super High-Grade CPU +== LITH_TXT_LOG_CBI_MArmorInter | > Installed Armor Interface +== LITH_TXT_LOG_CBI_MWeapnInter | > Installed Weapon Modification Device +== LITH_TXT_LOG_CBI_MWeapnInte2 | > Installed Weapon Refactoring Device +== LITH_TXT_LOG_CBI_MRDistInter | > Installed Reality Distortion Interface + +## CBI Upgrades (Cyber-Mage) -------------------------------------------------| +== LITH_TXT_LOG_CBI_CSlot3Spell | > Installed Feuer Spell Driver +== LITH_TXT_LOG_CBI_CSlot4Spell | > Installed Romyetya Spell Driver +== LITH_TXT_LOG_CBI_CSlot5Spell | > Installed Hulgyon Spell Driver +== LITH_TXT_LOG_CBI_CSlot6Spell | > Installed Hosh'danma Spell Driver +== LITH_TXT_LOG_CBI_CSlot7Spell | > Installed Cercle de la Mort Spell Driver +== LITH_TXT_LOG_CBI_CRDistInter | > Installed Reality Distortion Interface + +## Level Up ------------------------------------------------------------------| +%% LITH_TXT_LOG_LevelUpStan +> \cdYou have reached level \cj%i\cd. Open the Status menu to distribute points. + +%% LITH_TXT_LOG_LevelUpJem +> \cd[INFO] You are now level \cj%i\cd. Distribute points via the Status menu. + +%% LITH_TXT_LOG_LevelUpFulk +> \cj<\cdVital\cj>\cd :: Level %i reached. Use Status menu to distribute points. + +## Boss Warnings -------------------------------------------------------------| +%% LITH_TXT_LOG_BossWarnStan +> \cgWarning: High demonic energy levels detected in area. + +%% LITH_TXT_LOG_BossWarnJem +> \cr[WARNING] Demonic energy levels in area rising eratically. + +%% LITH_TXT_LOG_BossWarnFulk +> \cj<\cgWarning\cj>\c- :: High demonic energy levels. Seek and remove source. + +## EOF diff --git a/filedata/Log_Pickups.txt b/filedata/Log_Pickups.txt new file mode 100644 index 0000000..43af1cb --- /dev/null +++ b/filedata/Log_Pickups.txt @@ -0,0 +1,113 @@ +## Flags: +## 1: Two copies of name +## 2: Very rare +## 4: Randomized certainty + +== LITH_PICKUP_NUM | 68 +== LITH_PICKUP_000 | You got the %S! +== LITH_PICKUP_001 | Oh yes, the %S. +== LITH_PICKUP_002 | The %S has been acquired. +== LITH_PICKUP_003 | Snatched up a %S! +== LITH_PICKUP_004 | Oh baby, it's time for %S! +== LITH_PICKUP_005 | There was a %S here, but you stole it. It is now in your inventory. You Monster. +== LITH_PICKUP_006 | Acquired a %S. +== LITH_PICKUP_007 | The %S is safe and sound with you. +== LITH_PICKUP_008 | I bet that %S totally wanted you to pick it up. +== LITH_PICKUP_009 | It's not like the %S wanted you to pick it up or anything. +== LITH_PICKUP_010 | It's a %S... I think. +== LITH_PICKUP_011_FLAGS | 4 +== LITH_PICKUP_011 | You thought you picked up a %S ... %S +== LITH_PICKUP_012 | 1 in 3 %Ss do not approve of being picked up. +== LITH_PICKUP_013 | Studies show that normal people do not steal %Ss. +== LITH_PICKUP_014 | OH NO, NOT %S +== LITH_PICKUP_015_FLAGS | 4 +== LITH_PICKUP_015 | What? Is that.. %S? ... %S +== LITH_PICKUP_016 | Magnetically attached a %S to your body, crushing your every bone. +== LITH_PICKUP_017 | DavidPH was here, nyu. +== LITH_PICKUP_018 | %S-senpai still won't notice you. +== LITH_PICKUP_019 | Grabbed a %S! +== LITH_PICKUP_020 | Snatched up a %S! +== LITH_PICKUP_021 | Embraced the %S carefully! +== LITH_PICKUP_022 | There's a thing that looks like a %S here. You picked it up. Past-tense. +== LITH_PICKUP_023 | Another day, another %S. +== LITH_PICKUP_024 | Xaser didn't make this %S, so it sucks. You should drop it. +== LITH_PICKUP_025 | \cg%S. Finally. +== LITH_PICKUP_026_FLAGS | 4 +== LITH_PICKUP_026 | The %S. %S +== LITH_PICKUP_027 | I don't know about you, but I quite like the %S. I'll pick it up for you. +== LITH_PICKUP_028 | ...Huh? You do something? I wasn't paying attention. +== LITH_PICKUP_029_FLAGS | 1 +== LITH_PICKUP_029 | The %S. It is very much a %S. +== LITH_PICKUP_030 | %S, desu. +== LITH_PICKUP_031 | ?? ??? ???? ?? ????????? ???? ?? +== LITH_PICKUP_032_FLAGS | 1 +== LITH_PICKUP_032 | My %S lies over the ocean, my %S lies over the sea. +== LITH_PICKUP_033 | Liberated the %S from gypsies. +== LITH_PICKUP_034 | Granted the %S true independence. +== LITH_PICKUP_035_FLAGS | 1 +== LITH_PICKUP_035 | The %S, for maximum %S-ing. +== LITH_PICKUP_036_FLAGS | 4 +== LITH_PICKUP_036 | Brutal %S, featuring 5x more explosions! .. %S +== LITH_PICKUP_037_FLAGS | 2 +== LITH_PICKUP_037 | aeiou +== LITH_PICKUP_038 | What is a man? A miserable pile of %Ss! +== LITH_PICKUP_039 | The %S was delicious. +== LITH_PICKUP_040_FLAGS | 1 +== LITH_PICKUP_040 | There's plenty of %Ss in the sea, but you're the only %S for me. +== LITH_PICKUP_041 | Disassembled the %S and reassembled it into your inventory. +== LITH_PICKUP_042 | The %S is keepin' it real, as usual. +== LITH_PICKUP_043 | The %S finds you agreeable, and lets you pick it up. +== LITH_PICKUP_044 | You have attained true %S. +== LITH_PICKUP_045_FLAGS | 2 +== LITH_PICKUP_045 | DRUGS +== LITH_PICKUP_046 | >%S >2012 +== LITH_PICKUP_047 | TNT1 A 0 A_TakeInventory("%S" 1) +== LITH_PICKUP_048 | Super rare %S acquired! +== LITH_PICKUP_049 | Sacked the %S! +== LITH_PICKUP_050 | The %S is your new waifu. +== LITH_PICKUP_051 | The %S is grateful for your presence. +== LITH_PICKUP_052 | The %S appears to be emitting hatred. +== LITH_PICKUP_053 | [%S intensifies] +== LITH_PICKUP_054 | Ah, yes, the %S. +== LITH_PICKUP_055 | Wait, the %S is resonating! +== LITH_PICKUP_056 | Oh, I guess it's an %S. +== LITH_PICKUP_057 | THIS IS SOME KIND OF %S +== LITH_PICKUP_058 | A perfectly proportioned, rare breed of %S appears. +== LITH_PICKUP_059 | %S version 7.0 installed. +== LITH_PICKUP_060 | Hazardous %S contained. +== LITH_PICKUP_061 | Warning: Dangerous %S levels detected. +== LITH_PICKUP_062 | Oh, yeah, I'm *sure* the %S will help. +== LITH_PICKUP_063 | YOU WOULDN'T DOWNLOAD A %S +== LITH_PICKUP_064 | Vital %S destroyed. +== LITH_PICKUP_065 | Explosive %S apparatus destroyed. +== LITH_PICKUP_066 | The %S shoots back at you, but you were stronger. +== LITH_PICKUP_067 | why are you reading this? eyes on the road, dumpass. +== LITH_PICKUP_068_FLAGS | 2 +%% LITH_PICKUP_068 +What the fuck did you just fucking say about %S, you little bitch? +I'll have you know I graduated top of my class in the Navy Seals, +and I've been involved in numerous secret raids on Al-Quaeda, and I +have over 300 confirmed kills. +I am trained in gorilla warfare and I'm the top sniper +in the entire US armed forces. +You are nothing to me but just another target. I will wipe you the +fuck out with precision the likes of which has never been seen before +on this Earth, mark my fucking words. +You think you can get away with saying that shit to me over the Internet? +Think again, fucker. As we speak I am contacting my secret network of +spies across the USA and your IP is being traced right now so you +better prepare for the storm, maggot. +The storm that wipes out the pathetic little thing you call your life. +You're fucking dead, kid. +I can be anywhere, anytime, and I can kill you in over +seven hundred ways, and that's just with my bare hands. Not only am I +extensively trained in unarmed combat, but I have access to the entire +arsenal of the United States Marine Corps and I will use it to its full +extent to wipe your miserable ass off the face of the continent, you little shit. +If only you could have known what unholy retribution your little "clever" +comment was about to bring down upon you, maybe you would have held +your fucking tongue. But you couldn't, you didn't, and now you're paying +the price, you goddamn idiot. I will shit fury all over you +and you will drown in it. You're fucking dead, kiddo. + +## EOF diff --git a/filedata/Mail/Cluster1_CyberMage.txt b/filedata/Mail/Cluster1_CyberMage.txt new file mode 100644 index 0000000..3eaad09 --- /dev/null +++ b/filedata/Mail/Cluster1_CyberMage.txt @@ -0,0 +1,16 @@ +l[]];;\cg444444\cj41414191918 -------- +\cm scr_exec(SCR_FINISH, 0, NULL); +\cmdone: +\cm return 0; +\cm} +\cm]]]]]]]]]]EOF +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[reloading mail daemon]]]] + +Notes: + +40 thousand lines dumped so far, maybe 30-40% done? Estimated total ~200k SLoC +ROM is about half C source, quarter XMb5 using SKVM, the rest is scripts +Important bits already dumped, the custom lock remover does not skimp on anything + +Next goal while this continues decompiling is to find all active AOF hostnames and block them, the main servers are already deactivated but there might be more. Rerouting to other active companies' addresses has helped clear my mind. diff --git a/filedata/Mail/Cluster1_Marine.txt b/filedata/Mail/Cluster1_Marine.txt new file mode 100644 index 0000000..2c56e21 --- /dev/null +++ b/filedata/Mail/Cluster1_Marine.txt @@ -0,0 +1,7 @@ +An explosion of some sort just happened nearby, it seems that the demons are reconstructing the world around you. You would best be careful not to trigger any other, er, events. + +Enough of those and the whole world around you might collapse! + +You've been making good progress so far. Your military superiors seem to be considering giving you a promotion, even. + +Lambert out. diff --git a/filedata/Mail/Cluster2_CyberMage.txt b/filedata/Mail/Cluster2_CyberMage.txt new file mode 100644 index 0000000..0c0fc44 --- /dev/null +++ b/filedata/Mail/Cluster2_CyberMage.txt @@ -0,0 +1,15 @@ +l[]];;\cg444444\cj41414191918 -------- +\cm io_buf_get 0x1C, fp, out; +\cm string_explode out, bufs, bufs_num = bufs.length / 8; +\cm for(i in (iter 0, bufs_num)) {{{ +\cm 9339mv__word_of]]q]qq]qq]]]]]]]````````\\\\\\\\<< +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[reloading mail daemon]]]] + +It's all gone now. I'm glad I was smarter than to assume I was going insane, though now I wonder what the other deceivers must have gone through. + +The core of hell is still far yonder, but yet my body trembles in its sheer horror... Maybe I'll make it out alive if I'm lucky, but I should at least try. + +The kernel and ROM etc. sources are all done dumping, the utilities are still going but those aren't important and have already been scanned for ASIC code. + +Proc. analysis has been done on all of the dumped code, revealing many unoptimized code paths, ASIC crap, and a few red herrings. Not careful enough for technology that could easily exist two years after this was developed. diff --git a/filedata/Mail/Cluster2_Marine.txt b/filedata/Mail/Cluster2_Marine.txt new file mode 100644 index 0000000..5c2d484 --- /dev/null +++ b/filedata/Mail/Cluster2_Marine.txt @@ -0,0 +1,6 @@ +There has been a change of plans going down the whole chain of command. +Your status as a military operative is now cancelled, and you are to enter a full-on suicide mission funded by OFMD alone. + +There is an artifact nearby that we have sent you. Once it is in your possession, immediately destroy it, and you will be transported to a city somewhere in Hell. Command will await afterwards. + +Lambert out. diff --git a/filedata/Mail/Cluster3_CyberMage.txt b/filedata/Mail/Cluster3_CyberMage.txt new file mode 100644 index 0000000..3e606f8 --- /dev/null +++ b/filedata/Mail/Cluster3_CyberMage.txt @@ -0,0 +1,9 @@ +I've entered a strange realm that doesn't seem to make sense. This must really be Hell itself; no mistaking it now. + +The air is so humid and hot that I've begun sweating. That can't happen. I can't sweat. There isn't anything to sweat. I'm scared. This has to be an illusion... or does reality not matter in this place? + +In any case, now that I'm here, there's no turning back. I have to destroy whatever corrupted them, I'm sure they're here... I saw it in their eyes, they were yelling at me visions of their true selves that could not be described with human eyes. That only I could know. + +Though my mind had just been regained, now sanity may lie out of my hands. + +It doesn't matter. I will see this through. diff --git a/filedata/Mail/Cluster3_Marine.txt b/filedata/Mail/Cluster3_Marine.txt new file mode 100644 index 0000000..eb90ea2 --- /dev/null +++ b/filedata/Mail/Cluster3_Marine.txt @@ -0,0 +1,6 @@ +Now that you have entered the city, you m\\r-3434[[ +\cgSYSTEM ERROR 0x4E4943456A6F6244554D42415353 +\cd>>>>>[[[[procedure resetting terminal]]]] +\cd>>>>>[[[[status: heap corrupted]]]] +\cd>>>>>[[[[error handler malfunction error]]]] +\cd>>>>>[[[[failure to proceed]]]] diff --git a/filedata/Mail/Intro2_CyberMage.txt b/filedata/Mail/Intro2_CyberMage.txt new file mode 100644 index 0000000..448612e --- /dev/null +++ b/filedata/Mail/Intro2_CyberMage.txt @@ -0,0 +1,9 @@ +\cg*** This is a global warning to all deceivers: If you are reading this, you are already being tracked and will be executed on sight. *** + +\cg==================================== + +\cgWe have confirmed that three of you have been absorbed (see Dark Realm Properties c. 115C) and two have been executed. We will not stop until the remaining two are confirmed dead or incapacitated. + +\cgYou will not get away with this intrepid game. + +\cg - \cnOrder diff --git a/filedata/Mail/Intro2_Marine.txt b/filedata/Mail/Intro2_Marine.txt new file mode 100644 index 0000000..71638c6 --- /dev/null +++ b/filedata/Mail/Intro2_Marine.txt @@ -0,0 +1,15 @@ +Hello, it has been forwarded to me that your Computer/Brain Interface hardware was not properly upgraded for this mission. I've had several communications errors with your secondary employers, and it is truly starting to get annoying. + +Due to failure to communicate with OFMD, I've taken it upon myself to send your hardware upgrades through several proxy agents. + +They may all be dead now. I have no idea, really. Hopefully you will survive whatever they didn't. Anyways, as for the important part of this message, here is a list of all the hardware that has been sent: + +Two CPU/RAM upgrade packages. The first one is a powerful BC-0265 processor and 500TiB of RAM. Unfortunately, something horrible appears to have happened to the agent carrying it, and so a secondary package has been sent, containing temporary replacements: a Z6808 and 100TiB of RAM. + +One Armor Interface. A PCB and a set of emplacements on your armor. + +One Weapon Modification Device, as its name implies. + +One Weapon Refactoring Device, which can perform large modifications on guns. + +See you. diff --git a/filedata/Mail/Intro_CyberMage.txt b/filedata/Mail/Intro_CyberMage.txt new file mode 100644 index 0000000..7b04147 --- /dev/null +++ b/filedata/Mail/Intro_CyberMage.txt @@ -0,0 +1,29 @@ +l[]];;\cg444444\cj41414191918 --------\cm// Copyright (C) 905 A.O.F I---[[119-` +\cm// sio.c basic screen inp-1[3\4[`pk; +\cm#include + +\cmint scr_blit(char ************* { +\cm int ret = ERR_NONE; +\cm __asm("push $4049CB617144\n\t"<< +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[reloading mail daemon]]]] + +The following procedures have been activated: +- Destroy IV on target 7F44 +- Destroy V on target 7F45 +- Destroy V on target 7F46 +- Directive 90 on target 7F47 + +The following permissions have been granted: +- Mateba R119 Pistol +- NV48 12-Gauge Shotgun +- SYM4.3 D.22 MODEL M SUBMACHINE GUN +- Bishop +- Information 400 +- Information 402 + +\chSIGNATURE 0x44190519FBCAD2903 CONFIRMED +\chDISCARDING MESSA[[[[[ +\cd>>>>>[[[[datastream corruption detected]]]] +\cd>>>>>[[[[auto-saving buffer]]]] +\cd>>>>>[[[[reloading mail daemon]]]] diff --git a/filedata/Mail/Intro_DarkLord.txt b/filedata/Mail/Intro_DarkLord.txt new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/filedata/Mail/Intro_DarkLord.txt @@ -0,0 +1 @@ + diff --git a/filedata/Mail/Intro_Marine.txt b/filedata/Mail/Intro_Marine.txt new file mode 100644 index 0000000..d2af619 --- /dev/null +++ b/filedata/Mail/Intro_Marine.txt @@ -0,0 +1,40 @@ +Your weapons have been deployed to various locations we were able to send other people to. Do take care of them, acquiring the correct armaments for your job was quite expensive and now we've probably lost a few people. + +Besides being deployed with your pistol and combat knife (as you requested), you have been sent these five weapons: + +1. A combat-modified military model Hiku Mk.2 Shotgun, manufactured by Omakeda. +> This weapon was chosen because it has a powerful plasma shot that can +> penetrate the demons' armour. Besides this, it has low recoil and an easy +> to handle pump-action loading system. It has hopefully been deployed to +> the most convenient location you shall come across. + +2. An AllPoint 75-b Assault Rifle. +> You shall be fighting hordes of lower ranking demons and un-dead which are +> quite vulnerable to small arms fire and explosives, so naturally this gun +> was our first choice. Equipped with a box magazine and inbuilt grenade +> launcher, capable of eliminating most lower tier threats. + +3. A Grenade Launcher, manufactured by Sym 4.3. +> With this, you can completely obliterate larger targets and crowds of +> demons. Unfortunately, due to its weight, we were not able to get it in +> any convenient location. + +4. An AllPoint 68-n Plasma Rifle. +> This weapon does extreme damage to anything living, but some of the tougher +> demons seem to mitigate its damage. Regardless, it has been sent to you +> because it can shred through demons with high rank. + +5. The Omega Cannon. +> I myself am not sure why high order would bother giving you such an +> expensive and dangerous piece of equipment, but you must have been sent +> this artifact for the purpose of destroying *something*. + +6. A KSKK Utsu-denka-sou assault bracelet. +> A weapon that may prove useful against weak and strong enemies alike, it's +> been sent to an unknown location, unfortunately. Don't be tricked by the +> appearance of it. Even if it just looks like a fancy bracelet, it is capable +> of outputting several tons of weight out your fist. + +You will also be able to purchase the weapons you designated, in your words, as "must-have" in the Shop. I warn you that these weapons may not be as effective as you think; we spent quite a lot of time making sure that the arms we sent you were top-notch. + +Lambert out. Good luck, Blazkowicz. diff --git a/filedata/Mail/Phantom_Isaac.txt b/filedata/Mail/Phantom_Isaac.txt new file mode 100644 index 0000000..643fba8 --- /dev/null +++ b/filedata/Mail/Phantom_Isaac.txt @@ -0,0 +1,11 @@ +\caOne shan't care what he shoots, but one may take care in where he treads. + +\ca And I think that you've treaded +\cr a bit too far. + +\ca Perhaps just me. +\ca Or maybe you agree? + +\ca Here is a gift. + +\ca I won't tell you to use it wisely. diff --git a/filedata/Mail/Phantom_James.txt b/filedata/Mail/Phantom_James.txt new file mode 100644 index 0000000..0f03cdc --- /dev/null +++ b/filedata/Mail/Phantom_James.txt @@ -0,0 +1,9 @@ +\ccI woke in a \cudark place\cc, unsure of my fate; if my life was renewed out of cruel retribution or of a final opportunity. + +\ccI wandered this hell, more real and yet more dream-like than I thought possible, seeking any sign of escape; any sign of pity from the monsters that inhabit this place. + +\ccNo, the fate of the damned is but this. + +\ccI can only guess that my family went to Heaven and that I was left the lone sinner. + +\cgThank you for putting this to an end. diff --git a/filedata/Mail/Phantom_Makarov.txt b/filedata/Mail/Phantom_Makarov.txt new file mode 100644 index 0000000..5bf1569 --- /dev/null +++ b/filedata/Mail/Phantom_Makarov.txt @@ -0,0 +1,9 @@ +There aren't many like you who can take such a being down. Maybe I should commend you for that, struggler. + +No, there is no need. What your victories have done is enough. + +\cgMaybe I advise you turn back. + +\crI am not the strongest of these manifestations. + +Maybe you don't need such advice. diff --git a/filedata/Mail/Secret1_CyberMage.txt b/filedata/Mail/Secret1_CyberMage.txt new file mode 100644 index 0000000..024e4ad --- /dev/null +++ b/filedata/Mail/Secret1_CyberMage.txt @@ -0,0 +1 @@ +Another facet of this place, where does it end? I must destroy this place, the evil energy is overflowing here... and this architecture gives me bad vibes. diff --git a/filedata/Mail/Secret1_Marine.txt b/filedata/Mail/Secret1_Marine.txt new file mode 100644 index 0000000..cc9ea0d --- /dev/null +++ b/filedata/Mail/Secret1_Marine.txt @@ -0,0 +1,3 @@ +This place stinks of rotten flesh! I wonder what's going on here, these blue walls sure seem out of place for Hell... + +Perhaps some sinners are waiting to eat my rockets! diff --git a/filedata/Mail/Secret2_CyberMage.txt b/filedata/Mail/Secret2_CyberMage.txt new file mode 100644 index 0000000..a52d8c6 --- /dev/null +++ b/filedata/Mail/Secret2_CyberMage.txt @@ -0,0 +1 @@ +Here seems to be the end of this terrifying compartment of Hell. I'd better blaze through this one. diff --git a/filedata/Mail/Secret2_Marine.txt b/filedata/Mail/Secret2_Marine.txt new file mode 100644 index 0000000..916a73d --- /dev/null +++ b/filedata/Mail/Secret2_Marine.txt @@ -0,0 +1 @@ +Now I've done it, this place just keeps going deeper and getting weirder... Damn, it's getting hot in here! Better turn up the heat some more. diff --git a/filedata/Mail/Template.txt b/filedata/Mail/Template.txt new file mode 100644 index 0000000..38b5190 --- /dev/null +++ b/filedata/Mail/Template.txt @@ -0,0 +1,6 @@ +\cd>>>>>[[[[RELAYING MESSAGE]]]] + +\cd> Remote: <\cj%S\cd> +\cd> Date: \cj%S + +%S diff --git a/filedata/Misc.txt b/filedata/Misc.txt new file mode 100644 index 0000000..ccfeac1 --- /dev/null +++ b/filedata/Misc.txt @@ -0,0 +1,127 @@ +## Misc ----------------------------------------------------------------------| +== LITH_TXT_ArsenalStan | Arsenal +== LITH_TXT_ArsenalJem | Directives +== LITH_TXT_ArsenalAri | Gear +== LITH_TXT_ArsenalMod | $LITH_TXT_ArsenalStan + +== SECRETMESSAGE | \cnA secret is revealed! + +== BGFLAT06 | ZZLITHBG +== BGFLAT11 | ZZLITHBG +== BGFLAT20 | ZZLITHBG +== BGFLAT30 | ZZLITHBG +== BGFLAT15 | ZZLITHBG +== BGFLAT31 | ZZLITHBG + +## Obituaries ----------------------------------------------------------------| +== OB_DEFAULT | + +== LITH_OB_S_FatMac | %o's shoulders fell off their mounts. +== LITH_OB_S_Explosion | %o made %hself go boom. + +== LITH_OB_Falling_1 | %o took a long walk off a short floor. +== LITH_OB_Falling_2 | The floor fell love with %o. +== LITH_OB_Falling_3 | %o became paste with the power of gravity. +== LITH_OB_Falling_4 | Goodbye, %o. +== LITH_OB_Falling_5 | %o doesn't like heights. + +== LITH_OB_Crush_1 | %o likes small spaces too much. +== LITH_OB_Crush_2 | %o had a crush on the ceiling. +== LITH_OB_Crush_3 | The ceiling fell in love with %o. +== LITH_OB_Crush_4 | Splat goes the %o. +== LITH_OB_Crush_5 | %o was crushed. + +== LITH_OB_Exit_1 | %o didn't realize the futility of %p actions. +== LITH_OB_Exit_2 | %o tried to get away. +== LITH_OB_Exit_3 | There's no leaving for you, %o. +== LITH_OB_Exit_4 | %o was ripped limb from limb by \cgme\c-. + +== LITH_OB_Drowning_1 | %o's lungs burst. +== LITH_OB_Drowning_2 | %o's brain lacked the oxygen to go on. +== LITH_OB_Drowning_3 | %o drowned. +== LITH_OB_Drowning_4 | %o won't be heard from again. +== LITH_OB_Drowning_5 | Better start looking for %o's body. + +== LITH_OB_Slime_1 | %o melted. +== LITH_OB_Slime_2 | %o's boots don't appreciate %h anymore. +== LITH_OB_Slime_3 | %o lost %p legs. +== LITH_OB_Slime_4 | %o stood in something bad. +== LITH_OB_Slime_5 | %o became goop. + +== LITH_OB_Fire_1 | %o fried to death. +== LITH_OB_Fire_2 | %o is burning with passion. Er, fire. %r dead. +== LITH_OB_Fire_3 | It'll be hard to tell if %o's corpse is %s. +== LITH_OB_Fire_4 | %o went up in flames. +== LITH_OB_Fire_5 | Smells like... %o. + +== LITH_OB_Suicide_1 | %o took the hard way out. +== LITH_OB_Suicide_2 | %o won a Darwin award. +== LITH_OB_Suicide_3 | %o took a permanent solution to a temporary problem. +== LITH_OB_Suicide_4 | %o imploded. +== LITH_OB_Suicide_5 | %o couldn't take it anymore. + +== LITH_OB_Default_1 | %o is ded +== LITH_OB_Default_2 | %o was perforated by a chaingunner hiding in the sky. +== LITH_OB_Default_3 | %o was removed from the board. +== LITH_OB_Default_4 | %o dehumanized %hself. +== LITH_OB_Default_5 | %o went poof. + +## Death Messages ------------------------------------------------------------| +== LITH_DEATHMSG_01 | YOU ARE DEAD, DEAD, DEAD +== LITH_DEATHMSG_02 | GAME OVER YEAAAAAAHHHHHHHHHHH +== LITH_DEATHMSG_03 | MAYBE YOU SHOULD TRY AN EASIER MAP, LIKE OKU. +== LITH_DEATHMSG_04 | PROTIP: DO NOT PUT YOUR HEALTH IN /TMP. +== LITH_DEATHMSG_05 | YHOLL WILL BE PLEASED WITH THIS TURN OF EVENTS. +== LITH_DEATHMSG_06 | THE SKELETONS KNOW. +== LITH_DEATHMSG_07 | SOMEWHERE IN THE HEAVENS, THEY ARE LAUGHING. AT YOU. +== LITH_DEATHMSG_08 | JESUS CHRIST AMAZING +== LITH_DEATHMSG_09 | CONTRACT TERMINATED. REASON: DIED, LOL. +== LITH_DEATHMSG_10 | PLS, EVEN I COULD HAVE SURVIVED THAT. +== LITH_DEATHMSG_11 | HAHAHAHA! +== LITH_DEATHMSG_12 | YOU SHOULDN'T HAVE DONE THAT. +== LITH_DEATHMSG_13 | WOW! LOOK AT THOSE DEMON FEET. +== LITH_DEATHMSG_14 | OUCH! THAT HAD TO HURT. +== LITH_DEATHMSG_15 | LOOK AT ME! I'M FLAT! +== LITH_DEATHMSG_16 | THANKS FOR PLAYING! +== LITH_DEATHMSG_17 | YOU LAZY @&$#! +== LITH_DEATHMSG_18 | HAVE YOU HAD ENOUGH? +== LITH_DEATHMSG_19 | THE DEMONS GAVE YOU THE BOOT! +== LITH_DEATHMSG_20 | AT LEAST YOU PLAY BETTER THAN KAISER! + +## Menus ---------------------------------------------------------------------| +== MENU_NGAME | * (New-Game) +== MENU_OPTION | * (Options) +== MENU_LOADG | * (Load-Game) +== MENU_SAVEG | * (Save-Game) +== MENU_UPDAT | * (Update-Notes) +== MENU_QUITG | * (Quit-Game) + +== MENU_CHOOSECLASS | Your Class Is: +== MENU_WHICHEPISODE | Your Story Is: +== MENU_CHOOSESKILL | Your Skill Is: + +== DIFF_TOURIST | > I'm just a tourist. +== DIFF_EASY | > Throw me a bone. +== DIFF_NORMAL | > Hurt me plenty. +== DIFF_HARD | > Ultra-Violence! +== DIFF_XHARD | > Watch me die! +== DIFF_NMARE | > Crazed Nightmare! + +%% LITH_SKILL_TOURIST +Are you certain? +This one is just amusing. + +%% LITH_SKILL_EXTRAHARD +Are you sure? +This one is extra hard. + +%% LITH_SKILL_NIGHTMARE +Are you sure? +This one isn't even remotely fair. + +== DOSY | (Press Y to quit.) +== PRESSYN | Press Y or N. +== PRESSKEY | Press a key. + +== TXT_YES | [Yes] +== TXT_NO | [No] diff --git a/filedata/Misc_Changes.txt b/filedata/Misc_Changes.txt new file mode 100644 index 0000000..be109d3 --- /dev/null +++ b/filedata/Misc_Changes.txt @@ -0,0 +1,492 @@ +## Updates -------------------------------------------------------------------| + +## Header format: +## \cf(\ciDate\cf) \cjFrom \cnOld\cj to \cfNew\cj: + +## Specifiers: +## Addition = \cd+ +## Changed = \cj| +## Removed = \cg- +## Subspace = \cb] + +%% LITH_TXT_UPDATE_1_5_3 +\cf(\ciNov. 22, 2017\cf) \cjFrom \cn1.5.2\cj to \cf1.5.3\cj: +\cd+ Added a player levelling system with 7 stats. +\cb] Monsters will scale to your level. +\cd+ Added palette flashes for picking up special items. +\cd+ Added a puff to homing SMG tracers. +\cd+ Added a separate animation for when phantoms escape. +\cd+ Added new explosive barrels. +\cd+ Added new pickup sprites for ammo and skull keys. +\cd+ Added a debug weapon. +\cd+ Added more quit messages. +\cd+ Added an idle sound to the Star Destroyer. +\cd+ Added compatibility for Cheogsh and Eternal Doom 4. +\cj| Changed maximum monster level from 100 to 150. +\cj| Increased game-over timer by 50 hours. +\cj| Made Modal Rifle not require a CBI upgrade. +\cj| Changed payout gain and tax. +\cj| Changed ammo pickup score multiplier. +\cj| Fixed selling weapons giving extra score. +\cj| Fixed the aspect ratio of HUD elements. +\cj| Made boss health easier to read while healthbars are disabled. +\cj| Improved performance in high-monster-density maps. +\cj| Improved GUI performance slightly. + +%% LITH_TXT_UPDATE_1_5_3_Page2 +\cj| Changed the default automap colors. +\cj| Replaced the small font and console fonts. +\cj| Made players not collide with eachother in multiplayer. +\cj| Fixed Cyber-Mage's magic selector breaking weapons in multiplayer. +\cj| Fixed pause-in-menus breaking stuff in multiplayer. +\cj| Fixed visual rank not being set properly on non-compatible enemies. +\cj| Fixed Heretic weapons not being replaced. +\cj| Fixed Phantoms turning into chickens breaking the confines of reality. +\cj| Fixed the size of Rend and the SMG's tracer bullets. +\cj| Fixed PauseManager sometimes crashing the VM. +\cg- Removed mana regeneration. + +%% LITH_TXT_UPDATE_1_5_2 +\cf(\ciSep. 4, 2017\cf) \cjFrom \cn1.5.1\cj to \cf1.5.2\cj: +\cj| Fixed function pointer errors on upgrade init. + +%% LITH_TXT_UPDATE_1_5_1 +\cf(\ciAug. 36, 2017\cf) \cjFrom \cn1.5\cj to \cf1.5.1\cj: +\cd+ Added an auto-save setting. +\cd+ Added an API, so external C code can access all of Lithium by +\cd LOADing lithmain. +\cd+ Added indicators for upgrades that work with eachother. +\cd+ Added a footstep sound setting. +\cd+ Added a view tilt setting. +\cd+ Added the Elec. Binding upgrade. +\cd+ Added the Shock Charge upgrade. +\cd+ Added the Stealth System upgrade. +\cd+ Added an active (HUD) debug level (0x02/log_devh). +\cd+ Added a new class selection screen. +\cd+ Added a new skill selection screen. +\cd+ Added a system for allowing Phantoms to spawn mid-level. +\cd+ Added magic selection animations. +\cd+ Added a world sprite for Hulgyon. +\cd+ Added a magazine drop setting. +\cd+ Added sprites for the CBI upgrades that had placeholder sprites. +\cj| Improved the SPAS' reload animation (thanks, Shivers!) +\cj| Improved the SMG's reload animation slightly +\cj| Improved the Combat Rifle's reload animation slightly +\cj| Fixed junk frames in Extra Hard enemies. + +%% LITH_TXT_UPDATE_1_5_1_Page2 +\cj| Fixed death exits adding a bunch of junk to the upgrades menu. +\cj| Fixed the "resurrect" cheat not working. +\cj| Fixed the SPAS description listing the wrong capacity. +\cj| Made Romyetya and Blade do more damage with Berserk. +\cj| Changed the way magic selection works, so closing the menu will select. +\cj| Moved source code out of the packaged file. +\cj| Changed the compression from 7-zip to Zip, due to performance issues. +\cj| Made the Ion Rifle allow switching while reloading. +\cj| Buffed the SPAS. +\cj| Reduced the ammo taken by the Pulse Charger. +\cj| Made the Overloader upgrade un-scope when firing. +\cj| Changed the settings menu slightly. +\cj| Made Performance Rating more transparent for Cyber-Mage. +\cj| Made dialogue/terminal text log to the console. +\cj| Made Feuer not flash the screen when firing. +\cj| Re-balanced Cyber-Mage's weapon upgrade prices. +\cj| Fixed malignant null pointer dereferences. +\cj| Rewrote James' defeat message. +\cg- Removed the trail from Delear's world sprite. +\cg- Removed Score Golf mode + +%% LITH_TXT_UPDATE_1_5 +\cf(\ciAug. 25, 2017\cf) \cjFrom \cn1.5 beta\cj to \cf1.5\cj: +\cd+ Added the remaining Methods: +\cb] Blade, slot 1 - small slash, basic melee +\cb] Feuer, slot 3 - fires out two fireballs +\cb] Delear, slot 2 - fires out 16 projectiles in succession +\cb] Romyetya, slot 4 - rapid slashing attacks +\cb] Hulgyon, slot 5 - fires pillars of energy infront of you +\cb] Hosh'danma, slot 6 - violently fires out a bunch of stars +\cb] Cercle de la Mort, slot 7. +\cd+ Added the remaining upgrades. Go figure those out yourself I'm tired. +\cd+ Added the Shock Rifle, slot 3 Cyber-Mage weapon. +\cd+ Added all the intermission screen stuff. +\cd+ Added pickup sprites for Cyber-Mage. +\cd+ Added sprites for the Ion Rifle. +\cd+ Added new menus! All of them! Really, launch the game! THEY'RE COOL THANK YOU JIMMY +\cd+ Added the Ghost GUI theme. +\cd+ Added the Bassilla GUI theme (thanks, Shivers and Kurashiki!) +\cd+ Added in-game changelog. +\cd+ Added missing info pages. +\cd+ Added new info pages. +\cd+ Added the rest of Cyber-Mage's mail. +\cd+ Added messages when defeating phantoms. + +%% LITH_TXT_UPDATE_1_5_Page2 +\cd+ Added an animation when the SMG overheats. +\cd+ Added an armor type indicator to Cyber-Mage's HUD. +\cd+ Added more pickup sounds. +\cd+ Added Cyber-Mage's Charge Fist sprites. +\cj| Fixed death exits not deinitializing stuff properly. +\cj| Made Star Shot take less mana. +\cj| Fixed weird UDMF maps breaking things. +\cj| Made air-sliding usable when the jet booster is uncharged. +\cj| Improved the way rain audio is handled. +\cj| Made item glow specific to class. +\cj| Improved performance when using ZScript. +\cj| Separated ammo/magazine counting on the HUD. +\cj| Changed the log color for Cyber-Mage. +\cj| Improved the way mail messages and environment settings are handled. +\cj| Made the laser rifle trail prettier. +\cj| Changed the way the Star Destroyer targets enemies, making it even more deadly. +\cj| Fixed the log being positioned wrong for Cyber-Mage. +\cj| Raised the base difficulty to 10. +\cj| Slightly nerfed the Sniper Rifle. +\cj| Made Barons never infight with Knights. +\cj| Fixed some info pages never being unlocked. +\cj| Increased the Missile Launcher's damage. + +%% LITH_TXT_UPDATE_1_5_Page3 +\cj| Slightly changed the SMG's draw sound. +\cj| Moved the TITLEMAP to the doom2 filter, so it won't make some games unplayable. +\cj| Made rain effects better (thanks, Kate!) +\cj| Fixed some ZScript event handler bugs. +\cj| Optimized enemy barrier display, improving performance a ton on huge maps. +\cj| Changed the font on settings menu headers. +\cj| Fixed homing rockets having the wrong sprite when spawning. +\cj| Made mana pickups rainbow-y. +\cj| Fixed a bunch of errors in the boss code. Whoops. +\cj| Made the Finalizer upgrade stronger. +\cj| Made Finalizer deal damage on hit. +\cj| Made Finalizer disintegrate enemies when killed. +\cj| Fixed Hell Knight attack frames. +\cj| Made the monster tracker allocate into a different adderess space. (This is faster.) +\cj| Improved performance slightly in some trigonometry-heavy areas. +\cj| Fixed CBI items being installable twice. +\cj| Made damage bobbing a bit smoother. +\cj| Made the enemy checker simpler and more robust. +\cj| Fixed Delear taking too much Mana. +\cj| Fixed shop weapons not being given correctly. +\cj| Probably fixed some crashing. Probably. + +%% LITH_TXT_UPDATE_1_5b +\cf(\ciJul. 17, 2017\cf) \cjFrom \cn1.5 alpha 2\cj to \cf1.5 beta\cj: +\cd+ Enemies now have a level and rank, which determine their health +\cd and resistances, et al. +\cd+ Added 3 spells for Cyber-Mage: Delear, Hulgyon and Star Shot. +\cd+ Added a spell selection menu. +\cd+ Added Mana. +\cd+ Added support for monster mods that don't account for Lithium. +\cd+ Added extra support for Colorful Hell. +\cd+ Added new upgrades for Cyber-Mage, half of which are +\cd not implemented yet. The implemented ones include: +\cb] Soul Cleaver +\cb] Finalizer +\cb] SMG Trimag +\cb] Seeker Rounds +\cb] Safety System +\cb] Longinus Solspear +\cj| Improved the settings menu. +\cj| Fixed extremely terrible balance issues. +\cj| Fixed rain only spawning in your line of sight. +\cj| Fixed horrible performance issues with the pause-in-menus setting. +\cj| Made weapon pickup sounds play when selling the weapon. +\cj| Made the Star Destroyer sound slightly nicer in OpenAL. + +%% LITH_TXT_UPDATE_1_5b_Page2 +\cj| Made the Combat Rifle never auto-aim. +\cj| Fixed the Barrier powerup not displaying stacked uses properly. +\cj| Made the Spider Mastermind slightly more dangerous. +\cj| Made the SPAS reload faster. +\cj| Made the upgrades screen prettier. +\cd+ Re-added Heretic support. +\cd+ Added a "log ammo pickups" setting. +\cd+ Added more info pages. +\cd+ Added more unique pickup sounds. +\cd+ Added a "no item effects" setting. +\cd+ Added a pickup sprite for Cyber-Mage's shotgun. +\cj| Decreased memory usage. +\cj| Made the Charge Fist not suck, thanks to Yholl. +\cj| Made the Vital Scanner an implicit upgrade, as it is now necessary. +\cj| Made the Ion Rifle reload automatically on its final shot. +\cj| Fixed upgrades being updated while the game is paused. +\cj| Made the Star Destroyer's projectile smaller. +\cj| Fixed infinite noise emittance with sv_weaponstay on. +\cd+ Added new endings for both player classes. +\cd+ Added more debugging settings. +\cd+ Added something. +\cg- Removed the slide indicator from the HUD + +%% LITH_TXT_UPDATE_1_5a2 +\cf(\ciJul. 7, 2017\cf) \cjFrom \cn1.5 alpha\cj to \cf1.5 alpha 2\cj: +\cj| Fixed pausing weapons being caused from external sources +\cj (which broke the adrenaline upgrade completely.) + +%% LITH_TXT_UPDATE_1_5a +\cf(\ciJul. 7, 2017\cf) \cjFrom \cn1.4\cj to \cf1.5 alpha\cj: +\cd+ Added searching to the info panel. +\cd+ Added an adrenaline indicator to the HUD. +\cd+ Added a test map (named TESTMAP). +\cd+ Added some environment/ambience settings. +\cd May act slightly weird sometimes. +\cd+ Added map spawn IDs for stuff. +\cd+ Added a No Bosses CVar (lith_sv_nobosses). +\cd+ Added dialogue and terminal systems. Don't ask. +\cd+ Added 007 Mode extra upgrade. +\cd+ Added behaviour for several Extra Hard enemies. +\cj| Fixed some rather major bugs. +\cj| Merged extras addon with the main mod. +\cb] ZScript is auto-detected, so it only enables ZScript-only features +\cb when available. +\cb] The mod still mainly targets ZDoom 2.8.1, however running it in newer +\cb GZDoom versions is now stable and will give you extra features. +\cj| Fixed a lot of spelling errors. +\cj| Made the HUD weapon numbers change color when you have more +\cj weapons in that slot. +\cj| Fixed the Spider Mastermind not being terrifying enough. +\cj| Made the rifle clickier as it runs out of ammo. + +%% LITH_TXT_UPDATE_1_5a_Page2 +\cj| Compressed some sounds, reducing the overall file size. +\cj| Fixed some weird balance issues. +\cj| Fixed chaingunners using the wrong sound. +\cj| Replaced slider ticking sound to be less terrible. +\cj| Changed the ground hit sound for the Move Wetware upgrade. +\cj| Fixed bought upgrades actually not giving the right upgrade +\cj sometimes. WHOOPS +\cj| Decreased the price of extra upgrades to be slightly more obtainable. +\cj| Fixed pause in menus not pausing weapon states. +\cg- Removed autogroups due to their hard-to-maintain nature. May add +\cg them back in 1.5 beta in some way. +\cg- Removed heretic support. 2hard4me +\cd+ Added fun + +%% LITH_TXT_UPDATE_1_4 +\cf(\ciApr. 14, 2017\cf) \cjFrom \cn1.3.1\cj to \cf1.4\cj: +\cd+ Added Phantoms. +\cd+ Added a CBI upgrades/performance system. +\cd+ Added GUI themes. +\cd+ Added a Plasma Pistol upgrade. +\cd+ Added a Particle Beam upgrade. +\cd+ Added a Laser Rifle upgrade. +\cd+ Added a Homing Rocket upgrade. +\cd+ Added new sprites for the Gauss Rifle. +\cd+ Added a Quick Knife buttom. +\cd+ Added a mail system. +\cd+ Added LegenDoom Lite compatibility. +\cd+ Added a score golf mode. +\cd+ Added a teleport-in-items setting. +\cd+ Added a bright weapon pickups setting. +\cd+ Released Extras addon. +\cd+ Released Damage Bob Only mod. +\cd+ Added filtering to the upgrades screen. +\cj| Improved the Upgrades screen. +\cj| Fixed performance issues with the Settings screen. +\cj| Replaced the HUD's background color with black. +\cj| Made the SSG faster, and stronger. + +%% LITH_TXT_UPDATE_1_4_Page2 +\cj| Fixed the Combat Rifle and Sniper Rifle not actually being hitscan. +\cj| Gave Hell Knights/Barons and Cacodemons proper blood colors. +\cj| Re-fixed shop buy messages logging wrong. +\cj| Added the Charge Fist to the shop. +\cj| Fixed some of the info pages. +\cj| Fixed weapon pickups murdering framerate while the level is frozen. +\cj| Fixed the Laser Shotgun not resetting pitch all the way. +\cj| Fixed CVarInfo error under certain games. +\cj| Made weapon pickups look better in OpenGL. +\cj| Fixed weapon pickups breaking in maps with specials attached +\cj to weapons. +\cj| Buffed the Charge Fist. +\cj| Replaced bullet pickup graphics. +\cj| Added a noise when getting hit with Reactive Armor protection. +\cj| Improved the readability of info pages with images. +\cj| Decreased the backpack discount percentage. +\cj| Moved the Settings screen to the BIP. +\cj| Moved keys on the HUD to the top of the screen. +\cj| Fixed obituary messages with the Instant Death downgrade. +\cj| Slightly rebalanced score given by enemies. +\cg- Removed fun +\cd+ Definitely did not add evil gost. + +%% LITH_TXT_UPDATE_1_3_1 +\cf(\ciMar. 16, 2017\cf) \cjFrom \cn1.3\cj to \cf1.3.1\cj: +\cj| Fixed maps with ACS scripts in them occasionally causing +\cj reality to collapse. +\cj| Gave the charge fist a better animation and range. +\cj| Fixed resurrected enemies not getting poisoned. +\cj| Increased shell ammo to 60. +\cd+ Added a setting for cursor speed. + +%% LITH_TXT_UPDATE_1_3 +\cf(\ciMar. 16, 2017\cf) \cjFrom \cn1.2\cj to \cf1.3\cj: +\cj| Rebalanced a lot of stuff, mainly weapons and score amounts. +\cj| Made the cannon a lot easier to use. +\cj| Redid the GUI a bit. Mainly, stretched it from 320x200 to 320x240. +\cj| Improved scrollbars significantly. +\cj| Re-did the heads up display. +\cd+ Added Auto-Groups, which let you quickly toggle or buy upgrades, +\cd as well as auto-buy them. +\cd+ Added the Super Shotgun. +\cd+ Added the Missile Launcher. +\cd+ Added the Charge Fist (replaces chainsaw.) +\cd+ Added a pickup sprite for the Omega Cannon. +\cd+ Added a Poison Shotgun upgrade. +\cd+ Added indicators for mode changes/current mode of the reactive +\cd armor upgrade. +\cd+ Added a display for current score multiplier on the upgrades screen. +\cd+ Added a setting for clearing the combat rifle's mode when +\cd switching weapons. +\cd+ Added a setting for hiding the log. +\cd+ Added a setting for drawing the log from the top of the screen. +\cd+ Added settings for the Vital Scanner upgrade. +\cd+ Added enemy compatibility checker. + +%% LITH_TXT_UPDATE_1_3_Page2 +\cd+ Added a titlemap and title music. +\cd+ Added (badly written) intermission texts. +\cd+ Added a pretty loading screen. +\cd+ Added missing info pages. +\cd+ Added info pages for enemies, some companies I forgot to mention, +\cd and new places. +\cd+ Added an implicit upgrade for zooming in on stuff. +\cd+ Added serious mode. +\cj| Polished the upgrades panel. +\cj| Polished the info panel. +\cj| Made the Move Wetware's ground stomp actually useful. +\cj| Made sold weapon messages more descriptive. +\cj| Fixed sold weapon prices being wrong. +\cj| Fixed bad wording in a lot of the info pages. +\cj| Fixed bad wording in some upgrade descriptions. +\cj| Fixed GUI sliders being wonky. +\cj| Fixed the sniper rifle making things fly into oblivion. +\cj| Made the vital scanner freak out on strong enemies. +\cj| Fixed Auto Reload not having a description. +\cj| Fixed the pistol's info page. +\cj| Fixed the arachnotron/spider mastermind names being wrong. +\cj| Changed some miscallaneous text. + +%% LITH_TXT_UPDATE_1_3_Page3 +\cj| Improved the way the Adrenaline upgrade works. +\cj| Fixed items being picked up too much. +\cj| Fixed score multiplier not being applied occasionally. +\cj| Made the Punctuator Cannon take more ammo. +\cj| Nerfed the reactive armor upgrade. +\cj| Fixed rockets acting weird at certain angles. +\cj| Made the Vital Scanner upgrade cheaper. +\cg- Removed some items from the shop. + +%% LITH_TXT_UPDATE_1_2 +\cf(\ciFeb. 1, 2017\cf) \cjFrom \cn1.1\cj to \cf1.2\cj: +\cd+ Added logos for companies in the BIP +\cd+ Added a log tab to the CBI for showing things you've done or used +\cd+ Added lith_player_scorelog for logging any score you gain to the HUD +\cd+ Added Heretic support +\cd+ Added new pickup sprites for the shotgun, plasma rifle and combat rifle +\cd+ Added a Revolver weapon to the shop +\cd+ Added new skill definitions - tourist, easy, normal, hard, extra hard, +\cd and nightmare +\cd+ Added an automatic pistol upgrade +\cd+ Gave the grenade launcher an actual grenade firing altfire +\cd+ Added a Vital Scanner upgrade, which lets you see an enemy's health +\cd and the damage you deal to them +\cd+ Added a new debugging cvar +\cd+ Added a payout system, where you get paid based on percentages +\cd when you beat a level or hub +\cd+ Added an Auto Reload upgrade, which loads your guns for you while +\cd they're not selected +\cd+ Added a Laser Shotgun weapon to the shop +\cd+ Added a Sniper Rifle weapon to the shop +\cd+ Added a knife which replaces the fist +\cd+ Added menu sounds and a smallfont replacement + +%% LITH_TXT_UPDATE_1_2_Page2 +\cj| Made the pistol do more damage +\cj| Probably fixed more crashes +\cj| Made combat rifle spit blood better +\cj| Made the cannon a bit easier to aim +\cj| Fixed revenant missiles changing state when adrenaline is activated +\cj| Fixed all the crashes ever probably +\cj| Changed the pistol's capacity to 14 rounds instead of 7 +\cj| Moved murderous enemies to the Extra Hard skill +\cj| Fixed not being able to pick up weaons sometimes +\cj| Made the pistol, rocket launcher and shotgun's firing animations better +\cj| Fixed the spiral rocket attack not being strong enough and not doing +\cj damage to Cyberdemons +\cj| Gave the Gauss Rifle 5 extra rounds +\cj| Fixed scopes being offset wrong +\cj| Buffed the rocket launcher's attacks +\cj| Nerfed the shotgun's attacks +\cj| Fixed the barrier powerup acting weirdly sometimes +\cj| Fixed flashes not showing up on players in co-op +\cj| Reduced file size by compressing music +\cj| Made the punctuator cannon's attacks pitchable +\cj| Buffed bosses quite a bit +\cj| Buffed some weapons + +%% LITH_TXT_UPDATE_1_1 +\cf(\ciJan. 19, 2017\cf) \cjFrom \cn1.0\cj to \cf1.1\cj: +\cd+ Added an indicator for weapons that take ammo and ones that have +\cd magazines +\cd+ Added reloading to the rifle, which now has a 40-round magazine that +\cd must be reloaded but doesn't take ammo +\cd+ Added the Defensive Mini Nuke upgrade +\cd+ Made the player explode on death in singleplayer, togglable +\cd with lith_sv_revenge +\cd+ Gave grenades a small smoke trail +\cd+ Added weapon readying sounds to the Former Human and Former +\cd Sergeant +\cd+ Added the Adrenaline Injector upgrade +\cd+ Moved the HUD into an upgrade, so it can be disabled (also gives you +\cd extra score) +\cd+ Gave the Mancubus a new attack +\cd+ Gave the Cyberdemon a new attack +\cd+ Added powerups to the shop +\cd+ Added a score multiplier view to the upgrades shop so you can see +\cd what gives how much +\cd+ Added the Instant Death downgrade +\cd+ Added reloading to the Gauss Shotgun (now Gauss Rifle), which has a +\cd 10-round magazine + +%% LITH_TXT_UPDATE_1_1_Page2 +\cd+ Added a settings page to the CBI which lets you set up CVars +\cd+ Gave the Hell Knight a new attack +\cd+ Gave the Omega Cannon new sprites, new effects and better balance +\cd+ Added the Reactive Armor 2 upgrade +\cd+ Added the Omega Railgun upgrade! +\cd+ Gave the Shotgun new sprites/animations by Sgt. Shivers +\cd+ Gave the Megasphere and Soulsphere new sprites +\cd+ Added a custom Teleport Fog effect +\cd+ Gave the Baron of Hell a new attack +\cd+ Made the Blur Sphere into a Barrier powerup +\cd+ Added fun +\cj| Fixed the laser rifle making too many particles, destroying FPS (sadly +\cj it doesn't look as nice anymore) +\cj| Fixed a potential script overrun in the first tic that could cause +\cj weird bugs +\cj| Fixed deselecting the Punctuator Cannon while scoped breaking things +\cj| Fixed the Blue Skull Key giving a wrong pickup message +\cj| Made inputs a bit snappier +\cj| Improved scope visuals +\cj| Fixed enemies not giving score on XDeath +\cj| Changed the price of Torgue Mode + +%% LITH_TXT_UPDATE_1_1_Page3 +\cj| Changed the amount of score the base upgrades take, making it easier +\cj to obtain score +\cj| Improved GUI behaviour +\cj| Fixed powerups not having the correct sound +\cj| Improved the Charge Launcher description +\cj| Nerfed the Gauss Rifle and the Combat Rifle further +\cj| Made the Charge Launcher better +\cj| Tweaked prices on upgrades +\cj| Fixed cannon explosion sounds sometimes not playing +\cj| Nerfed the Reactive Armor +\cj| Probably fixed a ton of crashes +\cj| Fixed there not being a space inbetween pickup messages and the +\cj forward arrow +\cj| Fixed a bunch of things not alerting monsters +\cj| Fixed inconsistencies log messages +\cj| Made the scope on the Combat Rifle's burst fire mode optional (disabled +\cj by default) +\cj| Fixed the Lost Souls giving too much Score +\cj| Added Thing ID validation to the player, which should possibly fix more +\cj advanced ZDoom maps breaking diff --git a/filedata/Misc_Opener.txt b/filedata/Misc_Opener.txt new file mode 100644 index 0000000..833b876 --- /dev/null +++ b/filedata/Misc_Opener.txt @@ -0,0 +1,17 @@ +1626, New Era. + +A revelation in multiverse theory: Proof of other universes existing within the same dimension of time as our own universe. + +Finally explaining the odd artifacts which had been found throughout the new era, the researchers involved were to be awarded for their immense discovery, but soon after disappeared all at once. + +Twenty years later, 1649 N.E. + +Communications with these scientists have been re-established, and after investigation by the computer mega-corp Optic Fiber Maxim-Danil, they have been found to be no more than a red mist floating in space. + +The planetary system's central star had become a hole of darkness, emitting massive amounts of unknown magical energy. + +A hole which has begun spitting out demons. + +A portal to Hell itself. + +May those who attempt to stop it have godspeed, or Lithium shall forever rain from the skies. diff --git a/filedata/Misc_QuitMessages.txt b/filedata/Misc_QuitMessages.txt new file mode 100644 index 0000000..c02594d --- /dev/null +++ b/filedata/Misc_QuitMessages.txt @@ -0,0 +1,252 @@ +## Quit Messages -------------------------------------------------------------| +== QUITMSG1 | Hold it, your contract isn't complete yet! +== QUITMSG2 | I got nothing. +== QUITMSG3 | Leave before I make you leave! +== QUITMSG4 | Super, now I can get back to emitting bees at your house! +== QUITMSG5 | Look at this wuss! +== QUITMSG6 | I'm rooting for you whichever way you go! +== QUITMSG7 | Exit? +== QUITMSG8 | Wait, there's a youkai waiting for you at the exit! +== QUITMSG9 | Get outta here, and get me some money too. + +%% QUITMSG10 +Wait, don't go! +I still have to sell you the expansion pack! + +%% QUITMSG11 +There are still explosions to be had, +are you really sure? + +%% QUITMSG12 +Get out! Get out! +Go and do your job! + +%% QUITMSG13 +If you leave, I'll personally +send pizzas to your doorstep. + +%% QUITMSG14 +C'mon, +just 5 more minutes? + +%% QUITMSG15 +HEY +HEY +DIE + +== QUITMSG16 | Villain!! What color is your blood!! + +%% QUITMSG17 +The Omega Cannon was created in a swamp dimension by +an insane lizard-man who lusted for murder. +How it got here is a mystery. + +%% QUITMSG18 +Jeremy Stilko, Cyber-Mage, is blind, but can see +thanks to cybernetics. The profile image he has +is unusual in that he doesn't have a blindfold on. + +%% QUITMSG19 +Cyber-Mage's weapon pickups look retro due to +limitations in his bootleg space reformation wetware. + +== QUITMSG20 | Marine's Sniper Rifle was formerly his service weapon. + +%% QUITMSG21 +The English language diversified in the past +thousand years, splitting into dozens of dialects. +The most common are Eastern and Northwest English. + +== QUITMSG22 | The Ensurer watches over all. + +%% QUITMSG23 +The Star Destroyer's hum is a product of the +energy buffer on its top channeling sound +through the main hull of the gun, which may +prove the existence of a fifth dimension. + +%% QUITMSG24 +The amount of wetware jammed into Cyber-Mage's +brain is not healthy for anyone. + +%% QUITMSG25 +Marine was previously a gun collector, but stopped +after regulations passed regarding personal defense +weaponry in the military. + +%% QUITMSG26 +The Shock Rifle was previously used for hunting, +famed for its great power and ease of use. +Before it was stripped down and modified, anyway. + +%% QUITMSG27 +Rumors have spread of similarities between the +phantoms haunting Hell and tales of past heroes. + +%% QUITMSG28 +Within the week there will be OLD MEN, +RUNNING THE WORLD, if you quit. + +%% QUITMSG29 +On the planet Durla Prime, onesuch being exists whose +only true name is "King Crimera Haxfucker." + +== QUITMSG30 | AAAGH +== QUITMSG31 | wan + +%% QUITMSG32 +hellote i been looking at the sources what dont tell me how do i made a BSP grenades +like it is regular grenades but when you make explode it deform bsp tree into shrub + +== QUITMSG33 | ~text interface terminal malfunction error ~2992dud +== QUITMSG34 | Internet pornography. +== QUITMSG35 | if god is everywhere, then that means he's in this quit message and he needs to get the fuck OUT +== QUITMSG36 | Now if you'll excuse me, I need to go die to the Soviet Union. + +%% QUITMSG37 +The Charge Fist uses pneumatics to launch +your fist forward, via advanced cybernetics. + +== QUITMSG38 | Can you at least offer weak opposition to exiting? + +%% QUITMSG39 +BORN TO CRASH +ZDoom is a fuck +410,757,864,530 SCRIPT ERRORS + +== QUITMSG40 | GET OUT +== QUITMSG41 | do-it.wad +== QUITMSG42 | You'll do whatever it takes to get the JooJ done right, right? +== QUITMSG43 | La la lai la, la la lai la, la la lai la lai lai laa +== QUITMSG44 | You dare defy ME? +== QUITMSG45 | At this journey's end, where does one go but to a DOS prompt? +== QUITMSG46 | I bet you'll come back for more. I know it. + +%% QUITMSG47 +AFTER 3000 YEARS I AM FREE! +DO YOU DARE QUIT AND LEAVE +THE FATE OF THE WORLD IN MY HANDS? + +== QUITMSG48 | Quitting? What are you, a NERD? +== QUITMSG49 | Master, your orders? +== QUITMSG50 | Off to go play [insert game here], I see. +== QUITMSG51 | Did you select the wrong menu option? +== QUITMSG52 | This is all just a dream. + +%% QUITMSG53 +This mod is just riddled with unsupported bytecode, +you better get out of here before it blows. + +== QUITMSG54 | See you, space cowboy. +== QUITMSG55 | FUCKING NINJAS STABBING LESBIAN NUNS +== QUITMSG56 | Will you give your Door of Truth to me? +== QUITMSG57 | You press Y. I'll be waiting. +== QUITMSG58 | Engarde, fuckboy. +== QUITMSG59 | If you quit, I will unleash the skeleton inside you. +== QUITMSG60 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAA +== QUITMSG61 | GMOTA never +== QUITMSG62 | :thinking: +== QUITMSG63 | nyu~ +== QUITMSG64 | Hey, Ron! Can we say 'fuck' in the game? + +%% QUITMSG65 +I'd leave - this is just more monsters and Score. +What a load. + +== QUITMSG66 | Trust us now, it's time to let go. + +%% QUITMSG67 +Enter the maze through your reflection, +we have to follow through a new connection. + +== QUITMSG68 | YOU MEAN THIS GUY JUST QUITS WHEN HE WANTS?????? +== QUITMSG69 | [smooth saxophone plays] + +%% QUITMSG70 +hetlo it is me of the durdandle i hav +come to tell u that if u quit i will +exit the universe and punch you through +deep non-existence thank for cooperate + +== QUITMSG71 | Press Y to BECOME THE BEAST YOU WORSHIP. +== QUITMSG72 | Fuck, fucking cock. + +%% QUITMSG73 +hello hacker fucker +this is marble +heres the deal. +if you hack this mod +i will find you +where ever you are +and break your legs +and thats a promise + +== QUITMSG74 | Detonating in 5... 4... 3... 2... +== QUITMSG75 | Look, bub. It's my way, or the highway. + +%% QUITMSG76 +| || +|| |_ + +== QUITMSG77 | AOHA PZ TVZA LEJLSSLUA +== QUITMSG78 | In modern times, Japanese pornography is hard to come by. +== QUITMSG79 | Hey! Who's in charge here? + +%% QUITMSG80 +If you leave, The Third Impact will become inevitable. +Are you sure? + +== QUITMSG81 | Wait! The Wood Cube is going to drop! + +%% QUITMSG82 +The Norwegians are leaving! The Norwegians are leaving! +The Norwegians are leaving! The Norwegians are leaving! + +== QUITMSG83 | Saotome. Sukida. +== QUITMSG84 | Throw yourself into the pit of Crest Worms? + +%% QUITMSG85 +the way grows + dim + +hungry chaos lurks behind the +bright corona + +dream ahead beyond the falling path +a billion S'pht lie yet unborn + +our own death fortold + +your dark mind cutting through +the deeping sky + +another time +another time + +== QUITMSG86 | Return to the wheat? +== QUITMSG87 | Gotta keep it together y'all, 'cus it's about time. +== QUITMSG88 | You leave, you give me your Yanagi card. + +%% QUITMSG89 +Water, 35 liters; carbon, 20 kilograms; +ammonia, 4 liters; lime, 1.5 kilograms; +phosphorus, 800 grams; salt, 250 grams; +saltpeter, 100 grams, and various other stuff. + +== QUITMSG90 | I've seen 'em come, I've seen 'em go. +== QUITMSG91 | WINNERS DON'T PRESS Y +== QUITMSG92 | Hand over the Platinum Chip? +== QUITMSG93 | Destroy Liberty Prime? +== QUITMSG94 | Press the Red Button? +== QUITMSG95 | The Zone awaits... + +%% QUITMSG96 +The suspense is killing me! +Just do it already! + +== QUITMSG97 | If you quit, you will never become THE COPPER MAN. +== QUITMSG98 | >stops in mid flow to sip his tea +== QUITMSG99 | bepis +== QUITMSG100 | Crungy Spimmy: Back 2 Tha Source: Wrong Number: Remastered Edition: Featuring Jungo from Chummy Tuungle 3: Lord of the Flies: Special Edition: Featuring Exclusive Grimbo and Hat DLC: Expansion Pack: Electronic Knucle Scrungus Mod: Day 1 Edition [Early Access] Only on PS4: Steam Greenlight Approved: The Long Lost Tale of the Gringledop Boopledonger: Frodus Poster Pack: HTC Vive Support Enabled: (BUY ROCKBAND MICROPHONE AND DRUMSET TO EXPAND YOUR BAND): "Every Chimmbus Eases the Pain" Extended Digital Special Edition: What's Under Double D's hat in Ed Edd 'n' Eddy? The Game Theory: Way If We Pees Form Butts?: Featuring Dongle Flopperdinglebop from the Fun Truungledinge Lost Tale of the Gringledop Boopledonger Series 2: Super Mega Edition: Redial: Featuring a Free Comic About Grimbo's Quest for the Humbusdoob: Ultra Edition: Bumbicop Statue With Real Chimmbus Action: Fire Red Version: Dream Drop Distance: Subsistence: See Inside: Crungy Spimmy and the Gringle Spingle Limited Edition Comic Series Cereal Box: The Movie: The Game +== QUITMSG101 | die +== QUITMSG102 | Aw, dude. There's still so many demons to kill. Don't leave me here with them. diff --git a/filedata/_Directory.txt b/filedata/_Directory.txt new file mode 100644 index 0000000..a8fd39f --- /dev/null +++ b/filedata/_Directory.txt @@ -0,0 +1,6 @@ +This is a list of unprocessed text to be processed into LANGUAGE by compilefs. + +in directory ../pk +include _Directory_Main.txt + +EOF diff --git a/filedata/_Directory_Main.txt b/filedata/_Directory_Main.txt new file mode 100644 index 0000000..b4749a7 --- /dev/null +++ b/filedata/_Directory_Main.txt @@ -0,0 +1,76 @@ +-- Info Pages ----------------------------------------------------------------- +in file language.info.corporations.en.txt +parse file: Info_Corporations.txt + +in file language.info.enemies.en.txt +parse file: Info_Enemies.txt + +in file language.info.places.en.txt +parse file: Info_Places.txt + +in file: language.info.yourself.en.txt +parse file: Info_Yourself.txt + +in file language.info.upgrades.en.txt +parse file: Info_Upgrades.txt + +in file language.info.weapons.en.txt +put data: sord -> LITH_TXT_INFO_SHORT_Sword +put data: Game Nanhai -> LITH_TXT_INFO_SHORT_Gameboy +put data: Spell Selector -> LITH_TXT_INFO_SHORT_CFist +put data: Knife -> LITH_TXT_INFO_SHORT_Fist + +parse file: Info_Weapons_Outcasts.txt +parse file: Info_Weapons_CyberMage.txt +parse file: Info_Weapons_Marine.txt + +comment: EOF + +in file language.info.omake.en.txt +parse file: Info_Extra.txt + + +-- CBI Mail ------------------------------------------------------------------- +in file language.info.mail.en.txt + +put file: Mail/Template.txt -> LITH_TXT_MAIL_TEMPLATE + +include _Mail.txt + + +-- CBI Pages ------------------------------------------------------------------ +in file language.arsenal.en.txt +parse file: Arsenal_Shop.txt +parse file: Arsenal_Upgrades.txt + +comment: EOF + + +-- Dialogue ------------------------------------------------------------------- +in file language.info.dialogue.txt +put file: Dialogue_TESTMAP.txt -> LITH_DLG_SCRIPT_TESTMAP +put file: Dialogue_M1A1.txt -> LITH_DLG_SCRIPT_M1A1 +put file: Dialogue_M1A2.txt -> LITH_DLG_SCRIPT_M1A2 + + +-- Misc ----------------------------------------------------------------------- +in file language.log.en.txt +parse file: Log.txt +parse file: Log_Pickups.txt + +comment: EOF + +in file language.misc.en.txt +parse file: Misc.txt +parse file: Misc_QuitMessages.txt +parse file: Misc_Changes.txt +put file: Misc_Opener.txt -> LITH_TXT_OPENER + +comment: EOF + +in file language.bipinfo.txt +put file: BIPInfo.txt -> LITH_BIPINFO + +comment: EOF + +EOF diff --git a/filedata/_Mail.txt b/filedata/_Mail.txt new file mode 100644 index 0000000..02c6f3a --- /dev/null +++ b/filedata/_Mail.txt @@ -0,0 +1,73 @@ +The flags for mail messages are as follows: +bit 1 - Does not print a message when received +bit 2 - Message is the same for all player classes + +put data: 1 -> LITH_TXT_MAIL_FLAG_Intro +put data: 2 -> LITH_TXT_MAIL_FLAG_JamesDefeated +put data: 2 -> LITH_TXT_MAIL_FLAG_MakarovDefeated +put data: 2 -> LITH_TXT_MAIL_FLAG_IsaacDefeated + +-- All Classes ---------------------------------------------------------------- +put file: Mail/Phantom_James.txt -> LITH_TXT_MAIL_BODY_JamesDefeated +put data: jam0s@g0n0j0t00.1025 -> LITH_TXT_MAIL_SEND_JamesDefeated + +put file: Mail/Phantom_Makarov.txt -> LITH_TXT_MAIL_BODY_MakarovDefeated +put data: mak666v@org.r\.\\\- -> LITH_TXT_MAIL_SEND_MakarovDefeated + +put file: Mail/Phantom_Isaac.txt -> LITH_TXT_MAIL_BODY_IsaacDefeated +put data: isaac@syn.400khz -> LITH_TXT_MAIL_SEND_IsaacDefeated + +-- Marine --------------------------------------------------------------------- +put file: Mail/Intro_Marine.txt -> LITH_TXT_MAIL_BODY_IntroStan +put data: ALambert@corp.OFMD -> LITH_TXT_MAIL_SEND_IntroStan +put data: 13:00 25-7-49 -> LITH_TXT_MAIL_TIME_IntroStan +put data: 610 -> LITH_TXT_MAIL_SIZE_IntroStan + +put file: Mail/Cluster1_Marine.txt -> LITH_TXT_MAIL_BODY_Cluster1Stan +put data: ALambert@corp.OFMD -> LITH_TXT_MAIL_SEND_Cluster1Stan + +put file: Mail/Cluster2_Marine.txt -> LITH_TXT_MAIL_BODY_Cluster2Stan +put data: ALambert@corp.OFMD -> LITH_TXT_MAIL_SEND_Cluster2Stan + +put file: Mail/Cluster3_Marine.txt -> LITH_TXT_MAIL_BODY_Cluster3Stan +put data: ALambert@corp.OFMD -> LITH_TXT_MAIL_SEND_Cluster3Stan + +put file: Mail/Intro2_Marine.txt -> LITH_TXT_MAIL_BODY_PhantomStan +put data: htic0@gov..mailserv -> LITH_TXT_MAIL_SEND_PhantomStan +put data: 330 -> LITH_TXT_MAIL_SIZE_PhantomStan + +put file: Mail/Secret1_Marine.txt -> LITH_TXT_MAIL_BODY_Secret1Stan +put data: Saved Buffer -> LITH_TXT_MAIL_NAME_Secret1Stan + +put file: Mail/Secret2_Marine.txt -> LITH_TXT_MAIL_BODY_Secret2Stan +put data: Saved Buffer -> LITH_TXT_MAIL_NAME_Secret1Stan + +-- Cyber-Mage ----------------------------------------------------------------- +put file: Mail/Intro_CyberMage.txt -> LITH_TXT_MAIL_BODY_IntroJem +put data: Saved Message -> LITH_TXT_MAIL_NAME_IntroJem +put data: @corp.AOF -> LITH_TXT_MAIL_SEND_IntroJem +put data: 13:44 25-7-49 -> LITH_TXT_MAIL_TIME_IntroJem +put data: 288 -> LITH_TXT_MAIL_SIZE_IntroJem + +put file: Mail/Cluster1_CyberMage.txt -> LITH_TXT_MAIL_BODY_Cluster1Jem +put data: Saved Text 104 -> LITH_TXT_MAIL_NAME_Cluster1Jem +put data: 240 -> LITH_TXT_MAIL_SIZE_Cluster1Jem + +put file: Mail/Cluster2_CyberMage.txt -> LITH_TXT_MAIL_BODY_Cluster2Jem +put data: Saved Text 152 -> LITH_TXT_MAIL_NAME_Cluster2Jem +put data: 288 -> LITH_TXT_MAIL_SIZE_Cluster2Jem + +put file: Mail/Cluster3_CyberMage.txt -> LITH_TXT_MAIL_BODY_Cluster3Jem +put data: Saved Text 244 -> LITH_TXT_MAIL_NAME_Cluster3Jem +put data: 218 -> LITH_TXT_MAIL_SIZE_Cluster3Jem + +put file: Mail/Intro2_CyberMage.txt -> LITH_TXT_MAIL_BODY_PhantomJem +put data: order@corp.AOF -> LITH_TXT_MAIL_SEND_PhantomJem + +put file: Mail/Secret1_CyberMage.txt -> LITH_TXT_MAIL_BODY_Secret1Jem +put data: Saved Text 250 -> LITH_TXT_MAIL_NAME_Secret1Jem + +put file: Mail/Secret2_CyberMage.txt -> LITH_TXT_MAIL_BODY_Secret2Jem +put data: Saved Text 252 -> LITH_TXT_MAIL_NAME_Secret2Jem + +EOF diff --git a/hashfs.rb b/hashfs.rb new file mode 100644 index 0000000..a18d046 --- /dev/null +++ b/hashfs.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +## Copyright © 2018 Graham Sanderson, all rights reserved. +## HashFS: Compile a directory structure into an enumerated list. + +require 'fileutils' + +it = 0 +base = "pk/graphics/" + +of = open('pk/language.gfx.txt', 'w') +of.puts('[enu default]') + +Dir.glob 'graphics/**/*.png' do |item| + to = sprintf("LITHX%.3i", it) + of.puts "\"LITH:#{/lgfx\/(.+)\.png/.match(item)[1].gsub('/', ':')}\" = \"#{to}\";" + FileUtils.copy item, base + to + ".png" + it += 1 +end diff --git a/ir/dummy.txt b/ir/dummy.txt new file mode 100644 index 0000000..478873e --- /dev/null +++ b/ir/dummy.txt @@ -0,0 +1 @@ +This is just here so Git knows that this folder exists. diff --git a/ir/main/dummy.txt b/ir/main/dummy.txt new file mode 100644 index 0000000..478873e --- /dev/null +++ b/ir/main/dummy.txt @@ -0,0 +1 @@ +This is just here so Git knows that this folder exists. diff --git a/pk/acs/dummy.txt b/pk/acs/dummy.txt new file mode 100644 index 0000000..478873e --- /dev/null +++ b/pk/acs/dummy.txt @@ -0,0 +1 @@ +This is just here so Git knows that this folder exists. diff --git a/pk/dummy.txt b/pk/dummy.txt new file mode 100644 index 0000000..478873e --- /dev/null +++ b/pk/dummy.txt @@ -0,0 +1 @@ +This is just here so Git knows that this folder exists. diff --git a/pk/graphics/dummy.txt b/pk/graphics/dummy.txt new file mode 100644 index 0000000..478873e --- /dev/null +++ b/pk/graphics/dummy.txt @@ -0,0 +1 @@ +This is just here so Git knows that this folder exists. diff --git a/pksrc/animdefs.txt b/pksrc/animdefs.txt new file mode 100644 index 0000000..4f273b5 --- /dev/null +++ b/pksrc/animdefs.txt @@ -0,0 +1,3 @@ +cameratexture LITHCAM1 320 200 +cameratexture LITHCAM2 480 240 +cameratexture LITHCAM3 480 240 diff --git a/pksrc/copylib.txt b/pksrc/copylib.txt new file mode 100644 index 0000000..4362b49 --- /dev/null +++ b/pksrc/copylib.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/pksrc/credits.txt b/pksrc/credits.txt new file mode 100644 index 0000000..86e9461 --- /dev/null +++ b/pksrc/credits.txt @@ -0,0 +1,269 @@ +%%% %%% +%% /7 //777777777777777777777777777 /// %% +% /:/7 //........................../ /::/ /77777 % +% /:// //77/ /// /// /:7/ :77 /7: % +% /:// /777 //77=======::////::///:7/ /:7 //7 % +% /:// /::/ //77/====7-::::::::// /7/ /:/77777777777777 % +% /:// /::/ //77/ /::// /:// /7/ /:=/ :77/ % +% /:======/::/=======//77/ /::// /:// /77/ 7:/ :7/: % +% /:::::://::/==========// ===// /:// /77/ /// :7// % +% /::/ /:// ^^^ /// /777 % +% ^^ ^^^ /777 % +% % +% Project Golan, Xevv 3 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% I have probably miscredited or forgotten to credit some people. ------------% +% Please tell me if I did and I will correct it. -----------------------------% +% There are extra credits here from Lithium, the original version of this ----% +% project. -------------------------------------------------------------------% +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +| | +| If you want to use something from this mod, *please* ask me (Marrub) first. | +| I don't want myself or anyone else who's given me stuff (directly or not) --| +| to get pissed off because proper attribution or permission wasn't given. ---| +| | +| Sound credits are all in the "sndinfo" files as comments. ------------------| +| | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +* * +* See copylib.txt for license information on GDCC libc, as included in linked * +* binary form in . * +* * +* Sources for GDCC libc can be found at . * +* * +* Sources for Lithia can be found at . * +* * +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +--- Credits ------------------------------------------------------------------| + +* * _sink * + +* End of game music + +* * 505 * + +* Title music (hYmns - Shredder) + +* * a1337spy * + +* Sounds for stuff + +* * Anthony Cole * + +* Test map marine sprites + +* * abbuw * + +* Vent texture + +* * DavidPH * + +* Glorious, glorious GDCC +* Lots of help with a lot of things +* Cool guy + +* * GAA1992 * + +* Gauss Shotgun idle sprite + +* * Green Den * + +* Test map music (Dandalins Story) + +* * Gutawer * + +* Lots of help with ZScript + +* * HorrorMovieGuy * + +* SteggleSphere sprites + + * InsanityBringer * + +* Quaternion and view unprojection code (used in crosshairs) + +* * JetPlane * + +* Image used as a base for the SMG sprite +* Cool guy + +* * Jimmy * + +* Fonts! Pretty much all of 'em +* Added some missing characters to the CBIFONT for me (which he also made) +* Really, like, this guy is kind of crazy great +* Made the base MENUDEFs for me + +* * Kate Fox * + +* Some specific, old code is based off of Error: Doom code +* This was originally a mod of Error: Doom, which is an awesome mod! +* Blank sphere used as a base for the the Blursphere +* Prettied up the rain effects +* Intermission text and background + +* * Kyle873 * + +* Said a nice thing +* I think +* maybe +* Fallout 4 sound rip +* Phantasy Star Nova sound rip + +* * Marrub (me) * + +* Almost everything not mentioned here + +* * MarlboroMike * + +* Score item sprites +* Backpack pickup +* Rocket Box pickup + +* * Marty Kirra * + +* Many advice +* Cool guy + +* * Minigunner * + +* Smooth explosion sprites +* Missile Launcher sprite + +* * monkeybtm6 * + +* BLLTR0 sprite + +* * Seryder * + +* Briefcase sprite (WUPGA0) + +* * Sgt. Shivers * + +* Shooting my shootyguns +* Shotgun sprites +* Revolver sprites (from Powerslave originally) +* knif +* Mateba reload animation +* SPAS reload animation +* Windows XP theme + +* * Shadowlink226 * + +* Halo 3 sound rip + +* * Skaven * + +* Intermission music (The Alchemist) + +* * TerminusEst13 * + +* SHKRA0/B0 and a shitload of sound sources +* Help with finding some sprites to work with + +* * vikingbro * + +* Image used as a base for the Shock Rifle sprite + +* * VriskaSerket * + +* Image used as a base for the Star Destroyer sprite + +* * Wartorn * + +* Help with HUD design +* Cool guy + +* * WildWeasel * + +* Help with making fonts, suggestions for HUD +* Sleeves for Cyber-Mage +* Cool guy +* Sound rip from Mac OS 9 + +* * Xaser Acheron * + +* Bullet puffs +* Probably some other stuff I took from Psychic +* Help with code stuff + +* * Yholl * + +* Effects from LegenDoom +* Help with a buncha stuff +* Descriptions for some of the extra upgrades +* Ideas for a lot of stuff +* Marathon resources +* knif +* Re-texturing the TITLEMAP for me +* Missile Launcher code +* Made the Charge Fist not suck +* eviel gost +* Cardinal gem sprites + +* * Zombie * + +* Image used as a base for the SPAS sprite +* Lots of help with ZScript + +* * zrrion the insect * + +* Full sprites for the Grenade Launcher, Pistol and Plasma Rifle +* Skull keys +* Health pickups +* Cell Pack pickup +* Health bonus pickup + +--- Testers ------------------------------------------------------------------| + + * AgentSpooks + * Ikazu-san + * MENTHA + * nax + * silentw + * Sledge + * wildweasel + * Yholl + * Zombie + +--- Other Credits ------------------------------------------------------------| + +Cannon sprites + Minigunner: (Centered DNF enforcer gun ) + Solo Spaghetti: (Skull SSG ) + Bloax: (Edit of skull SSG with barrel) + Slax: (Edit of skull SSG with scope ) + Marrub: (Redraw ) + +Combat Rifle sprites + Sgt. Shivers: (Model rip ) + TheRailgunner: (Edit of model rip) + Marrub: (Small edits ) + +Laser Shotgun sprites + Mike12: (Vented shotgun ) + GAA1992, Cage & Scuba Steve: (Auto shotgun ) + Marrub: (Redraw of sights and design) + +Sniper Rifle sprites + MrEnchanter: (Sniper rifle sprite ) + Marrub: (Redrawing and detailing, re-handing) + Sgt. Shivers: (Firing animation ) + +Super Shotgun sprites + Captain J & Turbo: (Whole sprite) + +Ion Rifle sprites + monkeybtm6: (Weapon rip from Disruptor) + torridGristle: (Assault rifle sprite ) + Marrub: (Redraw ) + +Bassilla GUI theme + Kurashiki: (Bassilla art ) + Sgt. Shivers: (Everything else) + +EOF diff --git a/pksrc/cvarinfo.debug.txt b/pksrc/cvarinfo.debug.txt new file mode 100644 index 0000000..5a3ecbd --- /dev/null +++ b/pksrc/cvarinfo.debug.txt @@ -0,0 +1,10 @@ +server noarchive int __lith_debug_level = 0; +server noarchive bool __lith_debug_all = false; +server noarchive bool __lith_debug_items = false; +server noarchive bool __lith_debug_bip = false; +server noarchive bool __lith_debug_score = false; +server noarchive bool __lith_debug_upgrades = false; +server noarchive bool __lith_debug_save = false; +server noarchive bool __lith_debug_nomonsters = false; + +// EOF diff --git a/pksrc/cvarinfo.gui.txt b/pksrc/cvarinfo.gui.txt new file mode 100644 index 0000000..bdcded3 --- /dev/null +++ b/pksrc/cvarinfo.gui.txt @@ -0,0 +1,6 @@ +user float lith_gui_xmul = 1.0; +user float lith_gui_ymul = 1.0; +user int lith_gui_theme = 0; +user int lith_gui_cursor = 0; + +// EOF diff --git a/pksrc/cvarinfo.hud.txt b/pksrc/cvarinfo.hud.txt new file mode 100644 index 0000000..e20992d --- /dev/null +++ b/pksrc/cvarinfo.hud.txt @@ -0,0 +1,21 @@ +user bool lith_hud_showscore = true; +user bool lith_hud_showweapons = true; +user bool lith_hud_showlog = true; +user bool lith_hud_showarmorind = true; +user bool lith_hud_logfromtop = false; + +user int lith_xhair_r = 255; +user int lith_xhair_g = 255; +user int lith_xhair_b = 255; +user int lith_xhair_a = 200; +user int lith_xhair_style = 1; +user bool lith_xhair_enable = true; + +user bool lith_scanner_slide = true; +user bool lith_scanner_bar = true; +user int lith_scanner_xoffs = 0; +user int lith_scanner_yoffs = 0; +user int lith_scanner_color = 106; // 'j' +user bool lith_scanner_altfont = false; + +// EOF diff --git a/pksrc/cvarinfo.player.txt b/pksrc/cvarinfo.player.txt new file mode 100644 index 0000000..bb77de7 --- /dev/null +++ b/pksrc/cvarinfo.player.txt @@ -0,0 +1,50 @@ +user float lith_player_damagebobmul = 0.6; +user bool lith_player_damagebob = true; +user bool lith_player_scoresound = true; +user bool lith_player_invertmouse = false; +user bool lith_player_scorelog = false; +user bool lith_player_ammolog = false; +user bool lith_player_resultssound = true; +user bool lith_player_stupidpickups = false; +server bool lith_player_brightweps = false; +server bool lith_player_noitemfx = false; +user bool lith_player_teleshop = false; +user float lith_player_footstepvol = 0.2; +user float lith_player_viewtilt = 0.0; +user bool lith_player_autolevel = false; + +// These are 200 bytes of storage per, so overall we have around 6kb available. +// If this isn't enough more of these can be added trivially (ACS doesn't +// assume the amount of available storage) +user string lith_psave_0 = ""; +user string lith_psave_1 = ""; +user string lith_psave_2 = ""; +user string lith_psave_3 = ""; +user string lith_psave_4 = ""; +user string lith_psave_5 = ""; +user string lith_psave_6 = ""; +user string lith_psave_7 = ""; +user string lith_psave_8 = ""; +user string lith_psave_9 = ""; +user string lith_psave_10 = ""; +user string lith_psave_11 = ""; +user string lith_psave_12 = ""; +user string lith_psave_13 = ""; +user string lith_psave_14 = ""; +user string lith_psave_15 = ""; +user string lith_psave_16 = ""; +user string lith_psave_17 = ""; +user string lith_psave_18 = ""; +user string lith_psave_19 = ""; +user string lith_psave_20 = ""; +user string lith_psave_21 = ""; +user string lith_psave_22 = ""; +user string lith_psave_23 = ""; +user string lith_psave_24 = ""; +user string lith_psave_25 = ""; +user string lith_psave_26 = ""; +user string lith_psave_27 = ""; +user string lith_psave_28 = ""; +user string lith_psave_29 = ""; + +// EOF diff --git a/pksrc/cvarinfo.server.txt b/pksrc/cvarinfo.server.txt new file mode 100644 index 0000000..bf36ca5 --- /dev/null +++ b/pksrc/cvarinfo.server.txt @@ -0,0 +1,13 @@ +server float __lith_version; + +server int lith_sv_difficulty = 10; +server bool lith_sv_rain = false; +server bool lith_sv_sky = false; +server bool lith_sv_revenge = true; +server float lith_sv_scoremul = 1.25; +server bool lith_sv_pauseinmenus = true; +server int lith_sv_autosave = 0; +server bool lith_sv_nobosses = false; +server bool lith_sv_nofullammo = false; + +// EOF diff --git a/pksrc/cvarinfo.weapons.txt b/pksrc/cvarinfo.weapons.txt new file mode 100644 index 0000000..8c421a3 --- /dev/null +++ b/pksrc/cvarinfo.weapons.txt @@ -0,0 +1,14 @@ +user float lith_weapons_zoomfactor = 3.0; +user float lith_weapons_scopealpha = 0.2; +user float lith_weapons_alpha = 1.0; +user bool lith_weapons_riflescope = false; +user bool lith_weapons_riflemodeclear = false; +server bool lith_weapons_magdrops = true; +server bool lith_weapons_casings = true; +server bool lith_weapons_magfadeout = true; +server bool lith_weapons_casingfadeout = true; +user bool lith_weapons_magicselanims = true; +user float lith_weapons_recoil = 1.0; +user bool lith_weapons_slot3ammo = false; + +// EOF diff --git a/pksrc/decaldef.txt b/pksrc/decaldef.txt new file mode 100644 index 0000000..f0b2c1a --- /dev/null +++ b/pksrc/decaldef.txt @@ -0,0 +1,23 @@ +decal Lith_GaussScorch +{ + pic BLLTA0 + add 1.0 + fullbright + shade "00 00 00" + animator GoAway +} + +generator Lith_GaussPuff Lith_GaussScorch + +decal Lith_DoomPoster1 {pic LITHFDPS} +decal Lith_DoomPoster2 {pic LITH64PS} +decal Lith_DoomPoster3 {pic LITHD2PS} +decal Lith_DoomPoster4 {pic LITHE4PS} + +decalgroup Lith_DoomPoster 60 +{ + Lith_DoomPoster1 1 + Lith_DoomPoster2 1 + Lith_DoomPoster3 1 + Lith_DoomPoster4 1 +} diff --git a/pksrc/decorate.dec b/pksrc/decorate.dec new file mode 100644 index 0000000..39a60fb --- /dev/null +++ b/pksrc/decorate.dec @@ -0,0 +1,104 @@ +#include "lscripts/Constants.dec" + +#include "lscripts/Hacks.dec" +#include "lscripts/Dummy.dec" +#include "lscripts/Rain.dec" +#include "lscripts/PlayerPawn.dec" +#include "lscripts/Player.dec" + +#include "lscripts/GunSmoke.dec" +#include "lscripts/BulletPuff.dec" +#include "lscripts/TeleFog.dec" +#include "lscripts/Death.dec" +#include "lscripts/PickupEffects.dec" +#include "lscripts/BossSpawners.dec" +#include "lscripts/RifleGrenade.dec" +#include "lscripts/Magazine.dec" +#include "lscripts/Decorations.dec" + +#include "lscripts/Monsters/System.dec" + +#include "lscripts/Monsters/Tier1.dec" +#include "lscripts/Monsters/Tier2.dec" +#include "lscripts/Monsters/Tier3.dec" +#include "lscripts/Monsters/Tier4.dec" +#include "lscripts/Monsters/Tier5.dec" + +#include "lscripts/Monsters/XHTier1.dec" +#include "lscripts/Monsters/XHTier2.dec" +#include "lscripts/Monsters/XHTier3.dec" +#include "lscripts/Monsters/XHTier4.dec" +#include "lscripts/Monsters/XHTier5.dec" + +#include "lscripts/Monsters/Phantom.dec" +#include "lscripts/Monsters/James.dec" +#include "lscripts/Monsters/Makarov.dec" +#include "lscripts/Monsters/Isaac.dec" + +#include "lscripts/Monsters/TitleMap.dec" + +#include "lscripts/Maps.dec" + +#include "lscripts/Items/Ammo.dec" +#include "lscripts/Items/Score.dec" +#include "lscripts/Items/AmmoPickups.dec" +#include "lscripts/Items/Powerups.dec" +#include "lscripts/Items/Keys.dec" +#include "lscripts/Items/CBIStuff.dec" + +//$GZDB_SKIP + +#include "lscripts/Projectiles/ShotgunTrail.dec" +#include "lscripts/Projectiles/Gauss.dec" +#include "lscripts/Projectiles/PoisonBullet.dec" +#include "lscripts/Projectiles/RifleBullet.dec" +#include "lscripts/Projectiles/SniperBullet.dec" +#include "lscripts/Projectiles/MiniMissile.dec" +#include "lscripts/Projectiles/Rocket.dec" +#include "lscripts/Projectiles/HomingRocket.dec" +#include "lscripts/Projectiles/PlasmaBolt.dec" +#include "lscripts/Projectiles/PlasmaLaser.dec" +#include "lscripts/Projectiles/Cannonball.dec" +#include "lscripts/Projectiles/Punctuator.dec" +#include "lscripts/Projectiles/RailgunParticles.dec" +#include "lscripts/Projectiles/SwordSwing.dec" + +#include "lscripts/Weapons/Base.dec" +#include "lscripts/Weapons/Misc.dec" +#include "lscripts/Weapons/Pickups.dec" + +#include "lscripts/Weapons_Outcasts/1_ChargeFist.dec" +#include "lscripts/Weapons_Outcasts/5_MissileLauncher.dec" +#include "lscripts/Weapons_Outcasts/6_PlasmaDiffuser.dec" + +#include "lscripts/Weapons_Marine/1_Fist.dec" +#include "lscripts/Weapons_Marine/2_Pistol.dec" +#include "lscripts/Weapons_Marine/2_Revolver.dec" +#include "lscripts/Weapons_Marine/3_Shotgun.dec" +#include "lscripts/Weapons_Marine/3_LazShotgun.dec" +#include "lscripts/Weapons_Marine/3_2_SuperShotgun.dec" +#include "lscripts/Weapons_Marine/4_CombatRifle.dec" +#include "lscripts/Weapons_Marine/4_SniperRifle.dec" +#include "lscripts/Weapons_Marine/5_RocketLauncher.dec" +#include "lscripts/Weapons_Marine/6_PlasmaRifle.dec" +#include "lscripts/Weapons_Marine/7_OmegaCannon.dec" + +#include "lscripts/Weapons_CyberMage/1_CFist.dec" +#include "lscripts/Weapons_CyberMage/2_Mateba.dec" +#include "lscripts/Weapons_CyberMage/3_ShockRifle.dec" +#include "lscripts/Weapons_CyberMage/3_2_SPAS.dec" +#include "lscripts/Weapons_CyberMage/4_SMG.dec" +#include "lscripts/Weapons_CyberMage/5_IonRifle.dec" +#include "lscripts/Weapons_CyberMage/6_CPlasmaRifle.dec" +#include "lscripts/Weapons_CyberMage/7_StarDestroyer.dec" + +#include "lscripts/Weapons_CyberMage/Magic/1_Blade.dec" +#include "lscripts/Weapons_CyberMage/Magic/2_Delear.dec" +#include "lscripts/Weapons_CyberMage/Magic/3_Feuer.dec" +#include "lscripts/Weapons_CyberMage/Magic/4_Rend.dec" +#include "lscripts/Weapons_CyberMage/Magic/5_Hulgyon.dec" +#include "lscripts/Weapons_CyberMage/Magic/6_StarShot.dec" +#include "lscripts/Weapons_CyberMage/Magic/7_Cercle.dec" + +// EOF + diff --git a/pksrc/end_timeup1.txt b/pksrc/end_timeup1.txt new file mode 100644 index 0000000..28c6e56 --- /dev/null +++ b/pksrc/end_timeup1.txt @@ -0,0 +1,20 @@ +>>>>>[[[[INCOMING MESSAGE]]]] + +> Remotes: @.mailserv, @corp. +> Date: Loading... + +>>>>>[[[[RECEIVING SPLIT TRANSMISSION 1/2]]]] + +The mission has failed, several samples of demonic energy have +been delivered throughout A.O.F territory and are already +confirmedly in their secret databases around the galaxy. You are +to be immediately transfered to [REDACTED]'s military and follow +all orders you are given. + +You will not hear from me again. +Delete this transmission upon reading. + +>>>>>[[[[RECEIVING SPLIT TRANSMISSION 2/2]]]] + +77777777777777777777777777732069089143XXXXXXXXXX +[[[[[[[[[>> data stream corrupt, retrying diff --git a/pksrc/end_timeup2.txt b/pksrc/end_timeup2.txt new file mode 100644 index 0000000..779d128 --- /dev/null +++ b/pksrc/end_timeup2.txt @@ -0,0 +1,15 @@ +>>>>>[[[[REDELIVERING MESSAGE]]]] + +> Remotes: @.mailserv, @corp. +> Date: Loading... + +>>>>>[[[[RECEIVING SPLIT TRANSMISSION 2/2]]]] + +Hi, + +We are going to transfer an undisclosed +amount of funds to your account for your +work. Thank you. + +Good luck, [REDACTED] + diff --git a/pksrc/fontdefs.txt b/pksrc/fontdefs.txt new file mode 100644 index 0000000..ff26a69 --- /dev/null +++ b/pksrc/fontdefs.txt @@ -0,0 +1,25 @@ +ALIENFONT +{ + template "LITHAN%.2i" +} + +LHUDFONTSMALL +{ + template "LITHFS%.2i" +} + +LHUDFONT +{ + template "LITHHF%.2i" +} + +LTRMFONT +{ + spacewidth 8 + count 94 + base 0 + template "LITHC%i" +} + +// EOF + diff --git a/pksrc/gameinfo.txt b/pksrc/gameinfo.txt new file mode 100644 index 0000000..2e1c736 --- /dev/null +++ b/pksrc/gameinfo.txt @@ -0,0 +1,4 @@ +StartupType = "Heretic" + +// EOF + diff --git a/pksrc/keyconf.txt b/pksrc/keyconf.txt new file mode 100644 index 0000000..9992299 --- /dev/null +++ b/pksrc/keyconf.txt @@ -0,0 +1,25 @@ +// Key Sections --------------------------------------------------------------| +addkeysection "Lithium Actions" Lithium +addmenukey "Open CBI" lith_k_opencbi +addmenukey "Special Action" +lith_k_qact +addmenukey "Zoom In" lith_k_zoomin +addmenukey "Zoom Out" lith_k_zoomout + +// Aliases -------------------------------------------------------------------| +alias lith_k_opencbi "pukename Lith_KeyOpenCBI" + +alias +lith_k_qact "+user4" +alias -lith_k_qact "-user4" + +alias lith_k_zoomin "pukename Lith_KeyZoom 30" +alias lith_k_zoomout "pukename Lith_KeyZoom -60" + +alias __lith_puketrm "pukename Lith_RunTerminal %1" +alias __lith_pukedlg "pukename Lith_RunDialogue %1" +alias __lith_pukemail "pukename Lith_GiveMail %1" + +// Binds ---------------------------------------------------------------------| +defaultbind i lith_k_opencbi +defaultbind g +lith_k_qact + +// EOF diff --git a/pksrc/loadacs.txt b/pksrc/loadacs.txt new file mode 100644 index 0000000..7967dd8 --- /dev/null +++ b/pksrc/loadacs.txt @@ -0,0 +1 @@ +lithmain diff --git a/pksrc/lscripts/BossSpawners.dec b/pksrc/lscripts/BossSpawners.dec new file mode 100644 index 0000000..f9861e4 --- /dev/null +++ b/pksrc/lscripts/BossSpawners.dec @@ -0,0 +1,62 @@ +actor Lith_BossChecker : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 + TNT1 A 0 A_JumpIf(health < 800, "nope") + TNT1 A 0 A_JumpIf(CallACS("LWData", wdata_bossspawned), "nope") + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBossArgs1", special, args[0], args[1], args[2]) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBossArgs2", args[3], args[4]) + TNT1 A 0 A_Jump(256, "Pickup1") + nope: + TNT1 A 0 + stop + } +} + +actor Lith_BossChecker1_1 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 1, 1) stop}} +actor Lith_BossChecker1_2 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 1, 2) stop}} +actor Lith_BossChecker2_1 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 2, 1) stop}} +actor Lith_BossChecker2_2 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 2, 2) stop}} +actor Lith_BossChecker2_3 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 2, 3) stop}} +actor Lith_BossChecker3_1 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 3, 1) stop}} +actor Lith_BossChecker3_2 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 3, 2) stop}} +actor Lith_BossChecker3_3 : Lith_BossChecker {states {Pickup1: TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SpawnBoss", 3, 3) stop}} + +actor Lith_BossSpawner +{ + +NOTIMEFREEZE + + const int flags = RGF_MONSTERS|RGF_CUBE;//RGF_MONSTERS|RGF_NOSIGHT|RGF_CUBE; + + states + { + Spawn: + TNT1 A 1 + TNT1 A 0 A_Log("OHNO") + stop + + // Boss 1 phase 1 (Weapon Mod Device) + // Boss 1 phase 2 (CPU Upgrade 1) + Boss1_1: TNT1 A 0 A_RadiusGive("Lith_BossChecker1_1", 16384, flags) stop + Boss1_2: TNT1 A 0 A_RadiusGive("Lith_BossChecker1_2", 16384, flags) stop + + // Boss 2 phase 1 (Armor Interface) + // Boss 2 phase 2 (CPU Upgrade 2) + // Boss 2 phase 3 (Weapon Refactoring Device) + Boss2_1: TNT1 A 0 A_RadiusGive("Lith_BossChecker2_1", 16384, flags) stop + Boss2_2: TNT1 A 0 A_RadiusGive("Lith_BossChecker2_2", 16384, flags) stop + Boss2_3: TNT1 A 0 A_RadiusGive("Lith_BossChecker2_3", 16384, flags) stop + + // Boss 3 phase 1 + // Boss 3 phase 2 + // Boss 3 phase 3 (Reality Distortion Interface) + Boss3_1: TNT1 A 0 A_RadiusGive("Lith_BossChecker3_1", 16384, flags) stop + Boss3_2: TNT1 A 0 A_RadiusGive("Lith_BossChecker3_2", 16384, flags) stop + Boss3_3: TNT1 A 0 A_RadiusGive("Lith_BossChecker3_3", 16384, flags) stop + } +} + +// EOF + diff --git a/pksrc/lscripts/BulletPuff.dec b/pksrc/lscripts/BulletPuff.dec new file mode 100644 index 0000000..a409eab --- /dev/null +++ b/pksrc/lscripts/BulletPuff.dec @@ -0,0 +1,78 @@ +// Taken from Psychic with permission. + +actor Lith_PuffSmoke +{ + Radius 1 + Height 1 + RenderStyle Add + Alpha 0.3 + Scale 0.4 + + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +FORCEXYBILLBOARD + + States + { + Spawn: + SMK5 ABCDEFGHIJKLMNOP 1 + stop + } +} + +actor Lith_BulletPuff replaces BulletPuff +{ + RenderStyle "Add" + DamageType "Lith_Bullets" + Species "Lith_Player" + Alpha 0.9 + + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +NOEXTREMEDEATH + +FORCEXYBILLBOARD + +PUFFGETSOWNER + +MTHRUSPECIES + -ALLOWPARTICLES + + States + { + explod: + MISL B 0 A_SetScale(0.3) + MISL B 0 A_PlaySound("explosion") + MISL B 8 bright A_Explode + MISL C 6 bright + MISL D 4 bright + stop + Spawn: + XPUF Q 0 + XPUF Q 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_TorgueMode, true), "explod") + XPUF Q 0 A_SpawnItemEx("Lith_PuffSmoke", 0, 0, 4.0 + 0.1 * random(-10, 10)) + XPUF Q 0 A_Jump(256, "PuffNormal", "PuffMirrored") + PuffNormal: + XPUF Q 0 A_Jump(32, "PuffNormalAlt") + XPUF QRSTU 1 bright + PuffNormalEnd: + XPUF FGH 1 bright + stop + PuffNormalAlt: + XPUF A 0 A_PlaySound("effects/puff/ricochet") + XPUF ABCDE 1 bright + goto PuffNormalEnd + PuffMirrored: + XPUF V 0 A_Jump(32, "PuffMirroredAlt") + XPUF VWXYZ 1 bright + PuffMirroredEnd: + XPUF NOP 1 bright + stop + PuffMirroredAlt: + XPUF I 0 A_PlaySound("effects/puff/ricochet") + XPUF IJKLM 1 bright + goto PuffMirroredEnd + } +} + +// EOF + diff --git a/pksrc/lscripts/Constants.dec b/pksrc/lscripts/Constants.dec new file mode 100644 index 0000000..488edec --- /dev/null +++ b/pksrc/lscripts/Constants.dec @@ -0,0 +1,52 @@ +#include "lscripts/Headers/lith_weapons.h" +#include "lscripts/Headers/lith_pdata.h" +#include "lscripts/Headers/lith_wdata.h" +#include "lscripts/Headers/lith_lognames.h" +#include "lscripts/Headers/lith_upgradenames.h" +#include "lscripts/Headers/lith_scorenums.h" + +const float FIX = 65536.0; +const int IFIX = 65536; + +// ACS interfacing +const int X_BT_ATTACK = 0x00000001; +const int X_BT_USE = 0x00000002; +const int X_BT_JUMP = 0x00000004; +const int X_BT_CROUCH = 0x00000008; +const int X_BT_TURN180 = 0x00000010; +const int X_BT_ALTATTACK = 0x00000020; +const int X_BT_RELOAD = 0x00000040; +const int X_BT_ZOOM = 0x00000080; +const int X_BT_SPEED = 0x00000100; +const int X_BT_STRAFE = 0x00000200; +const int X_BT_MOVERIGHT = 0x00000400; +const int X_BT_MOVELEFT = 0x00000800; +const int X_BT_BACK = 0x00001000; +const int X_BT_FORWARD = 0x00002000; +const int X_BT_RIGHT = 0x00004000; +const int X_BT_LEFT = 0x00008000; +const int X_BT_LOOKUP = 0x00010000; +const int X_BT_LOOKDOWN = 0x00020000; +const int X_BT_MOVEUP = 0x00040000; +const int X_BT_MOVEDOWN = 0x00080000; +const int X_BT_SHOWSCORES = 0x00100000; +const int X_BT_USER1 = 0x00200000; +const int X_BT_USER2 = 0x00400000; +const int X_BT_USER3 = 0x00800000; +const int X_BT_USER4 = 0x01000000; + +// Ammo values +const int AmmoAmt_Shell = 4; +const int AmmoAmt_ShellBox = 20; +const int AmmoAmt_Rocket = 1; +const int AmmoAmt_RocketBox = 5; +const int AmmoAmt_Cell = 500; +const int AmmoAmt_CellPack = 1500; +const int AmmoAmt_CannonPack = 4; + +const int AmmoAmt_ShellBackpk = 4; +const int AmmoAmt_RocketBackpk = 1; +const int AmmoAmt_CellBackpk = 1500; +const int AmmoAmt_CannonBackpk = 4; + +// EOF diff --git a/pksrc/lscripts/Constants.dec.bak b/pksrc/lscripts/Constants.dec.bak new file mode 100644 index 0000000..f6bf2f6 --- /dev/null +++ b/pksrc/lscripts/Constants.dec.bak @@ -0,0 +1,53 @@ +#include "lscripts/Headers/lith_weapons.h" +#include "lscripts/Headers/lith_pdata.h" +#include "lscripts/Headers/lith_wdata.h" +#include "lscripts/Headers/lith_lognames.h" +#include "lscripts/Headers/lith_upgradenames.h" +#include "lscripts/Headers/lith_scorenums.h" + +const float FIX = 65536.0; +const int IFIX = 65536; + +// ACS interfacing +const int X_BT_ATTACK = 0x00000001; +const int X_BT_USE = 0x00000002; +const int X_BT_JUMP = 0x00000004; +const int X_BT_CROUCH = 0x00000008; +const int X_BT_TURN180 = 0x00000010; +const int X_BT_ALTATTACK = 0x00000020; +const int X_BT_RELOAD = 0x00000040; +const int X_BT_ZOOM = 0x00000080; +const int X_BT_SPEED = 0x00000100; +const int X_BT_STRAFE = 0x00000200; +const int X_BT_MOVERIGHT = 0x00000400; +const int X_BT_MOVELEFT = 0x00000800; +const int X_BT_BACK = 0x00001000; +const int X_BT_FORWARD = 0x00002000; +const int X_BT_RIGHT = 0x00004000; +const int X_BT_LEFT = 0x00008000; +const int X_BT_LOOKUP = 0x00010000; +const int X_BT_LOOKDOWN = 0x00020000; +const int X_BT_MOVEUP = 0x00040000; +const int X_BT_MOVEDOWN = 0x00080000; +const int X_BT_SHOWSCORES = 0x00100000; +const int X_BT_USER1 = 0x00200000; +const int X_BT_USER2 = 0x00400000; +const int X_BT_USER3 = 0x00800000; +const int X_BT_USER4 = 0x01000000; + +// Ammo values +const int AmmoAmt_Shell = 4; +const int AmmoAmt_ShellBox = 20; +const int AmmoAmt_Rocket = 1; +const int AmmoAmt_RocketBox = 5; +const int AmmoAmt_Cell = 500; +const int AmmoAmt_CellPack = 1500; +const int AmmoAmt_CannonPack = 4; + +const int AmmoAmt_ShellBackpk = 4; +const int AmmoAmt_RocketBackpk = 1; +const int AmmoAmt_CellBackpk = 1500; +const int AmmoAmt_CannonBackpk = 4; + +// EOF + diff --git a/pksrc/lscripts/Death.dec b/pksrc/lscripts/Death.dec new file mode 100644 index 0000000..7074b22 --- /dev/null +++ b/pksrc/lscripts/Death.dec @@ -0,0 +1,60 @@ +actor Lith_PlayerDeathParticle +{ + RenderStyle "Subtract" + Alpha 0.9 + + +NOINTERACTION + + states + { + Spawn: + TNT1 A random(3, 30) + LDTH AAAAAAAAAAAAAAAAAAAAA 1 A_SetScale(frandom(0.1, 0.2)) + LDTH AAAA 3 A_FadeOut(0.1) + LDTH AAAA 4 A_FadeOut(0.1) + stop + } +} + +actor Lith_PlayerDeathParticle2 +{ + RenderStyle "Subtract" + Alpha 0.9 + Scale 0.2 + + +NOINTERACTION + + states + { + Spawn: + TNT1 A random(3, 10) + LDTH AAAA 12 A_FadeOut(0.1) + LDTH AAAA 4 A_FadeOut(0.1) + stop + } +} + +actor Lith_PlayerDeath : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 + TNT1 A 0 A_Quake(9, 35*2, 0, 2048) + TNT1 A 0 A_PlaySound("player/death2", CHAN_6, 1.0, false, ATTN_NONE) + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_PlayerDeathParticle", frandom(-32,32), frandom(-32,32), frandom(0, 64), frandom(-2, 2), frandom(-2, 2), frandom(1, 2), 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_PlayerDeathNuke : Lith_Nuke +{ + states + { + Pickup: + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_PlayerDeathParticle2", frandom(-32,32), frandom(-32,32), frandom(0, 64), frandom(-16, 16), frandom(-16, 16), frandom(1.5, 2.5), 0, SXF_NOCHECKPOSITION) + goto Super::Pickup + } +} + +// EOF diff --git a/pksrc/lscripts/Decorations.dec b/pksrc/lscripts/Decorations.dec new file mode 100644 index 0000000..f1875e9 --- /dev/null +++ b/pksrc/lscripts/Decorations.dec @@ -0,0 +1,18 @@ +actor Lith_ExplosiveBarrel : ExplosiveBarrel replaces ExplosiveBarrel +{ + Health 60 + PainChance 255 + PainSound "misc/barrel/hit" + + states + { + Spawn: + BAR1 ABCDEFGHIJKLM 2 + loop + Pain: + BAR1 X 5 A_Pain + goto Spawn + } +} + +// EOF diff --git a/pksrc/lscripts/Dummy.dec b/pksrc/lscripts/Dummy.dec new file mode 100644 index 0000000..ef44ded --- /dev/null +++ b/pksrc/lscripts/Dummy.dec @@ -0,0 +1,64 @@ +damagetype Lith_NoDamage +{ + Factor 0 + ReplaceFactor +} + +actor Lith_Dummy +{ + +NOTIMEFREEZE + +ALWAYSPUFF + +PUFFONACTORS + +NOGRAVITY + +BLOODLESSIMPACT + + states + { + Spawn: + TNT1 A 1 + stop + } +} + +actor Lith_PlayerDummyPuff : Lith_Dummy +{ + DamageType "Lith_PlayerMissile" +} + +actor Lith_DummyArmor : BasicArmorBonus {} + +actor Lith_PlayerBox +{ + Radius 16 + Height 56 + + +NOTIMEFREEZE + +NOGRAVITY + +NOBLOCKMAP + +NOCLIP + + states + { + Spawn: + TNT1 A 1 + stop + } +} + +// Don't remove this, it is actually used for checking if this mod is loaded. +actor Lith_GreyHam : HealthBonus +{ + //$Category "Health and Armor" + + Tag "Grey Ham" + Inventory.PickupMessage "Picked up a grey ham." + + states + { + Spawn: + MURB A 1 + loop + } +} + +// EOF diff --git a/pksrc/lscripts/GunSmoke.dec b/pksrc/lscripts/GunSmoke.dec new file mode 100644 index 0000000..0fa6355 --- /dev/null +++ b/pksrc/lscripts/GunSmoke.dec @@ -0,0 +1,15 @@ +actor Lith_GunSmoke +{ +} + +actor Lith_GunSmokeEmitter +{ +} + +actor Lith_GunSmokeSpawner +{ +} + +actor Lith_GunSmokeSpawnerSmall : Lith_GunSmokeSpawner +{ +} diff --git a/pksrc/lscripts/Hacks.dec b/pksrc/lscripts/Hacks.dec new file mode 100644 index 0000000..eb49693 --- /dev/null +++ b/pksrc/lscripts/Hacks.dec @@ -0,0 +1,68 @@ +actor Lith_CustomFunction : CustomInventory +{ + +INVENTORY.ALWAYSPICKUP + +NOTIMEFREEZE +} + +actor Lith_MonsterHax +{ + Monster + -COUNTKILL + -CANPUSHWALLS + -CANUSEWALLS + -ACTIVATEMCROSS + -CANPASS +} + +actor Lith_Alerter : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_AlertMonsters + stop + } +} + +actor Lith_CameraHax +{ + Radius 2 + Height 2 + + +NOTIMEFREEZE + +NOINTERACTION +} + +actor Lith_TimeHax : PowerTimeFreezer +{ + Powerup.Duration 1 +} + +actor Lith_TimeHax2 : PowerTimeFreezer +{ + Powerup.Duration -80 +} + +actor Lith_UniqueID : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF + +INVENTORY.UNDROPPABLE +} + +actor Lith_EnemyChecker : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_GetAngles : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_AddAngle", x, y) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Headers/lith_lognames.h b/pksrc/lscripts/Headers/lith_lognames.h new file mode 100644 index 0000000..ad44753 --- /dev/null +++ b/pksrc/lscripts/Headers/lith_lognames.h @@ -0,0 +1,41 @@ + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_LogName +{ + msg_null, + msg_min, + msg_allmap = msg_min, + msg_armorbonus, + msg_backpack, + msg_berserk, + msg_bluearmor, + msg_blursphere, + msg_greenarmor, + msg_healthbonus, + msg_infrared, + msg_invuln, + msg_medikit, + msg_megasphere, + msg_radsuit, + msg_soulsphere, + msg_stimpack, + msg_redcard, + msg_bluecard, + msg_yellowcard, + msg_redskull, + msg_blueskull, + msg_yellowskull, + msg_doggosphere, + msg_dogs, + msg_clip, + msg_clipbox, + msg_shell, + msg_shellbox, + msg_rocket, + msg_rocketbox, + msg_cell, + msg_cellbox, + msg_max +}; + +// EOF diff --git a/pksrc/lscripts/Headers/lith_pdata.h b/pksrc/lscripts/Headers/lith_pdata.h new file mode 100644 index 0000000..5eec8a4 --- /dev/null +++ b/pksrc/lscripts/Headers/lith_pdata.h @@ -0,0 +1,46 @@ + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_PData +{ + pdata_upgrade, + pdata_rifle_firemode, + pdata_buttons, + pdata_has_sigil, + pdata_weapon_zoom, + pdata_pclass +}; + +enum // Lith_PClass +{ + pcl_unknown, + + // Base Classes + pcl_marine = 1 << 0, + pcl_cybermage = 1 << 1, + pcl_informant = 1 << 2, + pcl_wanderer = 1 << 3, + pcl_assassin = 1 << 4, + pcl_darklord = 1 << 5, + pcl_thoth = 1 << 6, + + // Mods + pcl_fdoomer = 1 << 7, + pcl_drla = 1 << 8, + + // Groups + pcl_outcasts = pcl_marine | pcl_cybermage, + pcl_missioners = pcl_informant | pcl_wanderer, + pcl_intruders = pcl_assassin | pcl_darklord | pcl_thoth, + pcl_mods = pcl_fdoomer | pcl_drla, + + // Lifeform Type + pcl_human = pcl_marine | pcl_cybermage | pcl_assassin | pcl_mods, + pcl_nonhuman = pcl_wanderer | pcl_darklord | pcl_thoth, + pcl_robot = pcl_informant, + + // Misc. Abilities + pcl_any = pcl_outcasts | pcl_missioners | pcl_intruders | pcl_mods, + pcl_magicuser = pcl_cybermage | pcl_wanderer | pcl_thoth, +}; + +// EOF diff --git a/pksrc/lscripts/Headers/lith_scorenums.h b/pksrc/lscripts/Headers/lith_scorenums.h new file mode 100644 index 0000000..7a8f017 --- /dev/null +++ b/pksrc/lscripts/Headers/lith_scorenums.h @@ -0,0 +1,88 @@ + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_ScoreNum +{ + // Score values + Score_Clip = 1000, + Score_ClipBox = 4000, + Score_Shell = 2000, + Score_ShellBox = 5000, + Score_Rocket = 3000, + Score_RocketBox = 6000, + Score_Cell = 4000, + Score_CellPack = 7000, + Score_Backpack = 10000, + + // Tier 1 + Score_ZombieMan = 1000, // Bullets + Score_ShotgunGuy = 2000, // Bullets + Score_ChaingunGuy = 2000, // Bullets + Score_Imp = 2000, // Fire + Score_DRLACaptain = 2000, // Bullets + + // Tier 2 + Score_Demon = 5000, // Melee + Score_Spectre = 7500, // Melee + Score_LostSoul = 500, // Melee + Score_Nitrogolem = 4000, // Melee, FireMagic + + // Tier 3 + Score_HellKnight = 7000, // Melee, Magic + Score_Revenant = 7000, // Melee, Shrapnel + Score_Cacodemon = 7000, // Melee, Energy + Score_Arachnotron = 7000, // Energy + Score_Mancubus = 7000, // Fire + Score_BaronOfHell = 8000, // Melee, Magic + Score_Ophidian = Score_Arachnotron, // Ice, Fire + + // Tier 4 + Score_PainElemental = 20000, // None + Score_Archvile = 40000, // FireMagic + + // Tier 5 + Score_SpiderDemon = 700000, // Bullets + Score_CyberDemon = 1500000, // Shrapnel + Score_Maulotaur = Score_SpiderDemon, // Melee, Fire + + // Tier 6 + Score_DSparil = 10000000, // Energy +}; + +enum // Lith_EXPNum +{ + // Tier 1 + Exp_ZombieMan = 5, + Exp_ShotgunGuy = 10, + Exp_ChaingunGuy = 15, + Exp_Imp = 5, + Exp_DRLACaptain = 30, + + // Tier 2 + Exp_Demon = 10, + Exp_Spectre = Exp_Demon, + Exp_LostSoul = 5, + Exp_Nitrogolem = 20, + + // Tier 3 + Exp_HellKnight = 80, + Exp_Revenant = 80, + Exp_Cacodemon = 50, + Exp_Arachnotron = 80, + Exp_Mancubus = 50, + Exp_BaronOfHell = 100, + Exp_Ophidian = 50, + + // Tier 4 + Exp_PainElemental = 100, + Exp_Archvile = 200, + + // Tier 5 + Exp_SpiderDemon = 3000, + Exp_CyberDemon = 4000, + Exp_Maulotaur = 1000, + + // Tier 6 + Exp_DSparil = 9000, +}; + +// EOF diff --git a/pksrc/lscripts/Headers/lith_upgradenames.h b/pksrc/lscripts/Headers/lith_upgradenames.h new file mode 100644 index 0000000..c7f5204 --- /dev/null +++ b/pksrc/lscripts/Headers/lith_upgradenames.h @@ -0,0 +1,67 @@ + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_UpgradeName +{ + // Body + UPGR_HeadsUpDisp, + UPGR_HeadsUpDis2, + UPGR_JetBooster, + UPGR_ReflexWetw, + UPGR_Zoom, + UPGR_VitalScan, + UPGR_CyberLegs, + UPGR_ReactArmor, + UPGR_ReactArmor2, + UPGR_DefenseNuke, + UPGR_Adrenaline, + + // Body (Cyber-Mage) + UPGR_Magic, + UPGR_SoulCleaver, + UPGR_StealthSys, + + // Weapon + UPGR_AutoReload, + UPGR_AutoPistol, + UPGR_PlasPistol, + UPGR_GaussShotty, + UPGR_PoisonShot, + UPGR_RifleModes, + UPGR_LaserRCW, + UPGR_ChargeRPG, + UPGR_HomingRPG, + UPGR_PlasLaser, + UPGR_PartBeam, + UPGR_PunctCannon, + UPGR_OmegaRail, + + // Weapon (Cyber-Mage) + UPGR_Mateba_A, + UPGR_ShockRif_A, + UPGR_ShockRif_B, + UPGR_SPAS_A, + UPGR_SPAS_B, + UPGR_SMG_A, + UPGR_SMG_B, + UPGR_SMG_C, + UPGR_IonRifle_A, + UPGR_IonRifle_B, + UPGR_CPlasma_A, + UPGR_ShipGun_A, + UPGR_ShipGun_B, + + // Extra + UPGR_TorgueMode, + UPGR_7777777, + UPGR_lolsords, + UPGR_Goldeneye, + + // Downgrade + UPGR_Implying, + UPGR_UNCEUNCE, + UPGR_InstaDeath, + + UPGR_BASE_MAX +}; + +// EOF diff --git a/pksrc/lscripts/Headers/lith_wdata.h b/pksrc/lscripts/Headers/lith_wdata.h new file mode 100644 index 0000000..349c59b --- /dev/null +++ b/pksrc/lscripts/Headers/lith_wdata.h @@ -0,0 +1,63 @@ + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_WData +{ + wdata_brightweps, + wdata_noitemfx, + wdata_bossspawned, + wdata_grafzone, + wdata_enemycheck, + wdata_ptid, + wdata_pclass, + wdata_magdrops, +}; + +enum // Lith_CBIUpgradeM +{ + cupg_weapninter, + cupg_hasupgr1, + cupg_armorinter, + cupg_hasupgr2, + cupg_weapninte2, + cupg_rdistinter, + cupg_max +}; + +enum // Lith_CBIUpgradeC +{ + cupg_c_slot3spell, + cupg_c_slot4spell, + cupg_c_slot5spell, + cupg_c_slot6spell, + cupg_c_slot7spell, + cupg_c_rdistinter, +}; + +enum // Lith_RandomSpawnNum +{ + lrsn_garmor, + lrsn_barmor, + lrsn_hbonus, + lrsn_abonus, + lrsn_clip, + lrsn_clipbx, +}; + +enum // Lith_ArmorSlot +{ + aslot_lower, + aslot_upper, + aslot_ring, + aslot_pauld, + aslot_max +}; + +enum // Lith_MsgType +{ + msg_ammo, + msg_huds, + msg_full, + msg_both +}; + +// EOF diff --git a/pksrc/lscripts/Headers/lith_weapons.h b/pksrc/lscripts/Headers/lith_weapons.h new file mode 100644 index 0000000..17333bf --- /dev/null +++ b/pksrc/lscripts/Headers/lith_weapons.h @@ -0,0 +1,124 @@ + +// This file was generaed by wepc. +// Edit only if you aren't going to recompile. + +enum // Lith_WeaponNum +{ + weapon_min = 1, + weapon_unknown = 0, + + weapon_cfist, + weapon_missile, + weapon_plasmadiff, + weapon_fist, + weapon_pistol, + weapon_revolver, + weapon_shotgun, + weapon_lazshotgun, + weapon_ssg, + weapon_rifle, + weapon_sniper, + weapon_launcher, + weapon_plasma, + weapon_bfg, + weapon_c_fist, + weapon_c_mateba, + weapon_c_rifle, + weapon_c_spas, + weapon_c_smg, + weapon_c_sniper, + weapon_c_plasma, + weapon_c_shipgun, + weapon_c_blade, + weapon_c_delear, + weapon_c_fire, + weapon_c_rend, + weapon_c_hulgyon, + weapon_c_starshot, + weapon_c_cercle, + + weapon_max_lith, + weapon_nonlith_start = weapon_max_lith - 1, + + weapon_fd_plut_fist, + weapon_fd_plut_chainsaw, + weapon_fd_plut_pistol, + weapon_fd_plut_shotgun, + weapon_fd_plut_ssg, + weapon_fd_plut_chaingun, + weapon_fd_plut_launcher, + weapon_fd_plut_plasma, + weapon_fd_plut_bfg, + weapon_fd_tnt_fist, + weapon_fd_tnt_chainsaw, + weapon_fd_tnt_pistol, + weapon_fd_tnt_shotgun, + weapon_fd_tnt_ssg, + weapon_fd_tnt_chaingun, + weapon_fd_tnt_launcher, + weapon_fd_tnt_plasma, + weapon_fd_tnt_bfg, + weapon_fd_doom2_fist, + weapon_fd_doom2_chainsaw, + weapon_fd_doom2_pistol, + weapon_fd_doom2_shotgun, + weapon_fd_doom2_ssg, + weapon_fd_doom2_chaingun, + weapon_fd_doom2_launcher, + weapon_fd_doom2_plasma, + weapon_fd_doom2_bfg, + weapon_fd_aliens_fist, + weapon_fd_aliens_chainsaw, + weapon_fd_aliens_pistol, + weapon_fd_aliens_shotgun, + weapon_fd_aliens_ssg, + weapon_fd_aliens_chaingun, + weapon_fd_aliens_launcher, + weapon_fd_aliens_plasma, + weapon_fd_aliens_bfg, + weapon_fd_jpcp_fist, + weapon_fd_jpcp_chainsaw, + weapon_fd_jpcp_pistol, + weapon_fd_jpcp_shotgun, + weapon_fd_jpcp_ssg, + weapon_fd_jpcp_chaingun, + weapon_fd_jpcp_launcher, + weapon_fd_jpcp_plasma, + weapon_fd_jpcp_bfg, + weapon_fd_btsx_fist, + weapon_fd_btsx_chainsaw, + weapon_fd_btsx_pistol, + weapon_fd_btsx_shotgun, + weapon_fd_btsx_ssg, + weapon_fd_btsx_chaingun, + weapon_fd_btsx_launcher, + weapon_fd_btsx_plasma, + weapon_fd_btsx_bfg, + + weapon_max +}; + +enum // Lith_WeaponName +{ + wepnam_fist, + wepnam_chainsaw, + wepnam_pistol, + wepnam_shotgun, + wepnam_supershotgun, + wepnam_chaingun, + wepnam_rocketlauncher, + wepnam_plasmarifle, + wepnam_bfg9000, + + wepnam_max, +}; + +enum // Lith_RifleMode +{ + rifle_firemode_auto, + rifle_firemode_grenade, + rifle_firemode_burst, + rifle_firemode_max +}; + +// EOF diff --git a/pksrc/lscripts/Items/Ammo.dec b/pksrc/lscripts/Items/Ammo.dec new file mode 100644 index 0000000..46f87f6 --- /dev/null +++ b/pksrc/lscripts/Items/Ammo.dec @@ -0,0 +1,27 @@ +actor Lith_MagicAmmo : Ammo +{ + Inventory.MaxAmount 1000 +} + +actor Lith_ShellAmmo : Ammo +{ + Inventory.MaxAmount 60 +} + +actor Lith_RocketAmmo : Ammo +{ + Inventory.MaxAmount 200 +} + +actor Lith_PlasmaAmmo : Ammo +{ + Inventory.MaxAmount 14000 +} + +actor Lith_CannonAmmo : Ammo +{ + Inventory.MaxAmount 40 +} + +// EOF + diff --git a/pksrc/lscripts/Items/AmmoPickups.dec b/pksrc/lscripts/Items/AmmoPickups.dec new file mode 100644 index 0000000..be76e66 --- /dev/null +++ b/pksrc/lscripts/Items/AmmoPickups.dec @@ -0,0 +1,200 @@ +actor Lith_ManaPickupTrail +{ + Scale 0.4 + RenderStyle "Add" + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + BLLT Q 0 bright A_SetScale(scalex * 0.9) + BLLT Q 1 bright A_FadeOut(0.05) + loop + } +} + +actor Lith_ManaPickup : CustomInventory +{ + RenderStyle "Add" + Radius 4 + Height 4 + Scale 0.8 + Inventory.PickupSound "player/pickup/mana" + Inventory.PickupMessage "" + + +INVENTORY.ALWAYSPICKUP + +INVENTORY.NOSCREENFLASH + +NOGRAVITY + +NOCLIP + +SEEKERMISSILE + + var int user_deathwait; + + states + { + Spawn: + BLLT Q 0 + BLLT Q 0 Thing_SetTranslation(0, 42470 + random(0, 7)) + BLLT Q 0 A_SetScale(scalex*frandom(0.5,1)) + BLLT Q 0 ThrustThingZ(0, 16, 0, 1) + BLLT Q 0 A_SetUserVar(user_deathwait, 35 * 15) + SpawnLoop: + BLLT Q 0 A_JumpIf(user_deathwait == 0, "Death") + BLLT Q 0 A_SetUserVar(user_deathwait, user_deathwait - 1) + BLLT Q 0 A_ChangeVelocity(14, 14, velz*0.9, CVF_REPLACE) + BLLT Q 0 A_SpawnItemEx("Lith_ManaPickupTrail", 0,0,0, 0,0,0, 0, SXF_TRANSFERTRANSLATION) + BLLT Q 0 A_JumpIfTargetInLOS("Spawn1") + goto Spawn2 + Spawn1: + BLLT Q 0 A_SeekerMissile(360, 40, SMF_PRECISE|SMF_CURSPEED) + Spawn2: + BLLT Q 1 bright + goto SpawnLoop + Death: + BLLT Q 1 bright A_FadeOut + wait + Pickup: + BLLT Q 0 A_GiveInventory("Lith_MagicAmmo", random(5, 10)) + stop + } +} + +actor Lith_Clip : Lith_ScoreItem replaces Clip +{ + Inventory.PickupSound "player/pickup/scoresmall" + + states + { + Spawn: + SCOR A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_Clip) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_clip) + goto Super::Pickup + } +} + +actor Lith_ClipBox : Lith_ScoreItem replaces ClipBox +{ + Inventory.PickupSound "player/pickup/scorebig" + + states + { + Spawn: + SCOR B -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_ClipBox) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_clipbox) + goto Super::Pickup + } +} + +actor Lith_Shell : Lith_ScoreItem replaces Shell +{ + Inventory.PickupSound "player/pickup/shells" + + states + { + Spawn: + SHEL A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_Shell) + TNT1 A 0 A_GiveInventory("Lith_ShellAmmo", AmmoAmt_Shell) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_shell) + goto Super::Pickup + } +} + +actor Lith_ShellBox : Lith_ScoreItem replaces ShellBox +{ + Inventory.PickupSound "player/pickup/shellb" + + states + { + Spawn: + SBOX A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_ShellBox) + TNT1 A 0 A_GiveInventory("Lith_ShellAmmo", AmmoAmt_ShellBox) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_shellbox) + goto Super::Pickup + } +} + +actor Lith_RocketAmmoPickup : Lith_ScoreItem replaces RocketAmmo +{ + Inventory.PickupSound "player/pickup/rockets" + + states + { + Spawn: + ROCK A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_Rocket) + TNT1 A 0 A_GiveInventory("Lith_RocketAmmo", AmmoAmt_Rocket) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_rocket) + goto Super::Pickup + } +} + +actor Lith_RocketBox : Lith_ScoreItem replaces RocketBox +{ + Inventory.PickupSound "player/pickup/rocketb" + + states + { + Spawn: + BROK A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_RocketBox) + TNT1 A 0 A_GiveInventory("Lith_RocketAmmo", AmmoAmt_RocketBox) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_rocketbox) + goto Super::Pickup + } +} + +actor Lith_Cell : Lith_ScoreItem replaces Cell +{ + Inventory.PickupSound "player/pickup/cells" + + states + { + Spawn: + CELL A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_Cell) + TNT1 A 0 A_GiveInventory("Lith_PlasmaAmmo", AmmoAmt_Cell) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_cell) + goto Super::Pickup + } +} + +actor Lith_CellPack : Lith_ScoreItem replaces CellPack +{ + Inventory.PickupSound "player/pickup/cellb" + + states + { + Spawn: + CELP A -1 + stop + Pickup: + TNT1 A 0 A_GiveInventory("Lith_ScoreCount", Score_CellPack) + TNT1 A 0 A_GiveInventory("Lith_PlasmaAmmo", AmmoAmt_CellPack) + TNT1 A 0 A_GiveInventory("Lith_CannonAmmo", AmmoAmt_CannonPack) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_cellbox) + goto Super::Pickup + } +} + +// EOF + diff --git a/pksrc/lscripts/Items/BlurSphere.dec b/pksrc/lscripts/Items/BlurSphere.dec new file mode 100644 index 0000000..19d4e23 --- /dev/null +++ b/pksrc/lscripts/Items/BlurSphere.dec @@ -0,0 +1,86 @@ +actor Lith_HasBarrier : Powerup +{ + Powerup.Duration -30 + Powerup.Color "C3 DF E8", 0.1 +} + +actor Lith_BarrierFX +{ + RenderStyle "Add" + Scale 0.3 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR A 10 nodelay A_PlaySound("player/barrier", CHAN_NOPAUSE|CHAN_LISTENERZ) + SpawnLoop: + LBAR A 0 A_SetScale(scalex * 0.86) + LBAR A 1 A_FadeOut(0.25) + loop + } +} + +actor Lith_BarrierProtection : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIf(damage >= 20 || damage == 0, "Nope") + TNT1 A 0 A_CheckFlag("MISSILE", "PickupOk") + goto Nope + PickupOk: + TNT1 A 0 A_JumpIf(!CallACS("Lith_BarrierCheck"), "Nope") + TNT1 A 0 A_Jump(64, "Nope") + TNT1 A 0 Thing_Remove(0) + TNT1 A 0 A_SpawnItemEx("Lith_BarrierFX") + stop + Nope: + TNT1 A 0 A_RailWait + stop + } +} + +actor Lith_BarrierSpell : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_RadiusGive("Lith_BarrierProtection", 64, 0) + TNT1 A 0 A_RailWait + stop + } +} + +actor Lith_BlurSphere : Lith_CustomInventory replaces BlurSphere +{ + //$Category "Powerups" + + Tag "Fragma" + Inventory.PickupSound "player/pickup/barrier" + + +FLOATBOB + +COUNTITEM + +VISIBILITYPULSE + +INVENTORY.BIGPOWERUP + +INVENTORY.FANCYPICKUPSOUND + +INVENTORY.ALWAYSPICKUP + + states + { + Spawn: + PINS ABCD 6 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_blursphere) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_Barrier") + TNT1 A 0 A_TakeInventory("Lith_HasBarrier") + TNT1 A 0 A_GiveInventory("Lith_HasBarrier") + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Items/CBIStuff.dec b/pksrc/lscripts/Items/CBIStuff.dec new file mode 100644 index 0000000..a974064 --- /dev/null +++ b/pksrc/lscripts/Items/CBIStuff.dec @@ -0,0 +1,183 @@ +actor Lith_CBIItem : CustomInventory +{ + //$Category "CBI Items" + + Inventory.PickupMessage "" + Inventory.PickupSound "player/pickup/upgrcbi" + + +INVENTORY.ALWAYSPICKUP + + var int user_glowangle; + var int user_glowzangle; + + const int Lith_ISF = SXF_SETMASTER; + + states + { + SpawnLoop: + TNT1 A 1 A_CheckSight("LoopButDontShowThatShitOffDawg") + TNT1 A 0 A_SetUserVar(user_glowangle, (user_glowangle + 5) % 360) + TNT1 A 0 A_SetUserVar(user_glowzangle, (user_glowzangle + 2) % 360) + + // xyz + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", sin(user_glowangle) * 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowzangle) * 9.0), + 0, 0, 0, 0) + + // yz + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", 0, + sin(user_glowangle) * 32.0, + 24.0 + (cos(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", cos(user_glowangle) * 32.0, + sin(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", cos(user_glowangle) * 32.0, + ((1.0 - sin(user_glowangle)) * 32.0) - 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + + // xz + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", sin(user_glowangle) * 32.0, + 0, + 24.0 + (cos(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", sin(user_glowangle) * 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_UpgrGlow", ((1.0 - sin(user_glowangle)) * 32.0) - 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + loop + LoopButDontShowThatShitOffDawg: + TNT1 A 1 + TNT1 A 0 A_CheckSight("LoopButDontShowThatShitOffDawg") + goto SpawnLoop + } +} + +actor Lith_ISM_WUPG_A : Lith_ItemSpriteM {states {Spr: WUPG A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISM_CUPG_A : Lith_ItemSpriteM {states {Spr: CUPG A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISM_ARM1_Z : Lith_ItemSpriteM {states {Spr: ARM1 Z 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISM_CUPG_B : Lith_ItemSpriteM {states {Spr: CUPG B 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISM_WRDP_A : Lith_ItemSpriteM {states {Spr: WRDP A 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISC_SPEL_A : Lith_ItemSpriteC {states {Spr: SPEL A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_SPEL_B : Lith_ItemSpriteC {states {Spr: SPEL B 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_SPEL_C : Lith_ItemSpriteC {states {Spr: SPEL C 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_SPEL_D : Lith_ItemSpriteC {states {Spr: SPEL D 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_SPEL_E : Lith_ItemSpriteC {states {Spr: SPEL E 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_BossReward1 : Lith_CBIItem +{ + Tag "Weapon Modification Device" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_weapninter) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_WUPG_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SPEL_A", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_weapninter) + stop + } +} + +actor Lith_BossReward2 : Lith_CBIItem +{ + Tag "KSKK Spec. High-Grade CPU" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_hasupgr1) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_CUPG_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SPEL_B", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_hasupgr1) + stop + } +} + +actor Lith_BossReward3 : Lith_CBIItem +{ + Tag "Armor Interface" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_armorinter) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_ARM1_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SPEL_C", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_armorinter) + stop + } +} + +actor Lith_BossReward4 : Lith_CBIItem +{ + Tag "KSKK Spec. Super High-Grade CPU" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_hasupgr2) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_CUPG_B", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SPEL_D", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_hasupgr2) + stop + } +} + +actor Lith_BossReward5 : Lith_CBIItem +{ + Tag "Weapon Refactoring Device" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_weapninte2) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_WRDP_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SPEL_E", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_weapninte2) + stop + } +} + +actor Lith_BossReward6 : Lith_CBIItem +{ + Tag "Reality Distortion Interface" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_CBIItemWasSpawned", cupg_rdistinter) + IOBJ C 0 A_SpawnItemEx("Lith_ItemSprite", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PickupCBIItem", cupg_rdistinter) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Items/Keys.dec b/pksrc/lscripts/Items/Keys.dec new file mode 100644 index 0000000..778c052 --- /dev/null +++ b/pksrc/lscripts/Items/Keys.dec @@ -0,0 +1,104 @@ +actor Lith_RedCard : Lith_CustomInventory replaces RedCard +{ + Inventory.PickupSound "player/pickup/redkey" + + states + { + Spawn: + RKEY A 10 + RKEY B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_redcard) + TNT1 A 0 A_GiveInventory("RedCard") + stop + } +} + +actor Lith_BlueCard : Lith_CustomInventory replaces BlueCard +{ + Inventory.PickupSound "player/pickup/bluekey" + + states + { + Spawn: + BKEY A 10 + BKEY B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_bluecard) + TNT1 A 0 A_GiveInventory("BlueCard") + stop + } +} + +actor Lith_YellowCard : Lith_CustomInventory replaces YellowCard +{ + Inventory.PickupSound "player/pickup/yellowkey" + + states + { + Spawn: + YKEY A 10 + YKEY B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_yellowcard) + TNT1 A 0 A_GiveInventory("YellowCard") + stop + } +} + +actor Lith_RedSkull : Lith_CustomInventory replaces RedSkull +{ + Inventory.PickupSound "player/pickup/redskull" + + states + { + Spawn: + RSKU A 10 + RSKU B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_redskull) + TNT1 A 0 A_GiveInventory("RedSkull") + stop + } +} + +actor Lith_BlueSkull : Lith_CustomInventory replaces BlueSkull +{ + Inventory.PickupSound "player/pickup/blueskull" + + states + { + Spawn: + BSKU A 10 + BSKU B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_blueskull) + TNT1 A 0 A_GiveInventory("BlueSkull") + stop + } +} + +actor Lith_YellowSkull : Lith_CustomInventory replaces YellowSkull +{ + Inventory.PickupSound "player/pickup/yellowskull" + + states + { + Spawn: + YSKU A 10 + YSKU B 10 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_yellowskull) + TNT1 A 0 A_GiveInventory("YellowSkull") + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Items/Powerups.dec b/pksrc/lscripts/Items/Powerups.dec new file mode 100644 index 0000000..985cf12 --- /dev/null +++ b/pksrc/lscripts/Items/Powerups.dec @@ -0,0 +1,291 @@ +actor Lith_CustomInventory : CustomInventory +{ + Inventory.PickupMessage "" + + states + { + Nope: + TNT1 A 0 + fail + } +} + +actor Lith_AllMap : Lith_CustomInventory replaces Allmap +{ + Tag "Computer Area Map" + Inventory.PickupSound "misc/p_pkup" + + +COUNTITEM + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + PMAP ABCDCB 6 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_allmap) + TNT1 A 0 A_GiveInventory("Allmap") + stop + } +} + +actor Lith_ArmorBonus : Lith_CustomInventory replaces ArmorBonus +{ + Tag "Armor Bonus" + +COUNTITEM + + states + { + Spawn: + BON2 ABCDCB 6 + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_armorbonus) + TNT1 A 0 A_GiveInventory("ArmorBonus") + stop + } +} + +actor Lith_Backpack : Lith_ScoreItem replaces Backpack +{ + Tag "Backpack" + Inventory.PickupSound "player/pickup/item" + + +COUNTITEM + + states + { + Spawn: + BPAK A 0 nodelay A_GiveInventory("Lith_ScoreCount", Score_Backpack) + BPAK A 0 A_GiveInventory("Lith_ShellAmmo", AmmoAmt_ShellBackpk) + BPAK A 0 A_GiveInventory("Lith_RocketAmmo", AmmoAmt_RocketBackpk) + BPAK A 0 A_GiveInventory("Lith_PlasmaAmmo", AmmoAmt_CellBackpk) + BPAK A 0 A_GiveInventory("Lith_CannonAmmo", AmmoAmt_CannonBackpk) + BPAK A -1 + stop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_Discount", 0) + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_backpack) + goto Super::Pickup + } +} + +actor Lith_Berserk : Lith_CustomInventory replaces Berserk +{ + Tag "Berserk" + Inventory.PickupSound "misc/p_pkup" + + +COUNTITEM + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + PSTR A -1 + stop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_berserk) + TNT1 A 0 A_GiveInventory("Berserk") + stop + } +} + +actor Lith_BlueArmor : Lith_CustomInventory replaces BlueArmor +{ + Tag "Blue Armor" + + states + { + Spawn: + ARM2 A 6 + ARM2 B 6 bright + loop + Pickup: + TNT1 A 0 A_JumpIf(!CallACS("Lith_CheckArmor", 200), "Nope") + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_bluearmor) + TNT1 A 0 A_GiveInventory("BlueArmor") + stop + } +} + +#include "lscripts/Items/BlurSphere.dec" + +actor Lith_GreenArmor : Lith_CustomInventory replaces GreenArmor +{ + Tag "Green Armor" + + states + { + Spawn: + ARM1 A 6 + ARM1 B 7 bright + loop + Pickup: + TNT1 A 0 A_JumpIf(!CallACS("Lith_CheckArmor", 100), "Nope") + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_greenarmor) + TNT1 A 0 A_GiveInventory("GreenArmor") + stop + } +} + +actor Lith_HealthBonus : Lith_CustomInventory replaces HealthBonus +{ + Tag "Health Bonus" + Inventory.PickupSound "items/healthbonus" + + +COUNTITEM + + states + { + Spawn: + BON1 ABCDCB 6 + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_healthbonus) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_GiveHealthBonus", 1) + stop + } +} + +actor Lith_Infrared : Lith_CustomInventory replaces Infrared +{ + Tag "CB-Goggles" + Inventory.PickupSound "player/pickup/infrared" + + +COUNTITEM + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + PVIS A 6 bright + PVIS B 6 + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_infrared) + TNT1 A 0 A_GiveInventory("Infrared") + stop + } +} + +actor Lith_InvulnerabilitySphere : Lith_CustomInventory replaces InvulnerabilitySphere +{ + Tag "Invulnerability" + Inventory.PickupSound "misc/p_pkup" + + +FLOATBOB + +COUNTITEM + +INVENTORY.BIGPOWERUP + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + PINV ABCD 6 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_invuln) + TNT1 A 0 A_GiveInventory("InvulnerabilitySphere") + stop + } +} + +actor Lith_Medikit : Lith_CustomInventory replaces Medikit +{ + Tag "Medikit" + + states + { + Spawn: + MEDI A -1 + stop + Pickup: + TNT1 A 0 A_JumpIf(!CallACS("Lith_CheckHealth", 25), "Nope") + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_medikit) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_GiveHealth", 25) + stop + } +} + +actor Lith_Megasphere : Lith_CustomInventory replaces Megasphere +{ + Tag "Tao'chyan" + Inventory.PickupSound "misc/p_pkup" + + +FLOATBOB + +COUNTITEM + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + MEGA ABCDB 6 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_megasphere) + TNT1 A 0 A_GiveInventory("BlueArmor") + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_GiveHealthBonus", 200) + stop + } +} + +actor Lith_RadSuit : Lith_CustomInventory replaces RadSuit +{ + Tag "Radiation Shielding Suit" + Inventory.PickupSound "misc/p_pkup" + + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + SUIT A -1 bright + stop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_radsuit) + TNT1 A 0 A_GiveInventory("RadSuit") + stop + } +} + +actor Lith_SoulSphere : Lith_CustomInventory replaces SoulSphere +{ + Tag "Heart" + Inventory.PickupSound "misc/p_pkup" + + +FLOATBOB + +COUNTITEM + +INVENTORY.FANCYPICKUPSOUND + + states + { + Spawn: + SOUL ABCDB 6 bright + loop + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_soulsphere) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_GiveHealthBonus", 100) + stop + } +} + +actor Lith_Stimpack : Lith_CustomInventory replaces Stimpack +{ + Tag "Stimpack" + + states + { + Spawn: + STIM A -1 + stop + Pickup: + TNT1 A 0 A_JumpIf(!CallACS("Lith_CheckHealth", 10), "Nope") + TNT1 A 0 ACS_NamedExecuteAlways("Lith_LogName", 0, msg_stimpack) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_GiveHealth", 10) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Items/Score.dec b/pksrc/lscripts/Items/Score.dec new file mode 100644 index 0000000..ae3dd49 --- /dev/null +++ b/pksrc/lscripts/Items/Score.dec @@ -0,0 +1,20 @@ +actor Lith_ScoreCount : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF +} + +actor Lith_ScoreItem : CustomInventory +{ + Inventory.PickupMessage "" + Inventory.PickupSound "" + + states + { + Pickup: + TNT1 A 0 ACS_NamedExecuteAlways("Lith_UpdateScore") + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Magazine.dec b/pksrc/lscripts/Magazine.dec new file mode 100644 index 0000000..c49842a --- /dev/null +++ b/pksrc/lscripts/Magazine.dec @@ -0,0 +1,29 @@ +actor Lith_DroppedMagazine +{ + BounceType "Doom" + BounceCount 3 + BounceSound "weapons/magbounce" + BounceFactor 0.7 + Mass 140 + Speed 0 + + +MISSILE // damn it, zdoom + +THRUACTORS + + var int user_side; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_JumpIf(!CallACS("LWData", wdata_magdrops), "Null") + TNT1 A 0 A_Jump(256, "Spawn1") + stop + Done: + "####" "#" 300 + "####" "#" 1 A_FadeOut + wait + } +} + +// EOF diff --git a/pksrc/lscripts/Maps.dec b/pksrc/lscripts/Maps.dec new file mode 100644 index 0000000..c149a4b --- /dev/null +++ b/pksrc/lscripts/Maps.dec @@ -0,0 +1,59 @@ +actor Lith_MapMarine : Lith_TitleMarine +{ + //$Category "Marines" + + //$Arg0 "Dialogue Number" + //$Arg0ToolTip "Identifier of the dialogue when talked to." + //$Arg0Default 1 + + Speed 2 + Mass 99999999 + + +USESPECIAL + + var int user_init; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_JumpIf(user_init, "Idle") + TNT1 A 0 A_SetUserVar(user_init, 1) + TNT1 A 0 A_SetSpecial(84, 24244, args[0]) + Idle: + NMA6 A 4 + loop + Missile.Shotgun: + goto Missile.Chaingun + } +} + +actor Lith_Map_Jacques : Lith_MapMarine +{ + Tag "Jacques" +} + + +actor Lith_Chair +{ + //$Category "Decoration" + + Height 32 + Radius 20 + Scale 0.7 + + States + { + Spawn: + CHAI A -1 + Stop + } +} + +actor Lith_BoomBarrel : ExplosiveBarrel +{ + DeathSound "misc/booom" +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Archangel.dec b/pksrc/lscripts/Monsters/Archangel.dec new file mode 100644 index 0000000..e69de29 diff --git a/pksrc/lscripts/Monsters/Isaac.dec b/pksrc/lscripts/Monsters/Isaac.dec new file mode 100644 index 0000000..51e570c --- /dev/null +++ b/pksrc/lscripts/Monsters/Isaac.dec @@ -0,0 +1,165 @@ +actor Lith_IsaacThompsonTrail +{ + RenderStyle "Add" + Scale 0.8 + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut + wait + } +} + +actor Lith_IsaacThompsonBullet : FastProjectile +{ + MissileType "Lith_IsaacThompsonTrail" + RenderStyle "Translucent" + Species "Lith_Phantom" + DamageType "Lith_Bullets" + Alpha 0.9 + Scale 0.3 + Radius 4 + Height 4 + Damage (4 * random(1, 4)) + Speed 128 + + +BLOODSPLATTER + +MTHRUSPECIES + +DONTHURTSPECIES + + states + { + Spawn: + TNT1 A 1 + wait + Crash: + Death: + PUFF CD 4 + stop + XDeath: + TNT1 A 0 + stop + } +} + +actor Lith_IsaacThompsonBullet2 : Lith_IsaacThompsonBullet +{ + Damage 1 +} + +actor Lith_Boss_Michael : Lith_BasicPhantom +{ + Tag "Michael, Brother of Isaac" + Health 4000 + Speed 7 + + +THRUSPECIES + +NOINFIGHTING + + states + { + See: + PLAY AAAABBBBCCCCDDDD 1 A_Chase("Melee", "") + loop + + Melee: + PLAY F 0 A_FaceTarget + PLAY F 5 A_CustomMeleeAttack(15 * random(1, 5), "enemies/michael/hit", "enemies/michael/swing", "Lith_Melee") + PLAY F 5 + goto See + + Death: + TNT1 A 0 A_KillMaster + PLAY H 10 A_NoBlocking + PLAY I 60 + TNT1 A 70 + stop + } +} + +actor Lith_Boss_Johnson : Lith_BasicPhantom +{ + Tag "Isaac, Superbiorem Est" + Health 40 + Speed 3 + + +THRUSPECIES + +NOINFIGHTING + + states + { + See: + PLAY AAAABBBBCCCCDDDD 1 A_Chase("", "Missile", CHF_FASTCHASE) + loop + + Missile: + PLAY E 0 A_PlaySound("enemies/isaac/fire", CHAN_WEAPON) + PLAY EE 0 A_CustomMissile("Lith_IsaacThompsonBullet2", 32, 0, frandom(-10, 10), CMF_OFFSETPITCH, frandom(-5, 5)) + PLAY E 1 A_FaceTarget + PLAY F 1 A_FaceTarget + PLAY F 2 A_MonsterRefire(0, "See") + loop + + Death: + PLAY A 0 ACS_NamedExecuteWithResult("Lith_PhantomUnsetDupe") + PLAY H 10 A_NoBlocking + PLAY I 1 A_FadeOut(0.01) + wait + } +} + +actor Lith_Boss_Isaac : Lith_Phantom +{ + Tag "Isaac, Superbiorem Est" + Health 4000 + + var int user_spawnedduplicates; + + states + { + PostInit: + TNT1 A 0 A_JumpIf(user_phase < 2, 2) + TNT1 A 0 A_SpawnItemEx("Lith_Boss_Michael", 0,0,0, 0,0,0, 0, SXF_SETMASTER|SXF_NOCHECKPOSITION) + TNT1 A 0 A_Jump(256, "CallPhantomMain") + + See: + TNT1 A 0 A_Jump(32, "Missile2_1") + PLAY AAAABBBBCCCCDDDD 1 A_Chase("", "Missile", CHF_FASTCHASE) + loop + + Missile: + TNT1 A 0 A_Jump(256, "Missile1", "Missile2") + Missile1: + PLAY E 0 A_PlaySound("enemies/isaac/fire", CHAN_WEAPON) + PLAY EE 0 A_CustomMissile("Lith_IsaacThompsonBullet", 32, 0, frandom(-10, 10), CMF_OFFSETPITCH, frandom(-5, 5)) + PLAY E 1 A_FaceTarget + PLAY F 1 A_FaceTarget + PLAY F 0 A_Chase("", "", CHF_FASTCHASE) + PLAY F 2 A_MonsterRefire(0, "See") + goto Missile + + Missile2: + TNT1 A 0 A_JumpIf(user_phase < 3, "Missile1") + Missile2_1: + TNT1 A 0 A_JumpIf(user_phase < 3, "See") + TNT1 A 0 A_JumpIf(user_spawnedduplicates > 3, "See") + TNT1 A 0 A_SetUserVar("user_spawnedduplicates", user_spawnedduplicates + 1) + TNT1 A 0 A_SpawnItemEx("Lith_Boss_Johnson", 0,0,0, 0,0,0, 0, SXF_SETMASTER|SXF_NOCHECKPOSITION) + goto See + + Death: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PhantomDeath", 3, user_phase) + TNT1 A 0 A_KillChildren + PLAY H 10 A_NoBlocking + PLAY I 60 + TNT1 A 70 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/James.dec b/pksrc/lscripts/Monsters/James.dec new file mode 100644 index 0000000..e85d71a --- /dev/null +++ b/pksrc/lscripts/Monsters/James.dec @@ -0,0 +1,97 @@ +actor Lith_JamesRevolverTrail +{ + RenderStyle "Add" + Scale 0.7 + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut + wait + } +} + +actor Lith_JamesRevolverBullet : FastProjectile +{ + MissileType "Lith_JamesRevolverTrail" + RenderStyle "Translucent" + DamageType "Lith_Bullets" + Alpha 0.9 + Scale 0.8 + Radius 20 + Height 4 + Damage (10 * random(1, 4)) + Speed 64 + + +BLOODSPLATTER + + states + { + Spawn: + TNT1 A 1 + wait + Crash: + Death: + PUFF CD 4 + stop + XDeath: + TNT1 A 0 + stop + } +} + +actor Lith_Boss_James : Lith_Phantom +{ + Tag "James, Vanagloriam Est" + Health 1000 + + states + { + See: + PLAY AAAABBBBCCCCDDDD 1 A_Chase("Melee", "Missile", user_phase > 1 ? CHF_FASTCHASE : 0) + loop + + Missile: + PLAY E 0 A_JumpIf(user_phase < 2, "Missile1") + PLAY F 0 A_JumpIf(user_meleetime > 0, "Missile1") + PLAY E 0 A_JumpIfCloser(384, "Lunge") + + Missile1: + PLAY E 0 A_PlaySound("enemies/james/fire", CHAN_6) + PLAY F 0 A_FaceTarget + PLAY E 5 A_CustomMissile("Lith_JamesRevolverBullet", 32, 0, frandom(-20, 20), CMF_OFFSETPITCH, frandom(-5, 5)) + PLAY F 2 A_FaceTarget + PLAY F 0 A_FaceTarget + PLAY F 0 A_Jump(128, "See") + PLAY F 2 A_MonsterRefire(0, "See") + loop + + Melee: + PLAY F 0 A_JumpIf(user_phase < 2, "Missile") + PLAY F 0 A_JumpIf(user_meleetime > 0, "Missile") + PLAY F 0 A_SetUserVar(user_meleetime, 35) + PLAY F 0 A_FaceTarget + PLAY F 5 A_CustomMeleeAttack(15 * random(1, 5), "enemies/james/knifehit", "enemies/james/knife", "Lith_Melee") + goto See + + Lunge: + PLAY A 0 A_PlaySound("enemies/phantom/lunge", CHAN_5, 1.0, false, 0.5) + PLAY A 10 A_FaceTarget + PLAY A 0 A_FaceTarget + PLAY A 5 ACS_NamedExecuteWithResult("Lith_PhantomTeleport") + goto Melee + + Death: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PhantomDeath", 1, user_phase) + PLAY H 10 A_NoBlocking + PLAY I 60 + TNT1 A 70 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Makarov.dec b/pksrc/lscripts/Monsters/Makarov.dec new file mode 100644 index 0000000..d4b881f --- /dev/null +++ b/pksrc/lscripts/Monsters/Makarov.dec @@ -0,0 +1,162 @@ +actor Lith_MakarovShotgunTrail +{ + RenderStyle "Add" + Scale 0.5 + Alpha 0.5 + + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut + wait + } +} + +actor Lith_MakarovShotgunBullet : FastProjectile +{ + MissileType "Lith_MakarovShotgunTrail" + RenderStyle "Translucent" + DamageType "Lith_Bullets" + Alpha 0.9 + Scale 0.5 + Radius 24 + Height 20 + Damage (3 * random(1, 5)) + Speed 96 + + +BLOODSPLATTER + + states + { + Spawn: + TNT1 A 1 + wait + Crash: + Death: + PUFF CD 4 + stop + XDeath: + TNT1 A 0 + stop + } +} + +actor Lith_MakarovGrenade : Lith_RifleGrenade +{ + Speed 30 + Species "Lith_Phantom" + + +DONTHURTSPECIES +} + +actor Lith_MakarovChainStopper : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_Stop + stop + } +} + +actor Lith_MakarovChainFX +{ + states + { + Spawn: + BLLT I 10 bright + stop + } +} + +actor Lith_MakarovChain +{ + Speed 30 + DamageType "Lith_Melee" + + Projectile + +HITTRACER + + states + { + Spawn: + TNT1 A 1 A_SpawnItemEx("Lith_MakarovChainFX") + wait + XDeath: + TNT1 A 0 A_PlaySound("enemies/makarov/chainhit", CHAN_5) + Death: + TNT1 AAAAAAAAAAAAAAAAAA 1 A_GiveInventory("Lith_MakarovChainStopper", 1, AAPTR_TRACER) + stop + } +} + +actor Lith_Boss_Makarov : Lith_Phantom +{ + Tag "Makarov, Avarum Est" + Health 3000 + + states + { + See: + PLAY AAAABBBBCCCCDDDD 1 A_Chase + loop + + Missile: + PLAY E 0 A_JumpIf(user_phase < 2, "Missile1") + PLAY F 0 A_JumpIf(user_meleetime > 0, "Missile1") + PLAY E 0 A_JumpIfCloser(384, "Lunge") + + Missile1: + PLAY E 0 A_Jump(128, "Missile2", "Missile3") + PLAY E 0 A_PlaySound("enemies/makarov/fire", CHAN_6) + PLAY EEEEEEEE 0 A_CustomMissile("Lith_MakarovShotgunBullet", 32, 0, frandom(-20, 20), CMF_OFFSETPITCH, frandom(-5, 5)) + PLAY E 5 A_FaceTarget + PLAY F 2 A_FaceTarget + PLAY E 10 A_PlaySound("enemies/makarov/pump", CHAN_5) + PLAY F 10 + PLAY F 0 A_Jump(128, "See") + PLAY F 2 A_MonsterRefire(0, "See") + loop + + Missile2: + PLAY E 0 A_PlaySound("enemies/makarov/throw", CHAN_6) + PLAY E 0 A_CustomMissile("Lith_MakarovGrenade", 32, 0, frandom(-4,4), CMF_ABSOLUTEPITCH|CMF_SAVEPITCH, -10) + PLAY EF 10 + goto See + + Missile3: + PLAY E 0 A_JumpIf(user_phase < 3, "Missile2") + PLAY E 0 A_PlaySound("enemies/makarov/chainthrow", CHAN_6) + PLAY E 0 A_CustomMissile("Lith_MakarovChain") + PLAY EF 10 + goto See + + Melee: + PLAY F 0 A_JumpIf(user_phase < 2, "Missile") + PLAY F 0 A_JumpIf(user_meleetime > 0, "Missile") + PLAY F 0 A_SetUserVar(user_meleetime, 35) + PLAY F 0 A_FaceTarget + PLAY F 5 A_CustomMeleeAttack(15 * random(1, 5), "enemies/makarov/scythehit", "enemies/makarov/scythe", "Lith_Melee") + PLAY F 7 + goto See + + Lunge: + PLAY A 0 A_PlaySound("enemies/phantom/lunge", CHAN_5, 1.0, false, 0.5) + PLAY A 10 A_FaceTarget + PLAY A 0 A_FaceTarget + PLAY A 5 ACS_NamedExecuteWithResult("Lith_PhantomTeleport") + goto Melee + + Death: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PhantomDeath", 2, user_phase) + PLAY H 10 A_NoBlocking + PLAY I 60 + TNT1 A 70 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Phantom.dec b/pksrc/lscripts/Monsters/Phantom.dec new file mode 100644 index 0000000..5bb8b93 --- /dev/null +++ b/pksrc/lscripts/Monsters/Phantom.dec @@ -0,0 +1,203 @@ +actor Lith_IsPhantom : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_PhantomOut : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 + TNT1 A 0 A_Quake(9, 35*2, 0, 2048) + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_PlayerDeathParticle", frandom(-16,16), frandom(-16,16), 0, 0, 0, frandom(2, 6), 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_PhantomAuraFX +{ + RenderStyle "Subtract" + Alpha 0.6 + Scale 0.05 + + +NOINTERACTION + + states + { + Spawn: + LDTH A 1 A_FadeOut(0.01) + wait + } +} + +actor Lith_PhantomAura : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 AAAAAAAA 0 A_SpawnItemEx("Lith_PhantomAuraFX", frandom(-20,20),frandom(-20,20),frandom(0,16), 0,0,frandom(0,1), 0, 0, 128) + stop + } +} + +actor Lith_PhantomTeleportFX +{ + RenderStyle "Stencil" + StencilColor "Black" + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + PLAY A 3 + PLAY A 1 A_FadeOut + wait + } +} + +actor Lith_PhantomTeleport : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_SpawnItemEx("Lith_PhantomTeleportFX", 0,0,0, 0,0,0.5, 0) + stop + } +} + +actor Lith_PhantomPhase2Flags : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("MISSILEMORE", true) + stop + } +} + +actor Lith_PhantomPhase3Flags : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("MISSILEMORE", true) + TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", true) + stop + } +} + +actor Lith_PhantomTarget : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIf(CallACS("Lith_PhantomTargetCheck"), "Nope") + TNT1 A 0 A_CheckFlag("COUNTKILL", 1) + goto Nope + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PhantomTarget") + stop + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_PhantomHunt : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_RadiusGive("Lith_PhantomTarget", 1024, RGF_MONSTERS) + stop + } +} + +actor Lith_PhantomLOSCheck : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIfTargetInLOS("Nope") + TNT1 A 0 A_ClearTarget + stop + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_Phantom +{ + Species "Lith_Phantom" + Radius 20 + Height 56 + Speed 4 + RenderStyle "Stencil" + StencilColor "Black" + + Monster + +NOPAIN + +THRUSPECIES + +DONTHARMSPECIES + +BOSS + +MISSILEMORE + +NOTARGET + +NEVERTARGET + +DONTMORPH + + var int user_phase; + var int user_donespawn; + var int user_step; + var int user_meleetime; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_JumpIf(user_donespawn, "Spawn1") + TNT1 A 0 A_GiveInventory("Lith_IsPhantom", 1) + TNT1 A 0 A_SetUserVar(user_donespawn, true) + TNT1 A 0 A_Jump(256, "PostInit") + PostInit: + TNT1 A 0 A_Jump(256, "CallPhantomMain") + CallPhantomMain: + TNT1 A 0 A_PlaySound("enemies/phantom/aura", CHAN_7, 0.7, true, 0.7) + TNT1 A 0 ACS_NamedExecute("Lith_PhantomMain") + goto Spawn1 + Spawn1: + PLAY A 0 A_JumpIf(user_step <= 1, "Spawn2") + PLAY B 0 A_JumpIf(user_step == 2, "Spawn2") + PLAY C 0 A_JumpIf(user_step == 3, "Spawn2") + PLAY D 0 A_SetUserVar(user_step, 0) + Spawn2: + PLAY "#" 0 A_SetUserVar(user_step, user_step + 1) + PLAY "#" 0 A_Look + PLAY "#" 1 A_Wander + PLAY "#" 0 A_Look + PLAY "#" 1 A_Wander + PLAY "#" 0 A_Look + PLAY "#" 1 A_Wander + PLAY "#" 0 A_Look + PLAY "#" 1 A_Wander + goto Spawn1 + GetOutOfDodge: + "####" "#" 1 A_FadeOut(0.05) + loop + } +} + +actor Lith_BasicPhantom : Lith_Phantom +{ + states + { + CallPhantomMain: + TNT1 A 0 ACS_NamedExecute("Lith_PhantomMain2") + goto Spawn1 + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/System.dec b/pksrc/lscripts/Monsters/System.dec new file mode 100644 index 0000000..7d67d20 --- /dev/null +++ b/pksrc/lscripts/Monsters/System.dec @@ -0,0 +1,214 @@ +actor Lith_UniqueID : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF + +INVENTORY.UNDROPPABLE +} + +actor Lith_EnemyChecker : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_MonsterID : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF + +INVENTORY.UNDROPPABLE +} + +actor Lith_MonsterInvalid : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_MResist : PowerProtection +{ + Powerup.Duration 0x7FFFFFFF +} + +actor Lith_M_Bullets1 :Lith_MResist{DamageFactor "Lith_Bullets", 0.80 DamageFactor "Bullet", 0.80} +actor Lith_M_Energy1 :Lith_MResist{DamageFactor "Lith_Energy", 0.80 DamageFactor "Railgun", 0.80 DamageFactor "Electric", 0.80 DamageFactor "Plasma", 0.80} +actor Lith_M_Fire1 :Lith_MResist{DamageFactor "Lith_Fire", 0.80 DamageFactor "Fire", 0.80} +actor Lith_M_Magic1 :Lith_MResist{DamageFactor "Lith_Magic", 0.80} +actor Lith_M_Melee1 :Lith_MResist{DamageFactor "Lith_Melee", 0.80 DamageFactor "Melee", 0.80} +actor Lith_M_Shrapnel1:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.80} + +actor Lith_M_Bullets2 :Lith_MResist{DamageFactor "Lith_Bullets", 0.60 DamageFactor "Bullet", 0.60} +actor Lith_M_Energy2 :Lith_MResist{DamageFactor "Lith_Energy", 0.60 DamageFactor "Railgun", 0.60 DamageFactor "Electric", 0.60 DamageFactor "Plasma", 0.60} +actor Lith_M_Fire2 :Lith_MResist{DamageFactor "Lith_Fire", 0.60 DamageFactor "Fire", 0.60} +actor Lith_M_Magic2 :Lith_MResist{DamageFactor "Lith_Magic", 0.60} +actor Lith_M_Melee2 :Lith_MResist{DamageFactor "Lith_Melee", 0.60 DamageFactor "Melee", 0.60} +actor Lith_M_Shrapnel2:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.60} + +actor Lith_M_Bullets3 :Lith_MResist{DamageFactor "Lith_Bullets", 0.40 DamageFactor "Bullet", 0.40} +actor Lith_M_Energy3 :Lith_MResist{DamageFactor "Lith_Energy", 0.40 DamageFactor "Railgun", 0.40 DamageFactor "Electric", 0.40 DamageFactor "Plasma", 0.40} +actor Lith_M_Fire3 :Lith_MResist{DamageFactor "Lith_Fire", 0.40 DamageFactor "Fire", 0.40} +actor Lith_M_Magic3 :Lith_MResist{DamageFactor "Lith_Magic", 0.40} +actor Lith_M_Melee3 :Lith_MResist{DamageFactor "Lith_Melee", 0.40 DamageFactor "Melee", 0.40} +actor Lith_M_Shrapnel3:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.40} + +actor Lith_M_Bullets4 :Lith_MResist{DamageFactor "Lith_Bullets", 0.20 DamageFactor "Bullet", 0.20} +actor Lith_M_Energy4 :Lith_MResist{DamageFactor "Lith_Energy", 0.20 DamageFactor "Railgun", 0.20 DamageFactor "Electric", 0.20 DamageFactor "Plasma", 0.20} +actor Lith_M_Fire4 :Lith_MResist{DamageFactor "Lith_Fire", 0.20 DamageFactor "Fire", 0.20} +actor Lith_M_Magic4 :Lith_MResist{DamageFactor "Lith_Magic", 0.20} +actor Lith_M_Melee4 :Lith_MResist{DamageFactor "Lith_Melee", 0.20 DamageFactor "Melee", 0.20} +actor Lith_M_Shrapnel4:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.20} + +actor Lith_M_Bullets5 :Lith_MResist{DamageFactor "Lith_Bullets", 0.10 DamageFactor "Bullet", 0.10} +actor Lith_M_Energy5 :Lith_MResist{DamageFactor "Lith_Energy", 0.10 DamageFactor "Railgun", 0.10 DamageFactor "Electric", 0.10 DamageFactor "Plasma", 0.10} +actor Lith_M_Fire5 :Lith_MResist{DamageFactor "Lith_Fire", 0.10 DamageFactor "Fire", 0.10} +actor Lith_M_Magic5 :Lith_MResist{DamageFactor "Lith_Magic", 0.10} +actor Lith_M_Melee5 :Lith_MResist{DamageFactor "Lith_Melee", 0.10 DamageFactor "Melee", 0.10} +actor Lith_M_Shrapnel5:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.10} + +actor Lith_MonsterNoPain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("NOPAIN", true) + stop + } +} + +actor Lith_MonsterUsePain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("NOPAIN", false) + stop + } +} + +actor Lith_MonsterBarrier +{ + RenderStyle "Add" + XScale 0.3 + YScale 0.6 + VSpeed 2 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR A 1 + SpawnLoop: + LBAR A 1 A_FadeOut + loop + } +} + +actor Lith_MonsterHeptaura +{ + RenderStyle "Add" + XScale 0.2 + YScale 0.4 + VSpeed 2 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR B 1 + SpawnLoop: + LBAR B 1 A_FadeOut(frandom(0.06, 0.08)) + loop + } +} + +actor Lith_MonsterBarrierLook : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_RadiusGive("Lith_GetAngles", 384, RGF_PLAYERS|RGF_CUBE) + stop + } +} + +actor Lith_MonsterSoulEffect +{ + RenderStyle "Add" + Scale 0.25 + + +NOTIMEFREEZE + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT N 0 A_SetScale(scalex * 0.9) + BLLT N 1 A_FadeOut + loop + } +} + +actor Lith_MonsterSoul +{ + RenderStyle "Add" + Scale 0.25 + Damage 7 + Radius 4 + Height 4 + Speed 7 + + Projectile + +FLOATBOB + +SEEKERMISSILE + +MTHRUSPECIES + +THRUSPECIES + +BRIGHT + + states + { + Spawn: + BLLT N 0 + BLLT N 0 A_PlaySound("ghost/spawn", CHAN_5, 1, false, 0.5) + BLLT N 0 ThrustThingZ(0, 4, 0, 0) + SpawnLoop: + BLLT N 0 A_SpawnItemEx("Lith_MonsterSoulEffect") + BLLT N 0 A_SeekerMissile(0, 360, SMF_LOOK|SMF_PRECISE, 256, 1) + BLLT N 1 A_FadeOut(0.05) + loop + Death: + BLLT N 0 A_PlaySound("ghost/hit", CHAN_5, 1, false, 0.5) + TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("Lith_MonsterSoulEffect", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2)) + stop + } +} + +actor Lith_RunMonsterInfo : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIfInventory("Lith_MonsterID", 1, "Nope") + TNT1 A 0 A_JumpIfInventory("Lith_MonsterInvalid", 1, "Nope") + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MonsterInfo") + stop + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_MonsterInfoEmitter +{ + +NOTIMEFREEZE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_RadiusGive("Lith_RunMonsterInfo", 16384, RGF_MONSTERS|RGF_CUBE)//RGF_MONSTERS|RGF_NOSIGHT|RGF_CUBE) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/System.dec.bak b/pksrc/lscripts/Monsters/System.dec.bak new file mode 100644 index 0000000..d7663b2 --- /dev/null +++ b/pksrc/lscripts/Monsters/System.dec.bak @@ -0,0 +1,203 @@ +actor Lith_MonsterID : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF + +INVENTORY.UNDROPPABLE +} + +actor Lith_MonsterInvalid : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_MResist : PowerProtection +{ + Powerup.Duration 0x7FFFFFFF +} + +actor Lith_M_Bullets1 :Lith_MResist{DamageFactor "Lith_Bullets", 0.80 DamageFactor "Bullet", 0.80} +actor Lith_M_Energy1 :Lith_MResist{DamageFactor "Lith_Energy", 0.80 DamageFactor "Railgun", 0.80 DamageFactor "Electric", 0.80 DamageFactor "Plasma", 0.80} +actor Lith_M_Fire1 :Lith_MResist{DamageFactor "Lith_Fire", 0.80 DamageFactor "Fire", 0.80} +actor Lith_M_Magic1 :Lith_MResist{DamageFactor "Lith_Magic", 0.80} +actor Lith_M_Melee1 :Lith_MResist{DamageFactor "Lith_Melee", 0.80 DamageFactor "Melee", 0.80} +actor Lith_M_Shrapnel1:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.80} + +actor Lith_M_Bullets2 :Lith_MResist{DamageFactor "Lith_Bullets", 0.60 DamageFactor "Bullet", 0.60} +actor Lith_M_Energy2 :Lith_MResist{DamageFactor "Lith_Energy", 0.60 DamageFactor "Railgun", 0.60 DamageFactor "Electric", 0.60 DamageFactor "Plasma", 0.60} +actor Lith_M_Fire2 :Lith_MResist{DamageFactor "Lith_Fire", 0.60 DamageFactor "Fire", 0.60} +actor Lith_M_Magic2 :Lith_MResist{DamageFactor "Lith_Magic", 0.60} +actor Lith_M_Melee2 :Lith_MResist{DamageFactor "Lith_Melee", 0.60 DamageFactor "Melee", 0.60} +actor Lith_M_Shrapnel2:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.60} + +actor Lith_M_Bullets3 :Lith_MResist{DamageFactor "Lith_Bullets", 0.40 DamageFactor "Bullet", 0.40} +actor Lith_M_Energy3 :Lith_MResist{DamageFactor "Lith_Energy", 0.40 DamageFactor "Railgun", 0.40 DamageFactor "Electric", 0.40 DamageFactor "Plasma", 0.40} +actor Lith_M_Fire3 :Lith_MResist{DamageFactor "Lith_Fire", 0.40 DamageFactor "Fire", 0.40} +actor Lith_M_Magic3 :Lith_MResist{DamageFactor "Lith_Magic", 0.40} +actor Lith_M_Melee3 :Lith_MResist{DamageFactor "Lith_Melee", 0.40 DamageFactor "Melee", 0.40} +actor Lith_M_Shrapnel3:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.40} + +actor Lith_M_Bullets4 :Lith_MResist{DamageFactor "Lith_Bullets", 0.20 DamageFactor "Bullet", 0.20} +actor Lith_M_Energy4 :Lith_MResist{DamageFactor "Lith_Energy", 0.20 DamageFactor "Railgun", 0.20 DamageFactor "Electric", 0.20 DamageFactor "Plasma", 0.20} +actor Lith_M_Fire4 :Lith_MResist{DamageFactor "Lith_Fire", 0.20 DamageFactor "Fire", 0.20} +actor Lith_M_Magic4 :Lith_MResist{DamageFactor "Lith_Magic", 0.20} +actor Lith_M_Melee4 :Lith_MResist{DamageFactor "Lith_Melee", 0.20 DamageFactor "Melee", 0.20} +actor Lith_M_Shrapnel4:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.20} + +actor Lith_M_Bullets5 :Lith_MResist{DamageFactor "Lith_Bullets", 0.10 DamageFactor "Bullet", 0.10} +actor Lith_M_Energy5 :Lith_MResist{DamageFactor "Lith_Energy", 0.10 DamageFactor "Railgun", 0.10 DamageFactor "Electric", 0.10 DamageFactor "Plasma", 0.10} +actor Lith_M_Fire5 :Lith_MResist{DamageFactor "Lith_Fire", 0.10 DamageFactor "Fire", 0.10} +actor Lith_M_Magic5 :Lith_MResist{DamageFactor "Lith_Magic", 0.10} +actor Lith_M_Melee5 :Lith_MResist{DamageFactor "Lith_Melee", 0.10 DamageFactor "Melee", 0.10} +actor Lith_M_Shrapnel5:Lith_MResist{DamageFactor "Lith_Shrapnel", 0.10} + +actor Lith_MonsterNoPain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("NOPAIN", true) + stop + } +} + +actor Lith_MonsterUsePain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_ChangeFlag("NOPAIN", false) + stop + } +} + +actor Lith_MonsterBarrier +{ + RenderStyle "Add" + XScale 0.3 + YScale 0.6 + VSpeed 2 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR A 1 + SpawnLoop: + LBAR A 1 A_FadeOut + loop + } +} + +actor Lith_MonsterHeptaura +{ + RenderStyle "Add" + XScale 0.2 + YScale 0.4 + VSpeed 2 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR B 1 + SpawnLoop: + LBAR B 1 A_FadeOut(frandom(0.06, 0.08)) + loop + } +} + +actor Lith_MonsterBarrierLook : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_RadiusGive("Lith_GetAngles", 384, RGF_PLAYERS|RGF_CUBE) + stop + } +} + +actor Lith_MonsterSoulEffect +{ + RenderStyle "Add" + Scale 0.25 + + +NOTIMEFREEZE + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT N 0 A_SetScale(scalex * 0.9) + BLLT N 1 A_FadeOut + loop + } +} + +actor Lith_MonsterSoul +{ + RenderStyle "Add" + Scale 0.25 + Damage 7 + Radius 4 + Height 4 + Speed 7 + + Projectile + +FLOATBOB + +SEEKERMISSILE + +MTHRUSPECIES + +THRUSPECIES + +BRIGHT + + states + { + Spawn: + BLLT N 0 + BLLT N 0 A_PlaySound("ghost/spawn", CHAN_5, 1, false, 0.5) + BLLT N 0 ThrustThingZ(0, 4, 0, 0) + SpawnLoop: + BLLT N 0 A_SpawnItemEx("Lith_MonsterSoulEffect") + BLLT N 0 A_SeekerMissile(0, 360, SMF_LOOK|SMF_PRECISE, 256, 1) + BLLT N 1 A_FadeOut(0.05) + loop + Death: + BLLT N 0 A_PlaySound("ghost/hit", CHAN_5, 1, false, 0.5) + TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("Lith_MonsterSoulEffect", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2)) + stop + } +} + +actor Lith_RunMonsterInfo : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIfInventory("Lith_MonsterID", 1, "Nope") + TNT1 A 0 A_JumpIfInventory("Lith_MonsterInvalid", 1, "Nope") + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MonsterInfo") + stop + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_MonsterInfoEmitter +{ + +NOTIMEFREEZE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_RadiusGive("Lith_RunMonsterInfo", 16384, RGF_MONSTERS|RGF_CUBE)//RGF_MONSTERS|RGF_NOSIGHT|RGF_CUBE) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Tier1.dec b/pksrc/lscripts/Monsters/Tier1.dec new file mode 100644 index 0000000..4d7abc4 --- /dev/null +++ b/pksrc/lscripts/Monsters/Tier1.dec @@ -0,0 +1,185 @@ +actor Lith_ZombieMan : ZombieMan replaces ZombieMan +{ + Health 30 + AttackSound "" + DropItem "Lith_Dummy" + MinMissileChance 150 + Speed 9 + Tag "$LITH_TXT_INFO_SHORT_ZombieMan" + + var int user_shots; + + states + { + Missile: + POSS E 0 A_SetUserVar(user_shots, random(1, 3)) + POSS E 2 A_FaceTarget + POSS E 0 A_PlaySound("enemies/zombie/ready", CHAN_BODY|CHAN_NOPAUSE) + POSS E 0 A_GiveToTarget("Lith_AdrenalineToken", 1) + POSS E 5 A_FaceTarget + MissileLoop: + POSS E 5 A_FaceTarget + POSS F 0 bright A_PlaySound("enemies/zombie/fire", CHAN_WEAPON) + POSS F 0 bright A_JumpIfInTargetInventory("Lith_HasBarrier", 1, 2) + POSS F 0 A_Jump(256, "MissileFire") + POSS F 4 bright ACS_NamedExecuteAlways("Lith_BarrierBullets", 0) + goto MissileDone + MissileFire: + POSS F 4 bright A_CustomBulletAttack(22.5, 5, 1, random(1, 4) * 3, "BulletPuff", 0, CBAF_NORANDOM) + goto MissileDone + MissileDone: + POSS E 0 A_SetUserVar(user_shots, user_shots - 1) + POSS E 0 A_JumpIf(user_shots == 0, "MissileEnd") + goto MissileLoop + MissileEnd: + POSS E 8 + goto See + XDeath: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ZombieMan * 1.5) + goto Super::XDeath + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ZombieMan) + goto Super::Death + } +} + +actor Lith_ShotgunGuy : ShotgunGuy replaces ShotgunGuy +{ + Health 35 + AttackSound "" + DropItem "Lith_Dummy" + MinMissileChance 150 + Speed 9 + Tag "$LITH_TXT_INFO_SHORT_ShotgunGuy" + + states + { + Missile: + SPOS E 2 A_FaceTarget + SPOS E 0 A_PlaySound("enemies/shotguy/ready", CHAN_BODY|CHAN_NOPAUSE) + SPOS E 0 A_GiveToTarget("Lith_AdrenalineToken", 1) + SPOS E 10 A_FaceTarget + SPOS F 0 bright A_PlaySound("enemies/shotguy/fire", CHAN_WEAPON) + SPOS F 0 bright A_JumpIfInTargetInventory("Lith_HasBarrier", 1, 2) + SPOS F 0 A_Jump(256, "MissileFire") + SPOS F 0 bright ACS_NamedExecuteAlways("Lith_BarrierBullets", 0) + goto MissileDone + MissileFire: + SPOS F 0 A_CustomBulletAttack(22.5, 4, 3, random(1, 5) * 3, "BulletPuff", 0, CBAF_NORANDOM) + goto MissileDone + MissileDone: + SPOS F 10 bright + SPOS E 10 + goto See + XDeath: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ShotgunGuy * 1.5) + goto Super::XDeath + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ShotgunGuy) + goto Super::Death + } +} + +actor Lith_ImpBall : DoomImpBall +{ + Speed 16 + FastSpeed 32 + Scale 1.35 + DamageType "Lith_Fire" + + states + { + Spawn: + BAL1 AB 4 bright + loop + Death: + BAL1 A 0 A_SetScale(1.0) + BAL1 CDE 6 bright + stop + } +} + +actor Lith_Imp : DoomImp replaces DoomImp +{ + Speed 9 + Health 79 + MinMissileChance 160 + Scale 0.9 + Radius 18 + Height 50 + Tag "$LITH_TXT_INFO_SHORT_Imp" + + states + { + Spawn: + TROO AB 10 A_Look + loop + See: + TROO AABBCCDD 2 A_Chase + loop + Melee: + Missile: + TROO EF 6 A_FaceTarget + TROO G 6 A_CustomComboAttack("Lith_ImpBall", 32, 3 * random(1, 8), "imp/melee") + TROO G 2 + goto See + Pain: + TROO H 2 + TROO H 2 A_Pain + TROO H 0 A_Jump(256, "See") + XDeath: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Imp * 1.5) + goto Super::XDeath + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Imp) + goto Super::Death + Raise: + TROO ML 8 + TROO KJI 6 + TROO A 0 A_Jump(256, "See") + } +} + +actor Lith_ChaingunGuy : ChaingunGuy replaces ChaingunGuy +{ + Health 60 + AttackSound "" + DropItem "Lith_Dummy" + Speed 9 + Tag "$LITH_TXT_INFO_SHORT_ChaingunGuy" + + states + { + Missile: + CPOS E 2 A_FaceTarget + CPOS E 0 A_PlaySound("enemies/chainguy/bolt", CHAN_WEAPON|CHAN_NOPAUSE) + CPOS E 0 A_GiveToTarget("Lith_AdrenalineToken", 1) + CPOS E 12 A_FaceTarget + MissileLoop: + CPOS F 0 bright A_JumpIfInTargetInventory("Lith_HasBarrier", 1, 2) + CPOS F 0 A_Jump(256, "MissileFire") + CPOS F 0 A_PlaySound("enemies/chainguy/fire") + CPOS F 4 bright ACS_NamedExecuteAlways("Lith_BarrierBullets", 0) + CPOS E 0 A_PlaySound("enemies/chainguy/fire") + CPOS E 4 bright ACS_NamedExecuteAlways("Lith_BarrierBullets", 0) + goto MissileDone + MissileFire: + CPOS F 0 A_PlaySound("enemies/chainguy/fire") + CPOS F 4 bright A_CustomBulletAttack(22.5, 0, 1, random(1, 5) * 3, "BulletPuff", 0, CBAF_NORANDOM) + CPOS E 0 A_PlaySound("enemies/chainguy/fire") + CPOS E 4 bright A_CustomBulletAttack(22.5, 0, 1, random(1, 5) * 3, "BulletPuff", 0, CBAF_NORANDOM) + goto MissileDone + MissileDone: + CPOS F 1 A_CPosRefire + goto MissileLoop + XDeath: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ChaingunGuy * 1.5) + goto Super::XDeath + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_ChaingunGuy) + goto Super::Death + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Tier2.dec b/pksrc/lscripts/Monsters/Tier2.dec new file mode 100644 index 0000000..12e615c --- /dev/null +++ b/pksrc/lscripts/Monsters/Tier2.dec @@ -0,0 +1,96 @@ +actor Lith_Demon : Demon replaces Demon +{ + Radius 29 + MeleeRange 52 + Tag "$LITH_TXT_INFO_SHORT_Demon" + + states + { + Missile: + SARG A 0 A_JumpIfCloser(192, "MissileReal") + goto See + MissileReal: + SARG A 2 A_FaceTarget + SARG E 0 A_PlaySound("demon/melee", CHAN_BODY) + SARG E 0 A_FaceTarget + SARG E 0 ThrustThingZ(0, 16, 0, 1) + SARG E 8 ThrustThing(angle * 256 / 360, 32, 0, 0) + SARG F 8 + SARG G 8 A_CustomMeleeAttack(4 * random(1, 10), "demon/melee") + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Demon) + goto Super::Death + } +} + +actor Lith_Spectre : Lith_Demon replaces Spectre +{ + SeeSound "" + ActiveSound "" + RenderStyle "Fuzzy" + Alpha 0.5 + Speed 11 + Tag "$LITH_TXT_INFO_SHORT_Spectre" + + +SHADOW +} + +actor Lith_LostSoul : LostSoul replaces LostSoul +{ + Health 70 + RenderStyle Add + Alpha 0.7 + Tag "$LITH_TXT_INFO_SHORT_LostSoul" + + +QUICKTORETALIATE + +THRUSPECIES + -COUNTKILL + + var int user_invisible; + + states + { + Spawn: + SKUL AB 10 bright A_Look + loop + GoInvisible: + SKUL AABBAABBAA 1 bright A_FadeTo(0.08) + SKUL A 0 A_SetUserVar(user_invisible, true) + goto See + StopBeingInvisibleYouIdiot: + SKUL AABBAABBAA 1 bright A_FadeTo(0.7) + SKUL A 0 A_SetUserVar(user_invisible, false) + goto Missile + See: + SKUL A 0 A_JumpIf((!user_invisible) && (random(0, 128) < 64), "GoInvisible") + SKUL AAAAABBBBB 1 bright A_FastChase + loop + Missile: + SKUL A 0 A_JumpIf(user_invisible, "StopBeingInvisibleYouIdiot") + SKUL C 10 bright A_FaceTarget + SKUL D 4 bright A_SkullAttack + MissileLoop: + SKUL CCCCDDDD 1 bright + loop + Pain: + SKUL E 0 A_SetTranslucent(0.7, 1) + SKUL E 3 bright + SKUL E 3 bright A_Pain + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_LostSoul) + DeathReal: + SKUL F 0 A_SetTranslucent(0.7, 1) + SKUL F 6 bright + SKUL G 6 bright A_Scream + SKUL H 6 bright + SKUL I 6 bright A_NoBlocking + SKUL J 6 + SKUL K 6 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Tier3.dec b/pksrc/lscripts/Monsters/Tier3.dec new file mode 100644 index 0000000..8418c1c --- /dev/null +++ b/pksrc/lscripts/Monsters/Tier3.dec @@ -0,0 +1,275 @@ +actor Lith_PKTrail +{ + Speed 14 + Radius 2 + Height 5 + Damage 2 + RenderStyle "Add" + Alpha 1 + DamageType "Lith_Magic" + + Projectile + + states + { + Spawn: + BAL7 AAAABBBB 1 bright + loop + Death: + BAL7 CDE 6 bright + stop + } +} + +actor Lith_PolarKnight +{ + Scale 0.45 + Radius 2 + Height 5 + Speed 14 + Damage 7 + RenderStyle "Add" + Alpha 0.8 + SeeSound "enemies/hellknight/throw" + Decal "BaronScorch" + DamageType "Lith_Magic" + + Projectile + + states + { + Spawn: + BLLT F 1 bright + loop + Death: + BLLT F 1 bright A_FadeOut(0.08) + loop + } +} + +actor Lith_HellKnight : HellKnight replaces HellKnight +{ + Speed 4 + Species "Lith_HellKnight" + Tag "$LITH_TXT_INFO_SHORT_HellKnight" + BloodColor "DarkGreen" + + states + { + Spawn: + BOS2 AB 10 A_Look + loop + See: + BOS2 AAAAAABBBBBBCCCCCCDDDDDD 1 A_Chase + loop + Melee: + Missile: + BOS2 EF 6 A_FaceTarget + BOS2 G 1 + BOS2 G 0 A_CustomComboAttack("Lith_PolarKnight", 32, 10 * random(1, 8), "baron/melee") + BOS2 GGG 1 A_CustomMissile("Lith_PKTrail") + goto See + Pain: + BOS2 H 2 + BOS2 H 2 A_Pain + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_HellKnight) + goto Super::Death + Raise: + BOS2 O 8 + BOS2 NMLKJI 8 + goto See + } +} + +actor Lith_BaronBallSound : BaronBall replaces BaronBall +{ + DamageType "Lith_Magic" + Damage 4 + + states + { + Spawn: + BAL7 AB 1 bright + loop + } +} + +actor Lith_BaronBall : Lith_BaronBallSound +{ + SeeSound "" + DeathSound "" + Decal "" +} + +actor Lith_BaronOfHell : BaronOfHell replaces BaronOfHell +{ + PainChance 55 + Tag "$LITH_TXT_INFO_SHORT_BaronOfHell" + Species "Lith_HellKnight" + BloodColor "DarkGreen" + + +MISSILEMORE + + var int user_angle; + + states + { + Spawn: + BOSS AB 10 A_Look + loop + See: + BOSS AABBCCDD 3 A_Chase + loop + Melee: + BOSS EF 6 A_FaceTarget + BOSS G 4 A_CustomMeleeAttack(10 * random(1, 8), "baron/melee") + goto See + Missile: + BOSS EF 4 A_FaceTarget + BOSS G 0 A_FaceTarget + BOSS G 1 A_CustomMissile("Lith_BaronBallSound") + BOSS G 0 A_Jump(32, "MissileDone") + BOSS G 0 A_FaceTarget + BOSS G 0 A_SetUserVar("user_angle", random(0, 1) < 1 ? -45 : 45) + BOSS GGG 1 A_CustomMissile("Lith_BaronBall", 32, 0, user_angle, CMF_AIMDIRECTION) + goto See + MissileDone: + BOSS G 3 + goto See + Pain: + BOSS H 1 + BOSS H 1 A_Pain + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_BaronOfHell) + goto Super::Death + Raise: + BOSS O 8 + BOSS NMLKJI 8 + goto See + } +} + +actor Lith_RevenantTracer : RevenantTracer replaces RevenantTracer +{ + DamageType "Lith_Shrapnel" + + var int user_timer; + + states + { + Spawn: + FATB A 0 + FATB A 0 A_JumpIf(user_timer > 35 * 15, "Death") + FATB A 0 A_SetUserVar(user_timer, user_timer + 1) + FATB AB 1 bright A_Tracer + loop + } +} + +actor Lith_Revenant : Revenant replaces Revenant +{ + Health 350 + Tag "$LITH_TXT_INFO_SHORT_Revenant" + + states + { + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Revenant) + goto Super::Death + } +} + +actor Lith_CacodemonBall : CacodemonBall replaces CacodemonBall +{ + DamageType "Lith_Energy" + + states + { + Spawn: + BAL2 AB 4 bright + loop + } +} + +actor Lith_Cacodemon : Cacodemon replaces Cacodemon +{ + Tag "$LITH_TXT_INFO_SHORT_Cacodemon" + BloodColor "Blue" + + states + { + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Cacodemon) + goto Super::Death + } +} + +actor Lith_ArachnotronPlasma : ArachnotronPlasma replaces ArachnotronPlasma +{ + DamageType "Lith_Energy" + + states + { + Spawn: + APLS AB 5 bright + loop + } +} + +actor Lith_Arachnotron : Arachnotron replaces Arachnotron +{ + DamageFactor "Lith_Energy", 0.6 + Tag "$LITH_TXT_INFO_SHORT_Arachnotron" + + states + { + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Arachnotron) + goto Super::Death + } +} + +actor Lith_FatShot : FatShot replaces FatShot +{ + DamageType "Lith_Fire" + Damage 7 + Speed 10 + + states + { + Spawn: + MANF AB 4 bright + loop + } +} + +actor Lith_Mancubus : Fatso replaces Fatso +{ + PainChance 50 + Tag "$LITH_TXT_INFO_SHORT_Mancubus" + + states + { + Missile: + FATT G 10 A_FatRaise + FATT H 0 A_PlaySound("enemies/mancubus/fire", CHAN_5) + FATT HH 5 bright A_FatAttack1 + FATT IG 6 A_FaceTarget + FATT H 0 A_PlaySound("enemies/mancubus/fire", CHAN_5) + FATT HH 5 bright A_FatAttack2 + FATT IG 6 A_FaceTarget + FATT H 0 A_PlaySound("enemies/mancubus/fire", CHAN_5) + FATT HH 5 bright A_FatAttack3 + FATT IG 6 A_FaceTarget + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Mancubus) + goto Super::Death + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Tier4.dec b/pksrc/lscripts/Monsters/Tier4.dec new file mode 100644 index 0000000..7b09d80 --- /dev/null +++ b/pksrc/lscripts/Monsters/Tier4.dec @@ -0,0 +1,41 @@ +actor Lith_PainElemental : PainElemental replaces PainElemental +{ + Tag "$LITH_TXT_INFO_SHORT_PainElemental" + + states + { + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_PainElemental) + goto Super::Death + } +} + +actor Lith_Archvile : Archvile replaces Archvile +{ + Health 800 + PainChance 2 + Tag "$LITH_TXT_INFO_SHORT_Archvile" + + states + { + Missile: + VILE G 0 bright A_VileStart + VILE G 10 bright A_FaceTarget + VILE H 8 bright A_VileTarget + VILE IJKLM 8 bright A_FaceTarget + VILE N 0 bright A_JumpIfTargetInLOS(1) + goto Missile1 + VILE N 0 bright A_GiveToTarget("Lith_AdrenalineToken", 1) + Missile1: + VILE N 8 bright A_FaceTarget + VILE O 8 bright A_VileAttack("vile/stop", 20, 70, 70, 1.0, "Lith_FireMagic") + VILE P 20 bright + goto Super::See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_Archvile) + goto Super::Death + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/Tier5.dec b/pksrc/lscripts/Monsters/Tier5.dec new file mode 100644 index 0000000..58c2fde --- /dev/null +++ b/pksrc/lscripts/Monsters/Tier5.dec @@ -0,0 +1,148 @@ +actor Lith_SpiderMastermindBulletTrail +{ + RenderStyle "Add" + Scale 0.8 + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut + wait + } +} + +actor Lith_SpiderMastermindBullet : FastProjectile +{ + MissileType "Lith_SpiderMastermindBulletTrail" + RenderStyle "Translucent" + Species "Lith_SpiderMastermind" + DamageType "Lith_Bullets" + Alpha 0.9 + Scale 0.2 + Radius 2 + Height 2 + Damage (3 * random(1, 5)) + Speed 256 + + +BLOODSPLATTER + +MTHRUSPECIES + +DONTHURTSPECIES + + states + { + Spawn: + TNT1 A 1 + wait + Crash: + Death: + PUFF CD 4 + stop + XDeath: + TNT1 A 0 + stop + } +} + +actor Lith_SpiderMastermind : SpiderMastermind replaces SpiderMastermind +{ + Health 4000 + PainChance 0 + DamageFactor "Lith_Energy", 0.5 // :^) + Tag "$LITH_TXT_INFO_SHORT_SpiderMastermind" + + +MISSILEMORE + + states + { + See: + "####" "#" 0 A_StopSound(CHAN_WEAPON) + goto Super::See + Missile: + SPID A 2 bright + SPID A 0 A_PlaySound("enemies/spiderdemon/ready", CHAN_5|CHAN_NOPAUSE, 1, false, 0.3) + SPID A 0 A_GiveToTarget("Lith_AdrenalineToken", 1) + SPID A 20 bright A_FaceTarget + SPID A 0 A_PlaySound("enemies/spiderdemon/fire", CHAN_WEAPON, 1, true, 0.4) + MissileLoop: + SPID G 0 bright A_CustomMissile("Lith_SpiderMastermindBullet", 32, 0, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 7)) + SPID G 1 bright + SPID H 0 bright A_CustomMissile("Lith_SpiderMastermindBullet", 32, 0, frandom(-5, 5), CMF_OFFSETPITCH, frandom(-3, 5)) + SPID H 1 bright A_MonsterRefire(40, "See") + loop + Death: + "####" "#" 0 A_StopSound(CHAN_WEAPON) + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_SpiderDemon) + goto Super::Death + } +} + +actor Lith_CyberRocket : Rocket replaces Rocket +{ + DamageType "Lith_Shrapnel" + Scale 0.75 + Radius 8 + Height 4 + Speed 25 + Damage (15 * random(1, 8)) + DeathSound "explosion" + + states + { + Spawn: + MISL A 1 bright + loop + Death: + MEXP A 0 A_Explode(96) + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +actor Lith_Cyberdemon : Cyberdemon replaces Cyberdemon +{ + Health 5000 + PainChance 0 + DamageFactor "Lith_Energy", 0.5 // :^) + Tag "$LITH_TXT_INFO_SHORT_Cyberdemon" + + +MISSILEMORE + +MISSILEEVENMORE + + states + { + Missile: + CYBR E 2 A_FaceTarget + CYBR E 0 A_PlaySound("enemies/cyberdemon/ready", CHAN_5) + CYBR E 12 A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/firedone", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13) + CYBR E 1 bright A_FaceTarget + goto See + Death: + "####" "#" 0 ACS_NamedExecuteWithResult("Lith_EmitScore", Score_CyberDemon) + goto Super::Death + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/TitleMap.dec b/pksrc/lscripts/Monsters/TitleMap.dec new file mode 100644 index 0000000..ecd3ca4 --- /dev/null +++ b/pksrc/lscripts/Monsters/TitleMap.dec @@ -0,0 +1,194 @@ +// Code from Fuck Super Shotguns, which I made. I probably released that one. +actor Lith_TitleMarine : ScriptedMarine +{ + Speed 4 + PainChance 0 + MaxTargetRange 16384 + MinMissileChance 2 + Species "Lith_Player" + + +FRIENDLY + +MISSILEMORE + +MISSILEEVENMORE + +DONTHARMCLASS + +DONTHARMSPECIES + +NOINFIGHTING + +INVULNERABLE + + States + { + See: + "####" A 0 A_JumpIfCloser(128, "RunAway") + "####" AAAA 1 A_Chase("Melee", "Missile", CHF_NIGHTMAREFAST) + "####" BBB 1 A_Chase("Melee", "Missile", CHF_NIGHTMAREFAST) + "####" B 1 A_Chase("Melee", "Missile", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" CCCC 1 A_Chase("Melee", "Missile", CHF_NIGHTMAREFAST) + "####" DDD 1 A_Chase("Melee", "Missile", CHF_NIGHTMAREFAST) + "####" D 1 A_Chase("Melee", "Missile", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + Loop + Missile.Shotgun: + "####" E 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_M_CheckAttack + "####" E 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" E 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 bright A_CustomBulletAttack(5, 0, 10, 10, "Lith_Dummy") + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" F 0 A_JumpIfCloser(128, "RunAway") + "####" A 0 A_Jump(256, "See") + Missile.Chaingun: + "####" E 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_FaceTarget + "####" E 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" F 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_CustomBulletAttack(0, 0, 3, 5, "Lith_Dummy") + "####" F 1 bright A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" F 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_CustomBulletAttack(0, 0, 3, 5, "Lith_Dummy") + "####" F 1 bright A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + Missile.ChaingunLoop: + "####" F 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 0 A_CustomBulletAttack(5, 0, 3, 5, "Lith_Dummy") + "####" F 1 bright A_FaceTarget + "####" F 0 A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 0 A_CustomBulletAttack(5, 0, 3, 5, "Lith_Dummy") + "####" F 1 bright A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" F 0 A_FaceTarget + "####" F 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" F 0 A_JumpIfCloser(128, "RunAway") + "####" F 0 A_Jump(32, "RunAway") + "####" A 0 A_M_Refire + "####" A 0 A_Jump(256, "Missile.ChaingunLoop") + "####" A 0 + "####" A 0 A_Jump(256, "See") + RunAway: + "####" A 0 A_ChangeFlag("FRIGHTENED", 1) + "####" AAAABBBBCCCCDDDD 1 A_Chase("Melee", "Missile", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" A 0 A_JumpIfCloser(128, "RunAway") + "####" A 0 A_ChangeFlag("FRIGHTENED", 0) + "####" A 0 A_Jump(256, "See") + Missile: + "####" A 0 A_JumpIfCloser(128, "RunAway") + "####" A 0 A_Jump(256, "Missile.Shotgun", "Missile.Chaingun") + Melee: + "####" E 0 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_M_Saw + "####" E 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_Chase("", "", CHF_NIGHTMAREFAST) + "####" E 1 A_Chase("", "", CHF_FASTCHASE | CHF_NIGHTMAREFAST) + "####" E 0 A_M_SawRefire + "####" A 0 A_Jump(256, "Melee") + "####" A 0 + "####" A 0 A_Jump(256, "See") + } +} + +actor Lith_TitleImpBall : Lith_XH_ImpBall +{ + SeeSound "" + DeathSound "" + Speed 20 +} + +actor Lith_TitleBaronBall : BaronBall +{ + SeeSound "" + DeathSound "" +} + +actor Lith_TitleCyberdemon : Lith_XH_Cyberdemon +{ + Species "Lith_TitleEnemy" + + +NOINFIGHTING + +DONTHARMCLASS + +DONTHARMSPECIES +} + +actor Lith_TitleHellKnight : HellKnight +{ + SeeSound "" + ActiveSound "" + PainSound "" + DeathSound "" + Species "Lith_TitleEnemy" + + +NOINFIGHTING + +DONTHARMCLASS + +DONTHARMSPECIES + + states + { + Melee: + Missile: + BOS2 EF 8 A_FaceTarget + BOS2 G 8 A_CustomComboAttack("Lith_TitleBaronBall", 32, 10 * random(1, 8), "baron/melee") + goto See + Death: + BOS2 I 8 + BOS2 J 8 A_Scream + BOS2 K 8 + BOS2 L 8 A_NoBlocking + BOS2 MN 8 + BOS2 O 1000 + stop + } +} + +actor Lith_TitleImp : Lith_XH_Imp +{ + SeeSound "" + ActiveSound "" + PainSound "" + DeathSound "" + Species "Lith_TitleEnemy" + + +NOINFIGHTING + +DONTHARMCLASS + +DONTHARMSPECIES + + states + { + Melee: + Missile: + TROO EF 6 A_FaceTarget + TROO G 5 A_CustomComboAttack("Lith_TitleImpBall", 32, 3 * random(1, 8), "imp/melee") + TROO G 2 + goto See + Death: + TROO I 8 + TROO J 8 A_Scream + TROO K 6 + TROO L 6 A_NoBlocking + TROO M 1000 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/XHTier1.dec b/pksrc/lscripts/Monsters/XHTier1.dec new file mode 100644 index 0000000..70787f2 --- /dev/null +++ b/pksrc/lscripts/Monsters/XHTier1.dec @@ -0,0 +1,68 @@ +actor Lith_XH_ZombieMan : Lith_ZombieMan +{ + MinMissileChance 120 + + states + { + MissileFire: + POSS F 0 bright A_JumpIfCloser(1024, 3) + POSS F 4 bright A_WolfAttack(WAF_NORANDOM, "enemies/chainguy/fire", 1.0 / 5.0, frandom(1, 8) * 3.0) + POSS E 4 bright A_MonsterRefire(30, "MissileDone") + goto MissileFire + POSS F 4 bright A_WolfAttack(WAF_NORANDOM | WAF_USEPUFF, "", 3.0 / 4.0, frandom(1, 4) * 3.0) + goto MissileDone + } +} + +actor Lith_XH_ShotgunGuy : Lith_ShotgunGuy +{ + MinMissileChance 120 + + states + { + MissileFire: + SPOS FFF 0 A_WolfAttack(WAF_NORANDOM | WAF_USEPUFF, "", 4.0 / 5.0, frandom(1, 5) * 2.4) + goto MissileDone + } +} + +actor Lith_XH_ChaingunGuy : Lith_ChaingunGuy +{ + states + { + MissileFire: + CPOS FE 4 bright A_WolfAttack(WAF_NORANDOM | WAF_USEPUFF, "enemies/chainguy/fire", 3.0 / 4.0, frandom(1, 4) * 3.0) + goto MissileDone + } +} + +actor Lith_XH_ImpBall : Lith_ImpBall +{ + Speed 24 + FastSpeed 48 +} + +actor Lith_XH_Imp : Lith_Imp +{ + Speed 8 + Health 80 + MinMissileChance 140 + + +MISSILEMORE + + states + { + See: + TROO AAABBBCCCDDD 1 A_Chase + loop + Melee: + Missile: + TROO EF 6 A_FaceTarget + TROO G 5 A_CustomComboAttack("Lith_XH_ImpBall", 32, 3 * random(1, 8), "imp/melee") + TROO G 2 + goto See + } +} + +// EOF + diff --git a/pksrc/lscripts/Monsters/XHTier2.dec b/pksrc/lscripts/Monsters/XHTier2.dec new file mode 100644 index 0000000..11f7d24 --- /dev/null +++ b/pksrc/lscripts/Monsters/XHTier2.dec @@ -0,0 +1,11 @@ +actor Lith_XH_Demon : Lith_Demon +{ +} + +actor Lith_XH_Spectre : Lith_Spectre +{ +} + +actor Lith_XH_LostSoul : Lith_LostSoul +{ +} diff --git a/pksrc/lscripts/Monsters/XHTier3.dec b/pksrc/lscripts/Monsters/XHTier3.dec new file mode 100644 index 0000000..8957bf7 --- /dev/null +++ b/pksrc/lscripts/Monsters/XHTier3.dec @@ -0,0 +1,67 @@ +actor Lith_XH_HellKnight : Lith_HellKnight +{ +} + +actor Lith_XH_BaronOfHell : Lith_BaronOfHell +{ +} + +actor Lith_XH_RevenantTracer : Lith_RevenantTracer +{ + Scale 0.7 + Damage 1 + Radius 2 + Height 2 + + states + { + Spawn: + FATB A 0 + FATB A 0 A_JumpIf(user_timer > 35, "Death") + FATB A 0 A_SetUserVar(user_timer, user_timer + 1) + FATB AB 2 bright A_Tracer + loop + } +} + +actor Lith_XH_Revenant : Lith_Revenant +{ + Health 200 + +ALWAYSFAST + + states + { + Spawn: + SKEL A 0 A_JumpIf(random(0, 1000) < 10, "InvisibleRevenantsForDavid") + goto Super::Spawn + InvisibleRevenantsForDavid: + SKEL A 0 A_SetTranslucent(0.05, 0) + goto Super::Spawn + Missile: + SKEL J 0 Bright A_FaceTarget + SKEL J 2 Bright A_FaceTarget + Missile1: + SKEL K 4 A_CustomMissile("Lith_XH_RevenantTracer", 48) + SKEL K random(2, 4) A_FaceTarget + SKEL K 0 A_MonsterRefire(0, "See") + goto Missile1 + Melee: + SKEL G 0 A_FaceTarget + SKEL G 2 A_SkelWhoosh + SKEL H 2 A_FaceTarget + SKEL I 2 A_SkelFist + goto See + } +} + +actor Lith_XH_Cacodemon : Lith_Cacodemon +{ +} + +actor Lith_XH_Arachnotron : Lith_Arachnotron +{ +} + +actor Lith_XH_Mancubus : Lith_Mancubus +{ +} diff --git a/pksrc/lscripts/Monsters/XHTier4.dec b/pksrc/lscripts/Monsters/XHTier4.dec new file mode 100644 index 0000000..a3cc05c --- /dev/null +++ b/pksrc/lscripts/Monsters/XHTier4.dec @@ -0,0 +1,13 @@ +actor Lith_XH_PainElemental : Lith_PainElemental +{ + states + { + Death: + TNT1 A 0 A_Explode + goto Super::Death + } +} + +actor Lith_XH_Archvile : Lith_Archvile +{ +} diff --git a/pksrc/lscripts/Monsters/XHTier5.dec b/pksrc/lscripts/Monsters/XHTier5.dec new file mode 100644 index 0000000..a176ca5 --- /dev/null +++ b/pksrc/lscripts/Monsters/XHTier5.dec @@ -0,0 +1,55 @@ +actor Lith_XH_SpiderMastermind : Lith_SpiderMastermind +{ + +MISSILEEVENMORE +} + +actor Lith_XH_Cyberdemon : Lith_Cyberdemon +{ + states + { + Missile: + CYBR E 2 A_FaceTarget + CYBR E 0 A_PlaySound("enemies/cyberdemon/ready", CHAN_5) + CYBR E 12 A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/fire", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + CYBR F 0 bright A_PlaySound("enemies/cyberdemon/firedone", CHAN_6) + CYBR F 3 bright A_CustomMissile("Lith_CyberRocket", 40, -13, frandom(-15, 15), CMF_OFFSETPITCH, frandom(-5, 5)) + CYBR E 1 bright A_FaceTarget + goto See + } +} + +// EOF + diff --git a/pksrc/lscripts/PickupEffects.dec b/pksrc/lscripts/PickupEffects.dec new file mode 100644 index 0000000..a6cb198 --- /dev/null +++ b/pksrc/lscripts/PickupEffects.dec @@ -0,0 +1,101 @@ +actor Lith_ItemGlow +{ + RenderStyle "Add" + Alpha 0.7 + Scale 0.1 + Translation "112:127=168:183", "5:15=185:185", "224:231=168:171" + + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + PBAL A 0 + PBAL A 0 A_JumpIf(CallACS("LWData", wdata_noitemfx), "Nope") + PBAL A 0 A_JumpIf(CallACS("LWData", wdata_pclass) == pcl_marine, "SpawnDone") + PBAL C 0 A_JumpIf(CallACS("LWData", wdata_pclass) == pcl_cybermage, "SpawnDone") + PBAL D 0 //A_JumpIf(CallACS("LWData", wdata_pclass) == pcl_informant, "SpawnDone") + SpawnDone: + "####" "#" 5 bright + "####" "#" 1 bright A_FadeOut(1.0 / 35.0) + wait + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_WeapGlow : Lith_ItemGlow +{ + Translation "112:127=197:207", "224:231=192:199" + + states + { + Spawn: + PBAL A 0 + PBAL A 0 A_JumpIf(CallACS("LWData", wdata_brightweps), "SpawnBright") + goto Super::Spawn + SpawnBright: + PBAL A 0 A_SpawnItemEx("Lith_ItemGlowBright") + stop + } +} + +actor Lith_ItemGlowBright : Lith_ItemGlow +{ + Translation "112:127=192:207", "224:231=192:194" +} + +actor Lith_UpgrGlow : Lith_ItemGlow +{ + Translation "None" +} + +actor Lith_ItemSprite +{ + +NOINTERACTION + +NOTIMEFREEZE + + var int user_origx; + var int user_origy; + var int user_origz; + var int user_floatangle; + var int user_floatzangle; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SetUserVar(user_floatangle, random(0, 360)) + TNT1 A 0 A_SetUserVar(user_floatzangle, random(0, 360)) + TNT1 A 0 A_Jump(256, "Spr") + SpawnLoop: + "####" "#" 0 A_CheckFlag("SPECIAL", 2, AAPTR_MASTER) + "####" "#" 0 A_Jump(256, "Done") + + "####" "#" 0 A_SetUserVar(user_floatangle, (user_floatangle + 2) % 360) + "####" "#" 0 A_SetUserVar(user_floatzangle, (user_floatzangle + 3) % 360) + "####" "#" 0 A_SetUserVar(user_origx, x * FIX) + "####" "#" 0 A_SetUserVar(user_origy, y * FIX) + "####" "#" 0 A_SetUserVar(user_origz, z * FIX) + "####" "#" 1 bright A_Warp(AAPTR_MASTER, cos(user_floatangle) * 4.0, + sin(user_floatangle) * 4.0, + 16.0 + (sin(user_floatzangle) * 12.0), + 0, WARPF_NOCHECKPOSITION) + "####" "#" 0 bright A_Warp(AAPTR_MASTER, -x + user_origx / FIX, + -y + user_origy / FIX, + -z + user_origz / FIX, + 0, 0) + loop + Done: + TNT1 A 0 + stop + } +} + +actor Lith_ItemSpriteM : Lith_ItemSprite {VisibleToPlayerClass "Lith_MarinePlayer"} +actor Lith_ItemSpriteC : Lith_ItemSprite {VisibleToPlayerClass "Lith_CyberMagePlayer"} + +// EOF + diff --git a/pksrc/lscripts/Player.dec b/pksrc/lscripts/Player.dec new file mode 100644 index 0000000..f2a94e0 --- /dev/null +++ b/pksrc/lscripts/Player.dec @@ -0,0 +1,223 @@ +actor Lith_MarinePlayer : Lith_Player +{ + Player.StartItem "Lith_Pistol" + Player.StartItem "Lith_Fist" + Player.DisplayName "Marine" + Player.SoundClass "marine" + Player.Portrait "lgfx/Portraits/Marine.png" + Player.ViewHeight 48 + Player.AttackZOffset 15 + Tag "Marine" +} + +actor Lith_CyberMagePlayer : Lith_Player +{ + Player.StartItem "Lith_Mateba" + Player.StartItem "Lith_CFist" + Player.DisplayName "Cyber-Mage" + Player.SoundClass "cybermage" + Player.Portrait "lgfx/Portraits/CyberMage.png" + Player.ViewHeight 45 + Player.AttackZOffset 12 + Player.JumpZ 9 + Tag "Cyber-Mage" +} + +actor Lith_RA_Hax : PowerProtection +{ + Powerup.Duration 0x7FFFFFFF + ActiveSound "player/rarmor/damage" +} + +actor Lith_RA_Bullets1 : Lith_RA_Hax {DamageFactor "Lith_Bullets", 0.3 DamageFactor "Bullet", 0.3} +actor Lith_RA_Energy1 : Lith_RA_Hax {DamageFactor "Lith_Energy", 0.3 DamageFactor "Railgun", 0.3 DamageFactor "Electric", 0.3 DamageFactor "Plasma", 0.3} +actor Lith_RA_Fire1 : Lith_RA_Hax {DamageFactor "Lith_Fire", 0.3 DamageFactor "Fire", 0.3} +actor Lith_RA_FireMagic1 : Lith_RA_Hax {DamageFactor "Lith_FireMagic", 0.3} +actor Lith_RA_Magic1 : Lith_RA_Hax {DamageFactor "Lith_Magic", 0.3} +actor Lith_RA_Melee1 : Lith_RA_Hax {DamageFactor "Lith_Melee", 0.3 DamageFactor "Melee", 0.3} +actor Lith_RA_Shrapnel1 : Lith_RA_Hax {DamageFactor "Lith_Shrapnel", 0.3} +actor Lith_RA_Ice1 : Lith_RA_Hax {DamageFactor "Ice", 0.3} + +actor Lith_RA_Bullets2 : Lith_RA_Hax {DamageFactor "Lith_Bullets", 0.15 DamageFactor "Bullet", 0.15} +actor Lith_RA_Energy2 : Lith_RA_Hax {DamageFactor "Lith_Energy", 0.15 DamageFactor "Railgun", 0.15 DamageFactor "Electric", 0.15 DamageFactor "Plasma", 0.15} +actor Lith_RA_Fire2 : Lith_RA_Hax {DamageFactor "Lith_Fire", 0.15 DamageFactor "Fire", 0.15} +actor Lith_RA_FireMagic2 : Lith_RA_Hax {DamageFactor "Lith_FireMagic", 0.15} +actor Lith_RA_Magic2 : Lith_RA_Hax {DamageFactor "Lith_Magic", 0.15} +actor Lith_RA_Melee2 : Lith_RA_Hax {DamageFactor "Lith_Melee", 0.15 DamageFactor "Melee", 0.15} +actor Lith_RA_Shrapnel2 : Lith_RA_Hax {DamageFactor "Lith_Shrapnel", 0.15} +actor Lith_RA_Ice2 : Lith_RA_Hax {DamageFactor "Ice", 0.15} + +actor Lith_RocketBooster : PowerFlight +{ + Powerup.Duration 60 + -INVENTORY.HUBPOWER +} + +actor Lith_PuffItDownBro // Taken from DemonSteele +{ + RenderStyle Add + Alpha 0.5 + Height 0 + Radius 0 + Scale 0.5 + + +NOINTERACTION + + states + { + Spawn: + SMOK ABDEGHJKMNPQ 2 bright + stop + } +} + +actor Lith_ExplodoBoots +{ + DamageType "Lith_PlayerMissile" + Height 0 + Radius 0 + + +NOTIMEFREEZE + +NOGRAVITY + +NOBLOCKMAP + +PAINLESS + +NODAMAGETHRUST + +EXTREMEDEATH + +FORCERADIUSDMG + + states + { + Spawn: + TNT1 A 0 + // Taken from DemonSteele + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.0)*64.0, cos(0.0)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.0) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.1)*64.0, cos(0.1)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.1) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.2)*64.0, cos(0.2)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.2) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.3)*64.0, cos(0.3)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.3) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.4)*64.0, cos(0.4)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.4) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.5)*64.0, cos(0.5)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.5) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.6)*64.0, cos(0.6)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.6) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.7)*64.0, cos(0.7)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.7) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.8)*64.0, cos(0.8)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.8) + TNT1 A 0 A_SpawnItemEx("Lith_PuffItDownBro", sin(0.9)*64.0, cos(0.9)*64.0, -1, 6.0, 0.0, 1.0, 360.0*0.9) + TNT1 A 0 A_PlaySound("player/hitground", 0, 0.5, false, 0.5) + TNT1 A 0 Radius_Quake(2, 8, 0, 16, 0) + TNT1 A 0 A_Explode(100, 64, 0, 0, 64) + stop + } +} + +actor Lith_EXPLOOOSION +{ + DamageType "Lith_PlayerMissile" + + +NOTIMEFREEZE + +NOGRAVITY + + states + { + Spawn: + MEXP A 0 nodelay A_Explode + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +actor Lith_GEExplosion +{ + DamageType "Lith_PlayerMissile" + + +NOTIMEFREEZE + +NOGRAVITY + + states + { + Spawn: + MEXP A 0 bright + MEXP A 0 bright A_PlaySound("effects/geexplosion") + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +actor Lith_Death : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_JumpIfHealthLower(1000, 2) + TNT1 A 0 A_RailWait + stop + TNT1 A 0 A_Die + stop + } +} + +actor Lith_Die : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_Die + stop + } +} + +actor Lith_Nuke : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_PlaySound("player/nuke", CHAN_7, 1.0, false, ATTN_NONE) + TNT1 A 0 A_RadiusGive("Lith_Death", 6144, RGF_MONSTERS) + TNT1 A 0 A_AlertMonsters + stop + } +} + +actor Lith_Blood : Blood replaces Blood +{ + states + { + Spawn: + BLUD CBA 8 + BLUD A 0 A_RadiusGive("Lith_SpectralSteggles", 64, RGF_PLAYERS) + stop + } +} + +actor Lith_ManaLeak +{ + VSpeed 2 + Scale 0.1 + RenderStyle "Add" + + +NOTIMEFREEZE + +NOINTERACTION + + var int user_x; + var int user_y; + var int user_z; + + states + { + Spawn: + BLLT J 0 + BLLT J 0 A_Warp(AAPTR_MASTER, user_x, user_y, z-user_z, 0, WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_COPYINTERPOLATION) + BLLT J 1 A_FadeOut + loop + } +} + +actor Lith_StealthSystem : PowerInvisibility +{ + Powerup.Duration 0x7FFFFFFF + Powerup.Mode "Opaque" +} + +// EOF + diff --git a/pksrc/lscripts/PlayerPawn.dec b/pksrc/lscripts/PlayerPawn.dec new file mode 100644 index 0000000..da64d7f --- /dev/null +++ b/pksrc/lscripts/PlayerPawn.dec @@ -0,0 +1,47 @@ +actor Lith_Player : DoomPlayer +{ + Player.SideMove 2, 1 + Player.ForwardMove 2, 1 + Player.AirCapacity 0 + DamageFactor "Lith_PlayerMissile", 0 + Species "Lith_Player" + + +THRUSPECIES + + states + { + Pain: + Pain.Bullet: + Pain.Lith_Bullets: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 0) + goto Super::Pain + Pain.Plasma: + Pain.Railgun: + Pain.Electric: + Pain.Lith_Energy: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 1) + goto Super::Pain + Pain.Fire: + Pain.Lith_Fire: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 2) + goto Super::Pain + Pain.Lith_FireMagic: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 3) + goto Super::Pain + Pain.Lith_Magic: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 4) + goto Super::Pain + Pain.Melee: + Pain.Lith_Melee: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 5) + goto Super::Pain + Pain.Lith_Shrapnel: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 6) + goto Super::Pain + Pain.Ice: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_RA_Give", 7) + goto Super::Pain + } +} + +// EOF diff --git a/pksrc/lscripts/Projectiles/Cannonball.dec b/pksrc/lscripts/Projectiles/Cannonball.dec new file mode 100644 index 0000000..ac436dd --- /dev/null +++ b/pksrc/lscripts/Projectiles/Cannonball.dec @@ -0,0 +1,120 @@ +actor Lith_CannonExplosionParticle +{ + Mass 5 + Scale 0.5 + Gravity 0.8 + + -NOGRAVITY + + states + { + Spawn: + MEXP AB 2 bright A_SpawnItemEx("Lith_CannonSmokeParticle", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2), 0, SXF_NOCHECKPOSITION) + MEXP CD 3 bright A_SpawnItemEx("Lith_CannonSmokeParticle", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2), 0, SXF_NOCHECKPOSITION) + MEXP EF 4 bright A_SpawnItemEx("Lith_CannonSmokeParticle", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2), 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_CannonSmokeParticle : Lith_CannonExplosionParticle +{ + Mass 3 + Gravity 0.4 + RenderStyle "Add" + + states + { + Spawn: + SMOK ABCDEFGHIJKLM 1 A_FadeOut(0.06) + stop + } +} + +actor Lith_CannonBall +{ + Radius 13 + Height 8 + Scale 3.5 + Damage (400) + Speed 42 + Gravity 0.55 + BounceType "Hexen" + Species "Lith_Player" + DamageType "Lith_PlayerMissile" + + Projectile + +RIPPER + +BOUNCEONACTORS + +BOUNCEAUTOOFFFLOORONLY + +MTHRUSPECIES + +USEBOUNCESTATE + +FORCERADIUSDMG + +CANBOUNCEWATER + -NOGRAVITY + + var int user_angle; + var int user_time; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SetUserVar(user_angle, angle * FIX) + TNT1 A 0 A_SetUserVar(user_time, 35 * 10) + TNT1 A 2 + SpawnLoop: + TNT1 A 0 A_JumpIf(user_time <= 0, "Death") + TNT1 A 0 A_SetUserVar(user_time, user_time - 1) + TNT1 A 0 A_Explode(20, 60, 0) + CBAL A 1 bright A_SetAngle(user_angle / FIX) + loop + Bounce.Floor: + Bounce.Ceiling: + TNT1 A 0 A_PlaySound("weapons/cannon/impactfloor", CHAN_5) + TNT1 A 0 A_Quake(1, 10, 0, 512) + TNT1 A 0 A_Explode + goto SpawnLoop + Bounce.Wall: + TNT1 A 0 A_PlaySound("weapons/cannon/impactwall", CHAN_6) + TNT1 A 0 A_Quake(1, 10, 0, 512) + TNT1 A 0 A_Explode + goto SpawnLoop + Death: + CBAL B 0 A_PlaySound("weapons/cannon/explode", CHAN_7) + CBAL B 0 A_PlaySound("weapons/cannon/explode", CHAN_BODY) + CBAL B 0 A_SetScale(2) + CBAL B 0 A_NoGravity + CBAL B 0 A_Jump(256, "Splodey") + Splodey: + TNT1 A 0 A_Quake(3, 20, 0, 640) + TNT1 AAAAAA 0 A_Explode(128, 512, 0) + TNT1 AAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_CannonExplosionParticle", 0,0,8, frandom(-8,8),frandom(-8,8),frandom(6,12)) + goto ExplodeAnim + ExplodeAnim: + TNT1 A 0 A_Quake(4, 20, 0, 640) + TNT1 A 0 A_SetScale(radius / 30) + TNT1 A 0 A_SetTranslucent(1, 1) + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +actor Lith_SmallCannonBall : Lith_CannonBall +{ + Radius 8 + Scale 2 + Damage (100) + + states + { + Splodey: + TNT1 AAA 0 A_Explode(128, 512, 0) + TNT1 AAAAAAAAA 0 A_SpawnItemEx("Lith_CannonExplosionParticle", 0,0,8, frandom(-8,8),frandom(-8,8),frandom(6,12), 0) + goto ExplodeAnim + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/Gauss.dec b/pksrc/lscripts/Projectiles/Gauss.dec new file mode 100644 index 0000000..4224fa0 --- /dev/null +++ b/pksrc/lscripts/Projectiles/Gauss.dec @@ -0,0 +1,60 @@ +actor Lith_GaussExplosionParticle +{ + Scale 0.4 + Mass 3000 + BounceType "Doom" + + +BRIGHT + +NOBLOCKMAP + +FORCEXYBILLBOARD + +NOTELEPORT + + states + { + Spawn: + BLLT BBBCCCDDD 1 A_FadeOut(0.06) + wait + } +} + +actor Lith_GaussPuff +{ + RenderStyle "Translucent" + Species "Lith_Player" + DamageType "Lith_Energy" + + +BRIGHT + +PUFFONACTORS + +PUFFGETSOWNER + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +FORCEXYBILLBOARD + +MTHRUSPECIES + +NOTELEPORT + -ALLOWPARTICLES + + States + { + Crash: + BLLT A 0 + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/puff") + BLLT A 0 + BLLT A 1 A_FadeOut(0.05) + wait + Spawn: + Melee: + BLLT A 0 + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/puff") + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/spark", CHAN_5) + BLLT AAAAAAAAA 0 A_SpawnItemEx("Lith_GaussExplosionParticle", + frandom(-4, 4), frandom(-4, 4), frandom(-8, 8), + frandom(-4, 4), frandom(-4, 4), frandom(4, 7), + 0, SXF_NOCHECKPOSITION) + BLLT A 1 A_FadeOut(0.1) + wait + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/Gauss.dec.bak b/pksrc/lscripts/Projectiles/Gauss.dec.bak new file mode 100644 index 0000000..e256314 --- /dev/null +++ b/pksrc/lscripts/Projectiles/Gauss.dec.bak @@ -0,0 +1,58 @@ +actor Lith_GaussExplosionParticle +{ + Scale 0.4 + Mass 3000 + BounceType "Doom" + + +BRIGHT + +NOBLOCKMAP + +FORCEXYBILLBOARD + + states + { + Spawn: + BLLT BBBCCCDDD 1 A_FadeOut(0.06) + wait + } +} + +actor Lith_GaussPuff +{ + RenderStyle "Translucent" + Species "Lith_Player" + DamageType "Lith_Energy" + + +BRIGHT + +PUFFONACTORS + +PUFFGETSOWNER + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +FORCEXYBILLBOARD + +MTHRUSPECIES + -ALLOWPARTICLES + + States + { + Crash: + BLLT A 0 + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/puff") + BLLT A 0 + BLLT A 1 A_FadeOut(0.05) + wait + Spawn: + Melee: + BLLT A 0 + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/puff") + BLLT A 0 A_PlaySound("weapons/shotgun/gauss/spark", CHAN_5) + BLLT AAAAAAAAA 0 A_SpawnItemEx("Lith_GaussExplosionParticle", + frandom(-4, 4), frandom(-4, 4), frandom(-8, 8), + frandom(-4, 4), frandom(-4, 4), frandom(4, 7), + 0, SXF_NOCHECKPOSITION) + BLLT A 1 A_FadeOut(0.1) + wait + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/HomingRocket.dec b/pksrc/lscripts/Projectiles/HomingRocket.dec new file mode 100644 index 0000000..b0bd8c1 --- /dev/null +++ b/pksrc/lscripts/Projectiles/HomingRocket.dec @@ -0,0 +1,35 @@ +actor Lith_TargetMarker +{ + RenderStyle "Add" + Scale 1.7 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + BLLT H 1 bright A_FadeOut(0.1) + wait + } +} + +actor Lith_HomingRocket : Lith_Rocket +{ + +SEEKERMISSILE + + states + { + Spawn: + MISL A 0 + MISL A 0 ACS_NamedExecuteWithResult("Lith_HomingMissile") + goto Super::Spawn + SpawnLoop: + MISL A 0 A_SpawnItemEx("Lith_RocketTrail", 0, 0, 4, frandom(-0.5,0.5), frandom(-0.5,0.5), 0, 0, SXF_ABSOLUTEANGLE | SXF_NOCHECKPOSITION) + MISL A 0 A_SeekerMissile(3, 5) + goto Done + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/MiniMissile.dec b/pksrc/lscripts/Projectiles/MiniMissile.dec new file mode 100644 index 0000000..ca0467b --- /dev/null +++ b/pksrc/lscripts/Projectiles/MiniMissile.dec @@ -0,0 +1,35 @@ +actor Lith_MiniMissile +{ + Scale 0.25 + Radius 2 + Height 2 + Speed 20 + Damage 5 + DeathSound "weapons/missile/explode" + Species "Lith_Player" + DamageType "Lith_Shrapnel" + + Projectile + +ROCKETTRAIL + +MTHRUSPECIES + +EXPLODEONWATER + + states + { + Spawn: + MISL A 0 + MISL A 0 A_PlaySound("effects/rocket/fly", CHAN_AUTO, 0.65, true) + SpawnLoop: + MISL A 1 bright + wait + Death: + TNT1 A 0 A_Explode(32, 42) + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/PlasmaBolt.dec b/pksrc/lscripts/Projectiles/PlasmaBolt.dec new file mode 100644 index 0000000..f39688c --- /dev/null +++ b/pksrc/lscripts/Projectiles/PlasmaBolt.dec @@ -0,0 +1,107 @@ +actor Lith_PlasmaBoltTrail +{ + RenderStyle "Add" + Alpha 0.2 + Scale 0.125 + + +NOINTERACTION + + states + { + Spawn: + TNT1 A 0 + SpawnPick: + TNT1 A 0 A_Jump(256, "SpawnA", "SpawnB") + SpawnA: + PBAL A 1 bright + stop + SpawnB: + PBAL B 1 bright + stop + } +} + +actor Lith_PlasmaBoltTrail_Green : Lith_PlasmaBoltTrail +{ +} + +actor Lith_PlasmaBoltTrail_Red : Lith_PlasmaBoltTrail +{ + Translation "0:255=%[0,0,0]:[1,0,0]" +} + +actor Lith_PlasmaBoltTrail_Blue : Lith_PlasmaBoltTrail +{ + Translation "112:127=197:207", "224:231=192:199" + Alpha 0.5 +} + +actor Lith_PlasmaBolt +{ + Radius 12 + Height 12 + Speed 50 + Damage (10) + DamageType "Lith_Energy" + Species "Lith_Player" + + Projectile + +MTHRUSPECIES + + var int user_trailstep; + + states + { + Spawn: + TNT1 A 3 + TNT1 A 0 A_Jump(256, "Trail") + Trail: + TNT1 A 0 A_JumpIf(user_trailstep >= 5, "TrailDone") + TNT1 A 0 A_SetUserVar(user_trailstep, user_trailstep + 1) + TNT1 A 0 A_SpawnItemEx("Lith_PlasmaBoltTrail_Green", + ((user_trailstep * 10.0) * velx) / -35.0, + -((user_trailstep * 10.0) * vely) / -35.0, + 2.0 + ((user_trailstep * 10.0) * velz) / -35.0, + 0, 0, 0, + 0, SXF_ABSOLUTEANGLE | SXF_NOCHECKPOSITION) + loop + TrailDone: + TNT1 A 0 A_SetUserVar(user_trailstep, 0) + goto Step + Step: + TNT1 A 1 + TNT1 A 0 A_Jump(256, "Trail") + Death: + TNT1 A 2 A_PlaySound("weapons/plasma/explode", CHAN_AUTO) + stop + } +} + +actor Lith_PenetratingPlasmaBolt : Lith_PlasmaBolt +{ + Damage (5) + Speed 47 + + +RIPPER + + states + { + Trail: + TNT1 A 0 A_JumpIf(user_trailstep >= 10, "TrailDone") + TNT1 A 0 A_SetUserVar(user_trailstep, user_trailstep + 1) + TNT1 A 0 A_SpawnItemEx("Lith_PlasmaBoltTrail_Red", + ((user_trailstep * 10.0) * velx) / -35.0, + -((user_trailstep * 10.0) * vely) / -35.0, + 2.0 + ((user_trailstep * 10.0) * velz) / -35.0, + 0, 0, 0, + 0, SXF_ABSOLUTEANGLE | SXF_NOCHECKPOSITION) + loop + TrailDone: + TNT1 A 0 A_SetUserVar(user_trailstep, 0) + goto Step + Death: + TNT1 A 2 A_PlaySound("weapons/plasma/explode", CHAN_AUTO) + stop + } +} + diff --git a/pksrc/lscripts/Projectiles/PlasmaLaser.dec b/pksrc/lscripts/Projectiles/PlasmaLaser.dec new file mode 100644 index 0000000..c916507 --- /dev/null +++ b/pksrc/lscripts/Projectiles/PlasmaLaser.dec @@ -0,0 +1,65 @@ +actor Lith_PlasmaHit +{ + RenderStyle "Add" + Alpha 0.25 + Scale 0.65 + Species "Lith_Player" + DamageType "Lith_Energy" + + +BRIGHT + +NOINTERACTION + +PUFFONACTORS + +PUFFGETSOWNER + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +EXTREMEDEATH + +FORCEXYBILLBOARD + +MTHRUSPECIES + -ALLOWPARTICLES + + states + { + ded: + TNT1 A 0 + stop + Crash: + BLL2 A 0 + BLL2 A 0 A_JumpIf(CallACS("Lith_Timer") % 3, "ded") + BLL2 A 0 A_PlaySound("weapons/plasma/laser/spark", CHAN_7, 1.0, true) + PrettiesLoop: + BLL2 A 0 A_JumpIf(alpha >= 1, "PrettiesDone") + BLL2 A 1 A_FadeIn(0.07) + loop + PrettiesDone: + BLL2 A 1 A_FadeOut(0.1) + wait + Spawn: + Melee: + BLL2 A 0 + BLL2 A 0 A_JumpIf(CallACS("Lith_Timer") % 3, "ded") + BLL2 A 0 A_PlaySound("weapons/plasma/laser/spark", CHAN_7, 1.0, true) + BLL2 A 1 A_FadeOut(0.05) + wait + } +} + +actor Lith_PlasmaLaze +{ + RenderStyle "Add" + Scale 0.3 + + +FORCEXYBILLBOARD + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + BLLT E 2 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/PoisonBullet.dec b/pksrc/lscripts/Projectiles/PoisonBullet.dec new file mode 100644 index 0000000..55c3528 --- /dev/null +++ b/pksrc/lscripts/Projectiles/PoisonBullet.dec @@ -0,0 +1,141 @@ +actor Lith_PoisonFX +{ + RenderStyle "Stencil" + StencilColor "Green" + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + BLLT F 2 + BLLT F 1 A_FadeOut + wait + } +} + +actor Lith_PoisonFXTimer : Inventory +{ + Inventory.MaxAmount 20 +} + +actor Lith_PoisonFXReset : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_PoisonFXGiver : CustomInventory +{ + states + { + Pickup: + TNT1 A 0 //TODO A_DamageSelf(10, "Poison") + TNT1 A 0 A_PlaySound("weapons/shotgun/poison/acid", CHAN_5, 1, false, 0.5) + TNT1 A 0 A_SpawnItemEx("Lith_PoisonFX", 0,0,8, 0,0,0, 0, SXF_NOCHECKPOSITION) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_PoisonFXTicker") + TNT1 A 0 A_RailWait + stop + } +} + +actor Lith_PoisonFXGiverGiver : CustomInventory +{ + states + { + Pickup: + TNT1 A 0 + TNT1 A 0 A_JumpIfInventory("Lith_PoisonFXTimer", 1, "Reset") + Pickup1: + TNT1 A 0 A_GiveInventory("Lith_PoisonFXTimer", 20) + TNT1 A 0 A_GiveInventory("Lith_PoisonFXGiver", 1) + goto Done + Reset: + TNT1 A 0 A_GiveInventory("Lith_PoisonFXReset", 1) + Done: + TNT1 A 0 A_RailWait + stop + } +} + +actor Lith_PoisonBlob +{ + Alpha 1 + Scale 0.5 + Mass 20 + + +NOBLOCKMAP + +NOCLIP + -NOGRAVITY + + states + { + Spawn: + BLLT G 5 + BLLT G 0 A_PlaySound("weapons/shotgun/poison/acid", CHAN_5) + SpawnLoop: + BLLT G 0 A_JumpIf(z == floorz, "Crash") // ffs + BLLT G 1 A_FadeOut(0.01) + loop + Crash: + RADB ABCDEFGHIJKLM 1 A_FadeOut(0.01) + wait + } +} + +actor Lith_PoisonBullet : Lith_BulletPuff +{ + RenderStyle "Add" + DamageType "Lith_Bullets" + Species "Lith_Player" + Alpha 0.9 + + +NOGRAVITY + +NOBLOCKMAP + +FLOORCLIP + +NOEXTREMEDEATH + +FORCEXYBILLBOARD + +PUFFGETSOWNER + +MTHRUSPECIES + +HITTRACER + +PUFFONACTORS + -ALLOWPARTICLES + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_GiveInventory("Lith_PoisonFXGiverGiver", 1, AAPTR_TRACER) + TNT1 A 0 A_CheckFlag("NOBLOOD", "Crash", AAPTR_TRACER) + TNT1 A 0 A_SpawnItemEx("Blood") + stop + Crash: + XPUF Q 0 + XPUF QQQQQ 0 A_SpawnItemEx("Lith_PoisonBlob", 0,0,0, frandom(-1,1),frandom(-1,1),0, 0, 0, 64) + XPUF Q 0 A_SpawnItemEx("Lith_PuffSmoke", 0, 0, 4.0 + 0.1 * random(-10, 10)) + XPUF Q 0 A_Jump(256, "PuffNormal", "PuffMirrored") + PuffNormal: + XPUF Q 0 A_Jump(32, "PuffNormalAlt") + XPUF QRSTU 1 bright + PuffNormalEnd: + XPUF FGH 1 bright + stop + PuffNormalAlt: + XPUF A 0 A_PlaySound("effects/puff/ricochet") + XPUF ABCDE 1 bright + goto PuffNormalEnd + PuffMirrored: + XPUF V 0 A_Jump(32, "PuffMirroredAlt") + XPUF VWXYZ 1 bright + PuffMirroredEnd: + XPUF NOP 1 bright + stop + PuffMirroredAlt: + XPUF I 0 A_PlaySound("effects/puff/ricochet") + XPUF IJKLM 1 bright + goto PuffMirroredEnd + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/Punctuator.dec b/pksrc/lscripts/Projectiles/Punctuator.dec new file mode 100644 index 0000000..2c82165 --- /dev/null +++ b/pksrc/lscripts/Projectiles/Punctuator.dec @@ -0,0 +1,48 @@ +actor Lith_PunctuatorExplosion +{ + RenderStyle "Add" + Alpha 0.3 + Scale 0.9 + DamageType "Lith_PlayerMissile" + + +BLOODLESSIMPACT + +NOINTERACTION + +FORCERADIUSDMG + + states + { + Spawn: + TNT1 AA 0 nodelay A_Explode(128, 128, 0) + TNT1 A random(1, 5) + MEXP AB 1 bright + MEXP CD 2 bright + MEXP EF 3 bright + stop + } +} + +actor Lith_PunctuatorPuff +{ + Species "Lith_Player" + DamageType "Lith_PlayerMissile" + + +NOINTERACTION + +PUFFONACTORS + +NODECAL + +BLOODLESSIMPACT + +MTHRUSPECIES + +FORCERADIUSDMG + + states + { + Spawn: + TNT1 AA 0 nodelay A_Explode(128, 128, 0) + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/RailgunParticles.dec b/pksrc/lscripts/Projectiles/RailgunParticles.dec new file mode 100644 index 0000000..a5857d7 --- /dev/null +++ b/pksrc/lscripts/Projectiles/RailgunParticles.dec @@ -0,0 +1,110 @@ +actor Lith_OmegaRailFXBase +{ + RenderStyle "Add" + Alpha 0.75 + Translation "112:127=168:191", "160:167=168:191", "224:231=168:168" + Height 1 + Radius 1 + + +NOBLOCKMAP + +NOGRAVITY +} + +actor Lith_OmegaRailParticle1 +{ + RenderStyle "Add" + Alpha 0.8 + Translation "192:207=168:191", "240:247=191:191" + + +NOINTERACTION + + states + { + Spawn: + PLSS A 10 + PLSS A 1 A_FadeOut(0.01) + wait + } +} + +actor Lith_OmegaRailParticle2 : Lith_OmegaRailFXBase +{ + Alpha 0.5 + XScale 0.3 + YScale 0.5 + + states + { + Spawn: + BFE1 C 10 bright A_FadeOut(0.1) + loop + } +} + +actor Lith_OmegaRailBeam : Lith_OmegaRailFXBase +{ + RenderStyle "Add" + Alpha 0.75 + Translation "112:127=168:191", "160:167=168:191", "224:231=168:168" + XScale 0.8 + YScale 0.7 + DamageType "Lith_PlayerMissile" + + +EXTREMEDEATH + +FORCERADIUSDMG + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_OmegaRailParticle1", frandom(-57, 57),frandom(-57, 57),frandom(-57, 57)) + BFE1 C 25 bright A_Explode(24, 256, 0, false, 256) + BFE1 DEF 4 bright + stop + } +} + +actor Lith_OmegaRailExplosion : Lith_OmegaRailFXBase +{ + Scale 2 + + +EXTREMEDEATH + +FORCERADIUSDMG + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_PlaySound("weapons/rail/impact") + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_OmegaRailParticle2", frandom(-32, 32),frandom(-32, 32),frandom(-32, 32), frandom(-2, 2),frandom(-2, 2),frandom(-2, 2)) + BFE1 C 15 bright A_Explode(128, 512, 0, false, 512) + BFE1 DEF 3 bright + stop + } +} + +actor Lith_OmegaRailHax : FastProjectile +{ + Speed 32000 + Damage 300 + Height 1 + Radius 1 + + +NOGRAVITY + +NOBLOCKMAP + +THRUACTORS + +EXTREMEDEATH + +EXPLODEONWATER + + states + { + Spawn: + TNT1 A 1 + loop + Death: + TNT1 A 0 A_SpawnItemEx("Lith_OmegaRailExplosion", 0,0,0, 0,0,0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION) + stop + } +} + +// EOF \ No newline at end of file diff --git a/pksrc/lscripts/Projectiles/RifleBullet.dec b/pksrc/lscripts/Projectiles/RifleBullet.dec new file mode 100644 index 0000000..3ccfc7a --- /dev/null +++ b/pksrc/lscripts/Projectiles/RifleBullet.dec @@ -0,0 +1,44 @@ +actor Lith_RifleBullet : Lith_BulletPuff +{ + Mass 9999 + DamageType "Lith_Bullets" + Species "Lith_Player" + + +MTHRUSPECIES + +FORCERADIUSDMG + +PUFFONACTORS + +PUFFGETSOWNER + + states + { + Crash: + TNT1 A 0 + TNT1 A 0 A_Explode(7, 32, 0) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777, true), "CrashMarathon") + goto Super::Spawn + Spawn: + TNT1 A 0 + TNT1 A 0 A_Explode(7, 32, 0) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777, true), "SpawnMarathon") + goto Super::Spawn + XDeath: + TNT1 A 0 + TNT1 A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_7777777, true), 2) + TNT1 A 0 A_PlaySound("marathon/hit", 6) + TNT1 A 0 A_Explode(7, 32, 0) + stop + CrashMarathon: TNT1 A 0 A_PlaySound("marathon/hitwall", 6) goto MarathonPuff + SpawnMarathon: TNT1 A 0 A_PlaySound("marathon/hitsolid", 6) goto MarathonPuff + MarathonPuff: + TNT1 A 0 A_SetScale(0.5) + TNT1 A 0 A_SetTranslucent(1, 1) + MPUF ABCDEFG 2 bright + stop + } +} + +actor Lith_RifleBulletPainless : Lith_RifleBullet +{ + +PAINLESS +} + diff --git a/pksrc/lscripts/Projectiles/Rocket.dec b/pksrc/lscripts/Projectiles/Rocket.dec new file mode 100644 index 0000000..4ea7859 --- /dev/null +++ b/pksrc/lscripts/Projectiles/Rocket.dec @@ -0,0 +1,29 @@ +actor Lith_RocketTrail +{ + RenderStyle Add + Scale 0.076 + + +NOINTERACTION + + states + { + Spawn: + SMOK A 1 A_FadeOut(0.05) + wait + } +} + +actor Lith_Rocket : Rocket +{ +} + +actor Lith_RocketHax +{ + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Rocket") + stop + } +} diff --git a/pksrc/lscripts/Projectiles/ShotgunTrail.dec b/pksrc/lscripts/Projectiles/ShotgunTrail.dec new file mode 100644 index 0000000..714532d --- /dev/null +++ b/pksrc/lscripts/Projectiles/ShotgunTrail.dec @@ -0,0 +1,21 @@ +actor Lith_ShotgunTrail +{ + RenderStyle Add + Alpha 0.4 + Scale 0.1 + + +NOBLOCKMAP + +NOGRAVITY + + states + { + Spawn: + PBAL A 0 + PBAL A 0 A_Warp(AAPTR_DEFAULT, 0, 0, -8, 0, WARPF_NOCHECKPOSITION) + PBAL A 20 bright + SpawnLoop: + PBAL A 1 bright A_FadeOut(0.1 / 15.0) + loop + } +} + diff --git a/pksrc/lscripts/Projectiles/SniperBullet.dec b/pksrc/lscripts/Projectiles/SniperBullet.dec new file mode 100644 index 0000000..da8b92f --- /dev/null +++ b/pksrc/lscripts/Projectiles/SniperBullet.dec @@ -0,0 +1,28 @@ +actor Lith_SniperBullet : Lith_BulletPuff +{ + Mass 20 + DamageType "Lith_Bullets" + Species "Lith_Player" + + +MTHRUSPECIES + +FORCERADIUSDMG + +PUFFONACTORS + +PUFFGETSOWNER + +FORCEPAIN + +NOEXTREMEDEATH + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_Explode(25, 128, 0) + goto Super::Spawn + XDeath: + TNT1 A 0 + TNT1 A 0 A_Explode(25, 128, 0) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Projectiles/SwordSwing.dec b/pksrc/lscripts/Projectiles/SwordSwing.dec new file mode 100644 index 0000000..d418cab --- /dev/null +++ b/pksrc/lscripts/Projectiles/SwordSwing.dec @@ -0,0 +1,128 @@ +actor Lith_SwordHipcher +{ + RenderStyle Add + Alpha 0.25 + + +NOINTERACTION + + states + { + Spawn: + SMOK A 15 A_FadeOut(0.1) + wait + } +} + +actor Lith_SwordHitler +{ + RenderStyle Add + Scale 0.5 + + +NOINTERACTION + + states + { + Spawn: + SHKR B 0 + SHKR BBBBBBBB 0 A_SpawnItemEx("Lith_SwordHipcher", + frandom(-24,24),frandom(-24,24),frandom(-24,24), + frandom(-8,8),frandom(-8,8),frandom(-8,8), + 0, SXF_NOCHECKPOSITION, 240) + SHKR B 1 bright A_FadeOut(0.1) + wait + } +} + +actor Lith_SwordHither +{ + RenderStyle Add + Scale 0.5 + + +NOINTERACTION + + states + { + Spawn: + SHKR B 0 + SHKR B 1 bright A_FadeOut(0.1) + wait + } +} + +actor Lith_SwordHitter +{ + Radius 6 + Height 6 + Speed 40 + Damage 30 + Species "Lith_Player" + DamageType "Lith_Melee" + + Projectile + +MTHRUSPECIES + +EXPLODEONWATER + +RIPPER + + var int user_trailstep; + var int user_delta; + + states + { + ded: + TNT1 A 0 + stop + Spawn: + TNT1 A 0 + TNT1 A 3 A_PlaySound("weapons/sword/attack") + SpawnLoop: + TNT1 A 0 A_JumpIf(user_trailstep >= 8, "TrailDone") + TNT1 A 0 A_SetUserVar(user_trailstep, user_trailstep + 1) + TNT1 A 0 A_SpawnItemEx("Lith_SwordHither", + ((user_trailstep * 4.0) * velx) / -35.0, + -((user_trailstep * 4.0) * vely) / -35.0, + 2.0 + ((user_trailstep * 4.0) * velz) / -35.0, + 0, 0, 0, + 0, SXF_ABSOLUTEANGLE | SXF_NOCHECKPOSITION, + user_delta * 40) + loop + TrailDone: + TNT1 A 0 A_SetUserVar(user_trailstep, 0) + TNT1 A 0 A_SpawnItemEx("Lith_SwordHitler", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION) + TNT1 A 0 A_SetUserVar(user_delta, user_delta + 1) + TNT1 A 0 A_JumpIf(user_delta >= 15, "ded") + TNT1 A 1 + goto SpawnLoop + } +} + +actor Lith_SwordHipper : Lith_SwordHitter +{ + states + { + Spawn: + TNT1 A 0 + TNT1 A 3 + goto SpawnLoop + } +} + +actor Lith_SwordBlitter +{ + Speed 0 + + Projectile + +NOBLOCKMAP + +EXPLODEONWATER + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_CustomMissile("Lith_SwordHitter", 16, 8, 0, CMF_AIMDIRECTION | CMF_TRACKOWNER) + TNT1 A 1 A_CustomMissile("Lith_SwordHipper", 8, 0, 0, CMF_AIMDIRECTION | CMF_TRACKOWNER) + TNT1 A 0 A_CustomMissile("Lith_SwordHitter", -8, -8, 0, CMF_AIMDIRECTION | CMF_TRACKOWNER) + TNT1 A 1 A_CustomMissile("Lith_SwordHipper", -16, -16, 0, CMF_AIMDIRECTION | CMF_TRACKOWNER) + stop + } +} + diff --git a/pksrc/lscripts/Rain.dec b/pksrc/lscripts/Rain.dec new file mode 100644 index 0000000..41d7e37 --- /dev/null +++ b/pksrc/lscripts/Rain.dec @@ -0,0 +1,99 @@ +// Effects taken from Realm667. +// I think Tormenter made these originally, sorry if that's incorrect. + +actor Lith_RainDrop +{ + Height 2 + Radius 2 + XScale 0.5 + YScale 2.0 + RenderStyle "Add" + Alpha 0.25 + + +NOTRIGGER + +NOBLOCKMAP + +DROPOFF + +NOTELEPORT + +NOTIMEFREEZE + +NOGRAVITY + +DONTSPLASH + + states + { + Spawn: + RNDR A 0 nodelay A_ChangeVelocity(frandom(-2, 2), frandom(-2, 2), frandom(-12, -16), CVF_REPLACE) + Looping: + RNDR A 1 A_JumpIf(waterlevel > 0 || velz == 0, "Death") + loop + Death: + RNDR A 0 A_SetScale(1, 1) + RNDR A 0 A_ChangeVelocity(0, 0, 0, CVF_REPLACE) + RNDR BCDEFGH 3 A_FadeOut(0.0375) + stop + } +} + +actor Lith_BloodRainDrop : Lith_RainDrop +{ + RenderStyle "Subtract" + Alpha 0.5 + Translation "80:111=[0,64,64]:[0,128,128]" +} + +actor Lith_RainDropSpawner +{ + +NOTIMEFREEZE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_JumpIf(!CallACS("Lith_RainDropSpawn"), "Nope") + TNT1 A 0 A_Jump(256, "DoThing") + DoThing: + TNT1 A 0 A_SpawnItemEx("Lith_RainDrop") + stop + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_BloodRainDropSpawner : Lith_RainDropSpawner +{ + states + { + DoThing: + TNT1 A 0 A_SpawnItemEx("Lith_BloodRainDrop") + stop + } +} + +actor Lith_SpawnRain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_RainDropSpawner", + frandom(16, 1024), 0, frandom(256,512), 0, 0, 0, frandom(0, 360), 128) + TNT1 AAAAAAA 0 A_SpawnItemEx("Lith_RainDropSpawner", + frandom(512, 1536), 0, frandom(256,512), 0, 0, 0, frandom(-90, 90), 128) + stop + } +} + +actor Lith_SpawnBloodRain : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_BloodRainDropSpawner", + frandom(16, 1024), 0, frandom(256,512), 0, 0, 0, frandom(0, 360), 128) + TNT1 AAAAAAA 0 A_SpawnItemEx("Lith_BloodRainDropSpawner", + frandom(512, 1536), 0, frandom(256,512), 0, 0, 0, frandom(-90, 90), 128) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/RifleGrenade.dec b/pksrc/lscripts/RifleGrenade.dec new file mode 100644 index 0000000..3ee25a0 --- /dev/null +++ b/pksrc/lscripts/RifleGrenade.dec @@ -0,0 +1,55 @@ +actor Lith_RifleGrenadeSmoke +{ + RenderStyle "Add" + Scale 0.15 + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + SMOK ACDGHJKMPQ 1 bright + stop + } +} + +actor Lith_RifleGrenade +{ + Radius 8 + Height 8 + Speed 25 + Damage 20 + BounceType "Doom" + BounceCount 2 + Gravity 0.5 + BounceSound "weapons/rifle/grenadebounce" + Species "Lith_Player" + DamageType "Lith_Shrapnel" + + Projectile + +MTHRUSPECIES + +EXPLODEONWATER + -NOGRAVITY + + states + { + Spawn: + SGRN A 2 bright A_SpawnItemEx("Lith_RifleGrenadeSmoke", -8) + Loop + Death: + MEXP A 0 A_ChangeFlag("NOGRAVITY", true) + + MEXP A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777, true), 3) + MEXP A 0 A_PlaySound("explosion", 6) + MEXP A 0 A_Jump(256, 2) + MEXP A 0 A_PlaySound("marathon/explode", 6) + + MEXP A 0 A_Explode + MEXP AB 2 bright + MEXP CD 3 bright + MEXP EF 4 bright + Stop + } +} + diff --git a/pksrc/lscripts/TeleFog.dec b/pksrc/lscripts/TeleFog.dec new file mode 100644 index 0000000..3dea232 --- /dev/null +++ b/pksrc/lscripts/TeleFog.dec @@ -0,0 +1,27 @@ +actor Lith_TeleFogRing +{ + RenderStyle Add + + +NOINTERACTION + +BRIGHT + + States + { + Spawn: + TELE AAAAA 2 A_FadeOut(0.1) + Stop + } +} + +actor Lith_P67TeleFog : TeleportFog replaces TeleportFog +{ + States + { + Spawn: + TNT1 AAAA 5 A_SpawnItemEx("Lith_TeleFogRing", 0,0,0, 0,0,4) + Stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons/Base.dec b/pksrc/lscripts/Weapons/Base.dec new file mode 100644 index 0000000..41a5776 --- /dev/null +++ b/pksrc/lscripts/Weapons/Base.dec @@ -0,0 +1,65 @@ +actor Lith_Weapon : Weapon +{ + Weapon.BobStyle "Alpha" + Weapon.BobSpeed 1.5 + Inventory.PickupSound "" + Inventory.PickupMessage "" + + +INVENTORY.UNTOSSABLE + +WEAPON.NOALERT + + const int Lith_BOBONLY = WRF_NOSWITCH | WRF_NOFIRE; + + const int Lith_PF = SXF_TRANSFERSPECIAL; + + states + { + DummyFlash: + TNT1 A 0 A_AlertMonsters + stop + User4: + "####" "#" 0 A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_marine, "_UseKnife") + "####" "#" 0 A_Jump(256, "Ready") + _UseKnife: + "####" "#" 3 offset(2, 34) + "####" "#" 1 offset(5, 41) + "####" "#" 1 offset(10, 58) + "####" "#" 1 offset(17, 87) + TNT1 A 0 offset(1, 32) A_JumpIfInventory("Lith_Knif", 1, "_Knife1") + KNIF A 1 A_PlaySound("weapons/knife/swing1", CHAN_WEAPON) + KNIF BCD 1 + goto _KnifeNormal + _Knife1: + TNT1 A 1 A_PlaySound("weapons/knife/swing2", CHAN_WEAPON) + KNIF FGH 1 + _KnifeNormal: + TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "_KnifeBerserk") + TNT1 A 0 A_CustomPunch(5 * random(1, 10), true, 0, "Lith_KnifPuf", 96) + goto _KnifeEnd1 + _KnifeBerserk: + TNT1 A 0 A_CustomPunch(20 * random(1, 10), true, 0, "Lith_KnifPuf", 96) + goto _KnifeEnd1 + _KnifeEnd1: + TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "_KnifeEnd2") + KNIF E 1 + TNT1 A 1 + goto _KnifeEnd + _KnifeEnd2: + KNIF IJ 1 + _KnifeEnd: + TNT1 A 5 + TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "_KnifeDone") + TNT1 A 0 A_GiveInventory("Lith_Knif", 1) + TNT1 AAAAA 1 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE|WRF_NOSWITCH) + TNT1 A 0 A_TakeInventory("Lith_Knif", 1) + goto _KnifeFinish + _KnifeDone: + TNT1 A 0 A_TakeInventory("Lith_Knif", 1) + TNT1 AAAAA 1 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE|WRF_NOSWITCH) + _KnifeFinish: + TNT1 AAAAAAAAA 0 A_Lower + TNT1 A 1 + TNT1 A 0 A_Jump(256, "Select") + } +} + diff --git a/pksrc/lscripts/Weapons/Gameboy.dec b/pksrc/lscripts/Weapons/Gameboy.dec new file mode 100644 index 0000000..462eba1 --- /dev/null +++ b/pksrc/lscripts/Weapons/Gameboy.dec @@ -0,0 +1,32 @@ +actor Lith_Gameboy : Lith_Weapon +{ + Tag "$LITH_TXT_INFO_SHORT_Gameboy" + Weapon.SlotNumber 0 + Weapon.BobStyle "Smooth" + Weapon.BobSpeed 1 + + +WEAPON.WIMPY_WEAPON + + states + { + Ready: + GMBG A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + GMBG A 0 A_Lower + GMBG A 1 A_Lower + loop + Select: + GMBG A 0 A_Raise + GMBG A 1 A_Raise + loop + + Fire: + GMBG A 0 ACS_NamedExecuteWithResult("Lith_UseGameboy") + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons/Misc.dec b/pksrc/lscripts/Weapons/Misc.dec new file mode 100644 index 0000000..966bc54 --- /dev/null +++ b/pksrc/lscripts/Weapons/Misc.dec @@ -0,0 +1,17 @@ +actor Lith_WeaponScopedToken : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_MWeapon : Lith_Weapon +{ + Inventory.RestrictedTo "Lith_MarinePlayer" +} + +actor Lith_CWeapon : Lith_Weapon +{ + Inventory.RestrictedTo "Lith_CyberMagePlayer" +} + +// EOF + diff --git a/pksrc/lscripts/Weapons/Pickups.dec b/pksrc/lscripts/Weapons/Pickups.dec new file mode 100644 index 0000000..d0666c8 --- /dev/null +++ b/pksrc/lscripts/Weapons/Pickups.dec @@ -0,0 +1,242 @@ +actor Lith_WeaponPickup : CustomInventory +{ + Inventory.PickupSound "" + Inventory.PickupMessage "" + + const int Lith_ISF = SXF_SETMASTER; + + var int user_glowangle; + var int user_glowzangle; + var int user_pickupparm; + + states + { + SpawnLoop: + TNT1 A 1 A_CheckSight("LoopButDontShowThatShitOffDawg") + TNT1 A 0 A_SetUserVar(user_glowangle, (user_glowangle + 5) % 360) + TNT1 A 0 A_SetUserVar(user_glowzangle, (user_glowzangle + 2) % 360) + + // xyz + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", sin(user_glowangle) * 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowzangle) * 9.0), + 0, 0, 0, 0) + + // yz + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", 0, + sin(user_glowangle) * 32.0, + 24.0 + (cos(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", cos(user_glowangle) * 32.0, + sin(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", cos(user_glowangle) * 32.0, + ((1.0 - sin(user_glowangle)) * 32.0) - 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + + // xz + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", sin(user_glowangle) * 32.0, + 0, + 24.0 + (cos(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", sin(user_glowangle) * 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + TNT1 A 0 A_SpawnItemEx("Lith_WeapGlow", ((1.0 - sin(user_glowangle)) * 32.0) - 32.0, + cos(user_glowangle) * 32.0, + 24.0 + (sin(user_glowangle) * 32.0), + 0, 0, 0, 0) + loop + LoopButDontShowThatShitOffDawg: + TNT1 A 1 + TNT1 A 0 A_CheckSight("LoopButDontShowThatShitOffDawg") + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", weapon_fist) + stop + } +} + +actor Lith_ISG_FIST_A : Lith_ItemSprite {states {Spr: FIST A 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_CFIS_Z : Lith_ItemSpriteM {states {Spr: CFIS Z 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_CFIS_Y : Lith_ItemSpriteC {states {Spr: CFIS Y 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_PIST_A : Lith_ItemSpriteM {states {Spr: PIST A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_REVL_A : Lith_ItemSpriteC {states {Spr: REVL A 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_SHOT_A : Lith_ItemSpriteM {states {Spr: SHOT A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_CSRG_Z : Lith_ItemSpriteC {states {Spr: CSRG Z 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_SGN2_A : Lith_ItemSpriteM {states {Spr: SGN2 A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_CSHG_Y : Lith_ItemSpriteC {states {Spr: CSHG Y 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_RIFL_A : Lith_ItemSpriteM {states {Spr: RIFL A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_CSMG_Y : Lith_ItemSpriteC {states {Spr: CSMG Y 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_LAUN_A : Lith_ItemSpriteM {states {Spr: LAUN A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_IONG_Z : Lith_ItemSpriteC {states {Spr: IONG Z 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_PLAS_A : Lith_ItemSpriteM {states {Spr: PLAS A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_CPLG_Z : Lith_ItemSpriteC {states {Spr: CPLG Z 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_ISM_BFUG_A : Lith_ItemSpriteM {states {Spr: BFUG A 0 A_Jump(256, "SpawnLoop")}} +actor Lith_ISC_SDSG_Z : Lith_ItemSpriteC {states {Spr: SDSG Z 0 A_Jump(256, "SpawnLoop")}} + +actor Lith_FistPickup : Lith_WeaponPickup replaces Fist +{ + Tag "Fist Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISG_FIST_A", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_fist) + stop + } +} + +actor Lith_ChainsawPickup : Lith_WeaponPickup replaces Chainsaw +{ + Tag "Chainsaw Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_CFIS_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISM_CFIS_Y", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_chainsaw) + stop + } +} + +actor Lith_PistolPickup : Lith_WeaponPickup replaces Pistol +{ + Tag "Pistol Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_PIST_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_REVL_A", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_pistol) + stop + } +} + +actor Lith_ShotgunPickup : Lith_WeaponPickup replaces Shotgun +{ + Tag "Shotgun Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_SHOT_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_CSRG_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_shotgun) + stop + } +} + +actor Lith_SuperShotgunPickup : Lith_WeaponPickup replaces SuperShotgun +{ + Tag "Super Shotgun Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_SGN2_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_CSHG_Y", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_supershotgun) + stop + } +} + +actor Lith_ChaingunPickup : Lith_WeaponPickup replaces Chaingun +{ + Tag "Chaingun Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_RIFL_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_CSMG_Y", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_chaingun) + stop + } +} + +actor Lith_RocketLauncherPickup : Lith_WeaponPickup replaces RocketLauncher +{ + Tag "Rocket Launcher Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_LAUN_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_IONG_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_rocketlauncher) + stop + } +} + +actor Lith_PlasmaRiflePickup : Lith_WeaponPickup replaces PlasmaRifle +{ + Tag "Plasma Rifle Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_PLAS_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_CPLG_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_plasmarifle) + stop + } +} + +actor Lith_BFG9000Pickup : Lith_WeaponPickup replaces BFG9000 +{ + Tag "BFG9000 Pickup" + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ISM_BFUG_A", 0,0,0, 0,0,0, 0, Lith_ISF) + TNT1 A 0 A_SpawnItemEx("Lith_ISC_SDSG_Z", 0,0,0, 0,0,0, 0, Lith_ISF) + goto SpawnLoop + Pickup: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_WeaponPickup", wepnam_bfg9000) + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/1_CFist.dec b/pksrc/lscripts/Weapons_CyberMage/1_CFist.dec new file mode 100644 index 0000000..8628310 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/1_CFist.dec @@ -0,0 +1,42 @@ +actor Lith_CFist : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_CFist" + Weapon.Kickback 100 + Weapon.SlotNumber 1 + Weapon.SlotPriority 0.9 + DamageType "Lith_Melee" + + +WEAPON.WIMPY_WEAPON + +WEAPON.MELEEWEAPON + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_FistPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + TNT1 A 1 A_WeaponReady(WRF_NOFIRE|CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SetMagicUI", false) + DeselectLoop: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_SetMagicUI", true) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/2_Mateba.dec b/pksrc/lscripts/Weapons_CyberMage/2_Mateba.dec new file mode 100644 index 0000000..666c14c --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/2_Mateba.dec @@ -0,0 +1,205 @@ +actor Lith_MatebaShotsFired : Inventory +{ + Inventory.MaxAmount 12 +} + +actor Lith_FinalizerKill2 +{ + RenderStyle "Stencil" + StencilColor "Red" + Alpha 0.9 + + +NOINTERACTION + + states + { + Spawn: + BLLT F 5 + BLLT F 1 A_FadeOut(0.05) + wait + } +} + +actor Lith_FinalizerKill +{ + RenderStyle "Add" + + +NOINTERACTION + + states + { + Spawn: + BLLT F 10 + BLLT F 0 A_SpawnItemEx("Lith_FinalizerKill2", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION) + BLLT F 1 A_FadeOut(0.05) + wait + } +} + +actor Lith_Finalizer : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_CheckFlag("BOSS", "Nope") + TNT1 A 0 A_JumpIf(((health*1.0) / CallACS("Lith_GetFinalizerMaxHealth")) > 0.5, "Nope") + TNT1 A 0 A_SpawnItemEx("Lith_FinalizerKill", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION) + TNT1 A 0 Thing_Remove(0) + stop + Nope: + TNT1 A 0 //TODO A_DamageSelf(50) + stop + } +} + +actor Lith_FinalizerEffect +{ + RenderStyle "Add" + Scale 0.2 + Radius 0 + Height 0 + + +FORCEXYBILLBOARD + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + BLLT O 10 bright + BLLT O 1 bright A_FadeOut(0.2) + wait + } +} + +actor Lith_FinalizerShotEffect +{ + RenderStyle "Add" + Scale 0.8 + + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + BLLT E 1 bright A_FadeOut + wait + } +} + +actor Lith_FinalizerShot : FastProjectile +{ + RenderStyle "Add" + Speed 90 + MissileType "Lith_FinalizerShotEffect" + + Projectile + +HITTRACER + +NOTIMEFREEZE + + states + { + Spawn: + TNT1 A 1 + wait + Death: + TNT1 A 0 A_GiveInventory("Lith_Finalizer", 1, AAPTR_TRACER) + stop + } +} + +actor Lith_Mateba : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Mateba" + Weapon.SlotNumber 2 + Weapon.SlotPriority 1 + Weapon.BobSpeed 2.5 + Weapon.BobRangeX 0.2 + Weapon.BobRangeY 0.3 + Weapon.UpSound "weapons/mateba/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_PistolPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + MTBG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + MTBG AAA 0 A_Lower + MTBG A 1 + loop + Select: + MTBG AAA 0 A_Raise + MTBG A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_MatebaShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_MatebaShotsFired", 1) + TNT1 A 0 A_GunFlash("DummyFlash") + + TNT1 A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_Mateba_A), 2) + TNT1 A 0 A_JumpIfInventory("Lith_MatebaShotsFired", 0, "Finalize") + + TNT1 A 0 A_FireBullets(2, 2, -1, 30, "BulletPuff", FBF_NORANDOM) + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawnerSmall", 0, 0, 0, 6) + TNT1 A 0 A_PlaySound("weapons/mateba/fire", CHAN_WEAPON) + MTBG B 1 bright offset(0, 50) + MTBG C 1 bright offset(0, 46) + MTBG A 1 offset(0, 40) + MTBG A 1 offset(0, 37) + MTBG A 1 offset(0, 34) A_WeaponReady(WRF_NOBOB) + MTBG A 1 offset(0, 33) A_WeaponReady(WRF_NOBOB) + MTBG A 1 offset(0, 32) A_WeaponReady(WRF_NOBOB) + MTBG A 1 A_WeaponReady(WRF_NOBOB) + goto Ready + + Finalize: + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawnerSmall", 0, 0, 0, 6) + TNT1 A 0 A_SpawnItemEx("Lith_FinalizerEffect", cos(pitch)*24, 0, ((height-19)+2) - sin(pitch)*24) + TNT1 A 0 A_FireCustomMissile("Lith_FinalizerShot", 0, 0, 0, 10) + TNT1 A 0 A_PlaySound("weapons/mateba/fire", CHAN_WEAPON) + TNT1 A 0 A_PlaySound("weapons/mateba/finalize", CHAN_6) + TNT1 A 0 A_PlaySound("weapons/shotgun/just", CHAN_5) + MTBG B 1 bright offset(0, 55) + MTBG C 1 bright offset(0, 51) + MTBG A 1 offset(0, 45) + MTBG A 1 offset(0, 43) + MTBG A 1 offset(0, 40) + MTBG A 1 offset(0, 37) + MTBG A 1 offset(0, 34) A_WeaponReady(WRF_NOBOB) + MTBG A 1 offset(0, 33) A_WeaponReady(WRF_NOBOB) + MTBG A 1 offset(0, 32) A_WeaponReady(WRF_NOBOB) + MTBG A 1 A_WeaponReady(WRF_NOBOB) + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_MatebaShotsFired", 1, 1) + goto Ready + MTBG E 2 + MTBG F 2 + MTBG G 2 + MTBG H 2 + MTBG I 4 A_PlaySound("weapons/mateba/open", 7) + MTBG J 3 + MTBG K 2 + MTBG L 3 A_PlaySound("weapons/mateba/eject", 6) + MTBG M 3 A_TakeInventory("Lith_MatebaShotsFired", 999) + MTBG N 3 + MTBG O 2 A_PlaySound("weapons/mateba/load", 5) + MTBG P 3 + MTBG Q 3 A_PlaySound("weapons/mateba/close", 7) + MTBG R 3 + MTBG S 4 + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_CyberMage/3_2_SPAS.dec b/pksrc/lscripts/Weapons_CyberMage/3_2_SPAS.dec new file mode 100644 index 0000000..77eb2ac --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/3_2_SPAS.dec @@ -0,0 +1,210 @@ +actor Lith_SPASShotsFired : Inventory +{ + Inventory.MaxAmount 8 +} + +actor Lith_VoidShotTrail +{ + RenderStyle "Add" + Alpha 0.9 + Scale 0.05 + Translation "0:255=%[0,0,0]:[0.8,0.1,0.75]" + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT N 0 + SpawnLoop: + "####" "#" 0 A_JumpIf(scalex < 0.005, "Death") + "####" "#" 1 + "####" "#" 0 A_SetScale(scalex * 0.9) + loop + Death: + TNT1 A 0 + stop + } +} + +actor Lith_VoidShotTrail2 : Lith_VoidShotTrail +{ + Scale 0.025 + Translation "None" + + states + { + Spawn: + BLLT L 0 + goto SpawnLoop + } +} + +actor Lith_VoidShotTrail3 : Lith_VoidShotTrail +{ + Scale 0.15 +} + +actor Lith_VoidShotEffect : Lith_MonsterSoulEffect +{ + Translation "0:255=%[0,0,0]:[0.8,0.1,0.75]" +} + +actor Lith_VoidShot +{ + RenderStyle "Add" + Alpha 0.9 + Scale 0.05 + Radius 4 + Height 4 + Damage 5 + Speed 16 + Translation "0:255=%[0,0,0]:[0.8,0.1,0.75]" + + Projectile + +BRIGHT + +SEEKERMISSILE + + states + { + Spawn: + BLLT N 0 A_SpawnItemEx("Lith_VoidShotTrail") + BLLT N 0 A_SpawnItemEx("Lith_VoidShotTrail2") + BLLT N 0 A_Jump(256, 1, 2) + BLLT N 0 A_SpawnItemEx("Lith_VoidShotTrail3") + BLLT N 0 A_Jump(256, 1, 2, 3, 3) + BLLT N 0 A_ChangeVelocity(0,frandom(-1,1),frandom(-1,1), CVF_RELATIVE) + BLLT N 0 A_SeekerMissile(5, 0.7, SMF_LOOK|SMF_PRECISE|SMF_CURSPEED) + BLLT N 1 + loop + Death: + BLLT N 0 A_PlaySound("ghost/hit", CHAN_5) + TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("Lith_VoidShotEffect", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2)) + stop + } +} + +actor Lith_SPAS : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_SPAS" + Weapon.UpSound "weapons/cshotgun/draw" + Weapon.SlotNumber 3 + Weapon.SlotPriority 0.95 + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_SuperShotgunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CSHG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + CSHG AAA 0 A_Lower + CSHG A 1 + loop + + Select: + CSHG AAA 0 A_Raise + CSHG A 1 + loop + + ReloadCheck: + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SPAS_B), "Fire1") + goto Reload + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_ShellAmmo", 1, 1) + goto FireEmpty + TNT1 A 0 A_JumpIfInventory("Lith_SPASShotsFired", 0, "ReloadCheck") + TNT1 A 0 A_TakeInventory("Lith_ShellAmmo", 1, TIF_NOTAKEINFINITE) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SPAS_B), "Fire1") + TNT1 A 0 A_GiveInventory("Lith_SPASShotsFired", 1) + + Fire1: + // don't ask + TNT1 A 0 A_JumpIf(z - floorz < 24, 3) + TNT1 A 0 A_Recoil(15) + TNT1 A 0 A_FireBullets(10.5, 3.5, 3, 3) + + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_Recoil(0.7) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SPAS_A), "FireVoid") + TNT1 A 0 A_FireBullets(10.5, 3.5, 12, 6) + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawner", 0, 0, 0, 6) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SPAS_B), "FireAnim3") + + FireAnim: + TNT1 A 0 A_PlaySound("weapons/cshotgun/fire", CHAN_WEAPON) + CSHG B 1 bright offset(0, 35) A_Light(1) + CSHG B 1 bright offset(0, 35) + CSHG C 1 bright offset(0, 34) A_Light(2) + CSHG C 1 bright offset(0, 33) + CSHG D 1 offset(0, 33) A_Light(0) + CSHG D 1 offset(0, 32) + goto Ready + + FireVoid: + TNT1 AAAAAA 0 A_FireCustomMissile("Lith_VoidShot", frandom(-5,5), false, 0, 0, 0, frandom(-2,2)) + + FireAnim2: + //TNT1 A 0 A_PlaySound("weapons/cshotgun/firemag", CHAN_WEAPON) + TNT1 A 0 A_PlaySound("weapons/cshotgun/fire", CHAN_WEAPON) + CSHG B 1 bright offset(0, 38) A_Light(1) + CSHG B 1 bright offset(0, 38) + CSHG C 1 bright offset(0, 37) A_Light(2) + CSHG D 1 bright offset(0, 36) + CSHG D 1 offset(0, 35) A_Light(0) + CSHG A 1 offset(0, 35) + CSHG A 1 offset(0, 33) + CSHG A 1 offset(0, 32) + goto Ready + + FireAnim3: + TNT1 A 0 A_FireBullets(11, 5, 2, 2) + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawner", 0, 0, 0, 6) + TNT1 A 0 A_PlaySound("weapons/cshotgun/fire2", CHAN_WEAPON) + CSHG B 1 bright offset(0, 38) A_Light(1) + CSHG B 1 bright offset(0, 38) + CSHG C 1 bright offset(0, 37) + CSHG C 1 bright offset(0, 37) A_Light(2) + CSHG D 1 bright offset(0, 36) + CSHG D 1 bright offset(0, 36) + CSHG D 1 offset(0, 35) A_Light(0) + CSHG A 1 offset(0, 35) + CSHG A 1 offset(0, 34) + CSHG A 1 offset(0, 33) + CSHG A 1 offset(0, 32) + goto Ready + + Reload: + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SPAS_B), "Ready") + TNT1 A 0 A_JumpIfInventory("Lith_SPASShotsFired", 1, 1) + goto Ready + CSHR ABCDE 1 + CSHR FG 2 + CSHR H 2 A_PlaySound("weapons/cshotgun/load", CHAN_6) + CSHR IJKLMNOPQR 2 + CSHR A 0 A_TakeInventory("Lith_SPASShotsFired", 999) + CSHR S 2 A_PlaySound("weapons/cshotgun/pump", CHAN_7) + CSHR TUVWXYZB 2 + goto Ready + + FireEmpty: + CSHG A 1 + CSHG A 2 offset(0, 38) + CSHG A 1 offset(0, 40) + CSHG A 1 offset(0, 37) A_PlaySound("weapons/cshotgun/empty", CHAN_5) + CSHG A 1 offset(0, 34) + CSHG A 1 offset(0, 33) + CSHG A 5 offset(0, 32) + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_CyberMage/3_ShockRifle.dec b/pksrc/lscripts/Weapons_CyberMage/3_ShockRifle.dec new file mode 100644 index 0000000..9d39de3 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/3_ShockRifle.dec @@ -0,0 +1,260 @@ +actor Lith_ShockRifleMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + Mass 150 + + states + { + Spawn1: + MGZE ABCD 3 A_SetUserVar(user_side, 0) + MGZE EFGH 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZE C 0 A_JumpIf(user_side == 0, "Done") + MGZE G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_ShockRifleMagazine2 : Lith_ShockRifleMagazine +{ + BounceSound "weapons/magbouncef" + Mass 155 + + states + { + Spawn1: + MGZE IJKL 3 A_SetUserVar(user_side, 0) + MGZE MNOP 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZE K 0 A_JumpIf(user_side == 0, "Done") + MGZE O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_ShockRifleShotsFired : Inventory +{ + Inventory.MaxAmount 7 +} + +actor Lith_ShockFX +{ + RenderStyle "Stencil" + StencilColor "LightBlue" + Alpha 0.5 + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT F 1 + BLLT F 1 A_FadeOut + wait + } +} + +actor Lith_ShockEnemyGiver : CustomInventory +{ + +INVENTORY.ALWAYSPICKUP + +FORCEPAIN + + states + { + Pickup: + TNT1 A 0 //TODO A_DamageSelf(5, "Lith_Energy", "None", "None", AAPTR_TARGET) + TNT1 A 0 A_SpawnItemEx("Lith_ShockFX", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_ShockEffect +{ + RenderStyle "Add" + Alpha 0.7 + Scale 0.6 + + +NOINTERACTION + +RANDOMIZE + +BRIGHT + + states + { + Spawn: + ZAP1 FEDCBA 1 + stop + } +} + +actor Lith_ShockEffect2 : Lith_ShockEffect +{ + -NOINTERACTION + +NOGRAVITY + +NOBLOCKMAP + +FRIENDLY + + states + { + Spawn: + ZAP1 FEDCBA 1 A_CustomRailgun(5, 0, "None", "White", RGF_SILENT|RGF_NOPIERCING|RGF_EXPLICITANGLE|RGF_FULLBRIGHT|RGF_CENTERZ, 0, 32, "Lith_PlayerDummyPuff", frandom(0, 360), frandom(0, 360), frandom(64,100), 10, 0.2, 0) + stop + } +} + +actor Lith_SuperShockEffect +{ + RenderStyle "Add" + Alpha 0.7 + Scale 0.6 + Translation "160:167=192:199" + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + SDXP IJKLMNOPQRS 1 + SDXP S 1 A_FadeOut(0.2) + wait + } +} + +actor Lith_ShockHitCount : Inventory +{ + Inventory.MaxAmount 6 +} + +actor Lith_ShockPuff : Lith_BulletPuff +{ + +HITTRACER + +FORCEPAIN + +PUFFONACTORS + +PUFFGETSOWNER + + states + { + Crash: + TNT1 A 0 + TNT1 A 0 A_PlaySound("weapons/erifle/zap") + TNT1 A 0 A_SpawnItemEx("Lith_ShockEffect") + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ShockRif_A, true), "Charged") + goto Super::Spawn + Melee: + Spawn: + TNT1 A 0 + TNT1 A 0 A_PlaySound("weapons/erifle/zap") + TNT1 A 0 A_SpawnItemEx("Lith_ShockEffect") + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ShockRif_B, true), "Binding") + TNT1 A 0 A_GiveInventory("Lith_ShockEnemyGiver", 1, AAPTR_TRACER) + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ShockRif_A, true), "Charged") + stop + Charged: + TNT1 A 0 A_SpawnItemEx("Lith_ShockEffect2", 0,0,0, 0,0,0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION) + stop + Binding: + TNT1 A 0 A_GiveInventory("Lith_ShockHitCount", 1, AAPTR_TRACER) + TNT1 A 0 A_JumpIfInventory("Lith_ShockHitCount", 0, "Explode", AAPTR_TRACER) + TNT1 AAA 3 A_GiveInventory("Lith_ShockEnemyGiver", 1, AAPTR_TRACER) + stop + Explode: + TNT1 A 0 A_TakeInventory("Lith_ShockHitCount", 999, 0, AAPTR_TRACER) + TNT1 A 0 A_SpawnItemEx("Lith_SuperShockEffect") + TNT1 A 0 A_PlaySound("weapons/erifle/shock") + TNT1 A 0 A_Explode(64, 512, 0) + TNT1 AAAAA 3 A_GiveInventory("Lith_ShockEnemyGiver", 1, AAPTR_TRACER) + stop + } +} + +actor Lith_ShockRifle : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_ShockRifle" + Weapon.UpSound "weapons/erifle/draw" + Weapon.SlotNumber 3 + Weapon.SlotPriority 1 + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ShotgunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CSRG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + CSRG AAA 0 A_Lower + CSRG A 1 + loop + + Select: + CSRG AAA 0 A_Raise + CSRG A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_ShockRifleShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_ShockRifleShotsFired", 1) + CSRG A 1 + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 A_PlaySound("weapons/erifle/fire", CHAN_WEAPON) + TNT1 A 0 A_FireBullets(1, 0, -1, 37*frandom(1,1.5), "Lith_ShockPuff", FBF_NORANDOM) + CSRG B 1 bright offset(0, 40) A_Light(1) + CSRG C 1 bright offset(0, 35) A_Light(0) + CSRG A 1 offset(0, 34) + CSRG A 1 offset(0, 33) + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_ShockRifleShotsFired", 1, 1) + goto Ready + CSRG D 1 offset(1, 32) + CSRG E 1 offset(3, 32) + CSRG F 1 offset(4, 32) + CSRG F 1 offset(8, 38) + CSRG F 1 offset(12, 45) + CSRG F 1 offset(16, 53) + CSRG F 1 offset(19, 60) + CSRG F 0 A_PlaySound("weapons/erifle/reloadout", CHAN_6) + CSRG F 1 offset(21, 64) + CSRG A 0 A_JumpIfInventory("Lith_ShockRifleShotsFired", 0, 2) + CSRG A 0 A_SpawnItemEx("Lith_ShockRifleMagazine2", 8,-1,20, frandom(0,1),frandom(1,3),0) + goto Reload2 + CSRG A 0 A_SpawnItemEx("Lith_ShockRifleMagazine", 8,-1,20, frandom(0,1),frandom(1,3),0) + Reload2: + CSRG F 1 offset(23, 67) + CSRG F 1 offset(22, 69) + CSRG F 1 offset(19, 70) + CSRG F 7 offset(18, 72) + CSRG F 1 offset(17, 69) + CSRG F 1 offset(19, 67) + CSRG F 1 offset(20, 66) + CSRG F 1 offset(21, 62) + CSRG E 1 offset(20, 60) + CSRG E 0 A_TakeInventory("Lith_ShockRifleShotsFired", 999) + CSRG D 1 offset(21, 63) A_PlaySound("weapons/erifle/reloadin", CHAN_7) + CSRG A 1 offset(23, 66) + CSRG A 1 offset(24, 68) + CSRG A 1 offset(25, 63) + CSRG A 1 offset(24, 59) + CSRG A 1 offset(22, 57) + CSRG A 1 offset(20, 54) + CSRG A 1 offset(16, 49) + CSRG A 1 offset(12, 44) + CSRG A 1 offset(10, 42) + CSRG A 1 offset(8, 40) + CSRG A 1 offset(5, 38) + CSRG A 1 offset(2, 35) + goto Ready + } +} + +// EOF diff --git a/pksrc/lscripts/Weapons_CyberMage/4_SMG.dec b/pksrc/lscripts/Weapons_CyberMage/4_SMG.dec new file mode 100644 index 0000000..8b5fdac --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/4_SMG.dec @@ -0,0 +1,397 @@ +actor Lith_SMGTrail +{ + RenderStyle "Add" + Scale 0.3 + Alpha 0.5 + + +BRIGHT + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut(0.2) + wait + } +} + +actor Lith_SMGTracer : FastProjectile +{ + MissileType "Lith_SMGTrail" + MissileHeight 8 + RenderStyle "Translucent" + Alpha 0.9 + Scale 0.5 + Radius 2 + Height 20 + Damage (0) + Speed 128 + + +NODAMAGE + + states + { + Spawn: + TNT1 A 1 + wait + } +} + +actor Lith_SMGTrail2 : Lith_SMGTrail +{ + Translation "160:167=16:28", "64:79=22:28" +} + +actor Lith_SMGTrail3 +{ + Alpha 0.8 + Scale 0.3 + RenderStyle "Add" + Translation "160:167=192:199", "64:79=197:201" + + +BRIGHT + +NOINTERACTION + + states + { + Spawn: + PUFF A 1 A_FadeOut(0.05) + wait + } +} + +actor Lith_SMGTrailPuff3 : Lith_SMGTrail3 +{ + states + { + Spawn: + PUFF BCD 2 + stop + } +} + +actor Lith_SMGTracer2 : Lith_SMGTracer +{ + MissileType "Lith_SMGTrail2" + Damage (1) +} + +actor Lith_SMGTracer3 +{ + MissileType "Lith_SMGTrail2" + Damage (5 * random(1, 3)) + Speed 50 + Radius 4 + Height 4 + + Projectile + +SEEKERMISSILE + +SCREENSEEKER + + states + { + Spawn: + TNT1 A 0 A_SeekerMissile(0, 5, SMF_LOOK) + TNT1 A 1 A_SpawnItemEx("Lith_SMGTrail3") + loop + Death: + TNT1 A 0 A_SpawnItemEx("Lith_SMGTrailPuff3") + stop + } +} + +actor Lith_SMGMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + + states + { + Spawn1: + MGZM ABCD 3 A_SetUserVar(user_side, 0) + MGZM EFGH 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZM C 0 A_JumpIf(user_side == 0, "Done") + MGZM G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_SMGMagazine2 : Lith_SMGMagazine +{ + BounceSound "weapons/magbouncef" + + states + { + Spawn1: + MGZM IJKL 3 A_SetUserVar(user_side, 0) + MGZM MNOP 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZM K 0 A_JumpIf(user_side == 0, "Done") + MGZM O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_SMGShotsFired : Inventory +{ + Inventory.MaxAmount 50 +} + +actor Lith_SMGShotsFired2 : Inventory +{ + Inventory.MaxAmount 150 +} + +actor Lith_SMGHeat : Inventory +{ + Inventory.MaxAmount 500 +} + +actor Lith_SMG : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_SMG" + Weapon.UpSound "weapons/smg/draw" + Weapon.SlotNumber 4 + Weapon.SlotPriority 1 + + const int lvar_spreadx = 1; + const int lvar_spready = 2; + const int lvar_recoil = 3; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ChaingunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CSMG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + CSMG A 0 A_StopSound(CHAN_WEAPON) + DeselectLoop: + CSMG AAA 0 A_Lower + CSMG A 1 + loop + + Select: + CSMG AAA 0 A_Raise + CSMG A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_SMGHeat", 0, "ReloadHeat") + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_recoil, 0.1*FIX) + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_A), 3) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired", 0, "Reload") + TNT1 A 0 A_Jump(256, 2) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired2", 0, "Reload") + + TNT1 A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_SMG_C), 2) + TNT1 A 0 A_JumpIfInventory("Lith_SMGHeat", 450, "Ready") + + TNT1 A 0 A_PlaySound("weapons/smg/fire", CHAN_WEAPON, 1, true) + Fire1: + TNT1 A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_SMG_C), 2) + TNT1 A 0 A_JumpIfInventory("Lith_SMGHeat", 450, "FireAnim1") + + TNT1 A 0 A_GiveInventory("Lith_SMGHeat", random(14,27)) + TNT1 A 0 A_JumpIfInventory("Lith_SMGHeat", 0, "ReloadHeatFromFiring") + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_A), 3) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired", 0, "ReloadFromFiring") + TNT1 A 0 A_Jump(256, 2) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired2", 0, "ReloadFromFiring") + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_A), 3) + TNT1 A 0 A_GiveInventory("Lith_SMGShotsFired", 1) + TNT1 A 0 A_Jump(256, 2) + TNT1 A 0 A_GiveInventory("Lith_SMGShotsFired2", 1) + TNT1 A 0 + + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_spreadx, frandom(-5, 5) * (CallACS("LPVarGet", lvar_recoil) / FIX) * FIX) + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_spready, frandom(-1, 1) * (CallACS("LPVarGet", lvar_recoil) / FIX) * FIX) + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarAdd", lvar_recoil, 0.05 * FIX) + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarMin", lvar_recoil, 1 * FIX) + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_B), "FireTrace") + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_A), 4) + TNT1 AA 0 A_FireCustomMissile("Lith_SMGTracer", + CallACS("LPVarGet", lvar_spreadx)/FIX, false, 0, 0, 0, + CallACS("LPVarGet", lvar_spready)/FIX) + TNT1 A 0 A_Jump(256, 3) + TNT1 AA 0 A_FireCustomMissile("Lith_SMGTracer2", + CallACS("LPVarGet", lvar_spreadx)/FIX, false, 0, 0, 0, + CallACS("LPVarGet", lvar_spready)/FIX) + + TNT1 AA 0 A_FireBullets( + CallACS("LPVarGet", lvar_spreadx)/FIX, + CallACS("LPVarGet", lvar_spready)/FIX, -1, 8, "BulletPuff", FBF_NORANDOM|FBF_EXPLICITANGLE) + goto FireAnim + + FireTrace: + TNT1 AA 0 A_FireCustomMissile("Lith_SMGTracer3", + CallACS("LPVarGet", lvar_spreadx)/FIX, false, 0, 0, 0, + CallACS("LPVarGet", lvar_spready)/FIX) + + FireAnim: + TNT1 A 0 offset(0, 32) + CSMG BC 1 bright + CSMG A 1 + CSMG A 1 A_ReFire("Fire1") + CSMG A 0 A_StopSound(CHAN_WEAPON) + CSMG A 0 A_PlaySound("weapons/smg/firedone", CHAN_5) + goto Ready + + FireAnim1: + CSMG A 1 + CSMG A 0 A_StopSound(CHAN_WEAPON) + CSMG A 0 A_PlaySound("weapons/smg/firedone", CHAN_5) + goto Ready + + ReloadHeatFromFiring: + CSMG A 0 A_StopSound(CHAN_WEAPON) + CSMG A 0 A_PlaySound("weapons/smg/firedone", CHAN_5) + + ReloadHeat: + TNT1 A 0 A_JumpIfInventory("Lith_SMGHeat", 200, 1) + goto Ready + CSMG A 1 offset(1, 32) + CSMG A 1 offset(3, 32) + CSMG A 1 offset(4, 32) + CSMG A 1 offset(8, 38) + CSMG A 2 offset(12, 45) A_PlaySound("weapons/smg/open", CHAN_6) + CSMG A 2 offset(16, 53) + CSMG A 2 offset(19, 60) + CSMG A 2 offset(21, 64) + CSMG A 3 offset(23, 67) + CSMG A 3 offset(22, 69) A_PlaySound("weapons/smg/eject", CHAN_6) + CSMG A 3 offset(19, 70) + CSMG A 0 A_TakeInventory("Lith_SMGHeat", 999) + TNT1 A 0 offset(18, 72) A_PlaySound("weapons/smg/heat", CHAN_7) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, -2, 5) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, -1, 4) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, -1, 3) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 2 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 0, 2) + CSMG A 3 offset(17, 69) + CSMG A 3 offset(19, 67) + CSMG A 8 offset(20, 66) A_PlaySound("weapons/smg/insert", CHAN_6) + CSMG A 10 offset(21, 62) + CSMG A 5 offset(20, 60) + CSMG A 4 offset(21, 63) + CSMG A 3 offset(23, 66) + CSMG A 2 offset(24, 68) + CSMG A 2 offset(25, 63) + CSMG A 2 offset(24, 59) + CSMG A 2 offset(22, 57) A_PlaySound("weapons/smg/close", CHAN_6) + CSMG A 1 offset(20, 54) + CSMG A 1 offset(16, 49) + CSMG A 1 offset(12, 44) + CSMG A 1 offset(10, 42) + CSMG A 1 offset(8, 40) + CSMG A 1 offset(5, 38) + CSMG A 2 offset(2, 35) + CSMG A 4 offset(0, 32) + goto Ready + + ReloadFromFiring: + CSMG A 0 A_StopSound(CHAN_WEAPON) + CSMG A 0 A_PlaySound("weapons/smg/firedone", CHAN_5) + + Reload: + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_SMG_A), 3) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired", 1, "Reload1") + TNT1 A 0 A_Jump(256, 2) + TNT1 A 0 A_JumpIfInventory("Lith_SMGShotsFired2", 1, "ReloadLong") + TNT1 A 0 + goto Ready + + Reload1: + CSMG A 1 + CSMG D 1 offset(-2, 34) + CSMG E 1 offset(-4, 37) + CSMG F 1 offset(-9, 43) A_PlaySound("weapons/smg/magout", CHAN_6) + CSMG F 1 offset(-12, 47) + CSMG F 0 A_JumpIfInventory("Lith_SMGShotsFired", 0, 2) + CSMG F 0 A_SpawnItemEx("Lith_SMGMagazine2", 4,-1,20, frandom(0,2),frandom(-1,1),0) + goto Reload2 + CSMG F 0 A_SpawnItemEx("Lith_SMGMagazine", 4,-1,20, frandom(0,2),frandom(-1,1),0) + Reload2: + CSMG F 1 offset(-14, 52) + CSMG F 2 offset(-12, 55) + CSMG F 3 offset(-11, 57) + CSMG F 8 offset(-10, 60) + CSMG F 8 offset(-11, 60) + CSMG A 0 A_TakeInventory("Lith_SMGShotsFired", 999) + CSMG E 2 offset(-13, 59) A_PlaySound("weapons/smg/magin", CHAN_7) + CSMG E 2 offset(-11, 49) + CSMG E 2 offset(-11, 47) + CSMG E 7 offset(-11, 45) + CSMG E 1 offset(-12, 49) + CSMG D 1 offset(-8, 53) + CSMG D 1 offset(-1, 57) + CSMG D 1 offset(3, 56) + CSMG D 1 offset(8, 52) + CSMG D 1 offset(10, 49) A_WeaponReady(WRF_NOBOB) + CSMG A 1 offset(8, 47) A_WeaponReady(WRF_NOBOB) + CSMG A 1 offset(7, 45) A_WeaponReady(WRF_NOBOB) + CSMG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB) + CSMG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB) + CSMG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB) + CSMG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB) + CSMG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB) + CSMG A 4 A_WeaponReady(WRF_NOBOB) + goto Ready + + ReloadLong: + CSMG A 1 + CSMG A 1 offset(-2, 34) + CSMG A 1 offset(-4, 37) + CSMG A 1 offset(-9, 43) A_PlaySound("weapons/smg/magout", CHAN_6) + CSMG A 1 offset(-12, 47) + CSMG A 2 offset(-14, 52) + CSMG A 0 A_JumpIfInventory("Lith_SMGShotsFired2", 0, 2) + CSMG A 0 A_SpawnItemEx("Lith_SMGMagazine2", 4,-1,20, frandom(0,2),frandom(-1,1),0) + goto ReloadLong1 + CSMG A 0 A_SpawnItemEx("Lith_SMGMagazine", 4,-1,20, frandom(0,2),frandom(-1,1),0) + ReloadLong1: + CSMG A 2 offset(-12, 55) + CSMG A 3 offset(-11, 57) + CSMG A 12 offset(-10, 60) + CSMG A 12 offset(-11, 60) + CSMG A 0 A_TakeInventory("Lith_SMGShotsFired2", 999) + CSMG A 2 offset(-13, 59) A_PlaySound("weapons/smg/magin2", CHAN_7) + CSMG A 2 offset(-11, 49) + CSMG A 3 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 10 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 3 offset(3, 40) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CSMG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB) + CSMG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB) + CSMG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB) + CSMG A 4 A_WeaponReady(WRF_NOBOB) + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_CyberMage/5_IonRifle.dec b/pksrc/lscripts/Weapons_CyberMage/5_IonRifle.dec new file mode 100644 index 0000000..3ebb346 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/5_IonRifle.dec @@ -0,0 +1,415 @@ +actor Lith_IonRifleFXBase +{ + RenderStyle "Add" + Alpha 0.75 + Translation "112:127=193:197", "160:167=193:199", "224:231=192:198" + Height 1 + Radius 1 + + +NOBLOCKMAP + +NOGRAVITY +} + +actor Lith_IonRifleParticle1 : Lith_IonRifleFXBase +{ + Alpha 0.5 + XScale 0.5 + YScale 0.4 + + states + { + Spawn: + BFE1 ABC 3 bright + SpawnLoop: + BFE1 C 0 bright A_SetScale(scalex, scaley * 0.875) + BFE1 C 1 bright A_FadeOut(0.025) + loop + } +} + +actor Lith_IonRifleParticle2 : Lith_IonRifleFXBase +{ + Alpha 0.5 + XScale 0.5 + YScale 0.4 + + states + { + Spawn: + BFE2 ABC 3 bright + SpawnLoop: + BFE2 C 0 bright A_SetScale(scalex, scaley * 0.875) + BFE2 C 1 bright A_FadeOut(0.025) + loop + } +} + +actor Lith_IonizedFX +{ + RenderStyle "Stencil" + StencilColor "Red" + Alpha 0.8 + + +NOINTERACTION + + states + { + Spawn: + BLLT F 2 + BLLT F 1 A_FadeOut + wait + } +} + +actor Lith_IonizedFXSpawner : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_SpawnItemEx("Lith_IonizedFX", 0,0,0, 0,0,-1, 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_Ionized : PowerProtection // HAH NOT SO PROTECTED NOW ARE YOU +{ + DamageFactor "Normal", 1.5 + Powerup.Duration -5 +} + +actor Lith_IonRifleExplosion +{ + Radius 0 + Height 0 + RenderStyle "Add" + DamageType "Lith_Plasma" + + +NOBLOCKMAP + +NOGRAVITY + + states + { + Spawn: + TNT1 A 0 + TNT1 A 1 A_Explode(96, 256, 0) + TNT1 A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_IonRifle_A, true), 2) + TNT1 A 0 A_RadiusGive("Lith_Ionized", 192, RGF_MONSTERS, 1) + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_IonRifleParticle1", frandom(-32, 32),frandom(-32, 32),frandom(-32, 32), frandom(-1, 1),frandom(-1, 1),frandom(-1, 1)) + TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_IonRifleParticle2", frandom(-24, 24),frandom(-24, 24),frandom(-24, 24), frandom(-0.5, 0.5),frandom(-0.5, 0.5),frandom(-0.5, 0.5)) + stop + } +} + +actor Lith_IonRifleHax : FastProjectile +{ + Speed 32000 + Damage 100 + Height 1 + Radius 1 + DamageType "Lith_Plasma" + + +NOGRAVITY + +NOBLOCKMAP + +THRUACTORS + +EXTREMEDEATH + +EXPLODEONWATER + + states + { + Spawn: + TNT1 A 1 + loop + Death: + TNT1 A 0 A_SpawnItemEx("Lith_IonRifleExplosion", 0,0,0, 0,0,0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_IonRifleParticle +{ + RenderStyle "Add" + Scale 0.05 + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT K 10 + SpawnLoop: + BLLT K 0 A_SetScale(scalex * 1.025) + BLLT K 1 A_FadeOut(0.075) + loop + } +} + +actor Lith_IonRifleShotsFired : Inventory +{ + Inventory.MaxAmount 6 +} + +actor Lith_IonRifle : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_IonRifle" + Weapon.UpSound "weapons/ionrifle/draw" + Weapon.SlotNumber 5 + Weapon.SlotPriority 1 + + +WEAPON.NOAUTOFIRE + + const int lvar_charge = 1; + + states + { + AltReady: + SCOP C 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + Ready: + IONG A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + ReadySelector: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + + Deselect: + IONG A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + IONG A 0 A_ZoomFactor(1.0) + DeselectLoop: + IONG AAA 0 A_Lower + IONG A 1 + loop + + Select: + IONG A 0 A_ZoomFactor(1.0) + SelectLoop: + IONG AAA 0 A_Raise + IONG A 1 + loop + + Fire: + "####" "#" 0 A_JumpIfInventory("Lith_RocketAmmo", 1, 1) + goto FireEmpty + "####" "#" 0 A_JumpIfInventory("Lith_IonRifleShotsFired", 0, "Reload") + "####" "#" 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_charge, 1*IFIX) + "####" "#" 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_IonRifle_B), "Charge1") + goto DoFire + // HELP + Charge1: + "####" "#" 2 + "####" "#" 1 A_ReFire("Charge2") + goto DoFire + Charge2: + "####" "#" 0 A_PlaySound("weapons/ionrifle/charge", CHAN_WEAPON) + "####" "#" 2 offset(0, 33) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.05*FIX) + "####" "#" 1 A_ReFire("Charge3") + goto DoFire + Charge3: + "####" "#" 2 offset(-1, 34) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.05*FIX) + "####" "#" 1 A_ReFire("Charge4") + goto DoFire + Charge4: + "####" "#" 2 offset(0, 35) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.07*FIX) + "####" "#" 1 A_ReFire("Charge5") + goto DoFire + Charge5: + "####" "#" 2 offset(1, 36) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.07*FIX) + "####" "#" 1 A_ReFire("Charge6") + goto DoFire + Charge6: + "####" "#" 2 offset(0, 37) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.09*FIX) + "####" "#" 1 A_ReFire("Charge7") + goto DoFire + Charge7: + "####" "#" 2 offset(0, 38) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.11*FIX) + "####" "#" 1 A_ReFire("Charge8") + goto DoFire + Charge8: + "####" "#" 2 offset(2, 38) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.13*FIX) + "####" "#" 1 A_ReFire("Charge9") + goto DoFire + Charge9: + "####" "#" 2 offset(0, 39) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.15*FIX) + "####" "#" 1 A_ReFire("Charge10") + goto DoFire + Charge10: + "####" "#" 2 offset(-2, 40) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.16*FIX) + "####" "#" 1 A_ReFire("Charge11") + goto DoFire + Charge11: + "####" "#" 2 offset(2, 40) ACS_NamedExecuteWithResult("LPVarAdd", lvar_charge, 0.17*FIX) + DoFire: + TNT1 A 0 A_GiveInventory("Lith_IonRifleShotsFired", 1) + TNT1 A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 A_FireCustomMissile("Lith_IonRifleHax") + TNT1 A 0 A_JumpIf(CallACS("LPVarGet", lvar_charge)/FIX < 1.5, 2) + TNT1 A 0 A_FireCustomMissile("Lith_IonRifleHax") + TNT1 A 0 A_JumpIf(CallACS("LPVarGet", lvar_charge)/FIX < 2, 2) + TNT1 A 0 A_FireCustomMissile("Lith_IonRifleHax") + TNT1 A 0 A_RailAttack(CallACS("LPVarGet", lvar_charge)/FIX * 300, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 0, "BulletPuff", 0, 0, 0, 0, 16, 0, "Lith_IonRifleParticle") + TNT1 A 0 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 0, "BulletPuff", 0, 0, 0, 0, 0.5, 0) + TNT1 A 0 A_Recoil(CallACS("LPVarGet", lvar_charge)/FIX * 2) + TNT1 A 0 A_JumpIf(CallACS("LPVarGet", lvar_charge)/FIX < 1.5, "Sound1") + TNT1 A 0 A_PlaySound("weapons/ionrifle/cfire", CHAN_7) + TNT1 A 0 A_JumpIf(CallACS("LPVarGet", lvar_charge)/FIX < 2, "Sound1") + TNT1 A 0 A_PlaySound("weapons/ionrifle/fire2", CHAN_WEAPON) + goto SoundDone + Sound1: + TNT1 A 0 A_PlaySound("weapons/ionrifle/fire", CHAN_WEAPON) + SoundDone: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireAnim_Scoped") + FireAnim_Unscoped: + IONG C 2 bright + IONG B 2 bright + IONG D 1 bright + IONG E 1 bright + IONG FGA 1 + goto ChillCheck + FireAnim_Scoped: + SCOP C 1 bright A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.80) + SCOP C 1 bright A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.85) + SCOP C 1 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.90) + SCOP C 1 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.95) + SCOP C 3 A_ZoomFactor(1 + CallACS("LPData", pdata_weapon_zoom) / FIX) + ChillCheck: + "####" "#" 0 A_JumpIf(CallACS("LPVarGet", lvar_charge)/FIX < 1.3, "BoltAnim") + "####" "#" 0 A_JumpIfInventory("Lith_WeaponScopedToken", 0, "ChillOut0") + goto ChillOut1 + ChillOut0: + "####" "#" 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" "#" 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" "#" 0 A_PlaySound("weapons/ionrifle/zoomout", 7) + ChillOut1: + IONG A 1 offset(-1, 33) A_PlaySound("weapons/ionrifle/heat", CHAN_7) + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 2 offset(-4, 34) + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 2 offset(-9, 37) + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 3 offset(-11, 39) + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 4 offset(-12, 40) + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 5 offset(-13, 41) + ChillOut2: + IONG A 0 A_FireCustomMissile("Lith_GunSmokeEmitter", 0, 0, 2, 5) + IONG A 2 A_JumpIf(CallACS("LPVarSub", lvar_charge, 0.06*FIX)/FIX < 1, "ChilledOut") + loop + ChilledOut: + IONG A 4 offset(-12, 40) + IONG A 3 offset(-11, 39) + IONG A 2 offset(-9, 37) + IONG A 2 offset(-4, 34) + IONG A 1 offset(-1, 33) + goto BoltAnim + BoltAnim: + "####" "#" 1 offset(1, 32) + "####" "#" 1 offset(3, 32) + "####" "#" 1 offset(4, 32) + "####" "#" 1 offset(8, 38) + "####" "#" 1 offset(12, 45) + "####" "#" 1 offset(16, 53) + "####" "#" 1 offset(19, 60) A_PlaySound("weapons/ionrifle/eject", CHAN_5) + "####" "#" 1 offset(21, 64) + "####" "#" 1 offset(23, 67) + "####" "#" 1 offset(22, 74) + "####" "#" 1 offset(19, 78) + "####" "#" 5 offset(18, 80) + "####" "#" 5 offset(17, 80) + "####" "#" 5 offset(16, 80) A_PlaySound("weapons/ionrifle/load", CHAN_6) + "####" "#" 1 offset(17, 74) + "####" "#" 1 offset(19, 67) + "####" "#" 1 offset(20, 66) + "####" "#" 1 offset(21, 62) + "####" "#" 1 offset(20, 60) + "####" "#" 1 offset(21, 63) + "####" "#" 1 offset(23, 66) + "####" "#" 1 offset(24, 68) + "####" "#" 1 offset(25, 63) + "####" "#" 1 offset(24, 59) + "####" "#" 1 offset(22, 57) + "####" "#" 1 offset(20, 54) + "####" "#" 1 offset(16, 49) + "####" "#" 1 offset(12, 44) + "####" "#" 1 offset(10, 42) + "####" "#" 1 offset(8, 40) + "####" "#" 1 offset(5, 38) + "####" "#" 1 offset(2, 35) + "####" "#" 5 offset(1, 32) + "####" "#" 0 A_JumpIfInventory("Lith_IonRifleShotsFired", 0, "Reload") + goto ReadySelector + AltFire: + "####" "#" 1 + "####" "#" 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ScopeOut") + goto ScopeIn + ScopeOut: + "####" "#" 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" "#" 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" "#" 0 A_PlaySound("weapons/ionrifle/zoomout", 7) + goto Ready + ScopeIn: + "####" "#" 0 A_GiveInventory("Lith_WeaponScopedToken", 1) + "####" "#" 0 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX)) + "####" "#" 0 A_PlaySound("weapons/ionrifle/zoomin", 6) + goto AltReady + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, 1) + goto Reload1 + TNT1 A 0 A_PlaySound("weapons/ionrifle/zoomout", 7) + TNT1 A 0 A_TakeInventory("Lith_WeaponScopedToken", 999) + TNT1 A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + Reload1: + TNT1 A 0 A_JumpIfInventory("Lith_IonRifleShotsFired", 1, 1) + goto ReadySelector + IONG A 1 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-2, 34) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-4, 37) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-9, 43) A_PlaySound("weapons/ionrifle/magout", CHAN_6) + IONG A 1 offset(-12, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-14, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 2 offset(-12, 55) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 3 offset(-11, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 8 offset(-10, 60) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 8 offset(-11, 60) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 8 offset(-12, 60) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 0 A_TakeInventory("Lith_IonRifleShotsFired", 999) + IONG A 2 offset(-13, 59) A_PlaySound("weapons/ionrifle/magin", CHAN_7) + IONG A 2 offset(-11, 49) + IONG A 2 offset(-11, 47) + IONG A 7 offset(-11, 45) + IONG A 7 offset(-12, 45) + IONG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 1 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + IONG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + IONG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + IONG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + IONG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + IONG A 4 A_WeaponReady(WRF_NOBOB) + goto ReadySelector + + FireEmpty: + "####" "#" 1 + "####" "#" 2 offset(0, 41) + "####" "#" 1 offset(0, 45) + "####" "#" 1 offset(0, 43) + "####" "#" 1 offset(0, 40) A_PlaySound("weapons/ionrifle/empty", CHAN_5) + "####" "#" 1 offset(0, 38) + "####" "#" 1 offset(0, 36) + "####" "#" 1 offset(0, 33) + "####" "#" 1 offset(0, 32) + "####" "#" 5 + "####" "####" 1 A_ReFire + goto ReadySelector + } +} + diff --git a/pksrc/lscripts/Weapons_CyberMage/6_CPlasmaRifle.dec b/pksrc/lscripts/Weapons_CyberMage/6_CPlasmaRifle.dec new file mode 100644 index 0000000..3cdef40 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/6_CPlasmaRifle.dec @@ -0,0 +1,125 @@ +actor Lith_PulseChargeTrail +{ + RenderStyle "Add" + Scale 0.05 + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + PBAL A 0 + PBAL A 0 A_JumpIf(scalex > 0.15, "FadeOut") + PBAL A 1 A_SetScale(scalex * frandom(1.05,1.2)) + loop + + FadeOut: + PBAL A 0 A_JumpIf(scalex < 0.05, "Death") + PBAL A 1 A_SetScale(scalex * frandom(0.7,0.9)) + loop + + Death: + PBAL A 0 + stop + } +} + +actor Lith_PulseCharge +{ + Speed 45 + DamageType "Lith_Energy" + Damage (20 * random(2, 4)) + Radius 8 + Height 8 + DeathSound "weapons/plasma/explode" + + Projectile + + states + { + Spawn: + TNT1 A 1 A_SpawnItemEx("Lith_PulseChargeTrail") + loop + Death: + TNT1 A 0 A_Explode(96, 32, 0) + TNT1 AAAAA 0 A_SpawnItemEx("Lith_PulseChargeTrail", 0,0,0, frandom(-2,2),frandom(-2,2),frandom(-2,2), 0, SXF_NOCHECKPOSITION) + stop + } +} + +actor Lith_CPlasmaRifle : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_CPlasmaRifle" + Weapon.UpSound "weapons/plasma/draw" + Weapon.SlotNumber 6 + Weapon.SlotPriority 1 + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_PlasmaRiflePickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CPLG A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + CPLG AAA 0 A_Lower + CPLG A 1 + loop + + Select: + CPLG AAA 0 A_Raise + CPLG A 1 + loop + + Fire: + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + CPLG A 0 A_GunFlash("DummyFlash") + CPLG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_CPlasma_A), "FirePulse") + + FireNormal: + CPLG A 0 A_TakeInventory("Lith_PlasmaAmmo", 30, TIF_NOTAKEINFINITE) + CPLG A 0 A_PlaySound("weapons/plasma/fire", CHAN_WEAPON) + CPLG AAAAA 0 A_FireCustomMissile("Lith_PlasmaBolt", CallACS("Lith_CircleSpread", 5*IFIX, 3*IFIX, false)/FIX, 0, 0, -9, 0, CallACS("Lith_CircleSpread", 0, 0, true)/FIX) + goto FireAnim1 + + FirePulse: + CPLG A 0 A_TakeInventory("Lith_PlasmaAmmo", 80, TIF_NOTAKEINFINITE) + CPLG A 0 A_PlaySound("weapons/plasma/altfire", CHAN_WEAPON) + CPLG A 0 A_FireCustomMissile("Lith_PulseCharge") + goto FireAnim2 + + FireAnim1: + CPLG B 2 offset(0, 36) bright + CPLG C 1 offset(0, 35) bright + CPLG D 1 offset(0, 32) + CPLG AAAA 1 A_ReFire + goto Ready + + FireAnim2: + CPLG B 2 offset(0, 40) bright + CPLG C 1 offset(0, 37) bright + CPLG C 1 offset(0, 34) bright + CPLG D 1 offset(0, 33) + CPLG D 1 offset(0, 32) + CPLG AAAA 1 offset(0, 32) A_ReFire + goto Ready + + FireEmpty: + CPLG A 0 A_StopSound(CHAN_7) + CPLG A 0 A_StopSound(CHAN_6) + CPLG A 1 A_PlaySound("weapons/plasma/empty", 7) + CPLG A 1 offset(0, 37) + CPLG A 1 offset(0, 36) + CPLG A 1 offset(0, 35) + CPLG A 1 offset(0, 34) + CPLG A 1 offset(0, 32) + CPLG A 1 A_ReFire + goto Ready + } +} diff --git a/pksrc/lscripts/Weapons_CyberMage/7_StarDestroyer.dec b/pksrc/lscripts/Weapons_CyberMage/7_StarDestroyer.dec new file mode 100644 index 0000000..1e5f81d --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/7_StarDestroyer.dec @@ -0,0 +1,366 @@ +actor Lith_StarShrapnel +{ + Damage (10) + Speed 32 + Radius 2 + Height 2 + Scale 0.7 + Mass 0 + RenderStyle "Add" + + Projectile + +NODAMAGETHRUST + + states + { + Spawn: + BLLT M 4 bright + loop + Death: + MICX A 0 bright A_PlaySound("weapons/dark/impact", CHAN_BODY, 0.3) + MICX A 0 bright A_SetScale(0.5) + MICX ABCDEFG 1 bright + stop + } +} + +actor Lith_StarShrapnelHoming : Lith_StarShrapnel +{ + Damage (30) + Scale 1.4 + Translation "160:167=192:199", "224:231=192:199" + + states + { + Spawn: + BLLT M 4 bright A_SeekerMissile(45, 360, SMF_LOOK) + loop + } +} + +actor Lith_StarWoosh1 +{ + Radius 8 + Height 8 + Scale 0.7 + RenderStyle "Add" + + +NOINTERACTION + + states + { + Death: + Spawn: + TNT1 A 0 + BLLT L 0 bright A_JumpIf(scalex < 0.01, "ded") + BLLT L 2 bright A_SetScale(scalex*frandom(0.9,1.0)) + loop + ded: + TNT1 A 0 + stop + } +} + +actor Lith_StarWoosh2 : Lith_StarWoosh1 +{ + states + { + Spawn: + BLLT L 0 bright A_SetScale(scalex*frandom(0.95,1.0)) + BLLT L 1 bright A_FadeOut(0.05) + loop + ded: + TNT1 A 0 + stop + } +} + +actor Lith_StarProjectile +{ + Damage 20 + Speed 2 + Scale 0.15 + Radius 8 + Height 8 + Mass 500 + RenderStyle "Add" + + Projectile + +RIPPER + +FORCERADIUSDMG + +SEEKERMISSILE + + var int user_soundtimer; + var int user_rushtimer; + var int user_homingshrapneltimer; + + states + { + Spawn: + TNT1 A 4 + TNT1 A 0 A_PlaySound("weapons/dark/wind", CHAN_7, 1.0, true) + Spawn1: + BLLT L 0 bright A_AlertMonsters + BLLT L 0 bright A_SetUserVar(user_rushtimer, user_rushtimer + 1) + BLLT L 0 bright A_JumpIf(user_rushtimer > 35*7, "Rush") + BLLT L 0 bright A_JumpIf(scalex < 0.7, "ScaleUp") + SoundCheck: + BLLT L 0 bright A_SetUserVar(user_homingshrapneltimer, user_homingshrapneltimer + 1) + BLLT L 0 bright A_JumpIf(user_homingshrapneltimer >= 10, "DoHomingMissile") + SoundCheck1: + BLLT L 0 bright A_SetUserVar(user_soundtimer, user_soundtimer - 1) + BLLT L 0 bright A_JumpIf(user_soundtimer > 0, "DoMissile") + BLLT L 0 bright A_SetUserVar(user_soundtimer, 3) + BLLT L 0 bright A_PlaySound("weapons/dark/fire", CHAN_5) + DoMissile: + BLLT L 0 bright A_Explode(40, 8 + 45 * scalex, 0) + BLLT LLLLL 0 bright A_CustomMissile("Lith_StarShrapnel", + CallACS("Lith_CircleSpread", 45*scalex*FIX, 45*scalex*FIX, false)/FIX, + CallACS("Lith_CircleSpread", 45*scalex*FIX, 45*scalex*FIX, true)/FIX, + 0, CMF_TRACKOWNER|CMF_AIMDIRECTION) + goto DoSeek + DoHomingMissile: + BLLT L 0 bright A_SetUserVar(user_homingshrapneltimer, 0) + BLLT LL 0 bright A_CustomMissile("Lith_StarShrapnelHoming", + CallACS("Lith_CircleSpread", 45*scalex*FIX, 45*scalex*FIX, false)/FIX, + CallACS("Lith_CircleSpread", 45*scalex*FIX, 45*scalex*FIX, true)/FIX, + 0, CMF_TRACKOWNER|CMF_AIMDIRECTION) + goto SoundCheck1 + ScaleUp: + BLLT L 0 bright A_SetScale(scalex * 1.01) + goto SoundCheck + DoSeek: + BLLT L 0 bright A_SeekerMissile(0, 1, SMF_LOOK) + goto DoWoosh + Rush: + BLLT L 0 bright A_ChangeFlag("RIPPER", false) + BLLT L 0 bright A_ChangeVelocity(velx*1.1, vely*1.1, velz*1.1, CVF_REPLACE) + DoWoosh: + BLLT L 0 bright A_SpawnItemEx("Lith_StarWoosh1", 0,0,0, 4,0,0, 180, SXF_TRANSFERSCALE|SXF_NOCHECKPOSITION) + BLLT L 0 bright A_SpawnItemEx("Lith_StarWoosh2", 0,0,0, 3,0,0, 180, SXF_TRANSFERSCALE|SXF_NOCHECKPOSITION) + BLLT L 0 bright A_Quake(1, 2, 0, 512) + BLLT L 0 bright A_Quake(3, 2, 0, 256) + BLLT L 0 bright A_Quake(5, 2, 0, 64) + BLLT L 1 bright + goto Spawn1 + Death: + SDXP A 0 A_Explode(128, 512, 0) + SDXP A 0 A_StopSound(CHAN_7) + SDXP A 0 A_PlaySound("weapons/shipgun/explode", CHAN_6) + SDXP A 0 A_SetScale(1) + SDXP ABCDEFGHIJKLMNOPQRS 1 bright + SDXP T 1 bright A_FadeOut + wait + } +} + +actor Lith_SolspearThingy +{ + Scale 0.15 + RenderStyle "Add" + + +BRIGHT + +NOGRAVITY + +NOCLIP + + states + { + Spawn: + BLLT L 0 + BLLT L 5 A_Explode(128, 128, 0) + BLLT L 1 A_FadeOut(0.025) + wait + } +} + +actor Lith_Solspear +{ + Damage 500 + Speed 48 + Radius 8 + Height 8 + Scale 0.15 + RenderStyle "Add" + BounceType "Hexen" + BounceSound "weapons/dark/fire" + BounceFactor 1 + WallBounceFactor 1 + BounceCount 15 + + Projectile + +BRIGHT + +RIPPER + + const int flags = SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -8 ,0,0, 0,0,0, 0, flags) + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -16,0,0, 0,0,0, 0, flags) + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -24,0,0, 0,0,0, 0, flags) + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -32,0,0, 0,0,0, 0, flags) + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -40,0,0, 0,0,0, 0, flags) + TNT1 A 0 A_SpawnItemEx("Lith_SolspearThingy", -48,0,0, 0,0,0, 0, flags) + BLLT L 1 + loop + } +} + +actor Lith_StarBarrier +{ + Translation "192:207=160:167", "240:247=167:167" + RenderStyle "Add" + XScale 0.3 + YScale 0.4 + Alpha 0.8 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + LBAR A 1 A_ScaleVelocity(frandom(0.5,1)) + SpawnLoop: + LBAR A 1 A_FadeOut(frandom(0.04, 0.09)) + loop + } +} + +actor Lith_SurgeProtector : PowerProtection +{ + DamageFactor "Normal", 0.3 + Powerup.Duration 3 +} + +actor Lith_SurgeOfDestiny : Lith_CustomFunction +{ + const int flags = SXF_NOCHECKPOSITION; + + states + { + Pickup: + TNT1 A 0 A_GiveInventory("Lith_SurgeProtector") + TNT1 A 0 A_Explode(128, 192, 0) + TNT1 A 0 bright A_PlaySound("weapons/dark/fire", CHAN_7) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 50, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 90, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 135, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 180, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 225, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 270, flags) + TNT1 A 0 A_SpawnItemEx("Lith_StarBarrier", 24,0,32, 2,0,2, 310, flags) + TNT1 AAAAAAAAA 0 bright A_FireCustomMissile("Lith_StarShrapnel", frandom(0, 360), false, 0, 32, 0, 0) + TNT1 AAA 0 bright A_FireCustomMissile("Lith_StarShrapnelHoming", frandom(0, 360), false, 0, 32, 0, 0) + stop + } +} + +actor Lith_StarDestroyer : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_StarDestroyer" + Weapon.UpSound "weapons/shipgun/draw" + Weapon.SlotNumber 7 + Weapon.SlotPriority 1 + Weapon.BobStyle "InverseSmooth" + Weapon.BobRangeX 1.7 + Weapon.BobSpeed 0.7 + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_BFG9000Pickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + SDSG AABBCCDDEEFFGGHH 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + SDSG A 0 A_StopSound(CHAN_6) + DeselectLoop: + SDSG AAA 0 A_Lower + SDSG A 1 + loop + + Select: + SDSG A 0 A_PlaySound("weapons/shipgun/idle", CHAN_6, 1, true) + SelectLoop: + SDSG AA 0 A_Raise + SDSG A 1 + loop + + Fire: + SDSG A 0 A_JumpIfInventory("Lith_CannonAmmo", 5, 1) + goto FireEmpty + SDSG A 1 A_PlaySound("weapons/shipgun/prepare", CHAN_WEAPON) + SDSG ABCDEFFGGHHAABCDEFGH 1 bright + SDSG ABBCCDDEFG 1 bright offset(0, 33) + SDSG HADEFHBCGH 1 bright offset(0, 34) + SDSG A 0 A_TakeInventory("Lith_CannonAmmo", 5, TIF_NOTAKEINFINITE) + SDSG A 0 A_AlertMonsters + SDSG A 1 bright + SDSG A 1 bright offset(-1, 33) + SDSG A 1 bright offset(-1, 34) + SDSG A 1 bright offset(-1, 36) + SDSG A 2 bright offset(1, 37) + SDSF A 3 bright offset(1, 38) + SDSF A 0 A_GunFlash("DummyFlash") + + SDSF A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ShipGun_A), "FireSolspear") + SDSF A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ShipGun_B), "FireSurge") + + FireStar: + SDSF A 0 A_JumpIf(CallACS("LWData", wdata_grafzone), 3) + SDSF A 0 A_PlaySound("weapons/shipgun/fire", CHAN_5) + SDSF A 0 A_Jump(256, 2) + SDSF A 0 A_PlaySound("weapons/shipgun/firemono", CHAN_5) + SDSF A 0 A_FireCustomMissile("Lith_StarProjectile") + goto FireAnim + + FireSolspear: + SDSF A 0 A_PlaySound("weapons/shipgun/firesol", CHAN_5) + SDSF A 0 A_FireCustomMissile("Lith_Solspear") + goto FireAnim + + FireSurge: + SDSF A 0 A_PlaySound("weapons/shipgun/firesurge", CHAN_5) + SDSF A 0 ACS_NamedExecuteWithResult("Lith_SurgeOfDestiny") + + FireAnim: + SDSF B 2 bright offset(0, 62) + SDSF C 1 bright offset(0, 57) + SDSF D 1 bright offset(0, 47) + SDSF E 1 bright offset(0, 44) + SDSF F 1 bright offset(0, 40) + SDSF G 1 bright offset(0, 37) + SDSF H 1 bright offset(0, 35) + SDSG AABBCCDDEEFFGGHH 1 offset(0, 32) A_ReFire + goto Ready + + FireEmpty: + SDSG A 2 A_PlaySound("weapons/shipgun/empty", CHAN_7) + SDSG B 1 offset(0, 28) + SDSG C 1 offset(0, 29) + SDSG D 1 offset(0, 32) + SDSG E 1 offset(0, 35) + SDSG F 1 offset(0, 40) + SDSG G 1 offset(0, 42) + SDSG H 1 offset(0, 43) + SDSG A 1 offset(0, 44) + SDSG B 1 offset(0, 40) + SDSG C 1 offset(0, 37) + SDSG D 1 offset(0, 34) + SDSG EFG 1 offset(0, 32) + SDSG H 1 A_ReFire + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/1_Blade.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/1_Blade.dec new file mode 100644 index 0000000..9a8217d --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/1_Blade.dec @@ -0,0 +1,77 @@ +actor Lith_BladeHitSound : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_PlaySound("weapons/blade/hit", CHAN_5) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Blade", true) + stop + } +} + +actor Lith_BladeHit : FastProjectile +{ + Damage (40 * random(1, 2)) + Radius 24 + Height 32 + Speed 128 + + +FORCEPAIN + + states + { + Spawn: + TNT1 A 1 + stop + XDeath: + TNT1 A 0 A_GiveInventory("Lith_BladeHitSound", 1, AAPTR_TARGET) + stop + } +} + +actor Lith_BladeHit2 : Lith_BladeHit +{ + Damage (40 * random(2, 3)) +} + +actor Lith_Blade : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Blade" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/blade/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 1) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 5, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 5) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Blade", false) + TNT1 A 0 A_PlaySound("weapons/blade/slash", CHAN_7) + TNT1 A 0 A_JumpIfInventory("PowerStrength", 0, 2) + TNT1 A 0 A_FireCustomMissile("Lith_BladeHit") + goto FireDone + TNT1 A 0 A_FireCustomMissile("Lith_BladeHit2") + FireDone: + TNT1 A 20 + goto Ready + } +} + +// EOF diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/2_Delear.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/2_Delear.dec new file mode 100644 index 0000000..9727b4f --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/2_Delear.dec @@ -0,0 +1,203 @@ +actor Lith_DelearDotTrail +{ + Scale 0.4 + RenderStyle "Add" + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + BLLT J 0 bright A_SetScale(scalex * 0.8) + BLLT J 1 bright A_FadeOut(0.1) + loop + } +} + +actor Lith_DelearSprite : Lith_DelearDotTrail +{ + Scale 0.3 + states + { + Spawn: + BLLT J 0 + BLLT J 0 A_Warp(AAPTR_MASTER, x,y,z, 0, WARPF_NOCHECKPOSITION|WARPF_ABSOLUTEOFFSET|WARPF_COPYINTERPOLATION) + Spawn1: + BLLT J 1 bright + stop + } +} + +actor Lith_DelearExplosion +{ + RenderStyle "Add" + Scale 0.35 + + +NOINTERACTION + + states + { + Spawn: + MICX ABCDEFG 1 bright + stop + } +} + +actor Lith_DelearDot : FastProjectile +{ + Speed 60 + Radius 4 + Height 2 + Damage (20 * random(1, 2)) + DamageType "Lith_Magic" + MissileType "Lith_DelearDotTrail" + MissileHeight 8 + + ClearFlags + Projectile + + states + { + Spawn: + TNT1 A 1 + wait + Death: + TNT1 A 0 A_SpawnItemEx("Lith_DelearExplosion") + stop + } +} + +actor Lith_DelearShotsFired : Inventory +{ + Inventory.MaxAmount 16 +} + +actor Lith_DelearSpriteDisplay : Lith_CustomFunction +{ + const int flags = SXF_NOCHECKPOSITION|SXF_ABSOLUTEVELOCITY; + + states + { + Pickup: + // :( + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 0, "Done") TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 20,((height-19)+2) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 15, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 16,((height-19)+4) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 14, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 12,((height-19)+6) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 13, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 8,((height-19)+8) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 12, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 20,((height-19)+12)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 11, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 16,((height-19)+14)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 10, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 12,((height-19)+16)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 9, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, 8,((height-19)+18)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 8, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-20,((height-19)+2) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 7, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-16,((height-19)+4) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 6, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-12,((height-19)+6) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 5, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, -8,((height-19)+8) -(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 4, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-20,((height-19)+12)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 3, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-16,((height-19)+14)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 2, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32,-12,((height-19)+16)-(sin(pitch)*32),velx,vely,velz,0,flags) + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 1, 2) TNT1 A 0 A_SpawnItemEx("Lith_DelearSprite", cos(pitch)*32, -8,((height-19)+18)-(sin(pitch)*32),velx,vely,velz,0,flags) + Done: + TNT1 A 0 + stop + } +} + +actor Lith_Delear : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Delear" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/delear/draw" + + +WEAPON.DONTBOB + -WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 2) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 0, "Reload") + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 1, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -8, 18) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 2, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -12, 16) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 3, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -16, 14) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 4, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -20, 12) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 5, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -8, 8) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 6, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -12, 6) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 7, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -16, 4) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 8, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, -20, 2) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 9, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 8, 18) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 10, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 12, 16) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 11, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 16, 14) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 12, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 20, 12) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 13, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 8, 8) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 14, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 12, 6) + goto FireDone + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 15, 2) + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 16, 4) + goto FireDone + TNT1 A 0 A_FireCustomMissile("Lith_DelearDot", 0, false, 20, 2) + FireDone: + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 A_GiveInventory("Lith_DelearShotsFired", 1) + TNT1 A 0 A_PlaySound("weapons/delear/fire", CHAN_WEAPON) + TNT1 A 4 bright + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 25, 1) + goto Ready + TNT1 A 0 A_JumpIfInventory("Lith_DelearShotsFired", 1, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 25) + TNT1 A 0 A_PlaySound("weapons/delear/open", 7) + TNT1 A 22 + TNT1 A 10 A_PlaySound("weapons/delear/charge", 6) + TNT1 A 0 A_TakeInventory("Lith_DelearShotsFired", 999) + TNT1 A 4 + TNT1 A 4 A_PlaySound("weapons/delear/close", 7) + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/3_Feuer.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/3_Feuer.dec new file mode 100644 index 0000000..1399e2d --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/3_Feuer.dec @@ -0,0 +1,136 @@ +actor Lith_FeuerTest +{ + RenderStyle "Add" + Scale 0.3 + + +NOINTERACTION + +BRIGHT + + states + { + Spawn: + BLLT E 1 + BLLT E 1 A_FadeOut((sin(CallACS("Lith_Timer") * 5) + 1) * 0.5) + stop + } +} + +actor Lith_FeuerFX +{ + RenderStyle "Add" + Scale 1.5 + + +NOINTERACTION + + states + { + Spawn: + BLLT R 0 + BLLT R 0 A_Jump(256, 1, 2, 3) + BLLT R 0 A_SetScale(-scalex, scaley) + goto Done + BLLT R 0 A_SetScale( scalex, -scaley) + goto Done + BLLT R 0 A_SetScale(-scalex, -scaley) + Done: + BLLT R 0 A_SetScale(scalex * frandom(0.5, 1)) + BLLT R 10 + BLLT R 1 A_FadeOut + stop + } +} + +actor Lith_FeuerFinal +{ + RenderStyle "Add" + Scale 0.3 + DamageType "Lith_Magic" + Damage 10 + + Projectile + +NOGRAVITY + + states + { + Spawn: + BLLT L 0 + Death: + BLLT LLLLLLLLLLLLLLL 0 A_SpawnItemEx("Lith_FeuerFX", 0,0,0, frandom(-4,4),frandom(-4,4),frandom(-2,2)) + BLLT L 0 A_PlaySound("weapons/feuer/final", CHAN_WEAPON) + BLLT L 0 A_Explode(96, 128, 0) + BLLT L 5 + BLLT L 1 A_FadeOut + wait + } +} + +actor Lith_FeuerExplosion +{ + RenderStyle "Add" + Scale 0.15 + DamageType "Lith_Magic" + Damage (10) + + Projectile + +NOGRAVITY + + states + { + Spawn: + BLLT L 1 + Death: + BLLT LLLLL 0 A_SpawnItemEx("Lith_FeuerFX", 0,0,0, frandom(-1,1),frandom(-1,1),frandom(-1,1)) + BLLT L 0 A_PlaySound("weapons/feuer/explode", CHAN_BODY) + BLLT L 0 A_Explode(5, 20, 0) + BLLT L 5 + BLLT L 1 A_FadeOut + wait + } +} + +actor Lith_Feuer : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Feuer" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/feuer/draw" + + -WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 3) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + /* + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Feuer", true, false) + TNT1 A 1 ACS_NamedExecuteWithResult("Lith_Feuer", false, false) + TNT1 A 1 A_ReFire + */ + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 50, 1) + goto Ready + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 25) + TNT1 A 0 A_PlaySound("weapons/feuer/fire", CHAN_WEAPON) + TNT1 A 15 ACS_NamedExecuteWithResult("Lith_Feuer", true, true) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 25) + TNT1 A 0 A_PlaySound("weapons/feuer/fire", CHAN_WEAPON) + TNT1 A 20 ACS_NamedExecuteWithResult("Lith_Feuer", false, true) + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/4_Rend.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/4_Rend.dec new file mode 100644 index 0000000..78a6bba --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/4_Rend.dec @@ -0,0 +1,80 @@ +actor Lith_RendHitSound : Lith_CustomFunction +{ + states + { + Pickup: + TNT1 A 0 A_PlaySound("weapons/rend/hit", CHAN_5) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Rend", true) + stop + } +} + +actor Lith_RendHit : FastProjectile +{ + Damage (50 * random(1, 2)) + Radius 8 + Height 8 + Speed 196 + + +FORCEPAIN + + states + { + Spawn: + TNT1 A 1 + stop + XDeath: + TNT1 A 0 A_GiveInventory("Lith_RendHitSound", 1, AAPTR_TARGET) + stop + } +} + +actor Lith_RendHit2 : Lith_RendHit +{ + Damage (50 * random(2, 3)) +} + +actor Lith_Rend : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Rend" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/rend/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 4) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 10, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 10) + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Rend", false, random(1, 4)) + TNT1 A 0 A_PlaySound("weapons/rend/slash", CHAN_7) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_JumpIfInventory("PowerStrength", 0, 2) + TNT1 A 0 A_FireCustomMissile("Lith_RendHit") + goto FireDone + TNT1 A 0 A_FireCustomMissile("Lith_RendHit2") + FireDone: + TNT1 A 5 + TNT1 A 0 A_ReFire + TNT1 A 5 A_PlaySound("weapons/rend/end", CHAN_6) + goto Ready + } +} + +// EOF diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/5_Hulgyon.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/5_Hulgyon.dec new file mode 100644 index 0000000..43f4e85 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/5_Hulgyon.dec @@ -0,0 +1,174 @@ +actor Lith_HulgyonEffect +{ + RenderStyle "Add" + + +NOGRAVITY + +THRUACTORS + +NODAMAGETHRUST + +BRIGHT + + states + { + Spawn: + BLLT P 0 + BLLT P 0 A_Explode(48, 90, 0) + BLLT P 5 + BLLT P 1 A_FadeOut(0.2) + wait + } +} + +actor Lith_HulgyonHit +{ + DamageType "Lith_Magic" + + +NOGRAVITY + +THRUACTORS + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_PlaySound("weapons/hulgyon/proc") + TNT1 A 1 A_SpawnItemEx("Lith_HulgyonEffect", 0,0, 0, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonEffect", 0,0, 4, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 1 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,10, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,14, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 1 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,20, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,24, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 1 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,30, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,34, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 1 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,40, 0,0,0, 0, SXF_TRANSFERPOINTERS) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonEffect", 0,0,44, 0,0,0, 0, SXF_TRANSFERPOINTERS) + stop + } +} + +actor Lith_HulgyonProjectile +{ + Damage (0) + Speed 30 + RenderStyle "Add" + XScale 4 + Radius 4 + Height 32 + + Projectile + +FLOORHUGGER + +RIPPER + +BRIGHT + + var int user_lastz; + var int user_curz; + + const int maxstep = 32; + + states + { + Spawn: + BLLT J 0 + BLLT J 0 A_SetUserVar(user_lastz, z) + + SpawnLoop: + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + + BLLT J 0 A_SpawnItemEx("Lith_HulgyonHit", 0,0,0, 0,0,0, 0, SXF_TRANSFERPOINTERS) + + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + + BLLT J 0 A_SetUserVar(user_curz, z) + BLLT J 1 A_JumpIf(z - user_lastz > maxstep || z - user_lastz < -maxstep, "Death") + BLLT J 0 A_SetUserVar(user_lastz, user_curz) + loop + Death: + TNT1 A 0 + stop + } +} + +actor Lith_HulgyonSprite +{ + RenderStyle "Add" + Scale 0.3 + + +NOTIMEFREEZE + +NOINTERACTION + + states + { + Spawn: + BLLT T 0 + BLLT T 0 A_Warp(AAPTR_MASTER, x,y,z, 0, WARPF_NOCHECKPOSITION|WARPF_ABSOLUTEOFFSET|WARPF_COPYINTERPOLATION) + Spawn1: + BLLT T 1 bright + stop + } +} + +actor Lith_HulgyonSprite2 : Lith_HulgyonSprite +{ + Alpha 0.3 + + states + { + Spawn: + BLLT T 7 bright + stop + } +} + +actor Lith_Hulgyon : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Hulgyon" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/hulgyon/draw" + + +WEAPON.DONTBOB + -WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + TNT1 A 0 A_SpawnItemEx("Lith_HulgyonSprite", cos(pitch)*32, 0, (height-19)-(sin(pitch)*32),velx,vely,velz,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEVELOCITY) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 5) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 50, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 50) + TNT1 A 10 A_FireCustomMissile("Lith_HulgyonProjectile") + TNT1 AAAAAAAAAA 1 A_SpawnItemEx("Lith_HulgyonSprite2", cos(pitch)*32, 0, (height-19)-(sin(pitch)*32),0,0,0,0,SXF_NOCHECKPOSITION) + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/6_StarShot.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/6_StarShot.dec new file mode 100644 index 0000000..afd5539 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/6_StarShot.dec @@ -0,0 +1,97 @@ +actor Lith_StarShotShotsFired : Inventory +{ + Inventory.MaxAmount 100 +} + +actor Lith_Star +{ + Damage (5*random(2,3)) + Speed 32 + Radius 2 + Height 2 + Scale 0.7 + Mass 0 + RenderStyle "Add" + DamageType "Lith_Magic" + SeeSound "weapons/sshot/fire" + + Projectile + +NODAMAGETHRUST + +SEEKERMISSILE + +SCREENSEEKER + +BRIGHT + + states + { + Spawn: + TNT1 A 0 + STSH A 0 A_JumpIf(random(0, 100) < 75, "Spawn1") + STS2 A 0 + Spawn1: + "####" ABC 1 A_SetTics(random(0, 1)) + SpawnLoop: + "####" ABC 1 A_SeekerMissile(0, 1, SMF_LOOK) + loop + Death: + TNT1 A 0 A_PlaySound("weapons/sshot/hit", CHAN_BODY, 0.3) + stop + } +} + +actor Lith_StarShot : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_StarShot" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/starshot/draw" + + -WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 6) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_StarShotShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_StarShotShotsFired", random(2,6)) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_PlaySound("weapons/sshot/firero", CHAN_7, CallACS("Lith_AmmoRunOut", true, 0.5*FIX)/FIX) + TNT1 A 0 A_FireCustomMissile("Lith_Star", frandom(-5,5), false, -20, 10, 0, frandom(-2,3)) + TNT1 A 0 A_FireCustomMissile("Lith_Star", frandom(-5,5), false, 20, 10, 0, frandom(-2,3)) + TNT1 A 0 A_FireCustomMissile("Lith_Star", frandom(-2,2), false, -16, 16, 0, frandom(-2,3)) + TNT1 A 0 A_FireCustomMissile("Lith_Star", frandom(-2,2), false, 16, 16, 0, frandom(-2,3)) + TNT1 A 0 A_Recoil(0.01) + TNT1 A 0 A_SetAngle(angle + frandom(-0.2, 0.2)) + TNT1 A 0 A_Quake(1, 4, 0, 128) + TNT1 A 2 bright + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 100, 1) + goto Ready + TNT1 A 0 A_JumpIfInventory("Lith_StarShotShotsFired", 1, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 100) + TNT1 A 0 A_PlaySound("weapons/delear/open", 6) + TNT1 A 22 + TNT1 A 10 A_PlaySound("weapons/delear/charge", 5) + TNT1 A 0 A_TakeInventory("Lith_StarShotShotsFired", 999) + TNT1 A 4 + TNT1 A 4 A_PlaySound("weapons/delear/close", 6) + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_CyberMage/Magic/7_Cercle.dec b/pksrc/lscripts/Weapons_CyberMage/Magic/7_Cercle.dec new file mode 100644 index 0000000..6f99848 --- /dev/null +++ b/pksrc/lscripts/Weapons_CyberMage/Magic/7_Cercle.dec @@ -0,0 +1,235 @@ +actor Lith_CircleSpearTrail +{ + RenderStyle "Add" + + +NOINTERACTION + +NOTIMEFREEZE + +BRIGHT + + states + { + Spawn: + BLLT S 1 A_FadeOut(0.2) + wait + } +} + +actor Lith_CircleSpear +{ + RenderStyle "Add" + Damage (77) + + Projectile + +NOTIMEFREEZE + +RIPPER + +BRIGHT + + var int user_trigger; + var int user_vel; + + states + { + Spawn: + BLLT S 1 A_JumpIf(user_trigger, "Go") + wait + Go: + BLLT S random(0, 2) + BLLT S 0 A_SetUserVar(user_vel, random(20, 30)) + BLLT S 0 A_ChangeVelocity(cos(angle)*user_vel, sin(angle)*user_vel, 0, CVF_REPLACE) + BLLT S 3 A_SpawnItemEx("Lith_CircleSpearTrail") + wait + Death: + BLLT S 1 A_FadeOut + wait + } +} + +actor Lith_CircleSpearThrower +{ + RenderStyle "None" + + +NOGRAVITY + +NOCLIP + +NOTIMEFREEZE + + states + { + Spawn: + TNT1 A 0 + TNT1 AAAAAAAAAAAAAA 0 A_SpawnItemEx("Lith_CircleSpear", frandom(-8,8),frandom(-8,8),frandom(-16,16), 0,0,0, frandom(-60,60), SXF_TRANSFERPOINTERS, 0, tid) + stop + } +} + +actor Lith_CircleElectricity +{ + Translation "96:111=168:191", "192:207=168:191" + RenderStyle "Add" + Damage 7 + + Projectile + +RANDOMIZE + +NOTIMEFREEZE + +RIPPER + +BRIGHT + + states + { + Spawn: + ZAP1 FFEFEFDDEFDEEDEEDDDCCCBCBBBCBBBBAAABA 1 A_FadeOut(0.01) + ZAP1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_FadeOut(0.02) + stop + } +} + +actor Lith_CircleWallFx +{ + RenderStyle "Add" + XScale 0.7 + YScale 5.1 + Alpha 0.7 + + +NOTIMEFREEZE + +NOCLIP + +NOGRAVITY + +BRIGHT + + states + { + Spawn: + BLLT E 0 + BLLT EEE 1 A_FadeIn + BLLT E 0 A_Explode(128, 128, 0) + FadeLoop: + BLLT E 1 A_FadeOut(0.1) + BLLT E 0 A_JumpIf(alpha <= 0.05, "Fire") + loop + Fire: + TNT1 A 2 + TNT1 AA 0 A_SpawnItemEx("Lith_CircleElectricity", frandom(-32,32),frandom(-32,32),0, frandom(-4,4),frandom(-4,4),frandom(-4,4), 0, SXF_TRANSFERPOINTERS) + stop + } +} + +actor Lith_CircleWallTrail : Lith_CircleWallFx +{ + XScale 0.5 + YScale 5 + + +NOINTERACTION + + states + { + Spawn: + BLLT E 1 A_FadeOut + wait + Nope: + TNT1 A 0 + stop + } +} + +actor Lith_CircleWall : Lith_CircleWallFx +{ + XScale 0.5 + YScale 5 + Radius 8 + Height 32 + + var int user_trigger; + + states + { + Spawn: + BLLT E 1 A_ScaleVelocity(0.9) + BLLT E 0 A_JumpIf(user_trigger, "Fire") + loop + Fire: + BLLT E 0 A_SpawnItemEx("Lith_CircleWallFX", 0,0,0, 0,0,0, 0, SXF_TRANSFERPOINTERS) + BLLT E 0 A_SetUserVar(user_trigger, false) + FireDoneLoop: + BLLT E 1 A_ScaleVelocity(0.9) + BLLT E 0 A_JumpIf(user_trigger, "FireOut") + loop + FireOut: + BLLT E 1 A_ChangeVelocity(cos(angle)*4, sin(angle)*4, 0, CVF_REPLACE) + FireOutLoop: + BLLT E 0 A_FadeOut(0.05) + BLLT E 0 A_Explode(128, 128, 0) + BLLT E 0 A_SpawnItemEx("Lith_CircleWallTrail", -8) + BLLT E 1 A_ChangeVelocity(velx*1.34, vely*1.34, 0, CVF_REPLACE) + loop + } +} + +actor Lith_CircleParticle +{ + RenderStyle "Add" + Scale 0.7 + + +NOINTERACTION + +NOTIMEFREEZE + +BRIGHT + + var int user_trigger; + var int user_fxtid; + + states + { + Spawn: + BLLT E 1 + SpawnLoop: + BLLT E 1 A_FadeOut(0.1) + BLLT E 0 A_JumpIf(alpha <= 0.05, "FadeOutDone") + loop + FadeOutDone: + BLLT E 1 A_JumpIf(user_trigger, "DoFadeIn") + loop + DoFadeIn: + BLLT E 1 A_FadeIn(0.1) + BLLT E 0 A_JumpIf(alpha >= 1, "Done") + loop + Done: + BLLT E 1 A_SpawnItemEx("Lith_CircleWall", 0,0,0, 0,0,7, 0, SXF_TRANSFERPOINTERS, 0, user_fxtid) + BLLT E 1 A_SpawnItemEx("Lith_CircleWall", 0,0,0, 0,0,2, 0, SXF_TRANSFERPOINTERS, 0, user_fxtid) + BLLT E 1 A_FadeOut(0.34) + stop + } +} + +actor Lith_Cercle : Lith_CWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Cercle" + Weapon.SlotNumber 0 + Weapon.SlotPriority 1 + Weapon.UpSound "weapons/cercle/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Ready: + TNT1 A 1 bright A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_MagicSelect", 7) + SelectLoop: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_MagicAmmo", 0, 1) + goto Ready + TNT1 A 0 A_TakeInventory("Lith_MagicAmmo", 0x7FFFFFFF) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 ACS_NamedExecuteWithResult("Lith_Cercle", false) + TNT1 A 10 + goto Ready + } +} + +// EOF diff --git a/pksrc/lscripts/Weapons_Marine/1_Fist.dec b/pksrc/lscripts/Weapons_Marine/1_Fist.dec new file mode 100644 index 0000000..83909ef --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/1_Fist.dec @@ -0,0 +1,110 @@ +// ALL THINGS HERE TAKEN FROM LEGENDOOM +actor Lith_Knif : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_KnifPuf +{ + RenderStyle "Translucent" + Alpha 0.5 + VSpeed 0.5 + Mass 5 + + +NOINTERACTION + -ALLOWPARTICLES + +PUFFONACTORS + +THRUGHOST + +MTHRUSPECIES + +NOEXTREMEDEATH + +FORCEPAIN + + states + { + Spawn: + XDeath: + TNT1 A 0 + TNT1 A 0 A_CheckFlag("NOBLOOD", "Crash", AAPTR_TRACER) + TNT1 A 0 A_PlaySound("weapons/knife/hitflesh", CHAN_WEAPON, 1, 0, 1.8) + stop + + Melee: + Crash: + TNT1 A 0 + TNT1 A 0 A_PlaySound("weapons/knife/hitwall", CHAN_WEAPON, 1, 0, 1.8) + PUFF A 2 bright + PUFF BCD 2 + stop + } +} + +actor Lith_Fist : Lith_MWeapon replaces Fist // why would you pick up a fist +{ + Tag "$LITH_TXT_INFO_SHORT_Fist" + Weapon.Kickback 100 + Weapon.SlotNumber 1 + Weapon.SlotPriority 0.9 + AttackSound "*fist" // there is nothing wrong here MOVE ALONG + DamageType "Lith_Melee" + + +WEAPON.WIMPY_WEAPON + +WEAPON.MELEEWEAPON + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_FistPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + TNT1 A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "Fire1") + KNIF A 1 A_PlaySound("weapons/knife/swing1", CHAN_WEAPON) + KNIF BCD 1 + goto FireNormal + Fire1: + TNT1 A 1 A_PlaySound("weapons/knife/swing2", CHAN_WEAPON) + KNIF FGH 1 + FireNormal: + TNT1 A 0 A_JumpIfInventory("PowerStrength", 1, "FireBerserk") + TNT1 A 0 A_CustomPunch(5 * random(1, 10), true, 0, "Lith_KnifPuf", 96) + goto FireEnd1 + FireBerserk: + TNT1 A 0 A_CustomPunch(20 * random(1, 10), true, 0, "Lith_KnifPuf", 96) + goto FireEnd1 + FireEnd1: + TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "FireEnd2") + KNIF E 1 + TNT1 A 1 + goto FireEnd + FireEnd2: + KNIF IJ 1 + FireEnd: + TNT1 A 10 + TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "FireTakeKnif") + TNT1 A 0 A_GiveInventory("Lith_Knif", 1) + TNT1 AAAAA 1 A_ReFire + TNT1 A 0 A_TakeInventory("Lith_Knif", 1) + goto Ready + FireTakeKnif: + TNT1 A 0 A_TakeInventory("Lith_Knif", 1) + TNT1 AAAAA 1 A_ReFire + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_Marine/2_Pistol.dec b/pksrc/lscripts/Weapons_Marine/2_Pistol.dec new file mode 100644 index 0000000..04ba358 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/2_Pistol.dec @@ -0,0 +1,220 @@ +actor Lith_PistolShotsFired : Inventory +{ + Inventory.MaxAmount 14 +} + +actor Lith_PlasmaPistolShotTrail +{ + Scale 0.2 + RenderStyle "Add" + Alpha 1 + + +NOINTERACTION + + states + { + Spawn: + BLLT A 0 + BLLT A 0 A_SetScale(scalex * 0.9) + BLLT A 1 bright A_FadeOut(0.1) + loop + } +} + +actor Lith_PlasmaPistolShot +{ + Radius 6 + Height 16 + Speed 40 + Damage 5 + RenderStyle "Add" + Alpha 1 + DeathSound "weapons/pistol/plasma/explode" + Scale 0.2 + + Projectile + + states + { + Spawn: + BLLT A 1 bright A_SpawnItemEx("Lith_PlasmaPistolShotTrail") + loop + Death: + PLSE ABCDE 3 bright + stop + } +} + +actor Lith_PistolMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + + states + { + Spawn1: + MGZP ABCD 2 A_SetUserVar(user_side, 0) + MGZP EFGH 2 A_SetUserVar(user_side, 1) + loop + Death: + MGZP C 0 A_JumpIf(user_side == 0, "Done") + MGZP G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_PistolMagazine2 : Lith_PistolMagazine +{ + BounceSound "weapons/magbouncef" + Mass 145 + + states + { + Spawn1: + MGZP IJKL 2 A_SetUserVar(user_side, 0) + MGZP MNOP 2 A_SetUserVar(user_side, 1) + loop + Death: + MGZP K 0 A_JumpIf(user_side == 0, "Done") + MGZP O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_Pistol : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Pistol" + Weapon.SlotNumber 2 + Weapon.SlotPriority 1 + Weapon.BobSpeed 3 + Weapon.BobRangeX 0.2 + Weapon.BobRangeY 0.3 + Weapon.UpSound "weapons/pistol/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_PistolPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + AltReady: + SCOP B 1 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOBOB) + loop + Ready: + PISG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + PISG A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + PISG A 0 A_ZoomFactor(1.0) + DeselectLoop: + PISG AAA 0 A_Lower + PISG A 1 + loop + + Select: + // fuck youuuuuuuuuuuuuuuuuuuuuuuuuuuuu + PISG A 0 A_ZoomFactor(1.0) + SelectLoop: + PISG AAA 0 A_Raise + PISG A 1 + loop + + // SPAGHETTI + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_PistolShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_PistolShotsFired", 1) + TNT1 A 0 A_AlertMonsters + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PlasPistol), "FirePlasma") + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_AutoPistol), 3) + TNT1 A 0 A_FireBullets(0, 0, -1, 9) + TNT1 A 0 A_Jump(256, 2) + + TNT1 A 0 A_FireBullets(5, 3, 1, 7) + + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawnerSmall", 0, 0, 0, 6) + + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_AutoPistol), 3) + TNT1 A 0 A_PlaySound("weapons/pistol/fire", CHAN_WEAPON) + TNT1 A 0 A_Jump(256, 2) + + TNT1 A 0 A_PlaySound("weapons/pistol/fireauto", CHAN_WEAPON) + + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireFinish_Scoped") + goto FireFinish_NoScope + + FirePlasma: + TNT1 A 0 A_PlaySound("weapons/pistol/plasma/fire", CHAN_WEAPON) + TNT1 A 0 A_FireCustomMissile("Lith_PlasmaPistolShot") + + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireFinish_Scoped") + goto FireFinish_NoScope + + FireFinish_Scoped: + SCOP B 5 bright + SCOP B 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_AutoPistol), "FireFinish_Auto") + SCOP BBBBB 1 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOBOB) + goto FireFinish + FireFinish_NoScope: + PISG A 1 A_WeaponReady(LITH_BOBONLY) + PISF AB 1 bright A_WeaponReady(LITH_BOBONLY) + PISF B 1 bright + PISG C 1 + PISG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_AutoPistol), "FireFinish_Auto_NoScope") + PISG B 2 A_WeaponReady(WRF_ALLOWRELOAD) + PISG AAAAA 1 A_WeaponReady(WRF_ALLOWRELOAD) + goto FireFinish + FireFinish_Auto_NoScope: + PISG BB 1 A_ReFire + PISG A 0 + FireFinish_Auto: + "####" "#####" 1 A_ReFire + FireFinish: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + + AltFire: + "####" B 1 + "####" B 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ScopeOut") + ScopeIn: + "####" B 0 A_GiveInventory("Lith_WeaponScopedToken", 1) + "####" B 0 A_ZoomFactor((CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.5) + "####" B 0 A_PlaySound("weapons/pistol/zoomin", 6) + goto AltReady + ScopeOut: + "####" B 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" B 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" B 0 A_PlaySound("weapons/pistol/zoomout", 6) + goto Ready + + Reload: + PISG A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ReloadZoomSound") + goto Reload1 + ReloadZoomSound: + TNT1 A 0 A_PlaySound("weapons/pistol/zoomout", 6) + Reload1: + TNT1 A 0 A_TakeInventory("Lith_WeaponScopedToken", 999) + TNT1 A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + TNT1 A 0 A_JumpIfInventory("Lith_PistolShotsFired", 1, "Reload2") + goto Ready + Reload2: + PISG A 0 A_PlaySound("weapons/pistol/reload", 7) + PISG A 2 A_WeaponReady(LITH_BOBONLY) + PISG B 3 A_WeaponReady(LITH_BOBONLY) + PISG B 0 A_JumpIfInventory("Lith_PistolShotsFired", 0, 2) + PISG B 0 A_SpawnItemEx("Lith_PistolMagazine2", 5,0,20, frandom(1,3),0,0) + goto Reload3 + PISG B 0 A_SpawnItemEx("Lith_PistolMagazine", 5,0,20, frandom(1,3),0,0) + Reload3: + PISG B 4 A_WeaponReady(LITH_BOBONLY) + PISG CB 5 A_WeaponReady(LITH_BOBONLY) + PISG A 0 A_TakeInventory("Lith_PistolShotsFired", 999) + PISG A 3 A_WeaponReady + goto FireFinish + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/2_Revolver.dec b/pksrc/lscripts/Weapons_Marine/2_Revolver.dec new file mode 100644 index 0000000..27e12a6 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/2_Revolver.dec @@ -0,0 +1,74 @@ +actor Lith_RevolverShotsFired : Inventory +{ + Inventory.MaxAmount 6 +} + +actor Lith_Revolver : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Revolver" + Weapon.SlotNumber 2 + Weapon.SlotPriority 0.9 + Weapon.BobSpeed 2.5 + Weapon.BobRangeX 0.2 + Weapon.BobRangeY 0.3 + Weapon.UpSound "weapons/revolver/draw" + + +WEAPON.NOAUTOFIRE + + states + { + Ready: + REVO A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + REVO AAA 0 A_Lower + REVO A 1 + loop + Select: + REVO AAA 0 A_Raise + REVO A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_RevolverShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_RevolverShotsFired", 1) + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 A_FireBullets(1, 1, -1, 45) + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawnerSmall", 0, 0, 0, 6) + TNT1 A 0 A_PlaySound("weapons/revolver/fire", CHAN_WEAPON) + REVO B 1 bright A_WeaponReady(LITH_BOBONLY) + REVO CD 1 bright A_WeaponReady(LITH_BOBONLY) + REVO EFD 2 A_WeaponReady(LITH_BOBONLY) + REVO AAA 1 A_WeaponReady(WRF_ALLOWRELOAD) + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_RevolverShotsFired", 1, 1) + goto Ready + REVO A 0 A_PlaySound("weapons/revolver/reload", 7) + REVO A 1 offset(0, 33) + REVO A 1 offset(0, 34) + REVO A 1 offset(0, 35) + REVO A 1 offset(-1, 37) + REVO A 1 offset(-4, 40) + REVO G 1 offset(-7, 42) + REVO G 1 offset(-9, 48) + REVO H 1 offset(-11, 50) + REVO H 1 offset(-12, 55) + REVO I 1 offset(-13, 64) + REVO I 1 offset(-13, 69) + TNT1 A 20 + TNT1 A 0 A_TakeInventory("Lith_RevolverShotsFired", 999) + REVO J 1 offset(2, 64) + REVO J 1 offset(2, 55) + REVO K 1 offset(2, 50) + REVO K 1 offset(2, 45) + REVO K 1 offset(1, 40) + REVO A 1 offset(1, 35) + REVO A 1 offset(1, 33) + REVO A 1 offset(1, 32) + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/3_2_SuperShotgun.dec b/pksrc/lscripts/Weapons_Marine/3_2_SuperShotgun.dec new file mode 100644 index 0000000..4959830 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/3_2_SuperShotgun.dec @@ -0,0 +1,104 @@ +actor Lith_SSGIter : Inventory +{ + Inventory.MaxAmount 2 +} + +actor Lith_SSGIter2 : Inventory +{ + Inventory.MaxAmount 2 +} + +actor Lith_SuperShotgun : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_SuperShotgun" + Weapon.UpSound "weapons/ssg/draw" + Weapon.SlotNumber 3 + Weapon.SlotPriority 0.95 + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_SuperShotgunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + SHT2 A 0 A_TakeInventory("Lith_SSGIter", 999) + SHT2 A 0 A_TakeInventory("Lith_SSGIter2", 999) + SHT2 A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + Deselect: + SHTG A 0 A_Lower + SHT2 A 1 A_Lower + loop + Select: + SHTG A 0 A_Raise + SHT2 A 1 A_Raise + loop + FireEmpty: + SHT2 A 1 + SHT2 A 2 offset(0, 38) + SHT2 A 1 offset(0, 40) + SHT2 A 1 offset(0, 37) A_PlaySound("weapons/ssg/empty", CHAN_5) + SHT2 A 1 offset(0, 34) + SHT2 A 1 offset(0, 33) + SHT2 A 5 offset(0, 32) + SHT2 AAAA 1 A_ReFire + goto Ready + Fire: + SHT2 A 0 A_JumpIfInventory("Lith_ShellAmmo", 4, 1) + goto AltFire + SHT2 A 2 + SHT2 A 0 A_GiveInventory("Lith_SSGIter", 2) + SHT2 A 0 A_GiveInventory("Lith_SSGIter2", 2) + goto Attack + AltFire: + SHT2 A 0 A_JumpIfInventory("Lith_ShellAmmo", 2, 1) + goto FireEmpty + SHT2 A 2 + SHT2 A 0 A_GiveInventory("Lith_SSGIter", 1) + SHT2 A 0 A_GiveInventory("Lith_SSGIter2", 1) + Attack: + SHT2 A 0 A_TakeInventory("Lith_ShellAmmo", 2, TIF_NOTAKEINFINITE) + SHT2 A 0 A_AlertMonsters + SHT2 A 0 A_FireBullets(9, 6, 16, 6, "BulletPuff") + SHT2 A 0 A_FireCustomMissile("Lith_GunSmokeSpawner", 0, 0, 0, 6) + SHT2 A 0 A_PlaySound("weapons/ssg/fire", 7) + SHT2 A 0 A_Recoil(1.2) + SHT2 A 1 + SHT2 I 1 bright offset(0, 40) + SHT2 J 1 bright offset(0, 37) + SHT2 A 0 A_TakeInventory("Lith_SSGIter2", 1) + SHT2 A 0 A_JumpIfInventory("Lith_SSGIter2", 1, "Attack") + Reload: + SHT2 A 1 offset(0, 35) + SHT2 A 1 offset(0, 33) + SHT2 A 1 offset(0, 32) + SHT2 A 0 A_JumpIfInventory("Lith_ShellAmmo", 2, 1) + goto Ready + SHT2 B 1 offset(1, 32) + SHT2 B 1 offset(-5, 32) + SHT2 B 2 offset(-10, 32) + SHT2 C 2 offset(1, 32) + SHT2 C 2 offset(-3, 32) + SHT2 C 3 offset(-5, 32) + SHT2 D 0 A_PlaySound("weapons/ssg/open", CHAN_5) + SHT2 D 2 offset(-10, 32) + SHT2 D 2 offset(-5, 32) + SHT2 D 3 offset(1, 32) + LoadAnim: + SHT2 Z 6 + SHT2 E 4 + SHT2 F 5 A_PlaySound("weapons/ssg/load", CHAN_6) + SHT2 A 0 A_TakeInventory("Lith_SSGIter", 1) + SHT2 A 0 A_JumpIfInventory("Lith_SSGIter", 1, "LoadAnim") + LoadDone: + SHT2 G 6 + SHT2 H 6 A_PlaySound("weapons/ssg/close", CHAN_7) + SHT2 AAAAA 1 A_ReFire + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_Marine/3_LazShotgun.dec b/pksrc/lscripts/Weapons_Marine/3_LazShotgun.dec new file mode 100644 index 0000000..ad19c51 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/3_LazShotgun.dec @@ -0,0 +1,79 @@ +actor Lith_LazShotgunTrail +{ + RenderStyle "Add" + Scale 0.34 + + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + BLLT E 4 bright + BLLT E 2 bright A_FadeOut(0.5) + BLLT E 1 bright A_FadeOut(0.2) + stop + } +} + +actor Lith_LazShotgun : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_LazShotgun" + Weapon.UpSound "weapons/lshotgun/draw" + Weapon.SlotNumber 3 + Weapon.SlotPriority 0.9 + + +WEAPON.NOAUTOFIRE + + states + { + Ready: + LSHT A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + LSHT AAA 0 A_Lower + LSHT A 1 + loop + + Select: + LSHT AAA 0 A_Raise + LSHT A 1 + loop + + Fire: + LSHT A 0 A_AlertMonsters + LSHT AAAAAAA 0 A_RailAttack(7 * random(1, 4), 0, true, "None", "Red", RGF_SILENT | RGF_FULLBRIGHT, 2, "BulletPuff", 4, 4, 0, 10, 5, 0, "Lith_LazShotgunTrail", -8) + LSHT A 0 A_PlaySound("weapons/lshotgun/fire", CHAN_WEAPON) + LSHT A 0 A_Recoil(0.5) + LSHT I 2 bright A_SetPitch(pitch - 0.75) + LSHT H 1 bright + LSHT A 4 + LSHT BB 1 A_SetPitch(pitch + 0.375) + LSHT C 2 A_PlaySound("weapons/lshotgun/open", CHAN_6) + LSHT D 2 + LSHT E 3 + LSHT F 5 + LSHT G 2 A_PlaySound("weapons/lshotgun/close", CHAN_7) + LSHT ED 2 + LSHT CA 3 + // [screams externally] + LSHT A 2 A_WeaponReady(LITH_BOBONLY) + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + LSHT A 0 A_WeaponReady(LITH_BOBONLY) + LSHT A 1 A_ReFire + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/3_Shotgun.dec b/pksrc/lscripts/Weapons_Marine/3_Shotgun.dec new file mode 100644 index 0000000..dca42fe --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/3_Shotgun.dec @@ -0,0 +1,258 @@ +actor Lith_GaussMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + Mass 150 + + states + { + Spawn1: + MGZG ABCD 3 A_SetUserVar(user_side, 0) + MGZG EFGH 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZG C 0 A_JumpIf(user_side == 0, "Done") + MGZG G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_GaussMagazine2 : Lith_GaussMagazine +{ + BounceSound "weapons/magbouncef" + Mass 155 + + states + { + Spawn1: + MGZG IJKL 3 A_SetUserVar(user_side, 0) + MGZG MNOP 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZG K 0 A_JumpIf(user_side == 0, "Done") + MGZG O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_GaussShotsFired : Inventory +{ + Inventory.MaxAmount 15 +} + +actor Lith_ShotgunJustFrame : Inventory +{ + Inventory.MaxAmount 3 +} + +actor Lith_Shotgun : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_Shotgun" + Weapon.UpSound "weapons/shotgun/draw" + Weapon.SlotNumber 3 + Weapon.SlotPriority 1 + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ShotgunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + AltReady: + SCOP A 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD) + loop + Ready: + SHTG A 0 A_TakeInventory("Lith_ShotgunJustFrame", 1) + SHTG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_GaussShotty), "ReadyGauss") + SHTG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + ReadyGauss: + SHTG N 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + goto Ready + + Deselect: + SHTG A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + SHTG A 0 A_ZoomFactor(1.0) + DeselectLoop: + SHTG AAA 0 A_Lower + SHTG A 1 + loop + + Select: + SHTG A 0 A_ZoomFactor(1.0) + SHTG A 0 A_GiveInventory("Lith_ShotgunJustFrame", 3) + SelectLoop: + SHTG AAA 0 A_Raise + SHTG A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_ShotgunJustFrame", 1, "FireJust") + FireCheck: + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_GaussShotty), "FireGauss") + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PoisonShot), "FirePoison") + goto FireRail + FireJust: + TNT1 A 0 A_TakeInventory("Lith_ShotgunJustFrame", 0x7FFFFFFF) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_PlaySound("weapons/shotgun/just", 7) + TNT1 A 0 A_RailAttack(20, 0, false, "None", "LightBlue", RGF_SILENT | RGF_FULLBRIGHT, 128, "BulletPuff", 0, 0, 0, 48, 3, 3) + goto FireCheck + FireFinish: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + FirePoison: + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_FireBullets(5.3, 2.3, 7, 5, "Lith_PoisonBullet") + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawner", 0, 0, 0, 6) + TNT1 A 0 A_PlaySound("weapons/shotgun/poison/fire", CHAN_WEAPON) + TNT1 A 0 A_Recoil(0.7) + goto FireFinish_Rail + + FireRail: + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_FireBullets(5.3, 2.3, 8, 5) + TNT1 A 0 A_RailAttack(20, 0, true, "None", "Green", RGF_SILENT | RGF_FULLBRIGHT, 2, "BulletPuff", 1, 1, 0, 0, 0.9, 1, "Lith_ShotgunTrail", 0) + TNT1 A 0 A_FireCustomMissile("Lith_GunSmokeSpawner", 0, 0, 0, 6) + TNT1 A 0 A_PlaySound("weapons/shotgun/fire", CHAN_WEAPON) + TNT1 A 0 A_Recoil(0.7) + FireFinish_Rail: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireFinish_Rail_Scoped") + // --- + SHTG B 2 bright A_Light(1) + SHTG C 2 bright A_Light(2) + SHTG D 2 A_Light(0) + SHTG A 4 + SHTG FG 3 + SHTG H 2 + SHTG I 1 + SHTG J 3 + SHTG KI 1 + SHTG H 3 + SHTG G 1 offset(-13, 32) + SHTG G 1 offset(0, 32) + SHTG F 1 offset(-9, 32) + SHTG F 1 offset(0, 32) + // [screams externally] + SHTG A 2 A_WeaponReady(LITH_BOBONLY) + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + SHTG A 0 A_WeaponReady(LITH_BOBONLY) + SHTG A 1 A_ReFire + goto FireFinish + FireFinish_Rail_Scoped: + SCOP A 1 bright A_Light1 + SCOP A 1 bright A_Light2 + SCOP A 2 A_Light0 + SCOP A 24 + SCOP A 5 A_WeaponReady(WRF_NOPRIMARY | WRF_NOBOB) + SCOP A 0 A_ReFire + SCOP A 7 A_WeaponReady(WRF_NOPRIMARY | WRF_NOBOB) + goto FireFinish + + AltFire: + "####" "#" 1 + "####" "#" 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ScopeOut") + goto ScopeIn + ScopeOut: + "####" "#" 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" "#" 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" "#" 0 A_PlaySound("weapons/shotgun/zoomout", 6) + goto Ready + ScopeIn: + "####" "#" 0 A_GiveInventory("Lith_WeaponScopedToken", 1) + "####" "#" 0 A_ZoomFactor(CallACS("LPData", pdata_weapon_zoom) / FIX) + "####" "#" 0 A_PlaySound("weapons/shotgun/zoomin", 6) + goto AltReady + + Reload: + TNT1 A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_GaussShotty), 1) + goto FireFinish + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, 1) + goto Reload1 + TNT1 A 0 A_PlaySound("weapons/shotgun/zoomout", 6) + TNT1 A 0 A_TakeInventory("Lith_WeaponScopedToken", 999) + TNT1 A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + Reload1: + TNT1 A 0 A_JumpIfInventory("Lith_GaussShotsFired", 1, 1) + goto FireFinish + SHTG N 2 + SHTG F 2 A_PlaySound("weapons/shotgun/gauss/reloadout", CHAN_6) + SHTG G 2 + SHTG G 0 A_JumpIfInventory("Lith_GaussShotsFired", 0, 2) + SHTG G 0 A_SpawnItemEx("Lith_GaussMagazine2", 8,-1,20, frandom(0,1),frandom(-1,-2),0) + goto Reload2 + SHTG G 0 A_SpawnItemEx("Lith_GaussMagazine", 8,-1,20, frandom(0,1),frandom(-1,-2),0) + Reload2: + SHTG H 2 + SHTG I 2 offset(-11, 57) + SHTG I 5 offset(-10, 60) + SHTG I 5 offset(-11, 60) + SHTG I 0 A_TakeInventory("Lith_GaussShotsFired", 999) + SHTG I 2 offset(-13, 59) A_PlaySound("weapons/shotgun/gauss/reloadin", CHAN_7) + SHTG I 2 offset(-11, 49) + SHTG I 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 5 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG I 1 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SHTG G 1 offset(-13, 32) + SHTG G 1 offset(1, 32) + SHTG F 1 offset(-9, 32) + SHTG F 1 offset(1, 32) + SHTG NNNNNNN 1 A_ReFire + goto FireFinish + + // + // Gauss + // + FireGauss: + TNT1 A 0 A_JumpIfInventory("Lith_GaussShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_GaussShotsFired", 1) + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_FireBullets(0, 0, 1, 14, "Lith_GaussPuff") + TNT1 A 0 A_Quake(1, 5, 0, 64) + TNT1 A 0 A_RailAttack(9, 0, false, LightBlue, Blue, RGF_NOPIERCING|RGF_FULLBRIGHT, 0, + "Lith_Dummy", 0.05, 0.05, 0, 5, frandom(0.35, 1), 0.5) + TNT1 A 0 A_PlaySound("weapons/shotgun/gauss/fire", CHAN_WEAPON) + TNT1 A 0 A_Recoil(0.777) + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireFinish_Gauss_Scoped") + // --- + SHTG N 1 + SHTG L 1 A_Light(3) + SHTG M 1 A_Light(2) + SHTG O 1 A_Light(1) + SHTG N 1 A_Light(0) + SHTG N 2 + SHTG NNNNNNN 1 A_ReFire + goto FireFinish + FireFinish_Gauss_Scoped: + SCOP A 1 bright A_Light(3) + SCOP A 1 bright A_Light(2) + SCOP A 0 A_Light(1) + SCOP A 1 A_WeaponReady(WRF_NOPRIMARY | WRF_NOBOB) + SCOP A 0 A_Light0 + SCOP A 4 A_WeaponReady(WRF_NOPRIMARY | WRF_NOBOB) + SCOP AAAAAAA 1 A_ReFire + goto FireFinish + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/4_CombatRifle.dec b/pksrc/lscripts/Weapons_Marine/4_CombatRifle.dec new file mode 100644 index 0000000..868c3c6 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/4_CombatRifle.dec @@ -0,0 +1,263 @@ +actor Lith_RifleLaserTrail +{ + RenderStyle "Add" + Scale 0.14 + + +NOINTERACTION + +NOTIMEFREEZE + + states + { + Spawn: + BLLT E 5 bright + SpawnLoop: + BLLT E 1 bright A_SetScale(scalex - 0.035) + BLLT E 0 bright A_JumpIf(scalex < 0.05, "Done") + loop + Done: + TNT1 A 0 + stop + } +} + +actor Lith_CombatRifleMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + + states + { + Spawn1: + MGZR ABCD 3 A_SetUserVar(user_side, 0) + MGZR EFGH 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZR C 0 A_JumpIf(user_side == 0, "Done") + MGZR G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_CombatRifleMagazine2 : Lith_CombatRifleMagazine +{ + BounceSound "weapons/magbouncef" + Mass 145 + + states + { + Spawn1: + MGZR IJKL 3 A_SetUserVar(user_side, 0) + MGZR MNOP 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZR K 0 A_JumpIf(user_side == 0, "Done") + MGZR O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_RifleShotsFired : Inventory +{ + Inventory.MaxAmount 40 +} + +actor Lith_CombatRifle : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_CombatRifle" + Weapon.UpSound "weapons/rifle/draw" + Weapon.SlotNumber 4 + Weapon.SlotPriority 1 + + +WEAPON.NOAUTOAIM + + const int lvar_burst = 1; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ChaingunPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CRFG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + CRFG AAA 0 A_Lower + CRFG A 1 + loop + + Select: + CRFG A 0 ACS_NamedExecuteWithResult("Lith_ResetRifleMode") + SelectLoop: + CRFG AAA 0 A_Raise + CRFG A 1 + loop + + Fire: + CRFG A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_burst, 0) + CRFG A 0 A_JumpIf(CallACS("LPData", pdata_rifle_firemode) == rifle_firemode_burst, "FireBurst") + CRFG A 0 A_JumpIf(CallACS("LPData", pdata_rifle_firemode) == rifle_firemode_grenade, "FireGrenade") + + TNT1 A 0 A_JumpIfInventory("Lith_RifleShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_RifleShotsFired", 1) + + CRFG A 0 A_GunFlash("DummyFlash") + + CRFG A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_LaserRCW), "Fire2") + + TNT1 AA 0 A_RailAttack(8, 0, true, "None", "Red", RGF_SILENT|RGF_FULLBRIGHT, 0, "BulletPuff", 5.77, 3, 0, 0, 4, 0, "Lith_RifleLaserTrail", 0) + CRFG A 0 A_PlaySound("weapons/rcw/fire", CHAN_WEAPON) + goto Fire1 + + Fire2: + CRFG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777), 4) + CRFG A 0 A_PlaySound("weapons/rifle/fire", CHAN_WEAPON, CallACS("Lith_AmmoRunOut", false)/FIX) + CRFG A 0 A_PlaySound("weapons/rifle/firero", CHAN_7, CallACS("Lith_AmmoRunOut", true )/FIX) + CRFG A 0 A_Jump(256, 2) + CRFG A 0 A_PlaySound("marathon/rifle/fire", CHAN_WEAPON) + + CRFG A 0 A_Jump(128, 3) + CRFG A 0 A_FireBullets(5.77, 2, -1, 1, "Lith_RifleBullet", FBF_NORANDOM) + CRFG A 0 A_Jump(256, 2) + CRFG A 0 A_FireBullets(5.77, 2, -1, 1, "Lith_RifleBulletPainless", FBF_NORANDOM) + CRFG A 0 A_FireBullets(5.77, 2, -1, 1, "Lith_RifleBulletPainless", FBF_NORANDOM) + + Fire1: + CRFG B 1 bright A_WeaponReady(LITH_BOBONLY) + CRFG C 1 bright A_WeaponReady(LITH_BOBONLY) + CRFG A 2 A_WeaponReady(LITH_BOBONLY) + CRFG AAAAAA 1 A_ReFire + goto Ready + + FireBurst: + TNT1 A 0 A_JumpIfInventory("Lith_RifleShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_RifleShotsFired", 1) + + CRFG A 0 A_GunFlash("DummyFlash") + + CRFG A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_LaserRCW), "Fire4") + + TNT1 AAA 0 A_RailAttack(8, 0, true, "None", "Red", RGF_SILENT|RGF_FULLBRIGHT, 0, "BulletPuff", 2, 2, 0, 0, 4, 0, "Lith_RifleLaserTrail", 0) + CRFG A 0 A_PlaySound("weapons/rcw/firesnipe", CHAN_WEAPON) + goto Fire3 + + Fire4: + CRFG A 0 A_PlaySound("weapons/rifle/firesnipe", CHAN_WEAPON) + CRFG A 0 A_FireBullets(1, 1, -3, 1, "Lith_RifleBullet", FBF_NORANDOM) + + Fire3: + CRFG B 1 bright A_WeaponReady(LITH_BOBONLY) + CRFG C 1 bright A_WeaponReady(LITH_BOBONLY) + CRFG A 2 A_WeaponReady(LITH_BOBONLY) + CRFG A 0 A_JumpIf(CallACS("LPVarAdd", lvar_burst, 1) >= 5, 1) + goto FireBurst + CRFG A 6 A_WeaponReady(LITH_BOBONLY) + + CRFG A 0 A_JumpIf(!CallACS("LPData", pdata_upgrade, UPGR_LaserRCW), 2) + CRFG A 2 A_WeaponReady(LITH_BOBONLY) + + CRFG AAAAAA 1 A_Refire + goto Ready + + FireGrenade: + CRFG A 3 A_WeaponReady(LITH_BOBONLY) + + CRFG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777), 3) + CRFG A 0 A_PlaySound("weapons/rifle/grenade", CHAN_WEAPON) + CRFG A 0 A_Jump(256, 2) + CRFG A 0 A_PlaySound("marathon/rifle/grenade", CHAN_WEAPON) + + CRFG A 0 A_AlertMonsters + CRFG G 2 bright A_FireCustomMissile("Lith_RifleGrenade") + CRFG H 2 bright + CRFG I 2 bright + CRFG A 5 + + CRFG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_7777777), 3) + CRFG A 0 A_PlaySound("weapons/rifle/rldmount", CHAN_6) + CRFG A 0 A_Jump(256, 2) + CRFG A 0 A_PlaySound("marathon/rifle/reload", CHAN_6) + + // oh jesus + CRFG A 1 offset(1, 32) + CRFG A 1 offset(3, 32) + CRFG A 1 offset(4, 32) + CRFG A 1 offset(8, 38) + CRFG A 1 offset(12, 45) + CRFG A 1 offset(16, 53) + CRFG A 1 offset(19, 60) + CRFG A 1 offset(21, 64) + CRFG A 1 offset(23, 67) + CRFG A 1 offset(22, 69) + CRFG A 1 offset(19, 70) + CRFG A 7 offset(18, 72) + CRFG A 1 offset(17, 69) + CRFG A 1 offset(19, 67) + CRFG A 1 offset(20, 66) + CRFG A 1 offset(21, 62) + CRFG A 1 offset(20, 60) + CRFG A 1 offset(21, 63) + CRFG A 1 offset(23, 66) + CRFG A 1 offset(24, 68) + CRFG A 1 offset(25, 63) + CRFG A 1 offset(24, 59) + CRFG A 1 offset(22, 57) + CRFG A 1 offset(20, 54) + CRFG A 1 offset(16, 49) + CRFG A 1 offset(12, 44) + CRFG A 1 offset(10, 42) + CRFG A 1 offset(8, 40) + CRFG A 1 offset(5, 38) + CRFG A 1 offset(2, 35) + CRFG A 5 offset(0, 32) A_WeaponReady(LITH_BOBONLY) + goto Ready + + AltFire: + CRFG A 2 A_WeaponReady(LITH_BOBONLY) + CRFG A 0 ACS_NamedExecuteAlways("Lith_SwitchRifleFiremode", 0) + CRFG DEF 1 A_WeaponReady(LITH_BOBONLY) + CRFG A 7 A_WeaponReady(WRF_NOSECONDARY) + goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_RifleShotsFired", 1, 1) + goto Ready + CRFG K 1 + CRFG J 1 offset(-2, 34) + CRFG J 1 offset(-4, 37) + CRFG J 1 offset(-9, 43) A_PlaySound("weapons/rifle/reloadout", CHAN_6) + CRFG J 1 offset(-12, 47) + CRFG J 0 A_JumpIfInventory("Lith_RifleShotsFired", 0, 2) + CRFG J 0 A_SpawnItemEx("Lith_CombatRifleMagazine2", 9,0,20, frandom(0,1),frandom(-1,-4),0) + goto Reload1 + CRFG J 0 A_SpawnItemEx("Lith_CombatRifleMagazine", 9,0,20, frandom(0,1),frandom(-1,-4),0) + Reload1: + CRFG J 1 offset(-14, 52) + CRFG J 2 offset(-12, 55) + CRFG J 3 offset(-11, 57) + CRFG J 8 offset(-10, 60) + CRFG J 8 offset(-11, 60) + CRFG J 0 A_TakeInventory("Lith_RifleShotsFired", 999) + CRFG J 2 offset(-13, 59) A_PlaySound("weapons/rifle/reloadin", CHAN_7) + CRFG J 2 offset(-11, 49) + CRFG J 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 7 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 1 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + CRFG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB) + CRFG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB) + CRFG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB) + CRFG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB) + CRFG A 4 A_WeaponReady(WRF_NOBOB) + goto Ready + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/4_SniperRifle.dec b/pksrc/lscripts/Weapons_Marine/4_SniperRifle.dec new file mode 100644 index 0000000..e90084b --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/4_SniperRifle.dec @@ -0,0 +1,198 @@ +actor Lith_SniperRifleMagazine : Lith_DroppedMagazine +{ + Scale 0.7 + Mass 150 + + states + { + Spawn1: + MGZS ABCD 3 A_SetUserVar(user_side, 0) + MGZS EFGH 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZS C 0 A_JumpIf(user_side == 0, "Done") + MGZS G 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_SniperRifleMagazine2 : Lith_SniperRifleMagazine +{ + BounceSound "weapons/magbouncef" + Mass 155 + + states + { + Spawn1: + MGZS IJKL 3 A_SetUserVar(user_side, 0) + MGZS MNOP 3 A_SetUserVar(user_side, 1) + loop + Death: + MGZS K 0 A_JumpIf(user_side == 0, "Done") + MGZS O 0 A_JumpIf(user_side == 1, "Done") + stop + } +} + +actor Lith_SniperShotsFired : Inventory +{ + Inventory.MaxAmount 8 +} + +actor Lith_SniperRifle : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_SniperRifle" + Weapon.UpSound "weapons/sniper/draw" + Weapon.SlotNumber 4 + Weapon.SlotPriority 0.9 + + +WEAPON.NOAUTOFIRE + + states + { + AltReady: + SCOP A 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + Ready: + SNPG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + ReadySelector: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + + Deselect: + SNPG A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + SNPG A 0 A_ZoomFactor(1.0) + DeselectLoop: + SNPG AAA 0 A_Lower + SNPG A 1 + loop + + Select: + SNPG A 0 A_ZoomFactor(1.0) + SelectLoop: + SNPG AAA 0 A_Raise + SNPG A 1 + loop + + Fire: + TNT1 A 0 A_JumpIfInventory("Lith_SniperShotsFired", 0, "Reload") + TNT1 A 0 A_GiveInventory("Lith_SniperShotsFired", 1) + + TNT1 A 0 A_GunFlash("DummyFlash") + TNT1 A 0 A_FireBullets(0, 0, 1, 161, "Lith_SniperBullet", FBF_NORANDOM) + TNT1 A 0 A_Recoil(1) + TNT1 A 0 A_PlaySound("weapons/sniper/fire", CHAN_WEAPON) + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireAnim_Scoped") + + FireAnim_Unscoped: + SNPG B 1 bright + SNPG C 1 bright + SNPG DEFG 1 + SNPG A 1 + goto BoltAnim + + FireAnim_Scoped: + SCOP A 1 bright A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.80) + SCOP A 1 bright A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.85) + SCOP A 1 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.90) + SCOP A 1 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.95) + SCOP A 3 A_ZoomFactor(1 + CallACS("LPData", pdata_weapon_zoom) / FIX) + + BoltAnim: + "####" "#" 1 offset(1, 32) + "####" "#" 1 offset(3, 32) + "####" "#" 1 offset(4, 32) + "####" "#" 1 offset(8, 38) + "####" "#" 1 offset(12, 45) + "####" "#" 1 offset(16, 53) + "####" "#" 1 offset(19, 60) + "####" "#" 1 offset(21, 64) + "####" "#" 1 offset(23, 67) + "####" "#" 1 offset(22, 74) A_PlaySound("weapons/sniper/boltback", CHAN_5) + "####" "#" 1 offset(19, 78) + "####" "#" 5 offset(18, 80) + "####" "#" 1 offset(17, 74) A_PlaySound("weapons/sniper/boltforward", CHAN_6) + "####" "#" 1 offset(19, 67) + "####" "#" 1 offset(20, 66) + "####" "#" 1 offset(21, 62) + "####" "#" 1 offset(20, 60) + "####" "#" 1 offset(21, 63) + "####" "#" 1 offset(23, 66) + "####" "#" 1 offset(24, 68) + "####" "#" 1 offset(25, 63) + "####" "#" 1 offset(24, 59) + "####" "#" 1 offset(22, 57) + "####" "#" 1 offset(20, 54) + "####" "#" 1 offset(16, 49) + "####" "#" 1 offset(12, 44) + "####" "#" 1 offset(10, 42) + "####" "#" 1 offset(8, 40) + "####" "#" 1 offset(5, 38) + "####" "#" 1 offset(2, 35) + "####" "#" 5 offset(0, 32) A_WeaponReady(LITH_BOBONLY) + goto ReadySelector + + AltFire: + "####" A 1 + "####" A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ScopeOut") + goto ScopeIn + ScopeOut: + "####" A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" A 0 A_PlaySound("weapons/sniper/zoomout", 6) + goto Ready + ScopeIn: + "####" A 0 A_GiveInventory("Lith_WeaponScopedToken", 1) + "####" A 0 A_ZoomFactor(1 + (CallACS("LPData", pdata_weapon_zoom) / FIX)) + "####" A 0 A_PlaySound("weapons/sniper/zoomin", 6) + goto AltReady + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, 1) + goto Reload1 + TNT1 A 0 A_PlaySound("weapons/sniper/zoomout", 6) + TNT1 A 0 A_TakeInventory("Lith_WeaponScopedToken", 999) + TNT1 A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + Reload1: + TNT1 A 0 A_JumpIfInventory("Lith_SniperShotsFired", 1, 1) + goto ReadySelector + SNPG A 1 + SNPG A 1 offset(-2, 34) + SNPG A 1 offset(-4, 37) + SNPG A 1 offset(-9, 43) A_PlaySound("weapons/sniper/magout", CHAN_6) + SNPG A 1 offset(-12, 47) + SNPG A 1 offset(-14, 52) + SNPG A 0 A_JumpIfInventory("Lith_SniperShotsFired", 0, 2) + SNPG A 0 A_SpawnItemEx("Lith_SniperRifleMagazine2", 8,-1,20, frandom(0,1),frandom(-1,-2),0) + goto Reload2 + SNPG A 0 A_SpawnItemEx("Lith_SniperRifleMagazine", 8,-1,20, frandom(0,1),frandom(-1,-2),0) + Reload2: + SNPG A 2 offset(-12, 55) + SNPG A 3 offset(-11, 57) + SNPG A 8 offset(-10, 60) + SNPG A 8 offset(-11, 60) + SNPG A 0 A_TakeInventory("Lith_SniperShotsFired", 999) + SNPG A 2 offset(-13, 59) A_PlaySound("weapons/sniper/magin", CHAN_7) + SNPG A 2 offset(-11, 49) + SNPG A 2 offset(-11, 47) + SNPG A 7 offset(-11, 45) + SNPG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 1 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + SNPG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + SNPG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + SNPG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + SNPG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY) + SNPG A 4 A_WeaponReady(WRF_NOBOB) + goto ReadySelector + } +} + diff --git a/pksrc/lscripts/Weapons_Marine/5_RocketLauncher.dec b/pksrc/lscripts/Weapons_Marine/5_RocketLauncher.dec new file mode 100644 index 0000000..0625b21 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/5_RocketLauncher.dec @@ -0,0 +1,181 @@ +actor Lith_GrenadeLauncher : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_GrenadeLauncher" + Weapon.UpSound "weapons/rocket/draw" + Weapon.SlotNumber 5 + Weapon.SlotPriority 1 + Weapon.BobStyle "Smooth" + Weapon.BobSpeed 1.3 + Weapon.BobRangeY 1.1 + Weapon.BobRangeX 0.9 + + +WEAPON.NOAUTOFIRE + + const int lith_load_max = 8; + + const int lvar_loaded = 1; + const int lvar_iter = 2; + const int lvar_mode = 3; + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_RocketLauncherPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + GRLG A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + GRLG AAA 0 A_Lower + GRLG A 1 + loop + Select: + GRLG AAA 0 A_Raise + GRLG A 1 + loop + + Fire: + GRLG A 1 + GRLG A 0 A_JumpIfInventory("Lith_RocketAmmo", 1, 1) + goto FireEmpty + GRLG A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_loaded, 0) + GRLG A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_iter, 0) + GRLG A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_mode, 0) + GRLG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ChargeRPG), "FireUnreal") + GRLG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_HomingRPG), "FireHoming") + FireReal: + GRLG A 0 A_AlertMonsters + GRLG A 0 A_PlaySound("weapons/rocket/fire", CHAN_WEAPON) + GRLG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + GRLG A 0 A_FireCustomMissile("Lith_Rocket") + FireAnim: + GRLG B 1 bright A_GunFlash + GRLG B 1 bright + GRLG C 1 bright offset(0, 33) + GRLG CD 1 bright offset(0, 34) + GRLG D 1 offset(0, 56) + GRLG E 1 offset(0, 59) A_PlaySound("weapons/rocket/load", CHAN_7) + GRLG A 1 offset(0, 56) + GRLG A 1 offset(0, 50) + GRLG A 1 offset(0, 45) + GRLG A 1 offset(0, 38) + GRLG A 1 offset(0, 35) + GRLG A 1 offset(0, 34) + GRLG A 1 offset(0, 33) + GRLG AAAA 1 offset(0, 32) A_ReFire + goto Ready + + AltFire: + GRLG A 1 + GRLG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_HomingRPG), "Ready") + GRLG A 0 A_JumpIfInventory("Lith_RocketAmmo", 1, 1) + goto FireEmpty + GRLG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_ChargeRPG), "FireReal") + GRLG A 0 A_AlertMonsters + GRLG A 0 A_PlaySound("weapons/rocket/grenade", CHAN_WEAPON) + GRLG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + GRLG A 0 A_FireCustomMissile("Lith_RifleGrenade") + goto FireAnim + + Flash: + TNT1 A 2 A_Light2 + TNT1 A 1 A_Light1 + goto LightDone + + FireEmpty: + GRLG A 1 + GRLG A 2 offset(0, 41) + GRLG A 1 offset(0, 45) + GRLG A 1 offset(0, 43) + GRLG A 1 offset(0, 40) A_PlaySound("weapons/rocket/empty", CHAN_5) + GRLG A 1 offset(0, 38) + GRLG A 1 offset(0, 36) + GRLG A 1 offset(0, 33) + GRLG A 1 offset(0, 32) + GRLG A 5 + GRLG AAAA 1 A_ReFire + goto Ready + + // + // Homing Launcher + // + FireHoming: + GRLG A 1 + GRLG A 0 A_AlertMonsters + GRLG A 0 A_PlaySound("weapons/rocket/fire", CHAN_WEAPON) + GRLG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + GRLG A 0 A_FireCustomMissile("Lith_HomingRocket") + goto FireAnim + + // + // Charge Launcher + // + FireUnreal: + GRLG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_loaded) + GRLG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + FireUnrealRefire: + GRLG A 2 + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_loaded) == lith_load_max, "FireUnrealReal") + GRLG A 0 A_JumpIf(CallACS("LPVarInc", lvar_iter), "FireUnrealLoad") + goto FireUnrealCheckRefire + FireUnrealLoad: + GRLG A 0 A_PlaySound("weapons/rocket/lock", CHAN_5) + GRLG A 0 A_JumpIfInventory("Lith_RocketAmmo", 1, 1) + goto FireUnrealReal + GRLG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + GRLG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_loaded) + GRLR A 1 + GRLR BC 2 + GRLR D 4 A_GunFlash("AltModeChanger", GFF_NOEXTCHANGE) + GRLR EF 2 + GRLR GH 1 + + FireUnrealCheckRefire: + GRLG A 2 + GRLG A 0 A_ReFire("FireUnrealRefire") + FireUnrealReal: + GRLG A 0 A_AlertMonsters + GRLG A 0 A_PlaySound("weapons/rocket/launch", CHAN_6) + GRLG A 0 A_PlaySound("weapons/rocket/fire", CHAN_WEAPON) + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_loaded), "FireThatShit") + GRLG A 0 A_FireCustomMissile("Lith_Rocket") + goto FireAnim + FireThatShit: + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_mode) == 1, "FireThatShitSpiral") + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_mode) == 2, "FireThatShitNades") + GRLG A 0 A_FireCustomMissile("Lith_Rocket", 0, 1, random(-24,24)) + GRLG A 0 A_JumpIf(CallACS("LPVarSub", lvar_loaded, 1), "FireThatShit") + goto FireAnim + FireThatShitSpiral: + GRLG A 0 A_FireCustomMissile("Lith_RocketHax", 0, 1, random(-4,4)) + GRLG A 0 A_JumpIf(CallACS("LPVarSub", lvar_loaded, 1), "FireThatShit") + goto FireAnim + FireThatShitNades: + GRLG A 0 A_FireCustomMissile("Lith_RifleGrenade", random(-4,4), 1, random(-7,7), random(-4,4)) + GRLG A 0 A_JumpIf(CallACS("LPVarSub", lvar_loaded, 1), "FireThatShit") + goto FireAnim + + AltModeChanger: + TNT1 A 0 A_JumpIf((CallACS("LPData", pdata_buttons) & X_BT_ALTATTACK) != 0, "ChangeAltMode") + stop + ChangeAltMode: + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_mode) == 1, "ChangeAltMode1") + GRLG A 0 A_JumpIf(CallACS("LPVarGet", lvar_mode) == 2, "ChangeAltMode2") + TNT1 A 0 A_PlaySound("weapons/rocket/setalt") + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_mode) + stop + ChangeAltMode1: + TNT1 A 0 A_PlaySound("weapons/rocket/setalt1") + TNT1 A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_mode) + stop + ChangeAltMode2: + TNT1 A 0 + stop + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_Marine/6_PlasmaRifle.dec b/pksrc/lscripts/Weapons_Marine/6_PlasmaRifle.dec new file mode 100644 index 0000000..0db8046 --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/6_PlasmaRifle.dec @@ -0,0 +1,208 @@ +actor Lith_ParticleBeam : Lith_PlasmaLaze +{ + RenderStyle "Add" + Scale 0.4 + Mass 0 + Translation "112:127=192:207", "224:231=192:194", "160:167=192:207", "249:249=196:196" + DamageType "Lith_PlayerMissile" + + +FORCEXYBILLBOARD + +NOTIMEFREEZE + +FORCERADIUSDMG + + states + { + Spawn: + BLLT A 0 + BLLT A 2 A_Explode(4, 256, 0) + BFS1 A 1 A_FadeOut(0.1) + wait + } +} + +actor Lith_PartBeamShotsFired : Inventory +{ + Inventory.MaxAmount 5 +} + +actor Lith_PlasmaRifle : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_PlasmaRifle" + Weapon.UpSound "weapons/plasma/draw" + Weapon.SlotNumber 6 + Weapon.SlotPriority 1 + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_PlasmaRiflePickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + PLSG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + PLSG A 0 A_StopSound(CHAN_7) + PLSG A 0 A_StopSound(CHAN_6) + DeselectLoop: + PLSG AAA 0 A_Lower + PLSG A 1 + loop + + Select: + PLSG AAA 0 A_Raise + PLSG A 1 + loop + + Fire: + PLSG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PlasLaser), "FireLaser") + PLSG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PartBeam), "FireParticleBeam") + FireReal: + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PLSK A 0 A_TakeInventory("Lith_PlasmaAmmo", 35, TIF_NOTAKEINFINITE) + PLSG A 0 A_GunFlash("DummyFlash") + PLSG A 0 A_PlaySound("weapons/plasma/fire", CHAN_WEAPON) + PLSG AAAA 0 A_FireCustomMissile("Lith_PlasmaBolt", + CallACS("Lith_CircleSpread", 5 * IFIX, 3 * IFIX, false) / FIX, + 0, 0, -9, 0, + CallACS("Lith_CircleSpread", 0, 0, true) / FIX) + PLSJ A 1 offset(0, 37) bright + PLSJ B 1 offset(0, 36) bright + PLSJ C 1 offset(0, 32) + PLSG AAAA 1 A_ReFire + goto Ready + + FireLaserReal: + TNT1 A 0 A_AlertMonsters + TNT1 A 0 A_FireBullets(0, 0, 1, 0, "Lith_PlasmaHit", FBF_NORANDOMPUFFZ) + TNT1 A 0 A_RailAttack(CallACS("LPData", pdata_upgrade, UPGR_TorgueMode) ? 1 : 15, 0, false, "None", "Red", RGF_SILENT|RGF_FULLBRIGHT|RGF_NOPIERCING, 0, "Lith_Dummy", 0, 0, 0, 1, 3, 0, "Lith_PlasmaLaze") + stop + + FireLaser: + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PLSK A 0 A_TakeInventory("Lith_PlasmaAmmo", 35, TIF_NOTAKEINFINITE) + PLSG A 0 A_PlaySound("weapons/plasma/laser/fire_start") + PLSG A 0 A_PlaySound("weapons/plasma/laser/fire_loop", CHAN_7, 0.4, true) + PLSG A 0 A_PlaySound("weapons/plasma/laser/fire_hum", CHAN_6, 0.4, true) + PLSG AA 0 A_GunFlash("FireLaserReal") + PLSK A 2 offset(0, 35) bright A_GunFlash("FireLaserReal") + FireLaserLoop: + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PLSK A 0 A_TakeInventory("Lith_PlasmaAmmo", 35, TIF_NOTAKEINFINITE) + PLSK B 1 offset(0, 39) bright A_GunFlash("FireLaserReal") + PLSK BB 1 offset(-2, 38) bright A_GunFlash("FireLaserReal") + PLSK B 1 offset(1, 37) bright A_GunFlash("FireLaserReal") + PLSK B 1 offset(-1, 40) bright A_GunFlash("FireLaserReal") + PLSK CC 1 offset(1, 37) bright A_ReFire("FireLaserLoop") + FireLaserDone: + PLSG A 0 A_StopSound(CHAN_7) + PLSG A 0 A_StopSound(CHAN_6) + PLSG A 1 offset(1, 36) A_PlaySound("weapons/plasma/laser/fire_end") + PLSG A 1 offset(0, 35) + PLSG A 1 offset(0, 34) + PLSG A 1 offset(0, 33) + PLSG A 1 offset(0, 32) + PLSG A 1 + goto Ready + + FireParticleBeam: + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PLSG A 0 A_JumpIfInventory("Lith_PartBeamShotsFired", 0, "Reload") + PLSG A 3 A_PlaySound("weapons/plasma/part/charge", CHAN_6) + PLSG A 3 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 5, "Lith_Dummy", 0, 0, 0, 1, 0.75, 0, "None", -2) + PLSG A 3 + PLSG A 3 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 4, "Lith_Dummy", 0, 0, 0, 1, 0.75, 0, "None", -2) + PLSG A 2 + PLSG A 3 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 3, "Lith_Dummy", 0, 0, 0, 1, 0.75, 0, "None", -2) + PLSG A 1 + PLSG A 3 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 2, "Lith_Dummy", 0, 0, 0, 1, 0.75, 0, "None", -2) + PLSG A 1 + PLSG A 3 A_RailAttack(0, 0, false, "None", "White", RGF_SILENT|RGF_FULLBRIGHT, 2, "Lith_Dummy", 0, 0, 0, 1, 0.75, 0, "None", -2) + PLSK A 0 A_TakeInventory("Lith_PlasmaAmmo", 200, TIF_NOTAKEINFINITE) + PLSG A 0 A_GiveInventory("Lith_PartBeamShotsFired", 1) + PLSG A 0 A_AlertMonsters + PLSG A 0 A_PlaySound("weapons/plasma/part/fire", CHAN_WEAPON) + PLSG A 0 A_RailAttack(300, 0, false, "None", "Blue", RGF_SILENT|RGF_FULLBRIGHT, 0, "Lith_Dummy", 0, 0, 0, 0, 16, 0, "Lith_ParticleBeam", -8) + PLSF A 1 bright offset(0, 55) + PLSF A 1 bright offset(0, 45) + PLSF B 1 bright offset(0, 37) + PLSF B 1 bright offset(0, 36) + PLSF C 1 bright offset(0, 35) + PLSG A 1 offset(0, 35) + PLSG A 3 offset(0, 34) + PLSG A 4 offset(0, 33) + PLSG A 5 offset(0, 32) + PLSG AAAAA 1 A_ReFire + goto Ready + + FireEmpty: + PLSG A 0 A_StopSound(CHAN_7) + PLSG A 0 A_StopSound(CHAN_6) + PLSG A 1 A_PlaySound("weapons/plasma/empty", 7) + PLSG A 1 offset(0, 37) + PLSG A 1 offset(0, 36) + PLSG A 1 offset(0, 35) + PLSG A 1 offset(0, 34) + PLSG A 1 offset(0, 32) + PLSG A 1 A_ReFire + goto Ready + + AltFire: + PLSG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PlasLaser), "FireReal") + PLSG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PartBeam), "FireReal") + PLSG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PLSK A 0 A_TakeInventory("Lith_PlasmaAmmo", 90, TIF_NOTAKEINFINITE) + PLSK A 0 A_GunFlash("DummyFlash") + PLSK A 0 A_FireCustomMissile("Lith_PenetratingPlasmaBolt", 0, 0, 0, -9) + PLSK A 0 A_FireCustomMissile("Lith_PenetratingPlasmaBolt", frandom(-2.7, -1.9), 0, 0, -9) + PLSK A 0 A_FireCustomMissile("Lith_PenetratingPlasmaBolt", frandom(2.7, 1.9), 0, 0, -9) + PLSK A 1 offset(0, 37) bright A_PlaySound("weapons/plasma/altfire", CHAN_WEAPON) + PLSK C 1 offset(0, 36) bright + PLSG A 1 offset(0, 35) + PLSG A 1 offset(0, 34) + PLSG A 1 offset(0, 32) + PLSG AAAA 1 A_ReFire + Goto Ready + + Reload: + TNT1 A 0 A_JumpIfInventory("Lith_PartBeamShotsFired", 1, 1) + goto Ready + PLSG A 1 + PLSG A 1 offset(-2, 34) + PLSG A 1 offset(-4, 37) + PLSG A 1 offset(-9, 43) A_PlaySound("weapons/plasma/part/reloadout", CHAN_6) + PLSG A 1 offset(-12, 47) + PLSG A 1 offset(-14, 52) + PLSG A 2 offset(-12, 55) + PLSG A 3 offset(-11, 57) + PLSG A 8 offset(-10, 60) + PLSG A 8 offset(-11, 60) + PLSG A 0 A_TakeInventory("Lith_PartBeamShotsFired", 999) + PLSG A 2 offset(-13, 59) A_PlaySound("weapons/plasma/part/reloadin", CHAN_7) + PLSG A 2 offset(-11, 49) + PLSG A 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 7 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + PLSG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB) + PLSG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB) + PLSG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB) + PLSG A 4 A_WeaponReady(WRF_NOBOB) + goto Ready + } +} diff --git a/pksrc/lscripts/Weapons_Marine/7_OmegaCannon.dec b/pksrc/lscripts/Weapons_Marine/7_OmegaCannon.dec new file mode 100644 index 0000000..0ac755e --- /dev/null +++ b/pksrc/lscripts/Weapons_Marine/7_OmegaCannon.dec @@ -0,0 +1,247 @@ +actor Lith_GTFO : Inventory +{ + Inventory.MaxAmount 1 +} + +actor Lith_OmegaRailDummy : Lith_Dummy +{ + Decal "Scorch" +} + +actor Lith_BFG9000 : Lith_MWeapon +{ + Tag "$LITH_TXT_INFO_SHORT_BFG9000" + Weapon.UpSound "weapons/cannon/draw" + Weapon.SlotNumber 7 + Weapon.SlotPriority 1 + Weapon.BobStyle "InverseSmooth" + Weapon.BobRangeX 1.7 + Weapon.BobSpeed 0.7 + + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_BFG9000Pickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + CNNG A 0 A_TakeInventory("Lith_GTFO", 999) + CNNG A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + CNNG A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + CNNG A 0 A_ZoomFactor(1.0) + DeselectLoop: + CNNG AAA 0 A_Lower + CNNG A 1 + loop + + Select: + CNNG A 0 A_ZoomFactor(1.0) + SelectLoop: + CNNG AA 0 A_Raise + CNNG A 1 + loop + + Fire: + CNNG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_OmegaRail), "FireRail") + CNNG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PunctCannon), "FirePunct") + CNNG A 0 A_JumpIfInventory("Lith_CannonAmmo", 1, 1) + goto FireEmpty + CNNG A 0 A_TakeInventory("Lith_CannonAmmo", 1, TIF_NOTAKEINFINITE) + CNNG A 0 A_AlertMonsters + goto FireCannonSmall + + AltFire: + CNNG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_OmegaRail), "Ready") + CNNG A 0 A_JumpIf(CallACS("LPData", pdata_upgrade, UPGR_PunctCannon), "ScopeToggle") + // + CNNG A 0 A_JumpIfInventory("Lith_CannonAmmo", 2, 1) + goto FireEmpty + CNNG A 0 A_TakeInventory("Lith_CannonAmmo", 2, TIF_NOTAKEINFINITE) + CNNG A 0 A_AlertMonsters + goto FireCannonBig + + FireEmpty: + "####" A 2 A_PlaySound("weapons/cannon/empty", 7) + "####" A 1 offset(0, 28) + "####" A 1 offset(0, 29) + "####" A 1 offset(0, 32) + "####" A 1 offset(0, 35) + "####" A 1 offset(0, 40) + "####" A 1 offset(0, 42) + "####" A 1 offset(0, 43) + "####" A 1 offset(0, 44) + "####" A 1 offset(0, 40) + "####" A 1 offset(0, 37) + "####" A 1 offset(0, 34) + "####" A 1 offset(0, 32) + "####" A 1 A_ReFire + "####" A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + + FireCannonBig: + CNNG A 10 A_PlaySound("weapons/cannon/prepare", CHAN_WEAPON) + CNNG A 1 bright + CNNG A 1 bright offset(-1, 33) + CNNG A 1 bright offset(-1, 34) + CNNG A 1 bright offset(-1, 36) + CNNG A 2 bright offset(1, 37) + CNNG A 3 bright offset(1, 38) + CNNG A 0 bright A_GunFlash("DummyFlash") + CNNG A 0 bright A_PlaySound("weapons/cannon/fire", CHAN_5) + CNNG C 2 bright offset(0, 62) A_FireCustomMissile("Lith_CannonBall", 0, false, 0, -24) + CNNG C 1 bright offset(0, 57) + CNNG C 1 bright offset(0, 47) + CNNG C 1 bright offset(0, 44) + CNNG B 1 bright offset(0, 40) + CNNG B 1 bright offset(0, 37) + CNNG B 1 bright offset(0, 35) + CNNG B 1 bright offset(0, 32) + CNNG AAAAAAAAAAAAAAAAAAAA 1 offset(0, 32) A_ReFire + goto Ready + + FireCannonSmall: + CNNG A 0 bright A_PlaySound("weapons/cannon/fire", CHAN_5) + CNNG C 1 bright offset(0, 48) A_GunFlash("DummyFlash") + CNNG C 1 bright offset(0, 57) A_FireCustomMissile("Lith_SmallCannonBall", 0, false, 0, -16) + CNNG C 1 bright offset(0, 55) + CNNG C 1 bright offset(0, 53) + CNNG C 1 bright offset(0, 49) + CNNG B 1 bright offset(0, 45) + CNNG B 1 bright offset(0, 40) + CNNG B 1 bright offset(0, 37) + CNNG A 1 bright offset(0, 34) + CNNG A 1 offset(0, 32) + CNNG A 8 + CNNG AAAAAAAAAA 1 A_ReFire + goto Ready + + FireRail: + "####" A 0 A_JumpIfInventory("Lith_CannonAmmo", 2, 1) + goto FireEmpty + CNNG A 5 offset(-1, 32) A_PlaySound("weapons/rail/charge", CHAN_5) + CNNG A 5 offset(0, 32) + CNNG A 5 offset(1, 32) + CNNG A 5 offset(0, 33) + CNNG A 5 offset(-1, 33) + CNNG A 5 offset(0, 33) + CNNG A 5 offset(1, 33) + CNNG A 5 offset(0, 33) + FireRailLoop: + "####" A 0 A_JumpIfInventory("Lith_CannonAmmo", 2, 1) + goto Ready + CNNG A 0 A_TakeInventory("Lith_CannonAmmo", 2, TIF_NOTAKEINFINITE) + CNNG A 0 A_GunFlash("DummyFlash") + CNNG A 1 offset(0, 34) + CNNG A 1 offset(0, 35) + CNNG A 1 bright offset(0, 45) + CNNG B 1 bright offset(0, 55) A_PlaySound("weapons/rail/fire", CHAN_WEAPON) + CNNG B 1 bright offset(0, 56) + CNNG B 0 A_FireCustomMissile("Lith_OmegaRailHax", 0, false, 0, -19) + CNNG C 1 bright offset(0, 57) A_RailAttack(500, 0, false, "None", "None", RGF_SILENT, 0, "Lith_OmegaRailDummy", 0, 0, 0, 0, 0.9, 0, "Lith_OmegaRailBeam", -19) + CNNG C 1 bright offset(0, 47) + CNNG A 1 offset(0, 42) + CNNG A 2 offset(0, 37) + CNNG A 3 offset(0, 35) + CNNG A 4 offset(0, 33) + CNNG AAAAAA 1 offset(0, 32) A_ReFire("FireRailLoop") + goto Ready + AltReady: + SCOP A 0 A_JumpIfInventory("Lith_GTFO", 1, "ScopeOut") + SCOP A 1 A_WeaponReady(WRF_NOBOB) + loop + + OverlayFirePunct: + TNT1 A 0 A_AlertMonsters + TNT1 A 0 ACS_NamedExecuteAlways("Lith_PunctuatorFire", 0) + stop + FirePunct: + "####" A 0 A_JumpIfInventory("Lith_CannonAmmo", 2, 1) + goto FireEmpty + CNNG A 0 A_AlertMonsters + CNNG A 0 A_TakeInventory("Lith_CannonAmmo", 2, TIF_NOTAKEINFINITE) + CNNG A 0 A_PlaySound("weapons/punct/fire", CHAN_WEAPON) + CNNG A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FirePunct_Scoped") + CNNG A 3 + CNNG A 1 bright offset(0, 36) + CNNG B 1 bright offset(0, 38) + CNNG B 1 bright offset(0, 49) + CNNG C 1 bright offset(0, 52) A_GunFlash("OverlayFirePunct") + CNNG C 1 bright offset(0, 37) + CNNG A 1 bright offset(0, 36) + CNNG A 2 bright offset(0, 35) + CNNG AAAAAAAAAA 1 offset(0, 34) A_ReFire + goto LoadAnim + FirePunct_Scoped: + SCOP A 3 + SCOP A 1 A_ZoomFactor((CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.80) + SCOP A 1 A_ZoomFactor((CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.85) + SCOP A 1 bright A_ZoomFactor((CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.90) + SCOP A 0 bright A_ZoomFactor((CallACS("LPData", pdata_weapon_zoom) / FIX) * 0.95) + SCOP A 1 bright A_GunFlash("OverlayFirePunct") + SCOP A 1 bright + SCOP A 1 bright + SCOP A 1 bright + SCOP A 1 bright + SCOP A 0 A_ZoomFactor(CallACS("LPData", pdata_weapon_zoom) / FIX) + SCOP AAAAAAAAAA 1 A_ReFire + goto LoadAnim + + LoadAnim: + "####" A 1 offset(1, 32) + "####" A 1 offset(3, 32) + "####" A 1 offset(4, 32) + "####" A 1 offset(8, 38) + "####" A 1 offset(12, 45) + "####" A 1 offset(16, 53) + "####" A 1 offset(19, 60) + "####" A 1 offset(21, 64) + "####" A 1 offset(23, 67) + "####" A 1 offset(22, 69) A_PlaySound("weapons/punct/load", CHAN_5) + "####" A 1 offset(19, 70) + "####" A 7 offset(18, 72) + "####" A 1 offset(17, 69) + "####" A 1 offset(19, 67) + "####" A 1 offset(20, 66) + "####" A 1 offset(21, 62) + "####" A 1 offset(20, 60) + "####" A 1 offset(21, 63) + "####" A 1 offset(23, 66) + "####" A 1 offset(24, 68) + "####" A 1 offset(25, 63) + "####" A 1 offset(24, 59) + "####" A 1 offset(22, 57) + "####" A 1 offset(20, 54) + "####" A 1 offset(16, 49) + "####" A 1 offset(12, 44) + "####" A 1 offset(10, 42) + "####" A 1 offset(8, 40) + "####" A 1 offset(5, 38) + "####" A 1 offset(2, 35) + "####" A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "AltReady") + goto Ready + + ScopeToggle: + "####" A 1 + "####" A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ScopeOut") + goto ScopeIn + ScopeOut: + "####" A 0 A_TakeInventory("Lith_WeaponScopedToken", 1) + "####" A 0 A_ZoomFactor(1.0, ZOOM_INSTANT) + "####" A 0 A_PlaySound("weapons/shotgun/zoomout", 6) + goto Ready + ScopeIn: + "####" A 0 A_GiveInventory("Lith_WeaponScopedToken", 1) + "####" A 0 A_ZoomFactor(CallACS("LPData", pdata_weapon_zoom) / FIX) + "####" A 0 A_PlaySound("weapons/shotgun/zoomin", 6) + goto AltReady + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_Outcasts/1_ChargeFist.dec b/pksrc/lscripts/Weapons_Outcasts/1_ChargeFist.dec new file mode 100644 index 0000000..eedaf57 --- /dev/null +++ b/pksrc/lscripts/Weapons_Outcasts/1_ChargeFist.dec @@ -0,0 +1,155 @@ +actor Lith_FistCharge : Inventory +{ + Inventory.MaxAmount 0x7FFFFFFF // Yes. +} + +actor Lith_FistHit : Powerup // :^) +{ + Powerup.Duration 5 +} + +actor Lith_ChargeFistQuakerOats +{ + +NOINTERACTION + +NOGRAVITY + + states + { + Spawn: + TNT1 A 0 + TNT1 A 2 A_Quake(5, 2, 0, 128, "") + TNT1 A 2 A_Quake(2, 2, 0, 128, "") + TNT1 A 2 A_Quake(1, 2, 0, 128, "") + stop + } +} + +actor Lith_ChargeFistPuff +{ + RenderStyle "Translucent" + Alpha 0.6 + + +NOINTERACTION + +HITTRACER + +PUFFONACTORS + +PUFFGETSOWNER + + states + { + Crash: + Spawn: + TNT1 A 0 + TNT1 A 0 A_GiveInventory("Lith_FistHit", 1, AAPTR_TARGET) + goto Animation + XDeath: + TNT1 A 0 + TNT1 A 0 A_GiveInventory("Lith_FistHit", 1, AAPTR_TARGET) + TNT1 A 0 A_PlaySound("weapons/cfist/hit", CHAN_WEAPON, 1, 0, 1.3) // much squish loud yes + TNT1 A 0 A_PlaySound("weapons/cfist/hit", CHAN_ITEM, 1, 0, 1.3) + goto Animation + Animation: + TNT1 A 0 A_SpawnItemEx("Lith_ChargeFistQuakerOats", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION) + TNT1 A 0 A_PlaySound("weapons/cfist/hitwall", CHAN_BODY, 1, 0, 0.9) + FHFX STUVW 3 + stop + } +} + +actor Lith_ChargeFist : Lith_Weapon +{ + Tag "$LITH_TXT_INFO_SHORT_ChargeFist" + Weapon.Kickback 100 + Weapon.SlotNumber 1 + Weapon.SlotPriority 1 + DamageType "Lith_Melee" + + +WEAPON.MELEEWEAPON + +WEAPON.NOAUTOFIRE + + states + { + Spawn: + TNT1 A 0 + TNT1 A 0 A_SpawnItemEx("Lith_ChainsawPickup", 0,0,0, 0,0,0, 0, Lith_PF) + stop + + Ready: + TNT1 A 0 A_TakeInventory("Lith_FistCharge", 0x7FFFFFFF) + TNT1 A 1 A_WeaponReady(CallACS("Lith_GetWRF")) + loop + + Deselect: + TNT1 A 0 A_StopSound(CHAN_5) + TNT1 A 0 A_Lower + loop + Select: + TNT1 A 0 A_Raise + loop + + Fire: + TNT1 A 9 A_GiveInventory("Lith_FistCharge", 35) + TNT1 A 0 A_ReFire("Fire1") + goto Release1 + Fire1: + TNT1 A 0 A_GiveInventory("Lith_FistCharge", 35) + CFIS A 0 A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_marine, "Fire2") + CCFS A 0 //A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_cybermage, "Fire2") + Fire2: + "####" A 1 A_PlaySound("weapons/cfist/ready", CHAN_6) + "####" B 1 A_PlaySound("weapons/cfist/charge", CHAN_5, 1, true) + "####" C 2 + "####" D 2 + "####" E 3 + "####" F 4 + "####" G 7 + goto WaitForRelease + WaitForRelease: + "####" G 1 A_GiveInventory("Lith_FistCharge", 2) + "####" G 1 A_ReFire("WaitForRelease") + Release: + TNT1 A 0 A_PlaySound("weapons/cfist/chargeend", CHAN_5) + TNT1 A 0 A_GunFlash("SekritHax", GFF_NOEXTCHANGE) // OH NO NOT yholehax + Release1: + CFI2 A 0 A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_marine, "Release2") + CCF2 A 0 //A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_cybermage, "Release2") + // GOTTA RELEASE FAST + Release2: + "####" A 0 A_ChangeVelocity(cos(pitch) * 3, 0, sin(pitch) * -3, 1) + "####" A 0 A_AlertMonsters(128) + "####" A 1 A_PlaySound("weapons/cfist/fire", CHAN_6) + "####" B 1 + "####" A 0 A_CustomPunch(CallACS("Lith_ChargeFistDamage"), true, 0, "Lith_ChargeFistPuff", 128) + "####" A 0 A_JumpIfInventory("Lith_FistHit", 1, "HitRecoil") + "####" C 2 // Missed, so you quickly bring your fist back + "####" D 5 + "####" H 2 + "####" I 1 + "####" J 1 + "####" K 1 + TNT1 A 1 + TNT1 AAAAAAAAAA 1 A_ReFire + goto Ready + HitRecoil: + "####" A 0 A_AlertMonsters + "####" A 0 A_ChangeVelocity(cos(pitch) * -2, 0, sin(pitch) * 2, 1) + "####" C 1 + "####" DEFG 1 // Shaking from the force of the impact + "####" DEFG 2 + "####" H 2 + "####" I 2 + "####" J 2 + "####" K 2 + TNT1 A 1 + TNT1 AAAAAAAAAA 1 A_ReFire + goto Ready + + SekritHax: // the crimera has struck again + CFIS A 0 A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_marine, "SekritHax2") + CCFS A 0 //A_JumpIf(CallACS("LPData", pdata_pclass) == pcl_cybermage, "SekritHax2") + SekritHax2: + "####" HI 1 + stop + } +} + +// EOF diff --git a/pksrc/lscripts/Weapons_Outcasts/5_MissileLauncher.dec b/pksrc/lscripts/Weapons_Outcasts/5_MissileLauncher.dec new file mode 100644 index 0000000..6c75d6c --- /dev/null +++ b/pksrc/lscripts/Weapons_Outcasts/5_MissileLauncher.dec @@ -0,0 +1,162 @@ +actor Lith_MissileShotsFired : Inventory +{ + Inventory.MaxAmount 10 +} + +actor Lith_MissileLauncher : Lith_Weapon +{ + Tag "$LITH_TXT_INFO_SHORT_MissileLauncher" + Weapon.UpSound "weapons/missile/draw" + Weapon.SlotNumber 5 + Weapon.SlotPriority 0.9 + Weapon.BobStyle "Smooth" + Weapon.BobSpeed 1.3 + Weapon.BobRangeY 1.1 + Weapon.BobRangeX 0.9 + + const int lvar_reset = 1; + + states + { + Ready: + MISG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + MISG AAA 0 A_Lower + MISG A 1 + loop + Select: + MISG AAA 0 A_Raise + MISG A 1 + loop + + Reload: + MISG A 0 A_JumpIfInventory("Lith_MissileShotsFired", 1, 1) + goto Ready + MISG A 1 + MISG A 1 offset(-2, 34) + MISG A 1 offset(-4, 37) + MISG A 1 offset(-9, 43) A_PlaySound("weapons/missile/reloadout", CHAN_6) + MISG A 1 offset(-12, 47) + MISG A 1 offset(-14, 52) + MISG A 2 offset(-12, 55) + MISG A 3 offset(-11, 57) + MISG A 8 offset(-10, 60) + MISG A 8 offset(-11, 60) + MISG A 0 A_TakeInventory("Lith_MissileShotsFired", 999) + MISG A 2 offset(-13, 59) A_PlaySound("weapons/missile/reloadin", CHAN_7) + MISG A 2 offset(-11, 49) + MISG A 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 7 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(3, 56) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(8, 52) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(10, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(8, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(7, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(5, 43) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 2 offset(3, 40) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE) + MISG A 3 offset(2, 39) A_WeaponReady(WRF_NOBOB) + MISG A 3 offset(1, 37) A_WeaponReady(WRF_NOBOB) + MISG A 4 offset(1, 34) A_WeaponReady(WRF_NOBOB) + MISG A 4 A_WeaponReady(WRF_NOBOB) + goto Ready + + Fire: + MISG A 0 ACS_NamedExecuteWithResult("LPVarSet", lvar_reset, 0) + Fire1: + MISG A 1 + MISG A 0 A_JumpIfInventory("Lith_RocketAmmo", 1, 1) + goto FireEmpty + MISG A 0 A_JumpIfInventory("Lith_MissileShotsFired", 0, "Reload") + MISG A 0 A_GiveInventory("Lith_MissileShotsFired", 1) + + MISG A 0 A_AlertMonsters + MISG A 0 A_PlaySound("weapons/missile/fire", CHAN_WEAPON) + MISG A 0 A_TakeInventory("Lith_RocketAmmo", 1, TIF_NOTAKEINFINITE) + MISG AAA 0 A_FireCustomMissile("Lith_MiniMissile", frandom(-7, 7), false, frandom(-2, 2), frandom(-2, 2), 0, frandom(-5, 5)) + MISG A 0 ACS_NamedExecuteWithResult("LPVarMin", lvar_reset, 5) + MISG A 0 A_JumpIf(CallACS("LPVarGet", lvar_reset) >= 5, "FireAnim6") // fuck you eat crime + MISG A 0 A_JumpIf(CallACS("LPVarGet", lvar_reset) >= 4, "FireAnim5") + MISG A 0 A_JumpIf(CallACS("LPVarGet", lvar_reset) >= 3, "FireAnim4") + MISG A 0 A_JumpIf(CallACS("LPVarGet", lvar_reset) >= 2, "FireAnim3") + MISG A 0 A_JumpIf(CallACS("LPVarGet", lvar_reset) >= 1, "FireAnim2") + FireAnim: // choke on the crime + MISG B 1 bright offset(0, 32) + MISG C 1 bright offset(0, 33) + MISG D 1 bright offset(0, 34) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting + FireAnim2: // be consumed by the crime + MISG B 1 bright offset(0, 33) + MISG C 1 bright offset(0, 34) + MISG D 1 bright offset(0, 35) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting2 + FireAnim3: // fall victim to the crime + MISG B 1 bright offset(0, 34) + MISG C 1 bright offset(0, 35) + MISG D 1 bright offset(0, 36) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting3 + FireAnim4: // crime is love + MISG B 1 bright offset(0, 35) + MISG C 1 bright offset(0, 36) + MISG D 1 bright offset(0, 37) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting4 + FireAnim5: // crime is life + MISG B 1 bright offset(0, 36) + MISG C 1 bright offset(0, 37) + MISG D 1 bright offset(0, 38) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting5 + FireAnim6: // worship the crime, for it brings graf salt + MISG B 1 bright offset(0, 37) + MISG C 1 bright offset(0, 38) + MISG D 1 bright offset(0, 39) + MISG A 0 ACS_NamedExecuteWithResult("LPVarInc", lvar_reset) + goto AnimResetting6 + + AnimResetting6: // oh yessssss + MISG A 1 offset(0, 39) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + AnimResetting5: + MISG A 1 offset(0, 37) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + AnimResetting4: + MISG A 1 offset(0, 36) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + AnimResetting3: + MISG A 1 offset(0, 35) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + AnimResetting2: + MISG A 1 offset(0, 34) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + AnimResetting: + MISG A 1 offset(0, 33) A_ReFire("Fire1") + MISG A 0 ACS_NamedExecuteWithResult("LPVarDec", lvar_reset) + MISG AAAAA 1 offset(0, 32) A_ReFire("Fire1") + goto Ready + + FireEmpty: // fuck u i ain't doing more + MISG A 1 + MISG A 2 offset(0, 41) + MISG A 1 offset(0, 45) + MISG A 1 offset(0, 43) + MISG A 1 offset(0, 40) A_PlaySound("weapons/missile/empty", CHAN_5) + MISG A 1 offset(0, 38) + MISG A 1 offset(0, 36) + MISG A 1 offset(0, 33) + MISG A 1 offset(0, 32) + MISG A 5 + MISG AAAA 1 A_ReFire + goto Ready + } +} + +// EOF + diff --git a/pksrc/lscripts/Weapons_Outcasts/6_PlasmaDiffuser.dec b/pksrc/lscripts/Weapons_Outcasts/6_PlasmaDiffuser.dec new file mode 100644 index 0000000..ec5231a --- /dev/null +++ b/pksrc/lscripts/Weapons_Outcasts/6_PlasmaDiffuser.dec @@ -0,0 +1,84 @@ +actor Lith_DiffPlasma : Lith_PlasmaBolt +{ + Damage (8*random(6,9)) + Speed 25 + DeathSound "weapons/plasdiff/explode" + + states + { + Spawn: + TNT1 A 0 + Trail: + TNT1 A 0 A_JumpIf(user_trailstep >= 5, "TrailDone") + TNT1 A 0 A_SetUserVar(user_trailstep, user_trailstep + 1) + TNT1 A 0 A_SpawnItemEx("Lith_PlasmaBoltTrail_Blue", + ((user_trailstep * 10.0) * velx) / -35.0, + -((user_trailstep * 10.0) * vely) / -35.0, + 2.0 + ((user_trailstep * 10.0) * velz) / -35.0, + 0, 0, 0, + 0, SXF_ABSOLUTEANGLE | SXF_NOCHECKPOSITION) + loop + TrailDone: + TNT1 A 0 A_SetUserVar(user_trailstep, 0) + goto Step + Step: + TNT1 A 1 + TNT1 A 0 A_Jump(256, "Trail") + Death: + PLSE ABCDE 4 bright + stop + } +} + +actor Lith_PlasmaDiffuser : Lith_Weapon +{ + Tag "$LITH_TXT_INFO_SHORT_PlasmaDiffuser" + Weapon.UpSound "weapons/plasdiff/draw" + Weapon.SlotNumber 6 + Weapon.SlotPriority 0.9 + + states + { + Ready: + PDFG A 1 A_WeaponReady(WRF_ALLOWRELOAD|CallACS("Lith_GetWRF")) + loop + + Deselect: + PDFG AAA 0 A_Lower + PDFG A 1 + loop + + Select: + PDFG AAA 0 A_Raise + PDFG A 1 + loop + + Fire: + PDFG A 0 A_JumpIfInventory("Lith_PlasmaAmmo", 1, 1) + goto FireEmpty + PDFG A 0 A_TakeInventory("Lith_PlasmaAmmo", 60, TIF_NOTAKEINFINITE) + PDFG A 0 A_GunFlash("DummyFlash") + PDFG A 0 A_PlaySound("weapons/plasdiff/fire", CHAN_WEAPON) + PDFG A 0 A_FireCustomMissile("Lith_DiffPlasma", 0, 0, 0, -9) + PDFG A 0 A_Jump(128, 3) + PDFG B 1 offset(0, 40) bright + PDFG A 0 A_Jump(256, 2) + PDFG C 1 offset(0, 40) bright + PDFG "#" 3 offset(0, 35) bright + PDFG A 1 offset(0, 34) bright A_ReFire + PDFG A 1 offset(0, 32) A_ReFire + goto Ready + + FireEmpty: + PDFG A 0 A_StopSound(CHAN_7) + PDFG A 0 A_StopSound(CHAN_6) + PDFG A 1 A_PlaySound("weapons/plasdiff/empty", 7) + PDFG A 1 offset(0, 37) + PDFG A 1 offset(0, 36) + PDFG A 1 offset(0, 35) + PDFG A 1 offset(0, 34) + PDFG A 1 offset(0, 32) + PDFG A 1 A_ReFire + goto Ready + } +} diff --git a/pksrc/mapinfo.txt b/pksrc/mapinfo.txt new file mode 100644 index 0000000..9616d92 --- /dev/null +++ b/pksrc/mapinfo.txt @@ -0,0 +1,278 @@ +// Game Info -----------------------------------------------------------------| + +gameinfo +{ + PlayerClasses = "Lith_MarinePlayer", "Lith_CyberMagePlayer" + DimColor = "Black" + DimAmount = 0.25 + MenuFontColor_Title = "Green" + MenuFontColor_Label = "White" + MenuFontColor_Value = "Purple" + MenuFontColor_Action = "White" + MenuFontColor_Header = "Green" + MenuFontColor_Highlight = "Green" + MenuFontColor_Selection = "Green" + NoRandomPlayerClass = true + BorderFlat = "ZZLITHBG" + AdvisoryTime = 0 + DrawReadThis = false + PauseSign = "PAUSE" + InfoPage = "HELP" + IntermissionCounter = true + IntermissionMusic = "lmusic/alchemis.it" + QuitSound = "misc/quitsound" + PrecacheSounds = "amb/rain", "amb/wind" + PickupColor = "#A0F3A0" + QuitMessages = "$QUITMSG1", "$QUITMSG2", "$QUITMSG3", "$QUITMSG4", "$QUITMSG5", "$QUITMSG6", "$QUITMSG7", + "$QUITMSG8", "$QUITMSG9", "$QUITMSG10", "$QUITMSG11", "$QUITMSG12", "$QUITMSG13", "$QUITMSG14", + "$QUITMSG15", "$QUITMSG16", "$QUITMSG17", "$QUITMSG18", "$QUITMSG19", "$QUITMSG20", "$QUITMSG21", + "$QUITMSG22", "$QUITMSG23", "$QUITMSG24", "$QUITMSG25", "$QUITMSG26", "$QUITMSG27", "$QUITMSG28", + "$QUITMSG29", "$QUITMSG30", "$QUITMSG31", "$QUITMSG32", "$QUITMSG33", "$QUITMSG34", "$QUITMSG35", + "$QUITMSG36", "$QUITMSG37", "$QUITMSG38", "$QUITMSG39", "$QUITMSG40", "$QUITMSG41", "$QUITMSG42", + "$QUITMSG43", "$QUITMSG44", "$QUITMSG45", "$QUITMSG46", "$QUITMSG47", "$QUITMSG48", "$QUITMSG49", + "$QUITMSG50", "$QUITMSG51", "$QUITMSG52", "$QUITMSG53", "$QUITMSG54", "$QUITMSG55", "$QUITMSG56", + "$QUITMSG57", "$QUITMSG58", "$QUITMSG59", "$QUITMSG60", "$QUITMSG61", "$QUITMSG62", "$QUITMSG63", + "$QUITMSG64", "$QUITMSG65", "$QUITMSG66", "$QUITMSG67", "$QUITMSG68", "$QUITMSG69", "$QUITMSG71", + "$QUITMSG72", "$QUITMSG73", "$QUITMSG74", "$QUITMSG75", "$QUITMSG76", "$QUITMSG77", "$QUITMSG78", + "$QUITMSG79", "$QUITMSG80", "$QUITMSG81", "$QUITMSG82", "$QUITMSG83", "$QUITMSG84", "$QUITMSG85", + "$QUITMSG86", "$QUITMSG87", "$QUITMSG88", "$QUITMSG89", "$QUITMSG90", "$QUITMSG91", "$QUITMSG92", + "$QUITMSG93", "$QUITMSG94", "$QUITMSG95", "$QUITMSG96", "$QUITMSG97", "$QUITMSG98", "$QUITMSG99", + "$QUITMSG100", "$QUITMSG101" +} + +// Automap Info --------------------------------------------------------------| + +automap +{ + Base = "Doom" + ShowLocks = true + Background = "#000000" + YourColor = "#00FF00" + WallColor = "#00FF00" + FloorDiffWallColor = "#008800" + CeilingDiffWallColor = "#008800" + SpecialWallColor = "#FF00FF" + GridColor = "#FF0000" +} + +// Skill Info ----------------------------------------------------------------| + +clearskills + +skill tourist +{ + DamageFactor = 0.1 + SpawnFilter = 5 + Name = "$DIFF_TOURIST" + Key = "t" + RespawnTime = 0.5 + EasyBossBrain + EasyKey + MonsterHealth = 0.1 + ArmorFactor = 2 + ACSReturn = 0 + MustConfirm = "$LITH_SKILL_TOURIST" +} + +skill easy +{ + DamageFactor = 0.9 + SpawnFilter = 2 + Name = "$DIFF_EASY" + Key = "b" + Aggressiveness = -0.3 + MonsterHealth = 0.9 + ACSReturn = 1 +} + +skill normal +{ + SpawnFilter = 3 + Name = "$DIFF_NORMAL" + Key = "h" + DefaultSkill + ACSReturn = 2 +} + +skill hard +{ + SpawnFilter = 4 + Name = "$DIFF_HARD" + Key = "u" + ACSReturn = 3 +} + +skill extrahard +{ + SpawnFilter = 5 + Name = "$DIFF_XHARD" + Key = "p" + DamageFactor = 1.05 + Aggressiveness = 0.1 + MustConfirm = "$LITH_SKILL_EXTRAHARD" + + ReplaceActor = "ZombieMan", "Lith_XH_ZombieMan" + ReplaceActor = "ShotgunGuy", "Lith_XH_ShotgunGuy" + ReplaceActor = "ChaingunGuy", "Lith_XH_ChaingunGuy" + ReplaceActor = "DoomImp", "Lith_XH_Imp" + ReplaceActor = "Demon", "Lith_XH_Demon" + ReplaceActor = "Spectre", "Lith_XH_Spectre" + ReplaceActor = "LostSoul", "Lith_XH_LostSoul" + ReplaceActor = "Fatso", "Lith_XH_Mancubus" + ReplaceActor = "Arachnotron", "Lith_XH_Arachnotron" + ReplaceActor = "Cacodemon", "Lith_XH_Cacodemon" + ReplaceActor = "HellKnight", "Lith_XH_HellKnight" + ReplaceActor = "BaronOfHell", "Lith_XH_BaronOfHell" + ReplaceActor = "Revenant", "Lith_XH_Revenant" + ReplaceActor = "PainElemental", "Lith_XH_PainElemental" + ReplaceActor = "Archvile", "Lith_XH_Archvile" + ReplaceActor = "SpiderMastermind", "Lith_XH_SpiderMastermind" + ReplaceActor = "Cyberdemon", "Lith_XH_Cyberdemon" + + ACSReturn = 4 +} + +skill nightmare +{ + DamageFactor = 2 + SpawnFilter = 5 + Name = "$DIFF_NMARE" + Key = "t" + RespawnTime = 0.5 + MonsterHealth = 0.5 + ArmorFactor = 2 + MustConfirm = "$LITH_SKILL_NIGHTMARE" + ACSReturn = 5 +} + +// Map Info ------------------------------------------------------------------| + +map TITLEMAP "Lithium Title" +{ + Sky1 = "LITHSKRD", 0.05 + Sky2 = "LITHSKS1" + Music = "lmusic/Shredder.ogg" + + DoubleSky +} + +map TESTMAP "Test Map" +{ + LevelNum = 18883000 + Sky1 = "LITHBGS4", 0.1 + Sky2 = "LITHSKD2" + Next = 1 + Music = "lmusic/dandalins story.it" + + DoubleSky +} + +map LITHTEND "" +{ + LevelNum = 1911777 + Next = EndSequence, "Lith_EndGameTimeOver" + + NoIntermission +} + +// Intermission Info ---------------------------------------------------------| + +intermission Lith_EndGameTimeOver +{ + Image + { + Background = "flats/ZZLITHBG.png" + Time = -1 + } + + TextScreen + { + TextLump = "end_timeup1.txt" + TextColor = "White" + } + + TextScreen + { + TextLump = "end_timeup2.txt" + TextColor = "White" + } + + TextScreen + { + Text = "You turn off your communications program." + } + + Wiper + { + WipeType = CrossFade + Time = 10 + Background = "flats/ZZLITHBG.png" + } + + Image + { + Background = "flats/ZZLITHBG.png" + Time = 1 + } + + GotoTitle{} +} + +intermission Inter_Cast +{ + Image + { + Background = "flats/ZZLITHBG.png" + Time = -1 + } + + Fader + { + Music = "lmusic/miniwip2.ogg" + DrawConditional = "Lith_MarinePlayer", "lgfx/End/Marine1.png", 0, 0 + DrawConditional = "Lith_CyberMagePlayer", "lgfx/End/CyberMage1.png", 0, 0 + Background = "flats/ZZLITHBG.png" + Time = 10 + FadeType = FadeIn + } + + Image + { + DrawConditional = "Lith_MarinePlayer", "lgfx/End/Marine1.png", 0, 0 + DrawConditional = "Lith_CyberMagePlayer", "lgfx/End/CyberMage1.png", 0, 0 + Background = "flats/ZZLITHBG.png" + } + + Wiper + { + WipeType = Burn + Time = 10 + Background = "graphics/TITLEPIC.png" + } + + TextScreen + { + Background = "graphics/TITLEPIC.png" + TextSpeed = 6 + TextColor = "White" + Text = "The end." + Position = 135, 100 + } + + Wiper + { + WipeType = CrossFade + Time = 10 + Background = "flats/ZZLITHBG.png" + } + + Image + { + Background = "flats/ZZLITHBG.png" + Time = 7 + } + + GotoTitle{} +} + +// EOF diff --git a/pksrc/menudef.txt b/pksrc/menudef.txt new file mode 100644 index 0000000..dbbd2fe --- /dev/null +++ b/pksrc/menudef.txt @@ -0,0 +1,73 @@ +DefaultListMenu +{ + Font "BIGFONT", "DarkGreen", "Green" + Selector "-", -20, 2 + LineSpacing 16 +} + +DefaultOptionMenu +{ + Position -15 +} + +ListMenu "MainMenu" +{ + StaticPatch 190, -10, "LITHTITL" + Position 30, 90 + + TextItem "$MENU_NGAME", "n", "PlayerclassMenu" + ifoption(SwapMenu) + { + TextItem "$MENU_LOADG", "l", "LoadGameMenu" + TextItem "$MENU_SAVEG", "s", "SaveGameMenu" + TextItem "$MENU_OPTION","o", "OptionsMenu" + } + else + { + TextItem "$MENU_OPTION","o", "OptionsMenu" + TextItem "$MENU_LOADG", "l", "LoadGameMenu" + TextItem "$MENU_SAVEG", "s", "SaveGameMenu" + } + TextItem "$MENU_QUITG", "q", "QuitMenu" +} + +ListMenu "PlayerclassMenu" +{ + NetgameMessage "$NEWGAME" + StaticTextCentered 160, 30, "$MENU_CHOOSECLASS" + Position 14, 55 + Font "LTRMFONT" + PlayerDisplay 100, 50, "00 00 00", "00 FF 00" + MouseWindow 14, 55 +} + +ListMenu "EpisodeMenu" +{ + NetgameMessage "$NEWGAME" + StaticTextCentered 160, 30, "$MENU_WHICHEPISODE" + Position 48, 63 +} + +ListMenu "SkillMenu" +{ + StaticTextCentered 160, 30, "$MENU_CHOOSESKILL" + StaticPatch 42, 48, "lgfx/Menu/SkillBack.png" + Position 48, 63 +} + +ListMenu "LoadGameMenu" +{ + NetgameMessage "$LOADNET" + StaticTextCentered 160, -20, "$MENU_LOADG" + Position 80, 54 + Class "LoadMenu" +} + +ListMenu "SaveGameMenu" +{ + StaticTextCentered 160, -20, "$MENU_SAVEG" + Position 80, 54 + Class "SaveMenu" +} + +// EOF diff --git a/pksrc/sbarinfo.txt b/pksrc/sbarinfo.txt new file mode 100644 index 0000000..52599c1 --- /dev/null +++ b/pksrc/sbarinfo.txt @@ -0,0 +1,6 @@ +statusbar fullscreen, fullscreenoffsets {} + +statusbar inventoryfullscreen, fullscreenoffsets + {drawinventorybar Doom, translucent, 1, INDEXFONT, -16+center, 145;} + +// EOF diff --git a/pksrc/sndinfo.cbi b/pksrc/sndinfo.cbi new file mode 100644 index 0000000..82d5abd --- /dev/null +++ b/pksrc/sndinfo.cbi @@ -0,0 +1,49 @@ +player/cbi/open lsounds/Player/CBI/Open.flac // Halo 3 +player/cbi/close lsounds/Player/CBI/Close.flac // 〃 + +player/cbi/buttoncurs lsounds/Player/CBI/ButtonCursor.flac // Rosenkreuzstilette +player/cbi/buttonpress lsounds/Player/CBI/ButtonPress.flac // Doom 3 + +player/cbi/slidertick lsounds/Player/CBI/SliderTick.flac // Phantasy Star Nova + +player/cbi/find lsounds/Player/CBI/Find.flac // Phantasy Star Nova +player/cbi/finddone lsounds/Player/CBI/FindDone.flac // 〃 +player/cbi/findfail lsounds/Player/CBI/FindFail.flac // 〃 + +player/cbi/invcur lsounds/Player/CBI/InvCur.flac // Phantasy Star Nova +player/cbi/invmov lsounds/Player/CBI/InvMov.flac // 〃 + +player/cbi/key1 lsounds/Player/CBI/Key1.flac // ??? +player/cbi/key2 lsounds/Player/CBI/Key2.flac // 〃 +player/cbi/key3 lsounds/Player/CBI/Key3.flac // 〃 + +player/cbi/clickon lsounds/Player/CBI/ClickOn.flac // 3maze - Buttons and Switches +player/cbi/clickoff lsounds/Player/CBI/ClickOff.flac // 〃 +player/cbi/clicklst lsounds/Player/CBI/ClickList.wav // Resident Evil 4 + +player/cbi/auto/toggle lsounds/Player/CBI/AutoGroupToggle.flac // Deus Ex +player/cbi/auto/buy lsounds/Player/CBI/AutoGroupBuy.flac // The Sound Keeper - Dark Sci-Fi UI Sounds +player/cbi/auto/invalid lsounds/Player/CBI/AutoGroupInvalid.flac // Touhou 13 + +player/cbi/dlgopen lsounds/Player/CBI/DialogueOpen.wav // Resident Evil 4 +player/cbi/dlgclick lsounds/Player/CBI/DialogueClick.wav // 〃 + +player/cbi/clickinvalid lsounds/Player/CBI/ClickInvalid.flac // Steam +player/cbi/mail lsounds/Player/CBI/MailReceive.flac // Fallout 4 +player/cbi/tabswitch lsounds/Player/CBI/TabSwitch.flac // 〃 + +player/cbi/scroll lsounds/Player/CBI/Scroll.flac // Mac OS 9 +player/cbi/scrollend lsounds/Player/CBI/ScrollRelease.wav // 〃 + +player/cbi/left lsounds/Player/CBI/Left.wav // Mac OS 9 +player/cbi/right lsounds/Player/CBI/Right.wav // 〃 + +$alias player/cbi/invrem player/cbi/findfail + +$random player/cbi/keypress { + player/cbi/key1 + player/cbi/key2 + player/cbi/key3 +} + +// EOF diff --git a/pksrc/sndinfo.enemies b/pksrc/sndinfo.enemies new file mode 100644 index 0000000..4c6c277 --- /dev/null +++ b/pksrc/sndinfo.enemies @@ -0,0 +1,59 @@ +// +// Zombies +// +enemies/zombie/ready lsounds/ZombieMan/Ready.flac // Fallout 3 +enemies/zombie/fire lsounds/ZombieMan/Fire.flac // Killing Floor +$attenuation enemies/zombie/fire 0.5 +$limit enemies/zombie/fire 0 + +enemies/shotguy/ready lsounds/ShotGuy/Ready.flac // Fallout: New Vegas +enemies/shotguy/fire lsounds/ShotGuy/Fire.flac // Killing Floor +$attenuation enemies/shotguy/fire 0.5 +$limit enemies/shotguy/fire 0 + +enemies/chainguy/fire lsounds/ChaingunGuy/Fire.flac // Killing Floor +enemies/chainguy/bolt lsounds/ChaingunGuy/Bolt.flac // 〃 +enemies/chainguy/boltb lsounds/ChaingunGuy/BoltBack.flac // 〃 +enemies/chainguy/boltf lsounds/ChaingunGuy/BoltForward.flac // 〃 +$attenuation enemies/chainguy/fire 0.5 +$limit enemies/chainguy/fire 0 + +// +// Mancubus +// +enemies/mancubus/fire lsounds/Mancubus/Fire.flac // FEAR, Doom +$attenuation enemies/mancubus/fire 0.5 + +// +// Hell Knight +// +enemies/hellknight/throw lsounds/HellKnight/Throw.flac // Touhou 7 + +// +// Spider Mastermind +// +enemies/spiderdemon/ready lsounds/SpiderMastermind/Arm.flac // ??? +enemies/spiderdemon/fire lsounds/SpiderMastermind/Fire.flac // FEAR +enemies/spiderdemon/firestop lsounds/SpiderMastermind/FireStop.flac // 〃 + +// +// Cyberdemon +// +enemies/cyberdemon/ready lsounds/Cyberdemon/Ready.flac // FEAR +enemies/cyberdemon/fire lsounds/Cyberdemon/Fire.flac // 〃 +enemies/cyberdemon/firedone lsounds/Cyberdemon/FireDone.flac // 〃 +$attenuation enemies/cyberdemon/ready 0.3 +$attenuation enemies/cyberdemon/fire 0.25 +$attenuation enemies/cyberdemon/firedone 0.25 + +// +// Ophidian +// +enemies/ophidian/ice lsounds/Ophidian/IceAttack.flac // Touhou 9 +enemies/ophidian/fire lsounds/Mancubus/Fire.flac // FEAR, Doom +$limit ophidian/ice 0 +$limit ophidian/fire 0 +$attenuation ophidian/ice 0.6 +$attenuation ophidian/fire 0.6 + +// EOF diff --git a/pksrc/sndinfo.marathon b/pksrc/sndinfo.marathon new file mode 100644 index 0000000..13aa5c2 --- /dev/null +++ b/pksrc/sndinfo.marathon @@ -0,0 +1,22 @@ +// All sounds from Marathon Trilogy + +marathon/pickup lsounds/Marathon/Pickup.flac +marathon/explode lsounds/Marathon/Explode.flac +marathon/hitsolid lsounds/Marathon/HitSolid.flac + +marathon/rifle/fire lsounds/Marathon/RifleFire.flac +marathon/rifle/grenade lsounds/Marathon/GrenadeLaunch.flac +marathon/rifle/reload lsounds/Marathon/RifleReload.flac + +marathon/hitwall1 lsounds/Marathon/HitWall1.flac +marathon/hitwall2 lsounds/Marathon/HitWall2.flac +marathon/hitwall3 lsounds/Marathon/HitWall3.flac + +marathon/hit1 lsounds/Marathon/Hit1.flac +marathon/hit2 lsounds/Marathon/Hit2.flac +marathon/hit3 lsounds/Marathon/Hit3.flac + +$random marathon/hitwall {marathon/hitwall1 marathon/hitwall2} +$random marathon/hit {marathon/hit1 marathon/hit2 marathon/hit3} + +// EOF diff --git a/pksrc/sndinfo.misc b/pksrc/sndinfo.misc new file mode 100644 index 0000000..7a3db29 --- /dev/null +++ b/pksrc/sndinfo.misc @@ -0,0 +1,67 @@ +$rolloff * custom 0 2025 + +// +// World +// +explosion DSBAREXP // Whatever you have loaded :y +$limit explosion 0 +$attenuation explosion 0.7 + +misc/teleport lsounds/Teleport.flac // Self-made +silence lsounds/Silence.flac // 〃 + +MMMMHMHMMMHMMM lsounds/MMMMHMHMMMHMMM.ogg // ????? +YOUSONOFABITCH lsounds/YOUSONOFABITCH.ogg // ??????????? +AAAAAAAAAAAAAA lsounds/AAAAAAAAAAAAAA.ogg // ????????????? +misc/booom lsounds/boom.flac // ?????????????? +misc/pop lsounds/pop.flac // ???????????????? + +misc/teleout lsounds/TeleportOut.flac // Touhou 13 +misc/telein lsounds/TeleportIn.flac // 〃 + +ghost/hit lsounds/GhostHit.flac // Touhou 13 +$alias ghost/spawn player/pickup/barrier + +// +// Intermission +// +intermission/tick lsounds/Menu/InterTick.flac // Halo 3 +intermission/nextstage lsounds/Menu/InterNext.flac // Halo 3, Phantasy Star Online +intermission/paststats lsounds/Menu/InterPass.wav // Phantasy Star Online +intermission/mid lsounds/Menu/InterMid.wav // 〃 + +// +// Menu +// +misc/chat lsounds/Chat.flac // FEAR +$alias misc/chat2 misc/chat + +menu/backup lsounds/Menu/Back.wav // Phantasy Star Online +menu/cursor lsounds/Menu/Move.wav // 〃 +menu/activate lsounds/Menu/Activate.wav // 〃 +menu/choose lsounds/Menu/Choose.wav // 〃 + +$alias menu/invalid player/cbi/clickinvalid +$alias menu/change player/cbi/slidertick + +$alias menu/dismiss menu/backup +$alias menu/prompt menu/activate +$alias menu/clear menu/backup + +$random misc/quitsound { + enemies/zombie/ready + enemies/shotguy/ready + enemies/chainguy/bolt + enemies/hellknight/throw + enemies/cyberdemon/ready + misc/teleport + misc/chat + player/barrier + marathon/hitsolid + weapons/revolver/pickup + weapons/shotgun/pickup + weapons/sniper/draw + weapons/sword/hit +} + +// EOF diff --git a/pksrc/sndinfo.phantoms b/pksrc/sndinfo.phantoms new file mode 100644 index 0000000..5ec1c6a --- /dev/null +++ b/pksrc/sndinfo.phantoms @@ -0,0 +1,144 @@ +// +// Phantom +// +enemies/phantom/spawn1 lsounds/Phantoms/Spawn.ogg // Self-made +enemies/phantom/spawn2 lsounds/Phantoms/Spawn2.ogg // 〃 + +enemies/phantom/lunge1 lsounds/Phantoms/Lunge.flac // Ninja Gaiden Black +enemies/phantom/lunge2 lsounds/Phantoms/Lunge2.flac // 〃 +enemies/phantom/lunge3 lsounds/Phantoms/Lunge3.flac // 〃 + +enemies/phantom/aura lsounds/Phantoms/Aura.flac // Phantasy Star Nova + +enemies/phantom/escape lsounds/Phantoms/Escape.flac // Touhou 13 + +$random enemies/phantom/lunge { + enemies/phantom/lunge1 + enemies/phantom/lunge2 + enemies/phantom/lunge3 +} + +$random enemies/phantom/spawned { + enemies/phantom/spawn1 + enemies/phantom/spawn2 +} + +// +// James +// +enemies/james/fire1 lsounds/Phantoms/James/Fire.flac // Alliance of Valiant Arms +enemies/james/fire2 lsounds/Phantoms/James/Fire2.flac // 〃 +enemies/james/fire3 lsounds/Phantoms/James/Fire3.flac // 〃 + +enemies/james/knife1 lsounds/Phantoms/James/Knife.flac // ??? +enemies/james/knife2 lsounds/Phantoms/James/Knife2.flac // 〃 +enemies/james/knife3 lsounds/Phantoms/James/Knife3.flac // 〃 + +$alias enemies/james/knifehit weapons/knife/hitflesh + +$random enemies/james/knife { + enemies/james/knife1 + enemies/james/knife2 + enemies/james/knife3 +} + +$random enemies/james/fire { + enemies/james/fire1 + enemies/james/fire2 + enemies/james/fire3 +} + +$limit enemies/james/fire 0 +$attenuation enemies/james/fire 0.5 + +// +// Makarov +// +enemies/makarov/fire1 lsounds/Phantoms/Makarov/Fire.ogg // Fallout: New Vegas +enemies/makarov/fire2 lsounds/Phantoms/Makarov/Fire2.ogg // 〃 + +enemies/makarov/pump1 lsounds/Phantoms/Makarov/Pump.flac // ??? +enemies/makarov/pump2 lsounds/Phantoms/Makarov/Pump2.flac // 〃 + +enemies/makarov/chainthrow lsounds/Phantoms/Makarov/ChainThrow.flac // ??? +enemies/makarov/chainhit lsounds/Phantoms/Makarov/ChainHit.flac // 〃 + +enemies/makarov/throw1 lsounds/Phantoms/Makarov/Throw.flac // ??? +enemies/makarov/throw2 lsounds/Phantoms/Makarov/Throw2.flac // 〃 +enemies/makarov/throw3 lsounds/Phantoms/Makarov/Throw3.flac // 〃 + +enemies/makarov/scythe1 lsounds/Phantoms/Makarov/ScytheSwing.flac // ???, Killing Floor +enemies/makarov/scythe2 lsounds/Phantoms/Makarov/ScytheSwing2.flac // 〃 + +enemies/makarov/scythehit1 lsounds/Phantoms/Makarov/ScytheHit.flac // Killing Floor +enemies/makarov/scythehit2 lsounds/Phantoms/Makarov/ScytheHit2.flac // 〃 + +$random enemies/makarov/scythe { + enemies/makarov/scythe1 + enemies/makarov/scythe2 +} + +$random enemies/makarov/scythehit { + enemies/makarov/scythehit1 + enemies/makarov/scythehit2 +} + +$random enemies/makarov/fire { + enemies/makarov/fire1 + enemies/makarov/fire2 +} + +$random enemies/makarov/pump { + enemies/makarov/pump1 + enemies/makarov/pump2 +} + +$random enemies/makarov/throw { + enemies/makarov/throw1 + enemies/makarov/throw2 + enemies/makarov/throw3 +} + +$limit enemies/makarov/fire 0 +$attenuation enemies/makarov/fire 0.5 + +$limit enemies/makarov/pump 0 + +// +// Isaac +// +enemies/isaac/fire1 lsounds/Phantoms/Isaac/Fire.flac // ???, Halo 3 +enemies/isaac/fire2 lsounds/Phantoms/Isaac/Fire2.flac // 〃 + +$random enemies/isaac/fire { + enemies/isaac/fire1 + enemies/isaac/fire2 +} + +$limit enemies/isaac/fire 0 +$attenuation enemies/isaac/fire 0.5 + +// +// Michael +// +enemies/michael/swing1 lsounds/Phantoms/Michael/Swing.ogg // Fallout 4 +enemies/michael/swing2 lsounds/Phantoms/Michael/Swing2.ogg // 〃 +enemies/michael/swing3 lsounds/Phantoms/Michael/Swing3.ogg // 〃 + +enemies/michael/hit1 lsounds/Phantoms/Michael/Hit.ogg // Halo 3 +enemies/michael/hit2 lsounds/Phantoms/Michael/Hit2.ogg // 〃 +enemies/michael/hit3 lsounds/Phantoms/Michael/Hit3.ogg // 〃 + +$random enemies/michael/swing { + enemies/michael/swing1 + enemies/michael/swing2 + enemies/michael/swing3 +} + +$random enemies/michael/hit { + enemies/michael/hit1 + enemies/michael/hit2 + enemies/michael/hit3 +} + +// EOF diff --git a/pksrc/sndinfo.pickups b/pksrc/sndinfo.pickups new file mode 100644 index 0000000..632e268 --- /dev/null +++ b/pksrc/sndinfo.pickups @@ -0,0 +1,57 @@ +// +// Pickup +// +player/pickup/upgrbody lsounds/Player/Pickup/UpgrBody.ogg // Killing Floor, ??? +player/pickup/upgrextr lsounds/Player/Pickup/UpgrExtr.flac // Phantasy Star Nova +player/pickup/upgrweap lsounds/Player/Pickup/UpgrWeap.ogg // Halo 3 +player/pickup/upgrcbi lsounds/Player/Pickup/CBIUpgrade.flac // 〃 +player/pickup/item lsounds/Player/Pickup/Item.ogg // Firearms: Source +player/pickup/barrier lsounds/Player/Pickup/Barrier.flac // Touhou 13 +player/pickup/infrared lsounds/Player/Pickup/Goggles.ogg // ??? +player/pickup/redkey lsounds/Player/Pickup/RedKey.flac // ??? +player/pickup/yellowkey lsounds/Player/Pickup/YellowKey.flac // 〃 +player/pickup/bluekey lsounds/Player/Pickup/BlueKey.flac // 〃 +player/pickup/redskull lsounds/Player/Pickup/RedSkull.flac // Halo 3 +player/pickup/yellowskull lsounds/Player/Pickup/YellowSkull.flac // 〃 +player/pickup/blueskull lsounds/Player/Pickup/BlueSkull.flac // 〃 +player/pickup/evil lsounds/Player/Pickup/EvilItem.flac // Phantasy Star: Nova +player/pickup/cells lsounds/Player/Pickup/CellSmall.flac // ??? +player/pickup/cellb lsounds/Player/Pickup/CellPack.flac // 〃 +player/pickup/shells lsounds/Player/Pickup/ShellSmall.ogg // 〃 +player/pickup/shellb lsounds/Player/Pickup/ShellPack.ogg // 〃 +player/pickup/rockets lsounds/Player/Pickup/RocketSmall.flac // Halo 3 +player/pickup/rocketb lsounds/Player/Pickup/RocketBig.flac // Quake 2 +player/pickup/mana lsounds/Player/Pickup/Mana.flac // Devil May Cry 2 +player/pickup/scorebig lsounds/Player/Pickup/ScoreBig.flac // Self-made +player/pickup/scoresmall lsounds/Player/Pickup/ScoreSmall.flac // 〃 +items/healthbonus lsounds/Player/Pickup/HealthBonus.wav // ??? +player/pickup/stimpack lsounds/Player/Pickup/StimPack.flac // Doom 3 +player/pickup/medikit lsounds/Player/Pickup/Medikit.flac // Fallout 4 + +player/pickup/scorechip lsounds/Player/Pickup/ScoreChip.flac // Half-Life 2 + +player/pickup/coin1 lsounds/Player/Pickup/Coin1.flac // Sony Media 1001 Sound Effects +player/pickup/coin2 lsounds/Player/Pickup/Coin2.flac // 〃 +player/pickup/coin3 lsounds/Player/Pickup/Coin3.flac // 〃 + +player/pickup/gem lsounds/Player/Pickup/Gem.flac // Fallout 4 + +player/pickup/material1 lsounds/Player/Pickup/Material1.ogg // Chronicles of Riddick +player/pickup/material2 lsounds/Player/Pickup/Material2.ogg // 〃 +player/pickup/material3 lsounds/Player/Pickup/Material3.ogg // 〃 +player/pickup/material4 lsounds/Player/Pickup/Material4.ogg // 〃 + +$random player/pickup/coin { + player/pickup/coin1 + player/pickup/coin2 + player/pickup/coin3 +} + +$random player/pickup/material { + player/pickup/material1 + player/pickup/material2 + player/pickup/material3 + player/pickup/material4 +} + +// EOF diff --git a/pksrc/sndinfo.player b/pksrc/sndinfo.player new file mode 100644 index 0000000..8216cfc --- /dev/null +++ b/pksrc/sndinfo.player @@ -0,0 +1,59 @@ +player/score1 lsounds/Player/Score1.flac // Self-made +player/score2 lsounds/Player/Score2.flac // 〃 +player/score3 lsounds/Player/Score3.flac // 〃 +player/rocketboost lsounds/Player/RocketBoost.flac // ??? +player/doublejump lsounds/Player/DoubleJump.flac // DemonSteele +player/slide lsounds/Player/Slide.flac // 〃 +player/getsigil lsounds/Player/DivisionSigilPickup.ogg // Resident Evil 4, Fallout 4 +player/nuke lsounds/Player/Nuke.ogg // Touhou 13 +player/barrier lsounds/Player/Barrier.flac // 〃 +player/death1 lsounds/Player/DeathCharge.ogg // 〃 +player/death2 lsounds/Player/Death.ogg // 〃 +player/adren/inj lsounds/Player/AdrenalineInject.flac // Killing Floor +player/adren/ready lsounds/Player/InjectorReady.flac // 〃 +player/counter lsounds/Player/Counter.flac // Halo 3 +player/counterdone lsounds/Player/CounterDone.flac // 〃 +player/zoomin lsounds/Player/ZoomIn.flac // 〃 +player/zoomout lsounds/Player/ZoomOut.flac // 〃 +player/YOUVEGOTMAIL lsounds/Player/Mail.ogg // AOL +player/hitground lsounds/Player/HitGround.flac // EYE: Divine Cybermancy +player/trmopen lsounds/Terminal/Open.wav // Marathon +player/trmswitch lsounds/Terminal/Switch.wav // 〃 +player/infraredoff lsounds/Player/InfraredOff.flac // Counter-Strike: Source +player/step1 lsounds/Footsteps/Step1.flac // ??? +player/step2 lsounds/Footsteps/Step2.flac // ??? +player/step3 lsounds/Footsteps/Step3.flac // ??? +player/step4 lsounds/Footsteps/Step4.flac // ??? +player/levelup1 lsounds/Player/LevelUp.ogg // Fatal/Fake +player/levelup2 lsounds/Player/LevelUp2.ogg // 〃 +player/wings lsounds/Player/Wings.wav // Hexen + +$volume player/death2 0.7 +$volume player/nuke 0.7 +$volume player/doublejump 0.7 + +$limit player/barrier 0 + +$random player/levelup { + player/levelup1 + player/levelup2 +} + +$random player/step { + player/step1 + player/step2 + player/step3 + player/step4 +} + +$random player/score { + player/score1 + player/score2 + player/score3 +} + +$playersound player male *jump lsounds/Player/Jump.flac // General 6000 +$playersound player male *usefail lsounds/Player/Usefail.flac // Self-made +$playersound player male *land lsounds/Player/Land.wav // Hexen + +// EOF diff --git a/pksrc/sndinfo.playerC b/pksrc/sndinfo.playerC new file mode 100644 index 0000000..22e381f --- /dev/null +++ b/pksrc/sndinfo.playerC @@ -0,0 +1,16 @@ +// +// Cyber-Mage +// +$playersound cybermage male *death lsounds/CyberMage/Death.flac // Doom +$playersound cybermage male *xdeath lsounds/CyberMage/XDeath.flac // 〃 +$playersound cybermage male *pain100 lsounds/CyberMage/PainSmall.flac // 〃 +$playersounddup cybermage male *pain75 *pain100 // 〃 +$playersound cybermage male *pain50 lsounds/CyberMage/Pain.flac // 〃 +$playersounddup cybermage male *pain25 *pain50 // 〃 +$playersound cybermage male *grunt lsounds/CyberMage/Grunt.flac // Doom 64 + +player/manafull lsounds/CyberMage/FullCharge.flac // Touhou 13 + +$alias player/cyber-mage/step player/step + +// EOF diff --git a/pksrc/sndinfo.playerD b/pksrc/sndinfo.playerD new file mode 100644 index 0000000..3e383ef --- /dev/null +++ b/pksrc/sndinfo.playerD @@ -0,0 +1,8 @@ +// +// Dark Lord +// +player/darklord/step lsounds/DarkLord/Step.flac // Resident Evil 4 + +$playersound darklord male *land lsounds/DarkLord/Land.ogg // Resident Evil 4, Slave Zero + +// EOF diff --git a/pksrc/sndinfo.playerI b/pksrc/sndinfo.playerI new file mode 100644 index 0000000..25b2c6b --- /dev/null +++ b/pksrc/sndinfo.playerI @@ -0,0 +1,38 @@ +// +// Informant +// +player/informant/land1 lsounds/Informant/Land1.flac // Phantasy Star: Nova +player/informant/land2 lsounds/Informant/Land2.flac // 〃 +player/informant/land3 lsounds/Informant/Land3.flac // 〃 + +player/informant/step1 lsounds/Footsteps/InformantStep1.flac // Fallout 4 +player/informant/step2 lsounds/Footsteps/InformantStep2.flac // 〃 +player/informant/step3 lsounds/Footsteps/InformantStep3.flac // 〃 +player/informant/step4 lsounds/Footsteps/InformantStep4.flac // 〃 + +player/informant/dodge lsounds/Informant/Dodge.flac // Monster Girl Quest + +$random player/informant/land { + player/informant/land1 + player/informant/land2 + player/informant/land3 +} + +$random player/informant/step { + player/informant/step1 + player/informant/step2 + player/informant/step3 + player/informant/step4 +} + +$playeralias informant male *land player/informant/land +$playeralias informant male *grunt silence +$playersound informant male *jump lsounds/Informant/Jump.flac // Self-made +$playersound informant male *death lsounds/Informant/Death.flac // 〃 +$playersound informant male *xdeath lsounds/Informant/XDeath.flac // 〃 +$playersound informant male *pain100 lsounds/Informant/PainSmall.flac // Doom +$playersounddup informant male *pain75 *pain100 // 〃 +$playersound informant male *pain50 lsounds/Informant/Pain.flac // 〃 +$playersounddup informant male *pain25 *pain50 // 〃 + +// EOF diff --git a/pksrc/sndinfo.playerM b/pksrc/sndinfo.playerM new file mode 100644 index 0000000..464101d --- /dev/null +++ b/pksrc/sndinfo.playerM @@ -0,0 +1,12 @@ +// +// R. Armor +// +player/rarmor/mode lsounds/Player/RArmor/ChangeMode.flac // Halo 3 +player/rarmor/damage lsounds/Player/RArmor/Damage.flac // Touhou 13 + +// +// Marine +// +$alias player/marine/step player/step + +// EOF diff --git a/pksrc/sndinfo.weapons b/pksrc/sndinfo.weapons new file mode 100644 index 0000000..78b5317 --- /dev/null +++ b/pksrc/sndinfo.weapons @@ -0,0 +1,187 @@ +// +// Casings +// +casings/bullet/bounce1 lsounds/Casings/CaseBounce1.wav // ??? +casings/bullet/bounce2 lsounds/Casings/CaseBounce2.wav // 〃 +casings/bullet/bounce3 lsounds/Casings/CaseBounce3.wav // 〃 +casings/bullet/bounce4 lsounds/Casings/CaseBounce4.wav // 〃 +casings/bullet/bounce5 lsounds/Casings/CaseBounce5.wav // 〃 +casings/bullet/bounce6 lsounds/Casings/CaseBounce6.wav // 〃 +casings/bullet/bounce7 lsounds/Casings/CaseBounce7.wav // 〃 +casings/bullet/bounce8 lsounds/Casings/CaseBounce8.wav // 〃 +casings/bullet/bounce9 lsounds/Casings/CaseBounce9.wav // 〃 +casings/bullet/bounce10 lsounds/Casings/CaseBounce10.wav // 〃 + +casings/shell/bounce1 lsounds/Casings/ShellBounce1.wav // ??? +casings/shell/bounce2 lsounds/Casings/ShellBounce2.wav // 〃 +casings/shell/bounce3 lsounds/Casings/ShellBounce3.wav // 〃 +casings/shell/bounce4 lsounds/Casings/ShellBounce4.wav // 〃 +casings/shell/bounce5 lsounds/Casings/ShellBounce5.wav // 〃 + +casings/bullet/die1 lsounds/Casings/CaseStop1.wav // ??? +casings/bullet/die2 lsounds/Casings/CaseStop2.wav // 〃 +casings/bullet/die3 lsounds/Casings/CaseStop3.wav // 〃 +casings/bullet/die4 lsounds/Casings/CaseStop4.wav // 〃 +casings/bullet/die5 lsounds/Casings/CaseStop5.wav // 〃 +casings/bullet/die6 lsounds/Casings/CaseStop6.wav // 〃 +casings/bullet/die7 lsounds/Casings/CaseStop7.wav // 〃 +casings/bullet/die8 lsounds/Casings/CaseStop8.wav // 〃 +casings/bullet/die9 lsounds/Casings/CaseStop9.wav // 〃 +casings/bullet/die10 lsounds/Casings/CaseStop10.wav // 〃 + +casings/shell/die1 lsounds/Casings/ShellBounce1.wav // ??? +casings/shell/die2 lsounds/Casings/ShellBounce2.wav // 〃 +casings/shell/die3 lsounds/Casings/ShellBounce3.wav // 〃 +casings/shell/die4 lsounds/Casings/ShellBounce4.wav // 〃 +casings/shell/die5 lsounds/Casings/ShellBounce5.wav // 〃 + +$random casings/bullet/bounce { + casings/bullet/bounce1 + casings/bullet/bounce2 + casings/bullet/bounce3 + casings/bullet/bounce4 + casings/bullet/bounce5 + casings/bullet/bounce6 + casings/bullet/bounce7 + casings/bullet/bounce8 + casings/bullet/bounce9 + casings/bullet/bounce10 +} +$volume casings/bullet/bounce 0.4 + +$random casings/bullet/die { + casings/bullet/die1 + casings/bullet/die2 + casings/bullet/die3 + casings/bullet/die4 + casings/bullet/die5 + casings/bullet/die6 + casings/bullet/die7 + casings/bullet/die8 + casings/bullet/die9 + casings/bullet/die10 +} +$volume casings/bullet/die 0.4 + +$random casings/shell/bounce { + casings/shell/bounce1 + casings/shell/bounce2 + casings/shell/bounce3 + casings/shell/bounce4 + casings/shell/bounce5 +} +$volume casings/shell/bounce 0.5 + +$random casings/shell/die { + casings/shell/die1 + casings/shell/die2 + casings/shell/die3 + casings/shell/die4 + casings/shell/die5 +} +$volume casings/shell/die 0.5 + +// +// Magazine +// +weapons/magbounce1 lsounds/Magazine/Drop1.flac // Halo 3 +weapons/magbounce2 lsounds/Magazine/Drop2.flac // 〃 +weapons/magbounce3 lsounds/Magazine/Drop3.flac // 〃 + +weapons/magbouncef1 lsounds/Magazine/DropFull1.flac // Halo 3 +weapons/magbouncef2 lsounds/Magazine/DropFull2.flac // 〃 +weapons/magbouncef3 lsounds/Magazine/DropFull3.flac // 〃 + +$random weapons/magbounce { + weapons/magbounce1 + weapons/magbounce2 + weapons/magbounce3 +} + +$random weapons/magbouncef { + weapons/magbouncef1 + weapons/magbouncef2 + weapons/magbouncef3 +} + +// +// sord +// +weapons/sword/chargeup lsounds/Sword/Charge.flac // Touhou 9: Phantasmagoria of Flower View +weapons/sword/attack lsounds/Sword/Charge1.flac // 〃 +weapons/sword/swing lsounds/Sword/Swing.flac // 〃 +weapons/sword/swing1 lsounds/Sword/Swing1.flac // 〃 +weapons/sword/charge lsounds/Sword/Charge2.flac // 〃 + +weapons/sword/normal1 lsounds/Sword/Swing2.flac // Ninja Gaiden Black +weapons/sword/normal2 lsounds/Sword/Swing3.flac // 〃 +weapons/sword/normal3 lsounds/Sword/Swing4.flac // 〃 +weapons/sword/normal4 lsounds/Sword/Swing5.flac // 〃 +weapons/sword/normal5 lsounds/Sword/Swing6.flac // 〃 + +$random weapons/sword/normal { + weapons/sword/normal1 + weapons/sword/normal2 + weapons/sword/normal3 + weapons/sword/normal4 + weapons/sword/normal5 +} + +weapons/sword/hit1 lsounds/Sword/Hit1.flac // Ninja Gaiden Black +weapons/sword/hit2 lsounds/Sword/Hit2.flac // 〃 +weapons/sword/hit3 lsounds/Sword/Hit3.flac // 〃 +weapons/sword/hit4 lsounds/Sword/Hit4.flac // 〃 +weapons/sword/hit5 lsounds/Sword/Hit5.flac // 〃 + +$random weapons/sword/hit { + weapons/sword/hit1 + weapons/sword/hit2 + weapons/sword/hit3 + weapons/sword/hit4 + weapons/sword/hit5 +} + +// +// Misc. +// +effects/rocket/fly lsounds/RocketLauncher/RocketFly.ogg // Unreal Tournament '99 + +effects/puff/ricochet1 lsounds/BulletPuff/Puff1.flac // Devil May Cry 2 +effects/puff/ricochet2 lsounds/BulletPuff/Puff2.flac // 〃 +effects/puff/ricochet3 lsounds/BulletPuff/Puff3.flac // 〃 +effects/puff/ricochet4 lsounds/BulletPuff/Puff4.flac // 〃 + +$random effects/puff/ricochet { + effects/puff/ricochet1 + effects/puff/ricochet2 + effects/puff/ricochet3 + effects/puff/ricochet4 +} + +effects/geexplosion1 lsounds/GEExplosion/expl1.wav // GoldenEye 007 +effects/geexplosion2 lsounds/GEExplosion/expl2.wav // 〃 +effects/geexplosion3 lsounds/GEExplosion/expl3.wav // 〃 +effects/geexplosion4 lsounds/GEExplosion/expl4.wav // 〃 +effects/geexplosion5 lsounds/GEExplosion/expl5.wav // 〃 +effects/geexplosion6 lsounds/GEExplosion/expl6.wav // 〃 +effects/geexplosion7 lsounds/GEExplosion/expl7.wav // 〃 +effects/geexplosion8 lsounds/GEExplosion/expl8.wav // 〃 +effects/geexplosion9 lsounds/GEExplosion/expl9.wav // 〃 +effects/geexplosion10 lsounds/GEExplosion/expl10.wav // 〃 +effects/geexplosion11 lsounds/GEExplosion/expl11.wav // 〃 + +$random effects/geexplosion { + effects/geexplosion1 + effects/geexplosion2 + effects/geexplosion3 + effects/geexplosion4 + effects/geexplosion5 + effects/geexplosion6 + effects/geexplosion7 + effects/geexplosion8 + effects/geexplosion9 + effects/geexplosion10 + effects/geexplosion11 +} + +// EOF diff --git a/pksrc/sndinfo.weaponsC b/pksrc/sndinfo.weaponsC new file mode 100644 index 0000000..cb88fc4 --- /dev/null +++ b/pksrc/sndinfo.weaponsC @@ -0,0 +1,171 @@ +// +// Mateba +// +weapons/mateba/fire lsounds/Mateba/Fire.flac // ??? +weapons/mateba/open lsounds/Mateba/Open.flac // ??? +weapons/mateba/eject lsounds/Mateba/Eject.flac // Killing Floor +weapons/mateba/load lsounds/Mateba/Load.flac // 〃 +weapons/mateba/close lsounds/Mateba/Close.flac // Half-Life 2, Fallout 4 +weapons/mateba/draw lsounds/Mateba/Draw.flac // ??? +weapons/mateba/finalize lsounds/Mateba/Finalize.ogg // Monster Girl Quest +$alias weapons/mateba/pickup weapons/mateba/draw + +// +// Shock Rifle +// +weapons/erifle/pickup lsounds/ShockRifle/Pickup.flac // Halo 3 +weapons/erifle/draw lsounds/ShockRifle/Draw.flac // 〃 +weapons/erifle/fire lsounds/ShockRifle/Fire.flac // Return to Castle Wolfenstein, Halo 3 +weapons/erifle/zap1 lsounds/ShockRifle/Zap1.wav // Half-Life 2 +weapons/erifle/zap2 lsounds/ShockRifle/Zap2.wav // 〃 +weapons/erifle/zap3 lsounds/ShockRifle/Zap3.wav // 〃 +weapons/erifle/reloadout lsounds/ShockRifle/ReloadOut.flac // Return to Castle Wolfenstein +weapons/erifle/reloadin lsounds/ShockRifle/ReloadIn.flac // 〃 +weapons/erifle/shock1 lsounds/ShockRifle/Shock1.wav // Half-Life 2 +weapons/erifle/shock2 lsounds/ShockRifle/Shock2.wav // 〃 + +$random weapons/erifle/shock { + weapons/erifle/shock1 + weapons/erifle/shock2 +} + +$random weapons/erifle/zap { + weapons/erifle/zap1 + weapons/erifle/zap2 + weapons/erifle/zap3 +} + +$volume weapons/erifle/zap 0.15 + +// +// SPAS +// +weapons/cshotgun/fire lsounds/CShotgun/Fire.flac // FEAR, Dynamic Range +weapons/cshotgun/fire2 lsounds/CShotgun/Fire2.flac // 〃 +weapons/cshotgun/load lsounds/CShotgun/Load.flac // Halo 3 +weapons/cshotgun/pump lsounds/CShotgun/Pump.flac // Dynamic Range +weapons/cshotgun/empty lsounds/CShotgun/FireEmpty.flac // EYE: Divine Cybermancy +weapons/cshotgun/pickup lsounds/CShotgun/Pickup.flac // FEAR, Dynamic Range +weapons/cshotgun/draw lsounds/CShotgun/Draw.flac // Dynamic Range + +// +// SMG +// +weapons/smg/fire lsounds/SMG/Fire.flac // FEAR +weapons/smg/firedone lsounds/SMG/FireDone.flac // 〃 +weapons/smg/eject lsounds/SMG/EjectRod.flac // Killing Floor +weapons/smg/insert lsounds/SMG/InsertRod.flac // 〃 +weapons/smg/heat lsounds/SMG/HeatDisperse.flac // Self-made +weapons/smg/open lsounds/SMG/TopOpen.flac // Half-Life 2 +weapons/smg/close lsounds/SMG/TopClose.flac // 〃 +weapons/smg/magout lsounds/SMG/MagOut.flac // 〃 +weapons/smg/magin2 lsounds/SMG/MagInLong.flac // 〃 +weapons/smg/magin lsounds/SMG/MagIn.flac // EYE: Divine Cybermancy +weapons/smg/draw lsounds/SMG/Draw.flac // Halo 3 +weapons/smg/pickup lsounds/SMG/Pickup.flac // FEAR + +// +// Ion Rifle +// +weapons/ionrifle/fire lsounds/IonRifle/Fire.flac // Fallout: New Vegas +weapons/ionrifle/fire2 lsounds/IonRifle/Fire2.flac // 〃 +weapons/ionrifle/eject lsounds/IonRifle/Eject.flac // Killing Floor +weapons/ionrifle/load lsounds/IonRifle/Load.flac // 〃 +weapons/ionrifle/magout lsounds/IonRifle/MagOut.flac // Halo 3 +weapons/ionrifle/magin lsounds/IonRifle/MagIn.flac // 〃 +weapons/ionrifle/zoomout lsounds/IonRifle/ZoomOut.flac // 〃 +weapons/ionrifle/zoomin lsounds/IonRifle/ZoomIn.flac // 〃 +weapons/ionrifle/empty lsounds/IonRifle/FireEmpty.flac // Killing Floor +weapons/ionrifle/draw lsounds/IonRifle/Draw.flac // Killing Floor, Fallout 3 +weapons/ionrifle/pickup lsounds/IonRifle/Pickup.flac // Killing Floor, Halo 3 +weapons/ionrifle/cfire1 lsounds/IonRifle/Charged1.flac // Halo 3 +weapons/ionrifle/cfire2 lsounds/IonRifle/Charged2.flac // 〃 +weapons/ionrifle/charge lsounds/IonRifle/Charge.flac // Quake 2 + +$random weapons/ionrifle/cfire { + weapons/ionrifle/cfire1 + weapons/ionrifle/cfire2 +} + +$alias weapons/ionrifle/heat weapons/smg/heat + +// +// Star Destroyer +// +weapons/shipgun/explode lsounds/StarDestroyer/Explode.flac // Halo 3 +weapons/shipgun/fire lsounds/StarDestroyer/Fire.flac // 〃 +weapons/shipgun/firesol lsounds/StarDestroyer/FireSolspear.flac // Halo 3, Fallout 4 +weapons/shipgun/prepare lsounds/StarDestroyer/Charge.flac // Halo 3, Devil May Cry 2 +weapons/shipgun/empty lsounds/StarDestroyer/FireEmpty.flac // Counter-Strike: Source, Phantasy Star Online +weapons/shipgun/draw lsounds/StarDestroyer/Draw.flac // Fallout: New Vegas +weapons/shipgun/pickup lsounds/StarDestroyer/Pickup.flac // Halo 3, Doom 3 +weapons/shipgun/firesurge lsounds/StarDestroyer/FireSurge.flac // Doom 3, Quake 2 +weapons/shipgun/idle lsounds/StarDestroyer/Idle.flac // Phantasy Star Nova + +$limit weapons/shipgun/explode 0 +$attenuation weapons/shipgun/explode 0.6 + +// +// Blade +// +weapons/blade/slash lsounds/Blade/Slash.ogg // Monster Girl Quest +weapons/blade/hit lsounds/Blade/Hit.ogg // 〃 + +// +// Delear +// +weapons/delear/fire lsounds/Delear/Fire.flac // Devil May Cry 3 +weapons/delear/open lsounds/Delear/Open.flac // Devil May Cry 3, ??? +weapons/delear/charge lsounds/Delear/Charge.flac // Devil May Cry 3, Deus Ex +weapons/delear/close lsounds/Delear/Close.flac // Alliance of Valiant Arms + +// +// Feuer +// +weapons/feuer/explode lsounds/Feuer/Explode.ogg // Monster Girl Quest +weapons/feuer/fire lsounds/Feuer/Fire.wav // Touhou 13 +weapons/feuer/final lsounds/Feuer/Final.flac // 〃 + +$limit weapons/feuer/explode 0 +$volume weapons/feuer/fire 0.9 + +// +// Rend +// +weapons/rend/slash1 lsounds/Rend/Fire1.flac // ??? +weapons/rend/slash2 lsounds/Rend/Fire2.flac // ??? +weapons/rend/slash3 lsounds/Rend/Fire3.flac // ??? +weapons/rend/end lsounds/Rend/End.flac // Phantasy Star Nova +weapons/rend/reflect lsounds/Rend/Reflect.flac // 〃 + +$random weapons/rend/slash { + weapons/rend/slash1 + weapons/rend/slash2 + weapons/rend/slash3 +} + +$alias weapons/rend/hit weapons/blade/hit + +// +// Hulgyon +// +weapons/hulgyon/proc lsounds/Hulgyon/Proc.flac // Touhou 13 +$limit weapons/hulgyon/proc 0 + +// +// Star Shot +// +weapons/sshot/fire lsounds/StarShot/Fire.flac // Halo 3 +weapons/sshot/firero lsounds/StarShot/RunOut.flac // Monster Girl Quest + +$alias weapons/sshot/hit weapons/shotgun/gauss/puff +$limit weapons/sshot/hit 0 +$limit weapons/sshot/fire 0 + +// +// Cercle +// +weapons/cercle/begin lsounds/Cercle/Begin.flac // Phantasy Star Online +weapons/cercle/attack lsounds/Cercle/Attack.flac // 〃 + +// EOF diff --git a/pksrc/sndinfo.weaponsM b/pksrc/sndinfo.weaponsM new file mode 100644 index 0000000..364113b --- /dev/null +++ b/pksrc/sndinfo.weaponsM @@ -0,0 +1,251 @@ +// +// Knife +// +weapons/knife/swing1 lsounds/Knife/Fire1.flac // Serious Sam: The First Encounter HD +weapons/knife/swing2 lsounds/Knife/Fire2.flac // 〃 +weapons/knife/hitflesh lsounds/Knife/Hit.flac // Killing Floor +weapons/knife/hitwall lsounds/Knife/HitWall.flac // 〃 + +$limit weapons/knife/hitflesh 0 +$limit weapons/knife/hitwall 0 + +// +// Pistol +// +weapons/pistol/fire lsounds/Pistol/Fire.flac // Half-Life +weapons/pistol/fireauto lsounds/Pistol/FireAuto.flac // Killing Floor, ??? +weapons/pistol/reload lsounds/Pistol/Reload.flac // Serious Sam: The First Encounter HD +weapons/pistol/zoomin lsounds/Pistol/ScopeIn.flac // Halo 3, EYE: Divine Cybermancy +weapons/pistol/zoomout lsounds/Pistol/ScopeOut.flac // 〃 +weapons/pistol/pickup lsounds/Pistol/Pickup.flac // Fallout 4 +$alias weapons/pistol/draw weapons/pistol/pickup + +weapons/pistol/plasma/fire lsounds/Pistol/FirePlasma.flac // Quake 2 + +$alias weapons/pistol/plasma/explode weapons/plasmax +$limit weapons/pistol/plasma/explode 0 +$volume weapons/pistol/plasma/explode 0.15 + +// +// Revolver +// +weapons/revolver/fire lsounds/Revolver/Fire.ogg // Killing Floor +weapons/revolver/draw lsounds/Revolver/Draw.flac // 〃 +weapons/revolver/pickup lsounds/Revolver/Pickup.flac // 〃 +weapons/revolver/reload lsounds/Revolver/Reload.flac // Serious Sam: The First Encounter HD + +// +// Shotgun +// +weapons/shotgun/fire lsounds/Shotgun/FireFull.flac // Killing Floor, General 6000 +weapons/shotgun/open lsounds/Shotgun/PumpOpen.flac // General 6000 +weapons/shotgun/close lsounds/Shotgun/PumpClose.flac // 〃 +weapons/shotgun/zoomin lsounds/Shotgun/ScopeIn.flac // Halo 3, EYE: Divine Cybermancy +weapons/shotgun/zoomout lsounds/Shotgun/ScopeOut.flac // 〃 +weapons/shotgun/pickup lsounds/Shotgun/Pickup.flac // Halo 3, EYE: Divine Cybermancy, General 6000 +weapons/shotgun/just1 lsounds/Shotgun/Just1.flac // Halo 3 +weapons/shotgun/just2 lsounds/Shotgun/Just2.flac // 〃 +weapons/shotgun/just3 lsounds/Shotgun/Just3.flac // 〃 +$alias weapons/shotgun/draw weapons/shotgun/open + +weapons/shotgun/gauss/fire lsounds/Shotgun/Gauss/ShootGunBang.flac // Descent 2 XL +weapons/shotgun/gauss/puff lsounds/Shotgun/Gauss/Fire.flac // 〃 +weapons/shotgun/gauss/spark1 lsounds/Shotgun/Gauss/Spark1.flac // Fallout 4 +weapons/shotgun/gauss/spark2 lsounds/Shotgun/Gauss/Spark2.flac // 〃 +weapons/shotgun/gauss/spark3 lsounds/Shotgun/Gauss/Spark3.flac // 〃 +weapons/shotgun/gauss/reloadout lsounds/Shotgun/Gauss/ReloadOut.flac // General 6000 +weapons/shotgun/gauss/reloadin lsounds/Shotgun/Gauss/ReloadIn.flac // 〃 + +weapons/shotgun/poison/fire lsounds/Shotgun/Poison/FireFull.ogg // FEAR, Gamemaster Audio - Gun Sound Pack, Killing Floor, General 6000 + +$random weapons/shotgun/just { + weapons/shotgun/just1 + weapons/shotgun/just2 + weapons/shotgun/just3 +} + +$random weapons/shotgun/gauss/spark { + weapons/shotgun/gauss/spark1 + weapons/shotgun/gauss/spark2 + weapons/shotgun/gauss/spark3 +} + +$alias weapons/shotgun/poison/acid weapons/shotgun/gauss/spark + +$limit weapons/shotgun/gauss/puff 0 +$limit weapons/shotgun/gauss/spark 0 + +// +// Super Shotgun +// +weapons/ssg/fire lsounds/SuperShotgun/Fire.flac // Per Kristian, General 6000 +weapons/ssg/pickup lsounds/SuperShotgun/Pickup.flac // General 6000, ??? +weapons/ssg/close lsounds/SuperShotgun/Close.flac // Killing Floor, ??? +weapons/ssg/open lsounds/SuperShotgun/Open.flac // 〃 +weapons/ssg/load lsounds/SuperShotgun/Load.flac // General 6000, ??? +weapons/ssg/empty lsounds/SuperShotgun/Empty.flac // General 6000 +weapons/ssg/draw lsounds/SuperShotgun/Draw.flac // General 6000, Killing Floor, ??? + +// +// Laser Shotgun +// +weapons/lshotgun/fire lsounds/LazShotgun/Fire.flac // Fallout: New Vegas +weapons/lshotgun/open lsounds/LazShotgun/Open.flac // Fallout: New Vegas, FEAR +weapons/lshotgun/close lsounds/LazShotgun/Close.flac // 〃 +weapons/lshotgun/draw lsounds/LazShotgun/Draw.flac // Doom 3, Fallout: New Vegas +$alias weapons/lshotgun/pickup weapons/lshotgun/open + +// +// Combat Rifle +// +weapons/rifle/fire1 lsounds/CombatRifle/Fire1.flac // Fallout 4, Killing Floor, Call of Duty: Modern Warfare 2 +weapons/rifle/fire2 lsounds/CombatRifle/Fire2.flac // 〃 +weapons/rifle/fire3 lsounds/CombatRifle/Fire3.flac // 〃 +weapons/rifle/firesnipe1 lsounds/CombatRifle/FireSnipe1.flac // 〃 +weapons/rifle/firesnipe2 lsounds/CombatRifle/FireSnipe2.flac // 〃 +weapons/rifle/firesnipe3 lsounds/CombatRifle/FireSnipe3.flac // 〃 +weapons/rifle/firero lsounds/CombatRifle/FireRunOut.flac // Counter-Strike: Source +weapons/rifle/rldmount lsounds/CombatRifle/ReloadMount.flac // Fallout 4, Halo 3, Serious Sam: The First Encounter HD +weapons/rifle/pickup lsounds/CombatRifle/Pickup.flac // Halo 3 +weapons/rifle/draw lsounds/CombatRifle/Draw.flac // 〃 +weapons/rifle/firemode lsounds/CombatRifle/SetFiremode.flac // Fallout: New Vegas, Deus Ex +weapons/rifle/grenade lsounds/CombatRifle/FireGrenade.flac // Fallout: New Vegas +weapons/rifle/reloadout lsounds/CombatRifle/ReloadOut.flac // ??? +weapons/rifle/reloadin lsounds/CombatRifle/ReloadIn.flac // ??? + +weapons/rifle/grenadebounce1 lsounds/CombatRifle/GrenadeBounce1.flac // Halo 3 +weapons/rifle/grenadebounce2 lsounds/CombatRifle/GrenadeBounce2.flac // 〃 +weapons/rifle/grenadebounce3 lsounds/CombatRifle/GrenadeBounce3.flac // 〃 + +$random weapons/rifle/grenadebounce { + weapons/rifle/grenadebounce1 + weapons/rifle/grenadebounce2 + weapons/rifle/grenadebounce3 +} + +$random weapons/rifle/fire { + weapons/rifle/fire1 + weapons/rifle/fire2 + weapons/rifle/fire3 +} + +$random weapons/rifle/firesnipe { + weapons/rifle/firesnipe1 + weapons/rifle/firesnipe2 + weapons/rifle/firesnipe3 +} + +weapons/rcw/fire lsounds/CombatRifle/FireLaz.ogg // Fallout 4, Fallout: New Vegas +weapons/rcw/firesnipe lsounds/CombatRifle/FireLazSnipe.ogg // 〃 + +$volume weapons/rcw/fire 0.7 +$volume weapons/rcw/firesnipe 0.7 + +// +// Sniper Rifle +// +weapons/sniper/fire lsounds/SniperRifle/Fire.ogg // Fallout: New Vegas, Firearms: Source +weapons/sniper/boltback lsounds/SniperRifle/BoltBack.flac // Fallout: New Vegas, FEAR, Firearms: Source +weapons/sniper/boltforward lsounds/SniperRifle/BoltForward.flac // 〃 +weapons/sniper/magout lsounds/SniperRifle/MagOut.flac // Halo 3 +weapons/sniper/magin lsounds/SniperRifle/MagIn.flac // 〃 +weapons/sniper/draw lsounds/SniperRifle/Draw.flac // 〃 + +$alias weapons/sniper/zoomin weapons/shotgun/zoomin +$alias weapons/sniper/zoomout weapons/shotgun/zoomout + +// +// Grenade Launcher +// +weapons/rocket/fire1 lsounds/RocketLauncher/Fire.ogg // FEAR +weapons/rocket/fire2 lsounds/RocketLauncher/Fire1.ogg // 〃 +weapons/rocket/fire3 lsounds/RocketLauncher/Fire2.ogg // 〃 +weapons/rocket/empty lsounds/RocketLauncher/FireEmpty.flac // Killing Floor +weapons/rocket/pickup lsounds/RocketLauncher/Pickup.flac // FEAR, Doom 3, Firearms: Source +weapons/rocket/draw lsounds/RocketLauncher/Draw.flac // FEAR, Doom 3 +weapons/rocket/load lsounds/RocketLauncher/Load.flac // 〃 +weapons/rocket/lock lsounds/RocketLauncher/Lock.flac // Unreal Tournament '99 +weapons/rocket/launch lsounds/RocketLauncher/Launch.flac // 〃 +weapons/rocket/setalt lsounds/RocketLauncher/SetAlt.flac // Killing Floor +weapons/rocket/setalt1 lsounds/RocketLauncher/SetAlt1.flac // 〃 +weapons/rocket/grenade lsounds/RocketLauncher/FireGrenade.ogg // Quake, Quake 2 +weapons/rocket/mark lsounds/RocketLauncher/Mark.flac // Phantasy Star Nova + +$random weapons/rocket/fire { + weapons/rocket/fire1 + weapons/rocket/fire2 + weapons/rocket/fire3 +} + +// +// Omega Cannon +// +weapons/cannon/fire lsounds/Cannon/Fire.flac // Serious Sam: The First Encounter HD +weapons/cannon/prepare lsounds/Cannon/Prepare.flac // 〃 +weapons/cannon/explode lsounds/Cannon/Explode.flac // 〃 +weapons/cannon/empty lsounds/Cannon/FireEmpty.flac // Killing Floor +weapons/cannon/pickup lsounds/Cannon/Pickup.flac // Halo 3, Doom 3 +weapons/cannon/draw lsounds/Cannon/Draw.flac // Fallout: New Vegas + +$limit weapons/cannon/explode 0 + +weapons/cannon/impactfloor lsounds/Cannon/ImpactFloor.flac +weapons/cannon/impactwall lsounds/Cannon/ImpactWall.flac + +$limit weapons/cannon/impactfloor 0 +$limit weapons/cannon/impactwall 0 + +$attenuation weapons/cannon/impactfloor 0.8 +$attenuation weapons/cannon/impactwall 0.8 + +// +// Punctuator Cannon +// +weapons/punct/fire lsounds/Punctuator/Fire.flac // FEAR +weapons/punct/load lsounds/Punctuator/Load.flac // 〃 + +// +// Omega Railgun +// +weapons/rail/fire lsounds/Railgun/Fire.flac // FEAR, Descent 2 +weapons/rail/impact lsounds/Railgun/Impact.flac // Descent 2 +weapons/rail/charge lsounds/Railgun/Charge.flac // FEAR, ??? + +$limit weapons/rail/impact 0 +$attenuation weapons/rail/impact 0.8 + +// +// Dark Cannon +// +weapons/dark/wind lsounds/DarkCannon/Wind.ogg // Half-Life 2 +weapons/dark/water1 lsounds/DarkCannon/Water.ogg // Steam +weapons/dark/water2 lsounds/DarkCannon/Water2.ogg // 〃 +weapons/dark/water3 lsounds/DarkCannon/Water3.flac // 〃 +weapons/dark/fire1 lsounds/DarkCannon/Fire.ogg // Halo 3 +weapons/dark/fire2 lsounds/DarkCannon/Fire2.ogg // 〃 +weapons/dark/fire3 lsounds/DarkCannon/Fire3.ogg // 〃 +weapons/dark/impact1 lsounds/DarkCannon/Impact.ogg // 〃 +weapons/dark/impact2 lsounds/DarkCannon/Impact2.ogg // 〃 +weapons/dark/impact3 lsounds/DarkCannon/Impact3.ogg // 〃 + +$random weapons/dark/water { + weapons/dark/water1 + weapons/dark/water2 + weapons/dark/water3 +} + +$random weapons/dark/fire { + weapons/dark/fire1 + weapons/dark/fire2 + weapons/dark/fire3 +} + +$random weapons/dark/impact { + weapons/dark/impact1 + weapons/dark/impact2 + weapons/dark/impact3 +} + +$limit weapons/dark/impact 0 + +// EOF diff --git a/pksrc/sndinfo.weapons_outcasts b/pksrc/sndinfo.weapons_outcasts new file mode 100644 index 0000000..0d2ff76 --- /dev/null +++ b/pksrc/sndinfo.weapons_outcasts @@ -0,0 +1,103 @@ +// +// Charge Fist +// +weapons/cfist/pickup lsounds/ChargeFist/Pickup.flac // Halo 3 +weapons/cfist/fire1 lsounds/ChargeFist/Fire1.flac // 〃 +weapons/cfist/fire2 lsounds/ChargeFist/Fire2.flac // 〃 +weapons/cfist/fire3 lsounds/ChargeFist/Fire3.flac // 〃 +weapons/cfist/ready lsounds/ChargeFist/Ready.flac // 〃 +weapons/cfist/charge lsounds/ChargeFist/Charge.ogg // Fallout 4, Halo 3 +weapons/cfist/chargeend lsounds/ChargeFist/ChargeEnd.flac // Fallout 4 +weapons/cfist/hit1 lsounds/ChargeFist/HitFlesh1.ogg // Shadow Complex +weapons/cfist/hit2 lsounds/ChargeFist/HitFlesh2.ogg // 〃 +weapons/cfist/hit3 lsounds/ChargeFist/HitFlesh3.ogg // 〃 +weapons/cfist/hitwall1 lsounds/ChargeFist/HitWall1.ogg // 〃 +weapons/cfist/hitwall2 lsounds/ChargeFist/HitWall2.ogg // 〃 +weapons/cfist/hitwall3 lsounds/ChargeFist/HitWall3.ogg // 〃 +weapons/cfist/hitwall4 lsounds/ChargeFist/HitWall4.ogg // 〃 + +$random weapons/cfist/hit { + weapons/cfist/hit1 + weapons/cfist/hit2 + weapons/cfist/hit3 +} + +$random weapons/cfist/hitwall { + weapons/cfist/hitwall1 + weapons/cfist/hitwall2 + weapons/cfist/hitwall3 + weapons/cfist/hitwall4 +} + +$random weapons/cfist/fire { + weapons/cfist/fire1 + weapons/cfist/fire2 + weapons/cfist/fire3 +} + +// +// Missile Launcher +// +weapons/missile/fire lsounds/MissileLauncher/Fire.flac // FEAR +weapons/missile/empty lsounds/MissileLauncher/FireEmpty.flac // 〃 +weapons/missile/reloadout lsounds/MissileLauncher/ReloadOut.flac // 〃 +weapons/missile/reloadin lsounds/MissileLauncher/ReloadIn.flac // 〃 +weapons/missile/draw lsounds/MissileLauncher/Draw.flac // Halo 3, Doom 3 +weapons/missile/explode lsounds/MissileLauncher/Explode.flac // ??? +$limit weapons/missile/explode 0 + +// +// Plasma Rifle +// +weapons/plasma/fire lsounds/PlasmaRifle/Fire.flac // Devil May Cry 3 +weapons/plasma/altfire lsounds/PlasmaRifle/AltFire.flac // 〃 +weapons/plasma/pickup lsounds/PlasmaRifle/Pickup.flac // Alliance of Valiant Arms +weapons/plasma/empty lsounds/PlasmaRifle/FireEmpty.flac // Killing Floor +weapons/plasma/draw lsounds/PlasmaRifle/Draw.flac // FEAR + +weapons/plasma/explode1 lsounds/PlasmaRifle/Explode1.flac // Devil May Cry 3 +weapons/plasma/explode2 lsounds/PlasmaRifle/Explode2.flac // 〃 +weapons/plasma/explode3 lsounds/PlasmaRifle/Explode3.flac // 〃 + +$random weapons/plasma/explode { + weapons/plasma/explode1 + weapons/plasma/explode2 + weapons/plasma/explode3 +} + +weapons/plasma/laser/fire_start lsounds/PlasmaRifle/Laser/FireStart.flac // Unreal Tournament '99 +weapons/plasma/laser/fire_hum lsounds/PlasmaRifle/Laser/FireHum.flac // 〃 +weapons/plasma/laser/fire_loop lsounds/PlasmaRifle/Laser/FireLoop.flac // Touhou 9: Phantasmagoria of Flower View +weapons/plasma/laser/fire_end lsounds/PlasmaRifle/Laser/FireEnd.flac // Quake +weapons/plasma/laser/spark lsounds/PlasmaRifle/Laser/Spark.flac // Fallout 4 + +$limit weapons/plasma/laser/spark 0 +$limit weapons/plasma/explode 0 +$volume weapons/plasma/explode 0.5 + +weapons/plasma/part/charge lsounds/PlasmaRifle/PartBeam/Charge.flac // Touhou 13 +weapons/plasma/part/fire lsounds/PlasmaRifle/PartBeam/Fire.ogg // FEAR, Halo 3 +weapons/plasma/part/reloadout lsounds/PlasmaRifle/PartBeam/ReloadOut.flac // FEAR +weapons/plasma/part/reloadin lsounds/PlasmaRifle/PartBeam/ReloadIn.flac // 〃 + +$volume weapons/plasma/part/fire 0.7 + +// +// Plasma Diffuser +// +weapons/plasdiff/fire1 lsounds/PlasmaDiffuser/Fire.flac // Halo 3 +weapons/plasdiff/fire2 lsounds/PlasmaDiffuser/Fire2.flac // 〃 +weapons/plasdiff/fire3 lsounds/PlasmaDiffuser/Fire3.flac // 〃 +weapons/plasdiff/draw lsounds/PlasmaDiffuser/Draw.flac // Fallout 3, Halo 3 +weapons/plasdiff/empty lsounds/PlasmaDiffuser/FireEmpty.flac // 〃 + +$alias weapons/plasdiff/explode weapons/plasmax +$limit weapons/plasdiff/explode 0 + +$random weapons/plasdiff/fire { + weapons/plasdiff/fire1 + weapons/plasdiff/fire2 + weapons/plasdiff/fire3 +} + +// EOF diff --git a/pksrc/sndinfo.world b/pksrc/sndinfo.world new file mode 100644 index 0000000..ee5e6b6 --- /dev/null +++ b/pksrc/sndinfo.world @@ -0,0 +1,56 @@ +// +// Body +// +body/bullethit1 lsounds/Body/Bullet1.wav // Half-Life +body/bullethit2 lsounds/Body/Bullet2.wav // 〃 + +$random body/bullethit { + body/bullethit1 + body/bullethit2 +} + +// +// Ambience +// +amb/rain lsounds/Ambience/Rain.ogg // ??? +amb/wind lsounds/Ambience/Wind.ogg // 〃 +amb/rainout lsounds/Ambience/RainOut.ogg // 〃 +amb/windout lsounds/Ambience/WindOut.ogg // 〃 +amb/bigcomp lsounds/Ambience/BigComputer.ogg // EYE: Divine Cybermancy +amb/alarmdist1 lsounds/Ambience/AlarmDistant.flac // Half-Life 2 +amb/alarmdist2 lsounds/Ambience/AlarmDistant2.flac // 〃 +amb/alarmdist3 lsounds/Ambience/AlarmDistant3.flac // 〃 +amb/alarmdist4 lsounds/Ambience/AlarmDistant4.flac // 〃 +amb/ship lsounds/Ambience/Ship.flac // 〃 +amb/field lsounds/Ambience/NoEntry.flac // 〃 +amb/vent lsounds/Ambience/VentPump.wav // 〃 +amb/lightson lsounds/Ambience/LightsOn.flac // 〃 +amb/computer lsounds/Ambience/Computer.wav // Quake + +$random amb/alarmdist { + amb/alarmdist1 + amb/alarmdist2 + amb/alarmdist3 + amb/alarmdist4 +} + +$ambient 42421 amb/alarmdist point 0.25 random 40 240 1.0 +$ambient 42422 amb/bigcomp point 1.5 continuous 0.7 +$ambient 42423 amb/ship world continuous 0.1 +$ambient 42424 amb/field point 2.0 continuous 1.0 +$ambient 42425 amb/field point 4.0 continuous 1.0 +$ambient 42426 amb/vent point 5.0 continuous 0.5 +$ambient 42427 amb/computer point 2.0 continuous 1.0 + +// +// Barrels +// +misc/barrel/hit1 lsounds/Barrel/Hit.flac +misc/barrel/hit2 lsounds/Barrel/Hit2.flac + +$random misc/barrel/hit { + misc/barrel/hit1 + misc/barrel/hit2 +} + +// EOF diff --git a/pksrc/textcolo.txt b/pksrc/textcolo.txt new file mode 100644 index 0000000..60ba486 --- /dev/null +++ b/pksrc/textcolo.txt @@ -0,0 +1,16 @@ +Lith_Grey +{ + #3D3D3D #BFBFBF +} + +Lith_Purple +{ + #301875 #8C3BF8 +} + +Lith_Green +{ + #005000 #00FF00 +} + +// EOF diff --git a/pksrc/textures.txt b/pksrc/textures.txt new file mode 100644 index 0000000..c463ff4 --- /dev/null +++ b/pksrc/textures.txt @@ -0,0 +1,77 @@ +Sprite BLL2A0, 31, 25 +{ + Offset 16, 13 + Patch BLLTA0, 0, 0 + { + Translation "192:207=168:191" + } +} + +Sprite CBALA0, 107, 92 +{ + XScale 4.500 + YScale 4.500 + Offset 55, 92 + Patch "lgfx/CannonBall.png", 0, 0 +} +Sprite SHT2A0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG1.png", 119, 112 +} + +Sprite SHT2B0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG3.png", 99, 74 +} + +Sprite SHT2C0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG4.png", 24, 43 +} + +Sprite SHT2D0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG2.png", 117, 95 +} + +Sprite SHT2E0, 420, 200 +{ + Offset 50, 0 + Patch "lgfx/SuperShotgun/SSG5.png", 25, 105 + Patch "lgfx/SuperShotgun/SSG7.png", 181, 134 +} + +Sprite SHT2F0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG6.png", 91, 117 +} + +Sprite SHT2G0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG2.png", 118, 94 +} + +Sprite SHT2H0, 320, 200 +{ + Patch "lgfx/SuperShotgun/SSG3.png", 116, 90 +} + +Sprite SHT2I0, 320, 200 +{ + Patch SHT2I0, 137, 103 + Patch "lgfx/SuperShotgun/SSG1.png", 119, 113 +} + +Sprite SHT2J0, 320, 200 +{ + Patch SHT2J0, 131, 95 + Patch "lgfx/SuperShotgun/SSG1.png", 119, 114 +} + +Sprite SHT2Z0, 420, 200 +{ + Offset 50, 0 + Patch "lgfx/SuperShotgun/SSG7.png", 181, 134 +} + +// EOF diff --git a/pksrc/voxeldef.txt b/pksrc/voxeldef.txt new file mode 100644 index 0000000..eb3fcea --- /dev/null +++ b/pksrc/voxeldef.txt @@ -0,0 +1,6 @@ +CBALA = "CBALA" +{ + Scale = 1.0 +} + +// EOF diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..b130f60 --- /dev/null +++ b/readme.md @@ -0,0 +1,24 @@ +![Lithium](http://mab.greyserv.net/f/Lithium_logo.png) + +# Overview + +A mod in which you shoot things until they die. See the ZDoom forums thread linked above for more details. + +# Code + +The code in Lithium is half C and half DECORATE. The C code is compiled to ACS bytecode with [GDCC](https://github.com/DavidPH/GDCC), an awesome compiler made by a crazy compiler man. + +The C code is rather terse at times, and scarcely commented, but hopefully it should be understandable enough. + +I tend to use a lot of GDCC's C extensions, so some of the code may be a bit confusing for purists. + +# Licensing + +All of the content and source code in this project is copyrighted unless otherwise stated. Do not use it elsewhere without permission. See pk7/credits.txt for more information. + +All DECORATE code in the `pksrc/lscripts` folder is public domain as defined by [the CC0 license](http://creativecommons.org/publicdomain/zero/1.0/). + +GDCC's libc is distributed under the LGPL license as detailed in `pk7/licenses/copylib.txt`. + +Respect content creators, ask permission before using something from this mod. + diff --git a/source/Headers/lith_attrib.h b/source/Headers/lith_attrib.h new file mode 100644 index 0000000..f112de2 --- /dev/null +++ b/source/Headers/lith_attrib.h @@ -0,0 +1,39 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#ifndef LITH_ATTRIB_H +#define LITH_ATTRIB_H + +#define ATTR_MAX 150 +#define ATTR_VIS_MAX 100 +#define ATTR_VIS_DIFF (ATTR_MAX - ATTR_VIS_MAX) + +enum +{ + at_acc, + at_def, + at_str, + at_vit, + at_stm, + at_luk, + at_rge, + at_max +}; + +struct player_attr_theta +{ + u32 points; + u32 attrs[at_max]; +}; + +struct player_attributes +{ + bool autolevel; + u64 exp, expnext; + u32 level; + __str names[at_max]; + + [[__anonymous]] + struct player_attr_theta cur; + struct player_attr_theta sup; +}; + +#endif diff --git a/source/Headers/lith_base64.h b/source/Headers/lith_base64.h new file mode 100644 index 0000000..d341c58 --- /dev/null +++ b/source/Headers/lith_base64.h @@ -0,0 +1,47 @@ +/* + * Base64 encoding/decoding (RFC1341 + * + * Copyright (c) 2005, Jouni Malinen + * + * This software may be distributed, used, and modified under the terms of + * BSD license: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name(s) of the above-listed copyright holder(s) nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef BASE64_H +#define BASE64_H + +#include +#include "lith_types.h" + +byte *base64_encode(byte const *src, size_t len, size_t *out_len); +byte *base64_decode(byte const *src, size_t len, size_t *out_len); + +#endif /* BASE64_H */ diff --git a/source/Headers/lith_bip.h b/source/Headers/lith_bip.h new file mode 100644 index 0000000..a9634df --- /dev/null +++ b/source/Headers/lith_bip.h @@ -0,0 +1,85 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#if defined(LITH_X) +LITH_X(WEAPONS, "Weapons") +LITH_X(ENEMIES, "Adversaries") +LITH_X(YOURSELF, "Yourself") +LITH_X(UPGRADES, "Upgrades") +LITH_X(PLACES, "Locations") +LITH_X(CORPORATIONS, "Companies") +LITH_X(MAIL, "Mail") +#undef LITH_X +#elif !defined(LITH_BIP_H) +#define LITH_BIP_H + +#include "lith_list.h" + +// Extern Functions ----------------------------------------------------------| + +[[__call("ScriptS")]] void Lith_PlayerInitBIP(struct player *p); +struct bippage_s *Lith_FindBIPPage(struct bip_s *bip, __str name); +[[__optional_args(1)]] struct bippage_s *Lith_UnlockBIPPage(struct bip_s *bip, __str name, int pclass); +[[__call("ScriptS")]] void Lith_DeallocateBIP(struct bip_s *bip); +[[__call("ScriptS"), __optional_args(1)]] void Lith_DeliverMail(struct player *p, __str title, int flags); + +// Types ---------------------------------------------------------------------| + +enum +{ + BIPC_NONE, +#define LITH_X(name, capt) BIPC_##name, +#include "lith_bip.h" + BIPC_MAX, + BIPC_MAIN, +}; + +enum +{ + MAILF_NoPrint = 1 << 0, + MAILF_AllPlayers = 1 << 1, +}; + +typedef __str bip_unlocks_t[5]; + +typedef struct bippage_s +{ + __str name; + __str image; + __str body; + __str title; + int height; + int category; + bool unlocked; + list_t link; + bip_unlocks_t unlocks; +} bippage_t; + +typedef struct bip_s +{ + __prop find {call: Lith_FindBIPPage (this)} + __prop unlock {call: Lith_UnlockBIPPage(this)} + __prop deallocate {call: Lith_DeallocateBIP(this)} + + // Stats + int categoryavail[BIPC_MAX]; + int categorymax[BIPC_MAX]; + int pageavail; + int pagemax; + int mailreceived; + int mailtrulyreceived; + + // State + bool init; + bippage_t *curpage; + int curpagenum; + int curcategory; + int lastcategory; + int scroll; + bippage_t *result[8]; + int resnum; + int rescur; + + // Info + list_t infogr[BIPC_MAX]; +} bip_t; + +#endif diff --git a/source/Headers/lith_cbi.h b/source/Headers/lith_cbi.h new file mode 100644 index 0000000..7dc6d89 --- /dev/null +++ b/source/Headers/lith_cbi.h @@ -0,0 +1,90 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_CBI_H +#define LITH_CBI_H + +#include "lith_gui.h" + +#define CBIState(g) ((struct cbistate *)((g)->state)) + +// Type Definitions ----------------------------------------------------------| + +enum +{ + cbi_tab_arsenal, + cbi_tab_status, + cbi_tab_info, + cbi_tab_settings, +}; + +enum +{ + cbi_tab_arsenal_upgrades, + cbi_tab_arsenal_shop, +}; + +enum +{ + cbi_tab_stat_attr, + cbi_tab_stat_cbi, +}; + +enum +{ + cbi_tab_info_bip, + cbi_tab_info_log, +}; + +enum +{ + cbi_theme_green, + cbi_theme_rose, + cbi_theme_umi, + cbi_theme_ender, + cbi_theme_orange, + cbi_theme_grey, + cbi_theme_bassilla, + cbi_theme_ghost, + cbi_theme_winxp, + cbi_theme_max +}; + +typedef struct cbi_s +{ + gui_state_t guistate; + int theme, oldtheme; + + struct cbistate + { + int maintab; + int stattab; + int arsetab; + int infotab; + + gui_typeon_state_t biptypeon; + gui_scroll_state_t bipscr; + gui_scroll_state_t bipinfoscr; + + void *logsel; + gui_scroll_state_t logscr; + + gui_scroll_state_t settingscr; + + int shopsel; + gui_scroll_state_t shopscr; + + int upgrsel; + int upgrselold; + int upgrfilter; + gui_typeon_state_t upgrtypeon; + gui_scroll_state_t upgrscr; + } st; + + int pruse; +} cbi_t; + +// Extern Functions ----------------------------------------------------------| + +void Lith_PlayerResetCBIGUI(struct player *p); + +#endif + diff --git a/source/Headers/lith_common.h b/source/Headers/lith_common.h new file mode 100644 index 0000000..a99c8e4 --- /dev/null +++ b/source/Headers/lith_common.h @@ -0,0 +1,106 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_COMMON_H +#define LITH_COMMON_H + +// unfortunate early project decisions. +#pragma GDCC FIXED_LITERAL ON +#pragma GDCC STRENT_LITERAL ON + +#include +#include +#include +#include +#include + +#include "lith_types.h" +#include "lith_memory.h" +#include "lith_drawing.h" +#include "lith_math.h" +#include "lith_str.h" + +#define strnull (__str)0 + +#define ifw(decl, ...) __with(decl;) if(__VA_ARGS__) +#define ifauto(type, name, ...) ifw(type name = (__VA_ARGS__), name) + +#define countof(a) (sizeof(a) / sizeof(*(a))) +#define swap(t, a, b) \ + do { \ + t _tmp = a; \ + a = b; \ + b = _tmp; \ + } while(0) + +#define IsSmallNumber(x) ((x) > -0.001 && (x) < 0.001) +#define CloseEnough(x, y) (IsSmallNumber(x - y)) +#define LogDebug(level, ...) \ + do if(ACS_GetCVar("__lith_debug_level") & (level)) \ + Log(#level ": " __VA_ARGS__); \ + while(0) + +#define TickerT(t, on, off) ((ACS_Timer() % 35) < (t) ? (on) : (off)) +#define Ticker(on, off) (TickerT(17, on, off)) + +#define Lith_PausableTick() \ + do ACS_Delay(1); \ + while(Lith_IsPaused) + +#define DebugStat(...) \ + (world.dbgLevel & log_devh ? Lith_DebugStat(__VA_ARGS__) : (void)0) + +#define DebugNote(...) \ + (world.dbgLevel & log_devh ? Lith_DebugNote(__VA_ARGS__) : (void)0) + +// Convenience names +#define InvNum ACS_CheckInventory +#define InvMax(arg) ACS_GetMaxInventory(0, arg) +#define InvTake ACS_TakeInventory +#define InvGive ACS_GiveInventory + +// Types ---------------------------------------------------------------------| + +enum { + log_none, + log_dev = 1 << 0, + log_devh = 1 << 1, + log_boss = 1 << 2, + log_dmon = 1 << 3, + log_dmonV = 1 << 4, + log_dlg = 1 << 5, +}; + +// Extern Functions ----------------------------------------------------------| + +void Log(__str fmt, ...); + +[[__call("StkCall")]] void Lith_FadeFlash(int r, int g, int b, fixed amount, fixed seconds); +[[__call("ScriptS"), __optional_args(1)]] int Lith_GetTID(int tid, int ptr); +[[__call("ScriptS"), __optional_args(1)]] int Lith_GetPlayerNumber(int tid, int ptr); +[[__call("ScriptS"), __optional_args(1)]] bool Lith_ValidPointer(int tid, int ptr); +[[__call("ScriptS"), __optional_args(2)]] bool Lith_SetPointer(int tid, int ptr, int assign, int tid2, int ptr2, int flags); +[[__call("StkCall")]] int Lith_CheckActorInventory(int tid, __str item); +[[__call("StkCall")]] void Lith_GiveActorInventory(int tid, __str item, int amount); +[[__call("StkCall")]] void Lith_TakeActorInventory(int tid, __str item, int amount); +[[__call("StkCall")]] void Lith_SetActorInventory (int tid, __str item, int amount); +void Lith_DebugStat(__str fmt, ...); +void Lith_DebugNote(__str fmt, ...); + +// Address Space Definitions -------------------------------------------------| + +// This doesn't actually cause anything bad to happen. ZDoom expects that all +// modules know the exact size of every array, even if they don't use them +// at all and even account for that. So, we hide this to hide warnings. +#ifndef EXTERNAL_CODE +__addrdef extern __mod_arr lmvar; +__addrdef extern __hub_arr lwvar; +#endif + +// Extern Objects ------------------------------------------------------------| + +#ifndef EXTERNAL_CODE +extern __str dbgstat[], dbgnote[]; +extern int dbgstatnum, dbgnotenum; +#endif + +#endif + diff --git a/source/Headers/lith_cps.h b/source/Headers/lith_cps.h new file mode 100644 index 0000000..8a34573 --- /dev/null +++ b/source/Headers/lith_cps.h @@ -0,0 +1,26 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. +#ifndef LITH_CPS_H +#define LITH_CPS_H + +#define Lith_CPS_Count(name) (countof(name) * 4) + +#define Lith_CPS_Len(len) ((len) / 4 + (len) % 4) + +#define Lith_CPS_Defn(name, len) \ + u32 (name)[Lith_CPS_Len(len)] = {} + +#define Lith_CPS_Decl(name, len) \ + u32 (name)[Lith_CPS_Len(len)] + +#define Lith_CPS_Shif(i, set) ((set) << ((i) % 4 * 8)) + +#define Lith_CPS_SetC(name, i, set) \ + ((name)[(i) / 4] &= ~Lith_CPS_Shif(i, 0xFF), \ + (name)[(i) / 4] |= Lith_CPS_Shif(i, set & 0xFF)) + +#define Lith_CPS_GetC(name, i) \ + (((name)[(i) / 4] & (0xFF << ((i) % 4 * 8))) >> ((i) % 4 * 8)) + +__str Lith_CPS_Print(u32 *cps); + +#endif diff --git a/source/Headers/lith_darray.h b/source/Headers/lith_darray.h new file mode 100644 index 0000000..d715811 --- /dev/null +++ b/source/Headers/lith_darray.h @@ -0,0 +1,30 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#ifndef lith_darray_h +#define lith_darray_h + +#include "lith_memory.h" + +#include + +#define Vec_Defn(type, name, ...) \ + __VA_ARGS__ type *name##V = NULL; \ + __VA_ARGS__ size_t name##C = 0, name##S = 0 + +#define Vec_Decl(type, name, ...) \ + __VA_ARGS__ type *name##V; \ + __VA_ARGS__ size_t name##C, name##S + +#define Vec_GrowN(vec, n, g) \ + ((vec##C) + (n) > (vec##S) ? \ + ((vec##S) += (n) + (g), \ + (vec##V) = Ralloc((vec##V), sizeof(*(vec##V)) * (vec##S))) : \ + (void *)0) + +#define Vec_Grow(vec, n) Vec_GrowN(vec, n, 8) + +#define Vec_Next(vec) ((vec##V)[(vec##C)++]) + +#define Vec_Clear(vec) \ + (Dalloc((vec##V)), (vec##V) = NULL, (vec##C) = (vec##S) = 0) + +#endif diff --git a/source/Headers/lith_dialogue.h b/source/Headers/lith_dialogue.h new file mode 100644 index 0000000..3faf18c --- /dev/null +++ b/source/Headers/lith_dialogue.h @@ -0,0 +1,118 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifdef DCD +// VM state +DCD(NOP) +DCD(DIE) + +// Stack +DCD(PUSH_I) +DCD(PUSH_A) +DCD(PUSH_B) +DCD(PUSH_C) +DCD(PUSH_D) + +DCD(POP) +DCD(POP_A) +DCD(POP_B) +DCD(POP_C) +DCD(POP_D) + +// Arithmetic +#define ArithSet(sfx) \ + DCD(ADD_##sfx) \ + DCD(SUB_##sfx) \ + DCD(MUL_##sfx) \ + DCD(DIV_##sfx) \ + DCD(MOD_##sfx) \ + DCD(IOR_##sfx) \ + DCD(AND_##sfx) \ + DCD(XOR_##sfx) \ + DCD(LSH_##sfx) \ + DCD(RSH_##sfx) +ArithSet(I) +ArithSet(A) +ArithSet(B) +ArithSet(C) +ArithSet(D) +#undef ArithSet + +// Jumps +DCD(JPAGE) +DCD(JMP) +DCD(JNZ) +DCD(JNITEM) +DCD(JNCLASS) + +// Interaction +DCD(SCRIPTI) +DCD(SCRIPTS) +DCD(TELEPORT_INTRALEVEL) +DCD(TELEPORT_INTERLEVEL) + +// Debugging +DCD(TRACE_S) +DCD(TRACE_A) +DCD(TRACE_B) +DCD(TRACE_C) +DCD(TRACE_D) + +// Shared +DCD(SETSTRING) +DCD(SETTEXT) +DCD(SETTEXTLOCAL) +DCD(ADDTEXT) +DCD(ADDTEXTLOCAL) +DCD(CONCAT) +DCD(CONCATEND) + +// Dialogue +DCD(PUTOPT) +DCD(DLGWAIT) + +// Terminal +DCD(LOGON) +DCD(LOGOFF) +DCD(INFO) +DCD(PICT) +DCD(TRMWAIT) +#undef DCD +#elif !defined(LITH_DIALOGUE_H) +#define LITH_DIALOGUE_H + +#include "lith_world.h" +#include "lith_darray.h" + +// Types ---------------------------------------------------------------------| + +enum +{ + #define DCD(name) DCD_##name, + #include "lith_dialogue.h" +}; + +enum +{ + DSTR_NAME = 0, + DSTR_ICON = 1, + DSTR_PICT = 1, + DSTR_REMOTE = 2, +}; + +enum +{ + DTRMPAGE_UNFINISHED = 0x7FFFFF0F, + DTRMPAGE_FINISHED, + DTRMPAGE_FAILURE, +}; + +struct dlgdef +{ + int num; + int pages[48]; + Vec_Decl(int, code); + + struct dlgdef *next; +}; + +#endif + diff --git a/source/Headers/lith_dlgstrtable.h b/source/Headers/lith_dlgstrtable.h new file mode 100644 index 0000000..c998066 --- /dev/null +++ b/source/Headers/lith_dlgstrtable.h @@ -0,0 +1,22 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +Str(NULL, "") +Str(class, "class") +Str(CyberMage, "CyberMage") +Str(dialogue, "dialogue") +Str(else, "else") +Str(exec, "exec") +Str(failure, "failure") +Str(finished, "finished") +Str(if, "if") +Str(item, "item") +Str(Marine, "Marine") +Str(option, "option") +Str(page, "page") +Str(terminal, "terminal") +Str(Informant, "Informant") +Str(unfinished, "unfinished") + +#undef Str + +// EOF + diff --git a/source/Headers/lith_drawing.h b/source/Headers/lith_drawing.h new file mode 100644 index 0000000..ee7525f --- /dev/null +++ b/source/Headers/lith_drawing.h @@ -0,0 +1,51 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. + +// Not 1.0 / 35.0 or even 0.028 because ZDoom is stupid. +#define TS (0.029) + +#define HudMessageLog(...) \ + ( \ + HudMessage(__VA_ARGS__), \ + ACS_OptHudMessage(HUDMSG_NOTWITHFULLMAP|HUDMSG_NOTWITH3DVIEW|HUDMSG_NOTWITHOVERLAYMAP|HUDMSG_LOG, hid_log_throwaway, CR_UNTRANSLATED, 0, 0, TS), \ + ACS_EndHudMessage() \ + ) + +#define HudMessageF(font, ...) \ + ( \ + ACS_SetFont(font), \ + HudMessage(__VA_ARGS__) \ + ) + +#define HudMessageParams(flags, id, tr, x, y, hold, ...) \ + ( \ + ACS_OptHudMessage((flags) | HUDMSG_NOTWITHFULLMAP, id, tr, x, y, hold), \ + ACS_EndHudMessage(__VA_ARGS__) \ + ) + +#define HudMessagePlain(id, x, y, hold) \ + ( \ + ACS_OptHudMessage(HUDMSG_PLAIN | HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold), \ + ACS_EndHudMessage() \ + ) + +#define HudMessageFade(id, x, y, hold, fadetime) \ + ( \ + ACS_OptHudMessage(HUDMSG_FADEOUT | HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold), \ + ACS_EndHudMessage(fadetime) \ + ) + +#define HudMessageAlpha(id, x, y, hold, alpha) \ + ( \ + HudMessageParams(HUDMSG_ALPHA, id, CR_UNTRANSLATED, x, y, hold, alpha) \ + ) + +[[__call("StkCall")]] void DrawSprite(__str name, int flags, int id, fixed x, fixed y, fixed hold); +[[__call("StkCall")]] void DrawSpriteX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1); +[[__call("StkCall")]] void DrawSpriteXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2); +[[__call("StkCall")]] void DrawSpriteXXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2, fixed a3); +[[__call("StkCall")]] void DrawSpritePlain(__str name, int id, fixed x, fixed y, fixed hold); +[[__call("StkCall")]] void DrawSpriteAlpha(__str name, int id, fixed x, fixed y, fixed hold, fixed alpha); +[[__call("StkCall")]] void DrawSpriteFade(__str name, int id, fixed x, fixed y, fixed hold, fixed fadetime); +void HudMessage(__str fmt, ...); + +// EOF diff --git a/source/Headers/lith_file.h b/source/Headers/lith_file.h new file mode 100644 index 0000000..49704c7 --- /dev/null +++ b/source/Headers/lith_file.h @@ -0,0 +1,14 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_FILE_H +#define LITH_FILE_H + +#include + +FILE *W_Open(__str fname, char const *mode); +FILE *Lith_NFOpen(int pnum, __str pcvar, char rw); +size_t Lith_FWrite32(void const *restrict ptr, size_t count, size_t bytes, FILE *restrict fp); +size_t Lith_FWrite_str(void const __str_ars *restrict ptr, size_t count, FILE *restrict fp); +size_t Lith_FRead32(void *restrict buf, size_t count, size_t bytes, FILE *restrict fp); + +#endif + diff --git a/source/Headers/lith_gui.h b/source/Headers/lith_gui.h new file mode 100644 index 0000000..6c94617 --- /dev/null +++ b/source/Headers/lith_gui.h @@ -0,0 +1,299 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=140 +#ifndef LITH_GUI_H +#define LITH_GUI_H + +#include "lith_cps.h" + +#define LineHash ((id_t)__LINE__ * FileHash) + +#define Pre(name) .preset = &guipre.name + +// Fixed ID +#define Lith_GUI_Button_FId(g, id, ...) Lith_GUI_Button_Impl (g, id, &(gui_button_args_t const){__VA_ARGS__}) +#define Lith_GUI_Checkbox_FId(g, id, ...) Lith_GUI_Checkbox_Impl (g, id, &(gui_checkb_args_t const){__VA_ARGS__}) +#define Lith_GUI_ScrollBegin_FId(g, id, ...) Lith_GUI_ScrollBegin_Impl(g, id, &(gui_scroll_args_t const){__VA_ARGS__}) +#define Lith_GUI_Slider_FId(g, id, ...) Lith_GUI_Slider_Impl (g, id, &(gui_slider_args_t const){__VA_ARGS__}) + +// Dynamic ID +#define Lith_GUI_Button_Id(g, id, ...) Lith_GUI_Button_FId (g, id + LineHash, __VA_ARGS__) +#define Lith_GUI_Checkbox_Id(g, id, ...) Lith_GUI_Checkbox_FId (g, id + LineHash, __VA_ARGS__) +#define Lith_GUI_ScrollBegin_Id(g, id, ...) Lith_GUI_ScrollBegin_FId(g, id + LineHash, __VA_ARGS__) +#define Lith_GUI_Slider_Id(g, id, ...) Lith_GUI_Slider_FId (g, id + LineHash, __VA_ARGS__) + +// Dynamic +#define Lith_GUI_Button(g, ...) Lith_GUI_Button_Id (g, 0, __VA_ARGS__) +#define Lith_GUI_Checkbox(g, ...) Lith_GUI_Checkbox_Id (g, 0, __VA_ARGS__) +#define Lith_GUI_ScrollBegin(g, ...) Lith_GUI_ScrollBegin_Id(g, 0, __VA_ARGS__) +#define Lith_GUI_Slider(g, ...) Lith_GUI_Slider_Id (g, 0, __VA_ARGS__) + +#define Lith_GUI_GenPreset(type, def) \ + type pre; \ + if(a->preset) pre = *a->preset; \ + else pre = def + +#define Lith_GUI_Prefix(set) \ + if(set) { \ + ACS_BeginPrint(); \ + ACS_PrintString(g->gfxprefix); \ + ACS_PrintString(set); \ + set = ACS_EndStrParam(); \ + } else (void)0 +#define Lith_GUI_Prefix1(g, pre, mem) \ + (!(pre)->external \ + ? ((pre)->mem ? (ACS_BeginPrint(), ACS_PrintString((g)->gfxprefix), ACS_PrintString((pre)->mem), ACS_EndStrParam()) : null) \ + : (pre)->mem) + +#define Lith_GUI_ScrollReset(g, st) \ + (*(st) = (gui_scroll_state_t){}) + +#define Lith_GUI_Tabs(g, st, names, x, y, yy) \ + do { \ + for(int _i = 0; _i < countof(names); _i++) \ + { \ + if(Lith_GUI_Button_Id(g, _i, names[_i], guipre.btntab.w * _i + (x), \ + guipre.btntab.h * (yy) + (y), _i == *(st), .preset = &guipre.btntab)) \ + { \ + *(st) = _i; \ + } \ + } \ + } while(0) + +#define Lith_GUI_BasicCheckbox(g, st, ...) \ + if(Lith_GUI_Checkbox((g), *(st), __VA_ARGS__)) \ + *(st) = !*(st); \ + else \ + (void)0 + +// Types ---------------------------------------------------------------------| + +typedef u32 id_t; + +typedef struct gui_scroll_state_s +{ + int ox; + int oy; + int occludeS; + int occludeE; + double y; + double grabpos; + bool grabbed; + int nextsnd; +} gui_scroll_state_t; + +typedef struct gui_typeon_state_s +{ + __str txt; + int len; + int pos; +} gui_typeon_state_t; + +typedef struct gui_delta_s +{ + float cx, cy; + bool clicklft : 1; + bool clickrgt : 1; + bool clickany : 1; +} gui_delta_t; + +typedef struct gui_state_s +{ + [[__anonymous]] gui_delta_t cur; + gui_delta_t old; + + int ox, oy; + int w, h; + + id_t active, hot, slide; + int slidecount, slidetime; + + bool useclip; + int clpxS, clpyS, clpxE, clpyE; + + void *state; + int hid; + + __str gfxprefix; +} gui_state_t; + +typedef struct gui_button_preset_s +{ + __str gfx; + __str hot; + __str snd; + __str cdef; + __str cact; + __str chot; + __str cdis; + __str font; + int ax; + int ay; + int w; + int h; + bool external; +} gui_button_preset_t; + +typedef struct gui_button_args_s +{ + __str label; + int x, y; + bool disabled; + __str color; + bool slide; + gui_button_preset_t const *preset; +} gui_button_args_t; + +typedef struct gui_checkb_preset_s +{ + __str gfx; + __str hot; + __str dis; + __str sndup; + __str snddn; + __str chkgfx; + __str chkhot; + __str chkact; + __str chkdis; + bool external; + int w; + int h; +} gui_checkb_preset_t; + +typedef struct gui_checkb_args_s +{ + bool on; + int x, y; + bool disabled; + gui_checkb_preset_t const *preset; +} gui_checkb_args_t; + +typedef struct gui_scroll_preset_s +{ + __str capS; + __str capE; + __str scrl; + __str notchgfx; + __str notchhot; + bool external; + int scrlw; + int scrlh; +} gui_scroll_preset_t; + +typedef struct gui_scroll_args_s +{ + gui_scroll_state_t *st; + int x; + int y; + int w; + int h; + int contenth; + int ww; + gui_scroll_preset_t const *preset; +} gui_scroll_args_t; + +typedef struct gui_slider_preset_s +{ + __str gfx; + __str snd; + __str notch; + __str notchhot; + __str font; + bool external; + int pad; + int w; + int h; +} gui_slider_preset_t; + +typedef struct gui_slider_args_s +{ + int x; + int y; + double minima; + double maxima; + double val; + bool integ; + __str suf; + gui_slider_preset_t const *preset; +} gui_slider_args_t; + +struct gui_presets { + gui_button_preset_t btndef; + gui_button_preset_t btntab; + gui_button_preset_t btnexit; + gui_button_preset_t btnnext; + gui_button_preset_t btnprev; + gui_button_preset_t btnnexts; + gui_button_preset_t btnprevs; + gui_button_preset_t btnlist; + gui_button_preset_t btnlistsel; + gui_button_preset_t btnlistactive; + gui_button_preset_t btnlistactivated; + gui_button_preset_t btnbipmain; + gui_button_preset_t btnbipback; + gui_button_preset_t btndlgsel; + gui_button_preset_t btnclear; + gui_button_preset_t btnnote; + gui_checkb_preset_t cbxdef; + gui_checkb_preset_t cbxsmall; + gui_scroll_preset_t scrdef; + gui_slider_preset_t slddef; +}; + +enum cursor +{ + gui_curs_green, + gui_curs_pink, + gui_curs_blue, + gui_curs_orange, + gui_curs_red, + gui_curs_white, + gui_curs_outline, + gui_curs_outline2, + gui_curs_outlineinv, + gui_curs_outline2inv, + gui_curs_max, +}; + +// Extern Objects ------------------------------------------------------------| + +#ifndef EXTERNAL_CODE +extern struct gui_presets const guipre; +#else +struct gui_presets const *Lith_GUIPreExtern(void); +#define guipre (*Lith_GUIPreExtern()) +#endif + +// Extern Functions ----------------------------------------------------------| + +[[__optional_args(1)]] +void Lith_GUI_Auto(gui_state_t *g, id_t id, int x, int y, int w, int h, bool slide); + +[[__optional_args(1)]] +void Lith_GUI_Init(gui_state_t *g, void *state); + +void Lith_GUI_UpdateState(gui_state_t *g, struct player *p); + +[[__optional_args(2)]] +void Lith_GUI_Begin(gui_state_t *g, int basehid, int w, int h); +void Lith_GUI_End(gui_state_t *g, enum cursor curs); + +[[__optional_args(1)]] +void Lith_GUI_Clip(gui_state_t *g, int x, int y, int w, int h, int ww); +void Lith_GUI_ClipRelease(gui_state_t *g); + +__str Lith_RemoveTextColors(__str str, int size); + +void Lith_GUI_TypeOn(gui_state_t *g, gui_typeon_state_t *typeon, __str text); +gui_typeon_state_t const *Lith_GUI_TypeOnUpdate(gui_state_t *g, gui_typeon_state_t *typeon); + +void Lith_GUI_ScrollEnd(gui_state_t *g, gui_scroll_state_t *scr); +[[__optional_args(1)]] +bool Lith_GUI_ScrollOcclude(gui_state_t *g, gui_scroll_state_t const *scr, int y, int h); + +bool Lith_GUI_Button_Impl (gui_state_t *g, id_t id, gui_button_args_t const *a); +bool Lith_GUI_Checkbox_Impl (gui_state_t *g, id_t id, gui_checkb_args_t const *a); +void Lith_GUI_ScrollBegin_Impl(gui_state_t *g, id_t id, gui_scroll_args_t const *a); +double Lith_GUI_Slider_Impl (gui_state_t *g, id_t id, gui_slider_args_t const *a); + +#endif + diff --git a/source/Headers/lith_hudid.h b/source/Headers/lith_hudid.h new file mode 100644 index 0000000..649edf2 --- /dev/null +++ b/source/Headers/lith_hudid.h @@ -0,0 +1,171 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_HUDID_H +#define LITH_HUDID_H + +enum +{ + // hid_base to hid_base + 99 reserved for magic + // hid_base + 100 to hid_base + 999 reserved for dialogue + // hid_base + 1000 to hid_base + 29999 reserved for CBI + // hid_base + 40000 to hid_base + 40999 reserved for payout + // hid_base + 41000 to hid_base + 41999 reserved for misc. + // hid_base + 42000 to hid_base + 42999 reserved for HUD + // hid_base + 43000 to hid_base + 44999 reserved for scopes + // hid_base + 45000 reserved for debug + hid_base = 0x100000, + + // Magic + hid_begin_magic = hid_base, + hid_end_magic = hid_base + 98, + + hid_magicsel, + + // Dialogue + hid_base_dialogue = hid_base + 100, + hid_end_dialogue = hid_base + 999, + + // CBI + hid_base_cbi = hid_base + 1000, + hid_end_cbi = hid_base + 29999, + + // Payout + hid_base_payout = hid_base + 40000, + hid_end_payout = hid_base + 40999, + + // Misc. + hid_base_misc = hid_base + 41000, + hid_end_misc = hid_base + 41999, + + hid_implyingE = hid_base_misc, + hid_implyingS = hid_implyingE + 200, + + hid_blade, + + hid_sigil_title, + hid_sigil_subtitle, + + hid_zoomvignette, + hid_zoombase, + hid_zoomcomp, + hid_zoomcam = hid_zoomcomp + 8, + + hid_teleportback, + hid_teleport, + + hid_log_throwaway, + + // HUD + hid_base_hud = hid_base + 42000, + hid_end_hud = hid_base + 42999, + + hid_logAddE = hid_base_hud, + hid_logAddS = hid_logAddE + 20, + + hid_logE, + hid_logS = hid_logE + 20, + + hid_vscbar, + hid_vscbarn, + hid_vschp, + hid_vsctag, + hid_vschitE, + hid_vschitS = hid_vschitE + 5, + hid_vscrankE, + hid_vscrankS = hid_vscrankE + 20, + + hid_jetE, + hid_jetS = hid_jetE + 15, + hid_jettext, + hid_jetbg, + + hid_weaponcurE, + hid_weaponcurS = hid_weaponcurE + 9, + + hid_weapontextE, + hid_weapontextS = hid_weapontextE + 9, + + hid_weaponE, + hid_weaponS = hid_weaponE + 9, + hid_weaponbg, + + hid_magicammo2, + hid_magicammo1, + hid_magicammobg, + hid_magicsymbol, + + hid_ammo1, + hid_ammo2, + hid_ammotype, + hid_ammotypebg, + hid_ammobg1, + hid_ammobg2, + hid_riflemode, + hid_riflemodebg, + hid_rifleheat = hid_riflemode, + hid_rifleheatbg = hid_riflemodebg, + + hid_adrenind_fxE, + hid_adrenind_fxS = hid_adrenind_fxE + 45, + + hid_slideind_fxE, + hid_slideind_fxS = hid_slideind_fxE + 11, + + hid_healthhit, + hid_health, + hid_healthtxt, + hid_healthbg, + hid_healthbg_fxE, + hid_healthbg_fxS = hid_healthbg_fxE + 32, + + hid_rarmortxt, + hid_rarmorbg, + + hid_armorhit, + hid_armor, + hid_armortxt, + hid_armorbg, + hid_armorbg_fxE, + hid_armorbg_fxS = hid_armorbg_fxE + 42, + + hid_scorehit, + hid_score, + hid_scoreaccum, + + hid_key_blue, + hid_key_yellow, + hid_key_red, + + hid_key_blueskull, + hid_key_yellowskull, + hid_key_redskull, + + // Scope + hid_base_scope = hid_base + 43000, + hid_end_scope = hid_base + 44999, + + hid_scope_sineE = hid_base_scope, + hid_scope_sineS = hid_scope_sineE + 200, + hid_scope_squareE, + hid_scope_squareS = hid_scope_squareE + 200, + hid_scope_triE, + hid_scope_triS = hid_scope_triE + 200, + hid_scope_stringstackE, + hid_scope_stringstackS = hid_scope_stringstackE + 200, + hid_scope_overlayE, + hid_scope_overlayS = hid_scope_overlayE + 5, + hid_scope_lineE, + hid_scope_lineS = hid_scope_lineE + 200, + + hid_rifle_scope_xhair, + hid_rifle_scope_img, + hid_rifle_scope_cam, + + hid_scope_clearS = hid_scope_sineE, + hid_scope_clearE = hid_scope_stringstackS, + + // Debug + hid_debug = hid_base + 45000, +}; + +#endif + diff --git a/source/Headers/lith_list.h b/source/Headers/lith_list.h new file mode 100644 index 0000000..a7302d8 --- /dev/null +++ b/source/Headers/lith_list.h @@ -0,0 +1,54 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_LIST_H +#define LITH_LIST_H + +#include "lith_common.h" + +#include + +#define forlist(var, name) \ + for(list_t *rover = (name).next, *nextp; rover && rover != &(name); rover = nextp) \ + __with(nextp = rover->next; var = rover->object;) + +#define forlistIt(var, name, ...) \ + for(list_t *rover = (name).next; rover && rover != &(name); rover = rover->next, __VA_ARGS__) \ + __with(var = rover->object;) + +// Extern Functions ----------------------------------------------------------| + +[[__optional_args(1)]] void Lith_LinkDefault(struct list_s *list, void *object); +void Lith_ListLink(struct list_s *head, struct list_s *list); +void *Lith_ListUnlink(struct list_s *list); +size_t Lith_ListSize(struct list_s *head); +[[__optional_args(1)]] void Lith_ListFree(struct list_s *head, bool dofree); + +// Type Definitions ----------------------------------------------------------| + +// To clarify how these new linked list structures work: +// You put a list_t in your structure (or anywhere, you could allocate one) +// and run LinkDefault on it to construct it proper. +// +// You can then have a head node which you iterate over. The head itself is +// a dummy node with no object, but you can iterate over it bidirectionally, +// as the back is head->prev and the front is head->next. +// +// This removes any real need to reverse a linked list, and you can insert +// backwards. Just be careful that all the nodes get constructed correctly. +// +// You can delete an entire list (destroying objects with a custom function or +// not at all) with ListFree, and get the size of a headed list with ListSize. + +typedef struct list_s +{ + __prop construct {call: Lith_LinkDefault(this)} + __prop link {call: Lith_ListLink(__arg, this)} + __prop unlink {call: Lith_ListUnlink(this)} + __prop size {get: Lith_ListSize(this)} + __prop free {call: Lith_ListFree(this)} + + void *object; + struct list_s *prev, *next; +} list_t; + +#endif + diff --git a/source/Headers/lith_log.h b/source/Headers/lith_log.h new file mode 100644 index 0000000..d82da08 --- /dev/null +++ b/source/Headers/lith_log.h @@ -0,0 +1,48 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_LOG_H +#define LITH_LOG_H + +#include "lith_lognames.h" +#include "lith_list.h" + +#include + +#define LOG_TIME 140 +#define LOG_MAX 7 + +typedef struct logmap_s +{ + int levelnum; + __str name; + list_t link; +} logmap_t; + +typedef struct logdata_s +{ + __str info; + int time; + int from; + bool keep; + list_t link; + list_t linkfull; +} logdata_t; + +typedef struct loginfo_s +{ + list_t hud; + list_t full; + list_t maps; +} loginfo_t; + +void Lith_Log(struct player *p, __str fmt, ...); // log to hud and full log +void Lith_LogF(struct player *p, __str fmt, ...); // log to full log only +void Lith_LogH(struct player *p, __str fmt, ...); // log to hud only +logdata_t *Lith_LogV(struct player *p, __str fmt, va_list vl); // vararg +void Lith_PlayerLogEntry(struct player *p); + +[[__call("ScriptS")]] void Lith_HUD_Log(struct player *p); + +#endif + +// EOF + diff --git a/source/Headers/lith_lognames.h b/source/Headers/lith_lognames.h new file mode 100644 index 0000000..3b587ef --- /dev/null +++ b/source/Headers/lith_lognames.h @@ -0,0 +1,42 @@ +// dec output: pk/lscripts/Headers/lith_lognames.h + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_LogName +{ + msg_null, + msg_min, + msg_allmap = msg_min, + msg_armorbonus, + msg_backpack, + msg_berserk, + msg_bluearmor, + msg_blursphere, + msg_greenarmor, + msg_healthbonus, + msg_infrared, + msg_invuln, + msg_medikit, + msg_megasphere, + msg_radsuit, + msg_soulsphere, + msg_stimpack, + msg_redcard, + msg_bluecard, + msg_yellowcard, + msg_redskull, + msg_blueskull, + msg_yellowskull, + msg_doggosphere, + msg_dogs, + msg_clip, + msg_clipbox, + msg_shell, + msg_shellbox, + msg_rocket, + msg_rocketbox, + msg_cell, + msg_cellbox, + msg_max +}; + +// EOF diff --git a/source/Headers/lith_math.h b/source/Headers/lith_math.h new file mode 100644 index 0000000..1f1ad3b --- /dev/null +++ b/source/Headers/lith_math.h @@ -0,0 +1,34 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. + +#define max(x, y) ((x) < (y) ? (y) : (x)) +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define minmax(x, mi, ma) (min(max(x, mi), ma)) + +// To make pitch values down=0, up=1 +#define PITCH_BASE (-0.5) + +// π! +#define pi (3.14159265358979323846f) +#define pi2 (pi / 2.0f) +#define pi4 (pi / 4.0f) +#define tau (pi * 2.0f) + +[[__optional_args(1)]] u64 Lith_CRC64(void const *data, size_t len, u64 result); +[[__optional_args(1)]] u64 Lith_CRC64_str(void __str_ars const *data, size_t len, u64 result); +[[__optional_args(1)]] float RandomFloat(float max, float min); +float mag2f(float x, float y); +[[__call("StkCall")]] fixed mag2k(fixed x, fixed y); +[[__call("StkCall")]] int mag2i(int x, int y); +fixed lerpk(fixed a, fixed b, fixed t); +fixed64 lerplk(fixed64 a, fixed64 b, fixed64 t); +float lerpf(float a, float b, float t); +double lerp(double a, double b, double t); +[[__call("StkCall")]] bool aabb(int x, int y, int z, int w, int x2, int y2); +[[__call("StkCall")]] int ceilk(fixed n); +[[__call("StkCall")]] float bzpolyf(float a, float b, float t); +[[__call("StkCall")]] int bzpolyi(int a, int b, float t); +struct vec2i qbezieri(int x1, int y1, int x2, int y2, int x3, int y3, float t); +struct vec2f qbezierf(float x1, float y1, float x2, float y2, float x3, float y3, float t); +struct polar ctopol(fixed x, fixed y); + +// EOF diff --git a/source/Headers/lith_memory.h b/source/Headers/lith_memory.h new file mode 100644 index 0000000..f17be77 --- /dev/null +++ b/source/Headers/lith_memory.h @@ -0,0 +1,21 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. +#ifndef LITH_MEMORY_H +#define LITH_MEMORY_H + +#if LITH_MEMORY_DEBUG +#include +#pragma GDCC STRENT_LITERAL ON +#define Salloc(t) (printf(c"%S:%i: Salloc\n", __FILE__, __LINE__), calloc(1, sizeof(t))) +#define Malloc(s) (printf(c"%S:%i: Malloc\n", __FILE__, __LINE__), malloc(s)) +#define Calloc(n, s) (printf(c"%S:%i: Calloc\n", __FILE__, __LINE__), calloc(n, s)) +#define Ralloc(p, s) (printf(c"%S:%i: Ralloc\n", __FILE__, __LINE__), realloc(p, s)) +#define Dalloc(p) (printf(c"%S:%i: Dalloc\n", __FILE__, __LINE__), free(p)) +#else +#define Salloc(t) calloc(1, sizeof(t)) +#define Malloc(s) malloc(s) +#define Calloc(n, s) calloc(n, s) +#define Ralloc(p, s) realloc(p, s) +#define Dalloc(p) free(p) +#endif + +#endif diff --git a/source/Headers/lith_monster.h b/source/Headers/lith_monster.h new file mode 100644 index 0000000..ecae4eb --- /dev/null +++ b/source/Headers/lith_monster.h @@ -0,0 +1,73 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_MONSTER_H +#define LITH_MONSTER_H + +#include "lith_common.h" +#include "lith_list.h" + +#define MAXRANK 5 +#define MAXLEVEL 150 + +enum dmgtype { + dmgtype_bullets, + dmgtype_energy, + dmgtype_fire, + dmgtype_magic, + dmgtype_melee, + dmgtype_shrapnel, + dmgtype_max +}; + +enum mtype { + mtype_unknown, + mtype_zombie, + mtype_imp, + mtype_demon, + mtype_lostsoul, + mtype_mancubus, + mtype_arachnotron, + mtype_cacodemon, + mtype_hellknight, + mtype_baron, + mtype_revenant, + mtype_painelemental, + mtype_archvile, + mtype_mastermind, + mtype_cyberdemon, + mtype_phantom, + mtype_max +}; + +struct dmon { + bool active; + int id; + enum mtype type; + + bool wasdead; + u64 exp; + int level; + int rank; + int maxhealth; + int resist[dmgtype_max]; + int painresist; + i96 score; + + struct dmon_stat *ms; +}; + +__addrdef extern __mod_arr dmonarr; + +typedef struct dmon dmonarr dmon_t; + +#ifndef EXTERNAL_CODE +extern int dmonarr dmonid; +#endif + +[[__call("ScriptS"), __optional_args(2)]] dmon_t *DmonPtr(int tid, int ptr); +dmon_t *Dmon(int id); +dmon_t *AllocDmon(void); + +void PrintDmonAllocSize(struct player *p); + +#endif//LITH_MONSTER_H + diff --git a/source/Headers/lith_pdata.h b/source/Headers/lith_pdata.h new file mode 100644 index 0000000..b814480 --- /dev/null +++ b/source/Headers/lith_pdata.h @@ -0,0 +1,47 @@ +// dec output: pk/lscripts/Headers/lith_pdata.h + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_PData +{ + pdata_upgrade, + pdata_rifle_firemode, + pdata_buttons, + pdata_has_sigil, + pdata_weapon_zoom, + pdata_pclass +}; + +enum // Lith_PClass +{ + pcl_unknown, + + // Base Classes + pcl_marine = 1 << 0, + pcl_cybermage = 1 << 1, + pcl_informant = 1 << 2, + pcl_wanderer = 1 << 3, + pcl_assassin = 1 << 4, + pcl_darklord = 1 << 5, + pcl_thoth = 1 << 6, + + // Mods + pcl_fdoomer = 1 << 7, + pcl_drla = 1 << 8, + + // Groups + pcl_outcasts = pcl_marine | pcl_cybermage, + pcl_missioners = pcl_informant | pcl_wanderer, + pcl_intruders = pcl_assassin | pcl_darklord | pcl_thoth, + pcl_mods = pcl_fdoomer | pcl_drla, + + // Lifeform Type + pcl_human = pcl_marine | pcl_cybermage | pcl_assassin | pcl_mods, + pcl_nonhuman = pcl_wanderer | pcl_darklord | pcl_thoth, + pcl_robot = pcl_informant, + + // Misc. Abilities + pcl_any = pcl_outcasts | pcl_missioners | pcl_intruders | pcl_mods, + pcl_magicuser = pcl_cybermage | pcl_wanderer | pcl_thoth, +}; + +// EOF diff --git a/source/Headers/lith_player.h b/source/Headers/lith_player.h new file mode 100644 index 0000000..8c331d2 --- /dev/null +++ b/source/Headers/lith_player.h @@ -0,0 +1,368 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#if defined(LITH_X) +// Shorthand and classes. For parsing and headers. +LITH_X(pM, pcl_marine) +LITH_X(pC, pcl_cybermage) +LITH_X(pI, pcl_informant) +LITH_X(pW, pcl_wanderer) +LITH_X(pA, pcl_assassin) +LITH_X(pD, pcl_darklord) +LITH_X(pT, pcl_thoth) + +LITH_X(gO, pcl_outcasts) +LITH_X(gM, pcl_missioners) +LITH_X(gI, pcl_intruders) +LITH_X(gA, pcl_any) +LITH_X(gH, pcl_human) +LITH_X(gN, pcl_nonhuman) +LITH_X(gR, pcl_robot) +LITH_X(gX, pcl_mods) +#undef LITH_X +#elif !defined(LITH_PLAYER_H) +#define LITH_PLAYER_H + +#include "lith_common.h" +#include "lith_cbi.h" +#include "lith_upgrades.h" +#include "lith_pdata.h" +#include "lith_bip.h" +#include "lith_log.h" +#include "lith_list.h" +#include "lith_weaponinfo.h" +#include "lith_shopdef.h" +#include "lith_attrib.h" + +#include + +#define MAX_PLAYERS 8 + +#define Lith_ForPlayer() \ + for(int _piter = 0; _piter < MAX_PLAYERS; _piter++) \ + __with(struct player *p = &players[_piter];) \ + if(p->active) + +#define Lith_GiveAllScore(score, nomul) \ + Lith_ForPlayer() \ + p->giveScore(score, nomul) + +#define Lith_GiveAllEXP(amt) \ + Lith_ForPlayer() \ + p->giveEXP(amt) + +#define LocalPlayer \ + (ACS_PlayerNumber() < 0 ? null : &players[ACS_PlayerNumber()]) +#define PlayerDiscount(n) (i96)((n) * p->discount) +#define NoPlayer(p) (!(p) || !(p)->active) +#define withplayer(ptr) \ + __with(struct player *p = (ptr);) \ + if(!NoPlayer(p)) + +// Types ---------------------------------------------------------------------| + +GDCC_HashMap_Decl(upgrademap_t, int, upgrade_t) + +enum +{ +#define LITH_X(l, r) l = r, +#include "lith_player.h" +}; + +enum +{ + pro_none, + pro_male, + pro_female, + pro_object, + pro_max, +}; + +enum +{ + GUI_NONE, + GUI_CBI, + GUI_MAX +}; + +// +// player_delta +// +// Data that needs to be kept track of between frames. +// +struct player_delta +{ + // Status + int maxhealth; + fixed alpha; + i96 score; + int indialogue; + + // Position + fixed x, y, z; + fixed floorz; + fixed pitch, yaw, roll; + + // Movement + fixed velx, vely, velz; + fixed pitchv, yawv; + fixed forwardv, sidev, upv; + fixed speedmul; + fixed jumpboost; + + // Input + int buttons; + bool scopetoken; + int frozen; + int semifrozen; + + // Attributes + struct player_attributes attr; +}; + +// Extern Functions ----------------------------------------------------------| + +// state +[[__call("ScriptS")]] void Lith_ResetPlayer(struct player *p); +[[__call("ScriptS")]] void Lith_PlayerLoadData(struct player *p); +[[__call("ScriptS")]] void Lith_PlayerSaveData(struct player *p); +[[__call("StkCall")]] int Lith_PlayerCurWeaponType(struct player *p); +[[__call("StkCall")]] bool Lith_ButtonPressed(struct player *p, int bt); +[[__call("StkCall"), __optional_args(1)]] bool Lith_SetPlayerVelocity(struct player *p, fixed velx, fixed vely, fixed velz, bool add); +void Lith_ValidatePlayerTID(struct player *p); + +// gui +[[__call("StkCall")]] void Lith_PlayerCloseGUI(struct player *p); +[[__call("StkCall")]] void Lith_PlayerUseGUI(struct player *p, int type); + +// score +[[__optional_args(1)]] i96 Lith_GiveScore(struct player *p, i96 score, bool nomul); +[[__call("StkCall")]] void Lith_TakeScore(struct player *p, i96 score); + +// attributes +[[__call("StkCall")]] void Lith_GiveEXP(struct player *p, u64 amt); + +// misc +upgrade_t *Lith_PlayerGetNamedUpgrade(struct player *p, int name); +bool Lith_PlayerGetUpgradeActive(struct player *p, int name); +[[__call("StkCall")]] void Lith_ClearTextBuf(struct player *p); +[[__call("StkCall")]] __str Lith_PlayerDiscriminator(int pclass); + +[[__call("ScriptS")]] void Lith_PlayerUpdateData(struct player *p); + +[[__call("StkCall")]] void Lith_PlayerUpdateStats(struct player *p); + +void Lith_HUD_DrawWeaponSlots(struct player *p, int const *ncol, int ncols, + char scol, int bx, int by); + +struct player *Lith_GetPlayer(int tid, int ptr); + +// Types ---------------------------------------------------------------------| + +// +// struct player +// +// 7/4/2016: That's a lot of data! +// edit 9/4/2016: Holy shit, that's really a lot of data! +// edit 7/5/2016: JESUS TAKE THE WHEEL +// edit 3/1/2017: help +// edit 6/1/2017: there's so much data that I had to split it +// edit 23/1/2017: D E S T R O Y +// edit 26/2/2017: There is yet again so much data that I had to split it. +// edit 11/3/2017: NOW WITH PROPERTY HELL +// edit 11/7/2017: and now it's over 5000 bytes. +// edit 14/7/2017: lol nevermind it's only 2kb now +// edit 31/8/2017: m e r g e +// +struct player +{ + // Properties -------------------------------------------------------------| + + // state + __prop reset {call: Lith_ResetPlayer(this)} + __prop loadData {call: Lith_PlayerLoadData(this)} + __prop saveData {call: Lith_PlayerSaveData(this)} + __prop weapontype {get: Lith_PlayerCurWeaponType(this)} + __prop buttonPressed {call: Lith_ButtonPressed(this)} + __prop setVel {call: Lith_SetPlayerVelocity(this)} + __prop mana {get: Lith_CheckActorInventory(->tid, "Lith_MagicAmmo")} + __prop manamax {get: ACS_GetMaxInventory(->tid, "Lith_MagicAmmo")} + __prop validateTID {call: Lith_ValidatePlayerTID(this)} + __prop health {get: ACS_GetActorProperty(->tid, APROP_Health), + set: ACS_SetActorProperty(->tid, APROP_Health)} + __prop setActivator {call: ACS_SetActivator(->tid)} + __prop getVel {call: mag2k(->velx, ->vely)} + + // score + __prop giveScore {call: Lith_GiveScore(this)} + __prop takeScore {call: Lith_TakeScore(this)} + + // attributes + __prop giveEXP {call: Lith_GiveEXP(this)} + + // log + __prop log {call: Lith_Log (this)} + __prop logF {call: Lith_LogF(this)} + __prop logH {call: Lith_LogH(this)} + + // gui + __prop useGUI {call: Lith_PlayerUseGUI(this)} + __prop closeGUI {call: Lith_PlayerCloseGUI(this)} + + // misc + __prop getUpgr {call: Lith_PlayerGetNamedUpgrade(this)} + __prop getUpgrActive {call: Lith_PlayerGetUpgradeActive(this)} + __prop deliverMail {call: Lith_DeliverMail(this)} + __prop clearTextBuf {call: Lith_ClearTextBuf(this)} + __prop bipUnlock {call: Lith_UnlockBIPPage(->bipptr, __arg, ->pclass)} + __prop discrim {get: Lith_PlayerDiscriminator(->pclass)} + __prop classname {get: ACS_GetActorPropertyString(->tid, APROP_NameTag)} + + // cvars + __prop getCVarI {call: ACS_GetUserCVar (->num)} + __prop getCVarK {call: ACS_GetUserCVarFixed (->num)} + __prop getCVarS {call: ACS_GetUserCVarString(->num)} + __prop setCVarI {call: ACS_SetUserCVar (->num)} + __prop setCVarK {call: ACS_SetUserCVarFixed (->num)} + __prop setCVarS {call: ACS_SetUserCVarString(->num)} + + // shop + __prop getCost {call: Lith_ShopGetCost(this)} + __prop canBuy {call: Lith_ShopCanBuy(this)} + __prop buy {call: Lith_ShopBuy(this)} + + // Members ----------------------------------------------------------------| + + // Initialization + bool wasinit; + bool active; + bool dead; + bool reinit; + + // Info + int tid; + int num; + u64 ticks; + __str name; + int pclass; + __str pcstr; + int pronoun; + int dlgnum; + + // Deltas + [[__anonymous]] + struct player_delta cur; + struct player_delta old; + int oldhealth; + + // BIP + bip_t bip, *bipptr; + + // Upgrades + struct upgr_data upgrdata; + upgrade_t upgrades[UPGR_STATIC_MAX]; + upgrademap_t upgrademap; + int upgrmax; + bool upgrinit; + + // HUD + loginfo_t loginfo; + bool hudenabled; + + // DECORATE/ZScript + int decvars[8]; + char txtbuf[8]; + int tbptr; + + // Score + i96 scoreaccum; + __str scoreaccumstr; + int scoreaccumtime; + double scoremul; + float discount; + + // Misc + int spuriousexplosions; + int brouzouf; + bool hadinfrared; + fixed rage; + bool autoreload; + + // Static data + bool staticinit; + int spawnhealth; + fixed spawndfactor; + fixed jumpheight; + fixed viewheight; + __str stepnoise; + + // pitch/yaw in precalculated sane radian format + float pitchf; + float yawf; + + // Additive angles + float addpitch; + float addyaw; + float addroll; + + // Damage bob angles + float bobpitch; + float bobyaw; + + // Extra angles + float extrpitch; + float extryaw; + + // View TIDs + int cameratid; + int weathertid; + + // GUI + int activegui; + cbi_t cbi; + + // Statistics + int weaponsheld; + int itemsbought; + int upgradesowned; + + i64 healthsum; + i64 healthused; + + i96 scoresum; + i96 scoreused; + + int unitstravelled; + + // Weapons + weapondata_t weapon; + + int riflefiremode; + list_t hudstrlist; + + __str weaponclass; + + // Keys + struct keycards_s + { + bool rc : 1, yc : 1, bc : 1; + bool rs : 1, ys : 1, bs : 1; + } keys; + + // ? 「÷」 0 + struct divsigil + { + bool acquired; + } sigil; +}; + +typedef void (*player_cb_t)(struct player *p); + +// Extern Objects ------------------------------------------------------------| + +#ifndef EXTERNAL_CODE +extern struct player players[MAX_PLAYERS]; +#else +struct player (*Lith_GetPlayersExtern(void))[MAX_PLAYERS]; +#define players (*Lith_GetPlayersExtern()) +#endif + +#endif diff --git a/source/Headers/lith_savedata.h b/source/Headers/lith_savedata.h new file mode 100644 index 0000000..05c6092 --- /dev/null +++ b/source/Headers/lith_savedata.h @@ -0,0 +1,62 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_SAVEDATA_H +#define LITH_SAVEDATA_H + +#include +#include + +#define FourCC(a, b, c, d) ((d << 24) | (c << 16) | (b << 8) | (a << 0)) + +// Lith: First valid chunk in save file. +// Ver. 7: Initial version. +// Ver. 14: Rewrite of save system. +// Ver. 15: Chunk format change. +#define Ident_Lith FourCC('L', 'i', 't', 'h') +#define SaveV_Lith 15 + +// Lend: Optional. Last valid chunk in save file. +#define Ident_Lend FourCC('L', 'e', 'n', 'd') +#define SaveV_Lend 0 + +#define Save_VersMask 0x000000FF +#define Save_FlagMask 0xFFFFFF00 +#define Save_FlagShft 8 + +// Types ---------------------------------------------------------------------| + +typedef uint32_t ident_t; + +// +// savechunk_t +// +typedef struct savechunk_s +{ + ident_t iden; // four char identifier + uint32_t vrfl; // version (lower 8 bits) + flags (upper 24 bits) + uint32_t size; // size of chunk data in bytes +} savechunk_t; + +// +// savefile_t +// +typedef struct savefile_s +{ + FILE *fp; + struct player *p; +} savefile_t; + +[[__call("ScriptS")]] typedef void (*loadchunker_t)(savefile_t *save, savechunk_t *chunk); + +// Extern Functions ----------------------------------------------------------| + +void Lith_SaveWriteChunk(savefile_t *save, ident_t iden, uint32_t vers, size_t size); +savefile_t *Lith_SaveBegin(struct player *p); +[[__call("ScriptS")]] void Lith_SaveEnd(savefile_t *save); + +[[__optional_args(1)]] +int Lith_LoadChunk(savefile_t *save, ident_t iden, uint32_t vers, loadchunker_t chunker); +savefile_t *Lith_LoadBegin(struct player *p); +void Lith_LoadEnd(savefile_t *save); + +#endif + diff --git a/source/Headers/lith_scorenums.h b/source/Headers/lith_scorenums.h new file mode 100644 index 0000000..24224d4 --- /dev/null +++ b/source/Headers/lith_scorenums.h @@ -0,0 +1,89 @@ +// dec output: pk/lscripts/Headers/lith_scorenums.h + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_ScoreNum +{ + // Score values + Score_Clip = 1000, + Score_ClipBox = 4000, + Score_Shell = 2000, + Score_ShellBox = 5000, + Score_Rocket = 3000, + Score_RocketBox = 6000, + Score_Cell = 4000, + Score_CellPack = 7000, + Score_Backpack = 10000, + + // Tier 1 + Score_ZombieMan = 1000, // Bullets + Score_ShotgunGuy = 2000, // Bullets + Score_ChaingunGuy = 2000, // Bullets + Score_Imp = 2000, // Fire + Score_DRLACaptain = 2000, // Bullets + + // Tier 2 + Score_Demon = 5000, // Melee + Score_Spectre = 7500, // Melee + Score_LostSoul = 500, // Melee + Score_Nitrogolem = 4000, // Melee, FireMagic + + // Tier 3 + Score_HellKnight = 7000, // Melee, Magic + Score_Revenant = 7000, // Melee, Shrapnel + Score_Cacodemon = 7000, // Melee, Energy + Score_Arachnotron = 7000, // Energy + Score_Mancubus = 7000, // Fire + Score_BaronOfHell = 8000, // Melee, Magic + Score_Ophidian = Score_Arachnotron, // Ice, Fire + + // Tier 4 + Score_PainElemental = 20000, // None + Score_Archvile = 40000, // FireMagic + + // Tier 5 + Score_SpiderDemon = 700000, // Bullets + Score_CyberDemon = 1500000, // Shrapnel + Score_Maulotaur = Score_SpiderDemon, // Melee, Fire + + // Tier 6 + Score_DSparil = 10000000, // Energy +}; + +enum // Lith_EXPNum +{ + // Tier 1 + Exp_ZombieMan = 5, + Exp_ShotgunGuy = 10, + Exp_ChaingunGuy = 15, + Exp_Imp = 5, + Exp_DRLACaptain = 30, + + // Tier 2 + Exp_Demon = 10, + Exp_Spectre = Exp_Demon, + Exp_LostSoul = 5, + Exp_Nitrogolem = 20, + + // Tier 3 + Exp_HellKnight = 80, + Exp_Revenant = 80, + Exp_Cacodemon = 50, + Exp_Arachnotron = 80, + Exp_Mancubus = 50, + Exp_BaronOfHell = 100, + Exp_Ophidian = 50, + + // Tier 4 + Exp_PainElemental = 100, + Exp_Archvile = 200, + + // Tier 5 + Exp_SpiderDemon = 3000, + Exp_CyberDemon = 4000, + Exp_Maulotaur = 1000, + + // Tier 6 + Exp_DSparil = 9000, +}; + +// EOF diff --git a/source/Headers/lith_shopdef.h b/source/Headers/lith_shopdef.h new file mode 100644 index 0000000..097e93e --- /dev/null +++ b/source/Headers/lith_shopdef.h @@ -0,0 +1,28 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_SHOPDEF_H +#define LITH_SHOPDEF_H + +enum +{ + shoptype_items, + shoptype_upgrades, + shoptype_max +}; + +typedef struct shopdef +{ + __str name; + __str bipunlock; + i96 cost; + + void (*shopBuy) (struct player *p, struct shopdef const *def, void *obj); + bool (*shopCanBuy)(struct player *p, struct shopdef const *def, void *obj); + bool (*shopGive) (struct player *p, struct shopdef const *def, void *obj, int tid); +} shopdef_t; + +i96 Lith_ShopGetCost(struct player *p, shopdef_t const *def); +bool Lith_ShopCanBuy(struct player *p, shopdef_t const *def, void *obj); +[[__optional_args(1)]] bool Lith_ShopBuy(struct player *p, shopdef_t const *def, void *obj, __str namefmt, bool nodelivery, bool nolog); + +#endif + diff --git a/source/Headers/lith_str.h b/source/Headers/lith_str.h new file mode 100644 index 0000000..82a8b0b --- /dev/null +++ b/source/Headers/lith_str.h @@ -0,0 +1,14 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. + +__str StrUpper(__str in); +[[__call("StkCall")]] u32 StrHash(char __str_ars const *s); +[[__call("StkCall")]] u32 CStrHash(char const *s); +char *Lith_strcpy_str(char *dest, char __str_ars const *src); +int Lith_strcmp_str(char const *s1, char __str_ars const *s2); +[[__call("StkCall")]] __str Lith_ScoreSep(i96 num); +__str Language(__str fmt, ...); +__str LanguageNull(__str fmt, ...); +__str StrParam(__str fmt, ...); +void StrParamBegin(__str fmt, ...); + +// EOF diff --git a/source/Headers/lith_tokbuf.h b/source/Headers/lith_tokbuf.h new file mode 100644 index 0000000..e75da82 --- /dev/null +++ b/source/Headers/lith_tokbuf.h @@ -0,0 +1,55 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#ifndef lith_tokbuf_h +#define lith_tokbuf_h + +#include "lith_token.h" + +#include + +// Extern Functions ----------------------------------------------------------| + +void Lith_TBufCtor (struct tokbuf *tb); +void Lith_TBufDtor (struct tokbuf *tb); +struct token *Lith_TBufGet (struct tokbuf *tb); +struct token *Lith_TBufPeek (struct tokbuf *tb); +struct token *Lith_TBufUnGet(struct tokbuf *tb); +struct token *Lith_TBufReGet(struct tokbuf *tb); +bool Lith_TBufDrop (struct tokbuf *tb, int t); + +int Lith_TBufProc (struct token *tok, void *udata); +int Lith_TBufProcL(struct token *tok, void *udata); + +// Types ---------------------------------------------------------------------| + +enum +{ + tokproc_next, + tokproc_done, + tokproc_skip +}; + +struct tokbuf +{ + __prop ctor {call: Lith_TBufCtor (this)} + __prop dtor {call: Lith_TBufDtor (this)} + __prop get {call: Lith_TBufGet (this)} + __prop peek {call: Lith_TBufPeek (this)} + __prop unget {call: Lith_TBufUnGet(this)} + __prop reget {call: Lith_TBufReGet(this)} + __prop drop {call: Lith_TBufDrop (this)} + + struct origin orig; + + FILE *fp; + + struct token *toks; + + int tpos, tend; + int bbeg, bend; + + void *udata; + + int (*tokProcess)(struct token *tok, void *udata); +}; + +#endif diff --git a/source/Headers/lith_token.h b/source/Headers/lith_token.h new file mode 100644 index 0000000..1b8a876 --- /dev/null +++ b/source/Headers/lith_token.h @@ -0,0 +1,115 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#ifndef lith_token_h +#define lith_token_h + +#include "lith_darray.h" + +#include + +#define Lith_TokStr(tok) StrParam("%.*s", (tok)->textC, (tok)->textV) + +// Types ---------------------------------------------------------------------| + +enum +{ + tok_null, // No token + + // Text sequences + tok_chrseq, // Arbitrary character sequence + tok_identi, // Identifier + tok_number, // Number + tok_string, // String < " > < " > + tok_charac, // Character String < ' > < ' > + tok_quote, // Quote < ` > < \n > + tok_cmtlin, // Line comment < // > < \n > + tok_cmtblk, // Block comment < /* > < */ > + + // Special (post-process) + tok_keywrd, // Keyword + tok_numint, // Integer Literal + tok_numflt, // Float Literal + + // Single characters + tok_lnend, // \n + tok_semico, // ; + tok_comma, // , + tok_dollar, // $ + tok_bracko, // [ + tok_brackc, // ] + tok_braceo, // { + tok_bracec, // } + tok_pareno, // ( + tok_parenc, // ) + + // Paired operators + tok_eq, // = + tok_eq2, // == + tok_tern, // ? + tok_terneq, // ?= + tok_div, // / + tok_diveq, // /= + tok_not, // ! + tok_neq, // != + tok_bnot, // ~ + tok_bneq, // ~= + tok_mul, // * + tok_muleq, // *= + tok_at, // @ + tok_at2, // @@ + + // Tupled operators + tok_lt, // < + tok_lt2, // << + tok_le, // <= + tok_gt, // > + tok_gt2, // >> + tok_ge, // >= + tok_or, // | + tok_or2, // || + tok_oreq, // |= + tok_and, // & + tok_and2, // && + tok_andeq, // &= + tok_add, // + + tok_add2, // ++ + tok_addeq, // += + tok_sub, // - + tok_sub2, // -- + tok_subeq, // -= + tok_mod, // % + tok_mod2, // %% + tok_modeq, // %= + tok_xor, // ^ + tok_xor2, // ^^ + tok_xoreq, // ^= + tok_col, // : + tok_col2, // :: + tok_coleq, // := + + // Misc + tok_dot, // . + tok_dot2, // .. + tok_dot3, // ... + tok_rarrow, // -> + tok_eof, // End of file + + tok_max +}; + +struct origin +{ + int colu, line; +}; + +struct token +{ + int type; + struct origin orig; + Vec_Decl(char, text); +}; + +// Extern Functions ----------------------------------------------------------| + +void Lith_ParseToken(FILE *fp, struct token *tok, struct origin *orig); + +#endif diff --git a/source/Headers/lith_types.h b/source/Headers/lith_types.h new file mode 100644 index 0000000..84ff6d4 --- /dev/null +++ b/source/Headers/lith_types.h @@ -0,0 +1,33 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. +#ifndef lith_types_h +#define lith_types_h + +#include +#include +#include + +typedef int64_t i64; +typedef int96_t i96; + +typedef uint32_t u32; +typedef uint64_t u64; +typedef uint96_t u96; + +typedef unsigned char byte; + +typedef long fixed fixed64; + +struct polar { + fixed ang; + fixed dst; +}; + +struct vec2f { + float x, y; +}; + +struct vec2i { + int x, y; +}; + +#endif diff --git a/source/Headers/lith_upgradedata.h b/source/Headers/lith_upgradedata.h new file mode 100644 index 0000000..c8a1b20 --- /dev/null +++ b/source/Headers/lith_upgradedata.h @@ -0,0 +1,183 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_UPGRADEDATA_H +#define LITH_UPGRADEDATA_H + +#include "lith_shopdef.h" + +#define UPGR_STATIC_MAX 80 +#define UPGR_EXTRA_NUM (UPGR_STATIC_MAX - UPGR_BASE_MAX) + +#define Lith_CastUData(u) ((struct upgr_data *)(u)->dataptr) +#define UData_Adrenaline(u) (Lith_CastUData(u)->u01) +#define UData_Implying(u) (Lith_CastUData(u)->u02) +#define UData_JetBooster(u) (Lith_CastUData(u)->u03) +#define UData_lolsords(u) (Lith_CastUData(u)->u04) +#define UData_ReactArmor(u) (Lith_CastUData(u)->u05) +#define UData_ReflexWetw(u) (Lith_CastUData(u)->u06) +#define UData_VitalScan(u) (Lith_CastUData(u)->u07) +#define UData_Zoom(u) (Lith_CastUData(u)->u08) +#define UData_HomingRPG(u) (Lith_CastUData(u)->u09) +#define UData_Magic(u) (Lith_CastUData(u)->u10) +#define UData_StealthSys(u) (Lith_CastUData(u)->u11) +#define UData_HeadsUpDisp(u) (Lith_CastUData(u)->u13) + +enum +{ + UC_Body, + UC_Weap, + UC_Extr, + UC_Down, + UC_MAX +}; + +enum +{ + UG_None, + UG_Pistol, + UG_Shotgun, + UG_SSG, + UG_Rifle, + UG_Launcher, + UG_Plasma, + UG_BFG, + UG_HUD, +}; + +enum +{ + UR_AI = 1 << 0, + UR_WMD = 1 << 1, + UR_WRD = 1 << 2, + UR_RDI = 1 << 3, + UR_RA = 1 << 4, +}; + +typedef bool (*upgr_reinit_cb_t)(struct upgradeinfo *ui); + + typedef void (*upgr_fn_cb_t)(struct player *, struct upgrade *); +[[__call("ScriptS")]] typedef void (*upgr_sc_cb_t)(struct player *, struct upgrade *); + +struct upgr_data_Adrenaline { + int charge; + bool readied; +}; + +struct upgr_data_Implying { + int hudid; +}; + +struct upgr_data_JetBooster { + int charge; + bool discharged : 1; +}; + +struct upgr_data_lolsords { + __str origweapon; +}; + +struct upgr_data_ReactArmor { + int activearmor; +}; + +struct upgr_data_ReflexWetw { + u32 charge : 6; + bool leaped : 1; +}; + +struct upgr_data_VitalScan { + int target; + int oldtarget; + __str tagstr; + int health; + int oldhealth; + int maxhealth; + fixed cangle; + fixed oangle; + fixed splitfrac; + u32 split : 3; + u32 rank : 4; + bool freak : 1; +}; + +struct upgr_data_Zoom { + int zoom; + float vzoom; +}; + +struct upgr_data_HomingRPG { + int id; +}; + +struct upgr_data_Magic { + fixed manaperc; + gui_state_t gst; + bool ui : 1; +}; + +struct upgr_data_StealthSys { + fixed mulvel; +}; + +struct upgr_data_HeadsUpDisp { + int cr; +}; + +struct upgr_data { + struct upgr_data_Adrenaline u01; + struct upgr_data_Implying u02; + struct upgr_data_JetBooster u03; + struct upgr_data_lolsords u04; + struct upgr_data_ReactArmor u05; + struct upgr_data_ReflexWetw u06; + struct upgr_data_VitalScan u07; + struct upgr_data_Zoom u08; + struct upgr_data_HomingRPG u09; + struct upgr_data_Magic u10; + struct upgr_data_StealthSys u11; + struct upgr_data_HeadsUpDisp u13; +}; + +typedef struct upgradeinfo { + [[__anonymous]] shopdef_t shopdef; + + int pclass; + int category; + int perf; + fixed scoreadd; + int group; + u32 requires; + + int id, key; + + upgr_fn_cb_t Activate; + upgr_fn_cb_t Deactivate; + upgr_sc_cb_t Update; + upgr_fn_cb_t Enter; + upgr_fn_cb_t Render; + upgr_fn_cb_t Init; +} upgradeinfo_t; + +bool Lith_UpgrCanActivate(struct player *p, struct upgrade *upgr); +bool Lith_UpgrToggle(struct player *p, struct upgrade *upgr); +void Lith_UpgrSetOwned(struct player *p, struct upgrade *upgr); + +typedef struct upgrade { + __prop canUse {call: Lith_UpgrCanActivate(__arg, this)} + __prop toggle {call: Lith_UpgrToggle(__arg, this)} + __prop setOwned {call: Lith_UpgrSetOwned(__arg, this)} + + void *dataptr; + + struct upgrade *next, **prev; + + upgradeinfo_t const *info; + + bool active : 1; + bool owned : 1; + bool wasactive : 1; // for reinitializing on map load +} upgrade_t; + +void Lith_LoadUpgrInfoBalance(upgradeinfo_t *uinfo, int max, char const *fname); + +#endif + diff --git a/source/Headers/lith_upgradefunc_end.h b/source/Headers/lith_upgradefunc_end.h new file mode 100644 index 0000000..4c4e214 --- /dev/null +++ b/source/Headers/lith_upgradefunc_end.h @@ -0,0 +1,12 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#undef Ret +#undef Fn_F +#undef Fn_S +#undef Case +#undef A +#undef D +#undef U +#undef E +#undef R + +// EOF diff --git a/source/Headers/lith_upgradefunc_start.h b/source/Headers/lith_upgradefunc_start.h new file mode 100644 index 0000000..cd7c1f3 --- /dev/null +++ b/source/Headers/lith_upgradefunc_start.h @@ -0,0 +1,18 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#ifdef Ret + #define Case(n) Ret(n) case UPGR_##n:; + #define A(n) Fn_F(n, Activate) + #define D(n) Fn_F(n, Deactivate) + #define U(n) Fn_S(n, Update) + #define E(n) Fn_F(n, Enter) + #define R(n) Fn_F(n, Render) +#else + #define Case(n) + #define A(n) Fn_F(n, Activate) + #define D(n) Fn_F(n, Deactivate) + #define U(n) Fn_S(n, Update) + #define E(n) Fn_F(n, Enter) + #define R(n) Fn_F(n, Render) +#endif + +// EOF diff --git a/source/Headers/lith_upgradefuncs.h b/source/Headers/lith_upgradefuncs.h new file mode 100644 index 0000000..5e9d3bf --- /dev/null +++ b/source/Headers/lith_upgradefuncs.h @@ -0,0 +1,101 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgradefunc_start.h" + +// Body Upgrades -------------------------------------------------------------| +Case(HeadsUpDisp) + A(HeadsUpDisp) + D(HeadsUpDisp) + R(HeadsUpDisp) + +Case(HeadsUpDis2) + A(HeadsUpDis2) + D(HeadsUpDis2) + R(HeadsUpDis2) + +Case(JetBooster) + A(JetBooster) + U(JetBooster) + R(JetBooster) + +Case(ReflexWetw) + A(ReflexWetw) + D(ReflexWetw) + U(ReflexWetw) + +Case(Zoom) + D(Zoom) + U(Zoom) + R(Zoom) + +Case(VitalScan) + U(VitalScan) + R(VitalScan) + +Case(CyberLegs) + A(CyberLegs) + D(CyberLegs) + U(CyberLegs) + +Case(ReactArmor) + D(ReactArmor) + R(ReactArmor) + +Case(DefenseNuke) + E(DefenseNuke) + +Case(Adrenaline) + A(Adrenaline) + U(Adrenaline) + R(Adrenaline) + +Case(Magic) + U(Magic) + R(Magic) + +Case(StealthSys) + D(StealthSys) + U(StealthSys) + +// Weapon Upgrades -----------------------------------------------------------| +Case(RifleModes) + D(RifleModes) + R(RifleModes) + +Case(HomingRPG) + U(HomingRPG) + +Case(PunctCannon) + D(PunctCannon) + +// Extra Upgrades ------------------------------------------------------------| +Case(7777777) + A(7777777) + D(7777777) + U(7777777) + +Case(lolsords) + A(lolsords) + D(lolsords) + U(lolsords) + +Case(Goldeneye) + U(Goldeneye) + +// Downgrades ----------------------------------------------------------------| +Case(Implying) + U(Implying) + +Case(UNCEUNCE) + A(UNCEUNCE) + D(UNCEUNCE) + U(UNCEUNCE) + +Case(InstaDeath) + U(InstaDeath) + +//----------------------------------------------------------------------------| + +#include "lith_upgradefunc_end.h" + +// EOF + diff --git a/source/Headers/lith_upgradenames.h b/source/Headers/lith_upgradenames.h new file mode 100644 index 0000000..2b9fcaa --- /dev/null +++ b/source/Headers/lith_upgradenames.h @@ -0,0 +1,68 @@ +// dec output: pk/lscripts/Headers/lith_upgradenames.h + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_UpgradeName +{ + // Body + UPGR_HeadsUpDisp, + UPGR_HeadsUpDis2, + UPGR_JetBooster, + UPGR_ReflexWetw, + UPGR_Zoom, + UPGR_VitalScan, + UPGR_CyberLegs, + UPGR_ReactArmor, + UPGR_ReactArmor2, + UPGR_DefenseNuke, + UPGR_Adrenaline, + + // Body (Cyber-Mage) + UPGR_Magic, + UPGR_SoulCleaver, + UPGR_StealthSys, + + // Weapon + UPGR_AutoReload, + UPGR_AutoPistol, + UPGR_PlasPistol, + UPGR_GaussShotty, + UPGR_PoisonShot, + UPGR_RifleModes, + UPGR_LaserRCW, + UPGR_ChargeRPG, + UPGR_HomingRPG, + UPGR_PlasLaser, + UPGR_PartBeam, + UPGR_PunctCannon, + UPGR_OmegaRail, + + // Weapon (Cyber-Mage) + UPGR_Mateba_A, + UPGR_ShockRif_A, + UPGR_ShockRif_B, + UPGR_SPAS_A, + UPGR_SPAS_B, + UPGR_SMG_A, + UPGR_SMG_B, + UPGR_SMG_C, + UPGR_IonRifle_A, + UPGR_IonRifle_B, + UPGR_CPlasma_A, + UPGR_ShipGun_A, + UPGR_ShipGun_B, + + // Extra + UPGR_TorgueMode, + UPGR_7777777, + UPGR_lolsords, + UPGR_Goldeneye, + + // Downgrade + UPGR_Implying, + UPGR_UNCEUNCE, + UPGR_InstaDeath, + + UPGR_BASE_MAX +}; + +// EOF diff --git a/source/Headers/lith_upgrades.h b/source/Headers/lith_upgrades.h new file mode 100644 index 0000000..2c9e41e --- /dev/null +++ b/source/Headers/lith_upgrades.h @@ -0,0 +1,33 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=110 +#ifndef LITH_UPGRADES_H +#define LITH_UPGRADES_H + +#include "lith_common.h" +#include "lith_upgradenames.h" +#include "lith_upgradedata.h" +#include "lith_shopdef.h" +#include "lith_list.h" + +#define Lith_UpgrBuy(p, upgr, ...) \ + p->buy(&(upgr)->info->shopdef, (upgr), "LITH_TXT_UPGRADE_TITLE_%S", __VA_ARGS__) + +// Extern Functions ----------------------------------------------------------| + +// These are included here so the compiler may check the function signatures. +#define Fn_F(n, cb) void Upgr_##n##_##cb(struct player *p, upgrade_t *upgr); +#define Fn_S(n, cb) [[__call("ScriptS")]] Fn_F(n, cb) +#include "lith_upgradefuncs.h" + + +[[__call("ScriptS")]] void Lith_PlayerInitUpgrades(struct player *p); +void Lith_PlayerDeallocUpgrades(struct player *p); +void Lith_PlayerDeinitUpgrades(struct player *p); +void Lith_PlayerReinitUpgrades(struct player *p); + +void Lith_PlayerEnterUpgrades(struct player *p); + +upgradeinfo_t *Lith_UpgradeRegister(upgradeinfo_t const *upgr); + +#endif + diff --git a/source/Headers/lith_upgrades_common.h b/source/Headers/lith_upgrades_common.h new file mode 100644 index 0000000..7919815 --- /dev/null +++ b/source/Headers/lith_upgrades_common.h @@ -0,0 +1,5 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_hudid.h" +#include diff --git a/source/Headers/lith_version.h b/source/Headers/lith_version.h new file mode 100644 index 0000000..af8e1ef --- /dev/null +++ b/source/Headers/lith_version.h @@ -0,0 +1,15 @@ +// Copyright © 2016-2018 Graham Sanderson, all rights reserved. +#define Lith_Version "1.0" +#define Lith_APIVersion 170 +#define Lith_CheckAPIVersion() \ + do \ + if(world.apiversion != Lith_APIVersion) { \ + printf(c"%s: Invalid API version! Expected %i, but got %i\n", \ + __func__, Lith_APIVersion, world.apiversion); \ + abort(); \ + } \ + while(0) +#include +// 170 - 1.0 + +// EOF diff --git a/source/Headers/lith_wdata.h b/source/Headers/lith_wdata.h new file mode 100644 index 0000000..c848679 --- /dev/null +++ b/source/Headers/lith_wdata.h @@ -0,0 +1,64 @@ +// dec output: pk/lscripts/Headers/lith_wdata.h + +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +enum // Lith_WData +{ + wdata_brightweps, + wdata_noitemfx, + wdata_bossspawned, + wdata_grafzone, + wdata_enemycheck, + wdata_ptid, + wdata_pclass, + wdata_magdrops, +}; + +enum // Lith_CBIUpgradeM +{ + cupg_weapninter, + cupg_hasupgr1, + cupg_armorinter, + cupg_hasupgr2, + cupg_weapninte2, + cupg_rdistinter, + cupg_max +}; + +enum // Lith_CBIUpgradeC +{ + cupg_c_slot3spell, + cupg_c_slot4spell, + cupg_c_slot5spell, + cupg_c_slot6spell, + cupg_c_slot7spell, + cupg_c_rdistinter, +}; + +enum // Lith_RandomSpawnNum +{ + lrsn_garmor, + lrsn_barmor, + lrsn_hbonus, + lrsn_abonus, + lrsn_clip, + lrsn_clipbx, +}; + +enum // Lith_ArmorSlot +{ + aslot_lower, + aslot_upper, + aslot_ring, + aslot_pauld, + aslot_max +}; + +enum // Lith_MsgType +{ + msg_ammo, + msg_huds, + msg_full, + msg_both +}; + +// EOF diff --git a/source/Headers/lith_weaponinfo.h b/source/Headers/lith_weaponinfo.h new file mode 100644 index 0000000..398cbdb --- /dev/null +++ b/source/Headers/lith_weaponinfo.h @@ -0,0 +1,62 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_WEAPONINFO_H +#define LITH_WEAPONINFO_H + +#include "lith_weapons.h" + +#define HasWeapon(p, w) (p)->weapon.inv[(w)].owned + +#define SLOT_MAX 8 + +enum +{ + AT_None = 0, + AT_NMag = 1 << 0, + AT_Ammo = 1 << 1, + AT_AMag = AT_NMag | AT_Ammo, +}; + +enum +{ + wf_magic = 1 << 0 +}; + +typedef struct weaponinfo_s +{ + int slot; + int pclass; + __str name; + __str pickupsound; + int defammotype; + __str defammoclass; + __str defmagclass; + __str classname; + int type; + int flags; +} weaponinfo_t; + +typedef struct invweapon_s +{ + weaponinfo_t const *info; + bool owned; + int autoreload; + int ammotype; + __str ammoclass; + __str magclass; + int magictake; // bullshit hack +} invweapon_t; + +typedef struct weapondata_s +{ + int slot[SLOT_MAX]; + invweapon_t inv[weapon_max]; + invweapon_t *cur; + invweapon_t *prev; +} weapondata_t; + +#ifndef EXTERNAL_CODE +extern weaponinfo_t const weaponinfo[weapon_max]; +#endif + +#endif + diff --git a/source/Headers/lith_weapons.h b/source/Headers/lith_weapons.h new file mode 100644 index 0000000..be3dfaa --- /dev/null +++ b/source/Headers/lith_weapons.h @@ -0,0 +1,125 @@ +// dec output: pk/lscripts/Headers/lith_weapons.h + +// This file was generaed by wepc. +// Edit only if you aren't going to recompile. + +enum // Lith_WeaponNum +{ + weapon_min = 1, + weapon_unknown = 0, + + weapon_cfist, + weapon_missile, + weapon_plasmadiff, + weapon_fist, + weapon_pistol, + weapon_revolver, + weapon_shotgun, + weapon_lazshotgun, + weapon_ssg, + weapon_rifle, + weapon_sniper, + weapon_launcher, + weapon_plasma, + weapon_bfg, + weapon_c_fist, + weapon_c_mateba, + weapon_c_rifle, + weapon_c_spas, + weapon_c_smg, + weapon_c_sniper, + weapon_c_plasma, + weapon_c_shipgun, + weapon_c_blade, + weapon_c_delear, + weapon_c_fire, + weapon_c_rend, + weapon_c_hulgyon, + weapon_c_starshot, + weapon_c_cercle, + + weapon_max_lith, + weapon_nonlith_start = weapon_max_lith - 1, + + weapon_fd_plut_fist, + weapon_fd_plut_chainsaw, + weapon_fd_plut_pistol, + weapon_fd_plut_shotgun, + weapon_fd_plut_ssg, + weapon_fd_plut_chaingun, + weapon_fd_plut_launcher, + weapon_fd_plut_plasma, + weapon_fd_plut_bfg, + weapon_fd_tnt_fist, + weapon_fd_tnt_chainsaw, + weapon_fd_tnt_pistol, + weapon_fd_tnt_shotgun, + weapon_fd_tnt_ssg, + weapon_fd_tnt_chaingun, + weapon_fd_tnt_launcher, + weapon_fd_tnt_plasma, + weapon_fd_tnt_bfg, + weapon_fd_doom2_fist, + weapon_fd_doom2_chainsaw, + weapon_fd_doom2_pistol, + weapon_fd_doom2_shotgun, + weapon_fd_doom2_ssg, + weapon_fd_doom2_chaingun, + weapon_fd_doom2_launcher, + weapon_fd_doom2_plasma, + weapon_fd_doom2_bfg, + weapon_fd_aliens_fist, + weapon_fd_aliens_chainsaw, + weapon_fd_aliens_pistol, + weapon_fd_aliens_shotgun, + weapon_fd_aliens_ssg, + weapon_fd_aliens_chaingun, + weapon_fd_aliens_launcher, + weapon_fd_aliens_plasma, + weapon_fd_aliens_bfg, + weapon_fd_jpcp_fist, + weapon_fd_jpcp_chainsaw, + weapon_fd_jpcp_pistol, + weapon_fd_jpcp_shotgun, + weapon_fd_jpcp_ssg, + weapon_fd_jpcp_chaingun, + weapon_fd_jpcp_launcher, + weapon_fd_jpcp_plasma, + weapon_fd_jpcp_bfg, + weapon_fd_btsx_fist, + weapon_fd_btsx_chainsaw, + weapon_fd_btsx_pistol, + weapon_fd_btsx_shotgun, + weapon_fd_btsx_ssg, + weapon_fd_btsx_chaingun, + weapon_fd_btsx_launcher, + weapon_fd_btsx_plasma, + weapon_fd_btsx_bfg, + + weapon_max +}; + +enum // Lith_WeaponName +{ + wepnam_fist, + wepnam_chainsaw, + wepnam_pistol, + wepnam_shotgun, + wepnam_supershotgun, + wepnam_chaingun, + wepnam_rocketlauncher, + wepnam_plasmarifle, + wepnam_bfg9000, + + wepnam_max, +}; + +enum // Lith_RifleMode +{ + rifle_firemode_auto, + rifle_firemode_grenade, + rifle_firemode_burst, + rifle_firemode_max +}; + +// EOF diff --git a/source/Headers/lith_world.h b/source/Headers/lith_world.h new file mode 100644 index 0000000..9fba51c --- /dev/null +++ b/source/Headers/lith_world.h @@ -0,0 +1,122 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifndef LITH_WORLD_H +#define LITH_WORLD_H + +#include + +#include "lith_wdata.h" + +enum +{ + skill_tourist, + skill_easy, + skill_normal, + skill_hard, + skill_extrahard, + skill_nightmare +}; + +enum +{ + CANONTIME_FULL, + CANONTIME_SHORT, + CANONTIME_DATE +}; + +typedef struct payoutinfo_s +{ + int killnum, killmax; + int itemnum, itemmax; + + fixed64 killpct; + fixed64 itempct; + + int killscr; + int itemscr; + + int total; + int tax; +} payoutinfo_t; + +enum game_s +{ + Game_Doom2, + Game_Episodic, +}; + +__str Lith_CanonTime(int type); +[[__optional_args(1)]] int Lith_UniqueID(int tid); +[[__call("StkCall")]] void Lith_BeginAngles(int x, int y); +[[__call("StkCall")]] fixed Lith_AddAngle(int x, int y); +[[__call("StkCall")]] void Lith_FreezeTime(bool on); + +typedef struct worldinfo_s +{ + __prop mapsecrets {get: ACS_GetLevelInfo(LEVELINFO_FOUND_SECRETS)} + __prop mapkills {get: ACS_GetLevelInfo(LEVELINFO_KILLED_MONSTERS)} + __prop mapitems {get: ACS_GetLevelInfo(LEVELINFO_FOUND_ITEMS)} + __prop mapnum {get: ACS_GetLevelInfo(LEVELINFO_LEVELNUM)} + __prop mapkillmax {get: ACS_GetLevelInfo(LEVELINFO_TOTAL_MONSTERS)} + __prop mapitemmax {get: ACS_GetLevelInfo(LEVELINFO_TOTAL_ITEMS)} + __prop cluster {get: ACS_GetLevelInfo(LEVELINFO_CLUSTERNUM)} + __prop canontime {get: Lith_CanonTime(CANONTIME_FULL)} + __prop canontimeshort {get: Lith_CanonTime(CANONTIME_SHORT)} + __prop canondate {get: Lith_CanonTime(CANONTIME_DATE)} + __prop difficulty {get: ACS_GetCVar("lith_sv_difficulty")} + __prop begAngles {call: Lith_BeginAngles()} + __prop addAngles {call: Lith_AddAngle()} + __prop freeze {call: Lith_FreezeTime()} + __prop autosave {get: ACS_GetCVar("lith_sv_autosave")} + + bool gsinit; + bool singleplayer; + int mapscleared; + int prevcluster; + int mapseed; + bool unloaded; + bool islithmap; + bool enemycompat; + bool enemycheck; + int secretsfound; + double scoremul; + u64 ticks; + int game; + int apiversion; + + // Bosses + bool bossspawned; + + // CBI global information + int cbiperf; + bool cbiupgr[cupg_max]; + + // Mod compat + bool legendoom; + bool drlamonsters; + + // DECORATE data + int a_x, a_y; + struct polar a_angles[8]; + int a_cur; + int decvars[8]; + + // Debugging + int dbgLevel; + bool dbgItems : 1; + bool dbgBIP : 1; + bool dbgScore : 1; + bool dbgUpgr : 1; + bool dbgSave : 1; + bool dbgNoMon : 1; +} worldinfo_t; + +#ifndef EXTERNAL_CODE +extern bool lmvar mapinit; +extern worldinfo_t world; +#else +worldinfo_t *Lith_GetWorldExtern(void); +#define world (*Lith_GetWorldExtern()) +#endif + +#endif + diff --git a/source/Main/g_auto.c b/source/Main/g_auto.c new file mode 100644 index 0000000..0da93e3 --- /dev/null +++ b/source/Main/g_auto.c @@ -0,0 +1,196 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_GUI_Auto +// +void Lith_GUI_Auto(gui_state_t *g, id_t id, int x, int y, int w, int h, bool slide) +{ + x += g->ox; + y += g->oy; + + // check clip versus cursor (if clipping), then check control versus cursor + if(!g->useclip || aabb(g->clpxS, g->clpyS, g->clpxE, g->clpyE, g->cx, g->cy)) + if(aabb(x, y, x + w, y + h, g->cx, g->cy)) + { + g->hot = id; + + if(g->active == 0 && g->clicklft) + g->active = id; + } + + // check slide state + if(slide && g->slide != id && g->active == id) { + g->slide = id; + g->slidetime = 1; + g->slidecount = 0; + } +} + +// +// Lith_GUI_Init +// +void Lith_GUI_Init(gui_state_t *g, void *state) +{ + g->state = state; + g->gfxprefix = ":UI:"; +} + +// +// Lith_GUI_UpdateState +// +void Lith_GUI_UpdateState(gui_state_t *g, struct player *p) +{ + bool inverted = p->getCVarI("lith_player_invertmouse"); + + // Due to ZDoom being ZDoom, GetUserCVar with invertmouse does nothing. + // This breaks network sync so we can only do it in singleplayer. + if(world.singleplayer) + inverted |= ACS_GetCVar("invertmouse"); + + g->old = g->cur; + + fixed xmul = p->getCVarK("lith_gui_xmul"); + fixed ymul = p->getCVarK("lith_gui_ymul"); + + g->cx -= p->yawv * (800.0f * xmul); + if(inverted) g->cy += p->pitchv * (800.0f * ymul); + else g->cy -= p->pitchv * (800.0f * ymul); + + g->cx = minmax(g->cx, 0, g->w); + g->cy = minmax(g->cy, 0, g->h); + + g->clicklft = p->buttons & BT_ATTACK; + g->clickrgt = p->buttons & BT_ALTATTACK; + g->clickany = g->clicklft || g->clickrgt; + + if(!g->clickany) + g->slide = 0; + else if(g->slidecount) + g->slidetime++; +} + +// +// Lith_GUI_Begin +// +void Lith_GUI_Begin(gui_state_t *g, int basehid, int w, int h) +{ + if(!w) w = 320; + if(!h) h = 200; + + g->hid = basehid; + g->hot = 0; + + ACS_SetHudSize(g->w = w, g->h = h); +} + +// +// Lith_GUI_End +// +void Lith_GUI_End(gui_state_t *g, enum cursor curs) +{ + __str cgfx; + + switch(curs) + { + default: + case gui_curs_green: cgfx = ":UI:Cursor"; break; + case gui_curs_pink: cgfx = ":UI:CursorPink"; break; + case gui_curs_blue: cgfx = ":UI:CursorBlue"; break; + case gui_curs_orange: cgfx = ":UI:CursorOrange"; break; + case gui_curs_red: cgfx = ":UI:CursorRed"; break; + case gui_curs_white: cgfx = ":UI:CursorWhite"; break; + case gui_curs_outline: cgfx = ":UI:CursorOutline"; break; + case gui_curs_outline2: cgfx = ":UI:CursorOutline2"; break; + case gui_curs_outlineinv: cgfx = ":UI:CursorOutlineInv"; break; + case gui_curs_outline2inv: cgfx = ":UI:CursorOutline2Inv"; break; + } + + DrawSpritePlain(cgfx, g->hid--, (int)g->cx + 0.1, (int)g->cy + 0.1, TS); + + if(!g->clickany) + g->active = 0; +} + +// +// Lith_GUI_Clip +// +void Lith_GUI_Clip(gui_state_t *g, int x, int y, int w, int h, int ww) +{ + g->useclip = true; + g->clpxE = x + w; + g->clpyE = y + h; + + if(ww == 0) ww = w; + ACS_SetHudClipRect(g->clpxS = x, g->clpyS = y, w, h, ww); +} + +// +// Lith_GUI_ClipRelease +// +void Lith_GUI_ClipRelease(gui_state_t *g) +{ + g->useclip = g->clpxS = g->clpyS = g->clpxE = g->clpyE = 0; + ACS_SetHudClipRect(0, 0, 0, 0); +} + +// +// Lith_GUI_TypeOn +// +void Lith_GUI_TypeOn(gui_state_t *g, gui_typeon_state_t *typeon, __str text) +{ + typeon->txt = text; + typeon->len = ACS_StrLen(text); + typeon->pos = 0; +} + +// +// Lith_RemoveTextColors +// +__str Lith_RemoveTextColors(__str str, int size) +{ + [[__no_init]] + static char buf[8192]; + int j = 0; + + if(size > countof(buf)) return "[programmer error, please report]"; + + for(int i = 0; i < size; i++) + { + if(str[i] == '\C') + { + i++; + if(str[i] == '[') + while(str[i] && str[i++] != ']'); + else + i++; + } + + if(i >= size || j >= size || !str[i]) + break; + + buf[j++] = str[i]; + } + + return StrParam("%.*s", j, buf); +} + +// +// Lith_GUI_TypeOnUpdate +// +gui_typeon_state_t const *Lith_GUI_TypeOnUpdate(gui_state_t *g, gui_typeon_state_t *typeon) +{ + int num = ACS_Random(2, 15); + + if((typeon->pos += num) > typeon->len) + typeon->pos = typeon->len; + + return typeon; +} + +// EOF + diff --git a/source/Main/g_button.c b/source/Main/g_button.c new file mode 100644 index 0000000..f0f89ec --- /dev/null +++ b/source/Main/g_button.c @@ -0,0 +1,72 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +// +// Lith_GUI_Button_Impl +// +bool Lith_GUI_Button_Impl(gui_state_t *g, id_t id, gui_button_args_t const *a) +{ + gui_button_preset_t const *pre = a->preset ? a->preset : &guipre.btndef; + + if(!a->disabled) + Lith_GUI_Auto(g, id, a->x, a->y, pre->w, pre->h, a->slide); + + __with(__str graphic;) + { + if(g->hot == id && pre->hot) graphic = Lith_GUI_Prefix1(g, pre, hot); + else graphic = Lith_GUI_Prefix1(g, pre, gfx); + + if(graphic) { + int const x = a->x + g->ox; + int const y = a->y + g->oy; + DrawSpritePlain(graphic, g->hid--, x + 0.1, y + 0.1, TS); + } + } + + if(a->label && pre->font) + { + int x, y; + __str color; + + if(pre->ax == 4 || !pre->ax) x = (pre->w / 2) + a->x + g->ox; + else x = a->x + g->ox; + + if(pre->ay == 4 || !pre->ay) y = (pre->h / 2) + a->y + g->oy; + else y = a->y + g->oy; + + if(a->disabled) color = pre->cdis; + else if(g->active == id) color = pre->cact; + else if(g->hot == id) color = pre->chot; + else if(a->color) color = a->color; + else color = pre->cdef; + color = color ? color : "j"; + + HudMessageF(pre->font, "\C%S%S", color, a->label); + HudMessagePlain(g->hid--, x + 0.4, y, TS); + } + + if(!a->disabled) + { + bool click = !g->clicklft; + + if(g->slide == id) + { + click = g->clicklft && !g->old.clicklft; + + if(g->slidecount < 2) click = click || g->slidetime % 20 == 0; + else if(g->slidecount < 10) click = click || g->slidetime % 5 == 0; + else click = true; + } + + if(g->hot == id && g->active == id && click) { + if(g->slide == id) g->slidecount++; + if(pre->snd) ACS_LocalAmbientSound(pre->snd, 127); + return true; + } + } + + return false; +} + +// EOF diff --git a/source/Main/g_checkbox.c b/source/Main/g_checkbox.c new file mode 100644 index 0000000..49a25b3 --- /dev/null +++ b/source/Main/g_checkbox.c @@ -0,0 +1,49 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +// +// Lith_GUI_Checkbox_Impl +// +bool Lith_GUI_Checkbox_Impl(gui_state_t *g, id_t id, gui_checkb_args_t const *a) +{ + gui_checkb_preset_t const *pre = a->preset ? a->preset : &guipre.cbxdef; + + if(!a->disabled) + Lith_GUI_Auto(g, id, a->x-(pre->w/2), a->y-(pre->h/2), pre->w, pre->h); + + __with(__str gfx = Lith_GUI_Prefix1(g, pre, gfx); + __str chkgfx = Lith_GUI_Prefix1(g, pre, chkgfx);) + { + if(a->disabled) { + if(pre->dis) gfx = Lith_GUI_Prefix1(g, pre, dis); + if(pre->chkdis) chkgfx = Lith_GUI_Prefix1(g, pre, chkdis); + } else if(g->active == id) { + if(pre->hot) gfx = Lith_GUI_Prefix1(g, pre, hot); + if(pre->chkact) chkgfx = Lith_GUI_Prefix1(g, pre, chkact); + } else if(g->hot == id) { + if(pre->hot) gfx = Lith_GUI_Prefix1(g, pre, hot); + if(pre->chkhot) chkgfx = Lith_GUI_Prefix1(g, pre, chkhot); + } + + if(gfx) + DrawSpritePlain(gfx, g->hid--, a->x + g->ox, a->y + g->oy, TS); + + if(chkgfx && a->on) { + DrawSpritePlain(chkgfx, g->hid--, a->x + g->ox, a->y + g->oy, + TS); + } + } + + if(g->hot == id && g->active == id && !g->clicklft) + { + if(a->on) {if(pre->snddn) ACS_LocalAmbientSound(pre->snddn, 127);} + else {if(pre->sndup) ACS_LocalAmbientSound(pre->sndup, 127);} + return true; + } + else + return false; +} + +// EOF + diff --git a/source/Main/g_preset.c b/source/Main/g_preset.c new file mode 100644 index 0000000..7442fb4 --- /dev/null +++ b/source/Main/g_preset.c @@ -0,0 +1,273 @@ +// Copyright © 2016-2018 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +struct gui_presets const guipre = { + .btndef = { + .gfx = "Button", + .hot = "ButtonHot", + .snd = "player/cbi/buttonpress", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "m", + .font = "cbifont", + .w = 48, + .h = 16, + .ax = 4, .ay = 0 + }, + + .btntab = { + .gfx = "Tab", + .hot = "TabHot", + .snd = "player/cbi/tabswitch", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 46, + .h = 11, + .ax = 4, .ay = 0 + }, + + .btnexit = { + .gfx = "ExitButton", + .hot = "ExitButtonHot", + .w = 11, + .h = 11, + .ax = 4, .ay = 0 + }, + + .btnnext = { + .gfx = "BtnNext", + .hot = "BtnNextHot", + .snd = "player/cbi/right", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 8, + .h = 11, + .ax = 4, .ay = 0 + }, + + .btnprev = { + .gfx = "BtnPrev", + .hot = "BtnPrevHot", + .snd = "player/cbi/left", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 8, + .h = 11, + .ax = 4, .ay = 0 + }, + + .btnnexts = { + .gfx = "BtnNextSmall", + .hot = "BtnNextSmallHot", + .snd = "player/cbi/buttoncurs", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 6, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnprevs = { + .gfx = "BtnPrevSmall", + .hot = "BtnPrevSmallHot", + .snd = "player/cbi/buttoncurs", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 6, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnlist = { + .gfx = "ListButton", + .hot = "ListButtonHot", + .snd = "player/cbi/clicklst", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "u", + .font = "cbifont", + .w = 80, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnlistsel = { + .gfx = "ListButton", + .hot = "ListButtonHot", + .snd = "player/cbi/clicklst", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 80, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnlistactive = { + .gfx = "ListButtonActive", + .hot = "ListButtonActiveHot", + .snd = "player/cbi/clicklst", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 80, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnlistactivated = { + .gfx = "ListButtonActivated", + .hot = "ListButtonActiveHot", + .snd = "player/cbi/clicklst", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "i", + .font = "cbifont", + .w = 80, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btnbipmain = { + .snd = "player/cbi/buttonpress", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "-", + .font = "cbifont", + .w = 180, + .h = 9, + .ax = 1, .ay = 0 + }, + + .btnbipback = { + .snd = "player/cbi/buttonpress", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "n", + .font = "cbifont", + .w = 48, + .h = 9, + .ax = 4, .ay = 0 + }, + + .btndlgsel = { + .gfx = ":Dialogue:SelectBack", + .hot = ":Dialogue:SelectBackHot", + .snd = "player/cbi/dlgclick", + .cdef = "j", + .cact = "g", + .chot = "d", + .cdis = "i", + .font = "cbifont", + .external = true, + .w = 240, + .h = 14, + .ax = 4, .ay = 0 + }, + + .btnclear = { + .snd = "player/cbi/buttonpress", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "n", + .font = "cbifont", + .w = 20, + .h = 8, + .ax = 1, .ay = 1 + }, + + .btnnote = { + .snd = "player/cbi/buttoncurs", + .cdef = "j", + .cact = "g", + .chot = "k", + .cdis = "-", + .font = "cbifont", + .w = 200, + .h = 30, + .ax = 1, .ay = 1 + }, + + .cbxdef = { + .gfx = "Checkbox", + .hot = "CheckboxHot", + .dis = "CheckboxDisabled", + .sndup = "player/cbi/clickon", + .snddn = "player/cbi/clickoff", + .chkgfx = "CheckboxX", + .chkhot = "CheckboxXHot", + .chkact = "CheckboxXActive", + .chkdis = "CheckboxXDisabled", + .w = 10, + .h = 10 + }, + + .cbxsmall = { + .gfx = "CheckboxSmall", + .hot = "CheckboxSmallHot", + .dis = "CheckboxSmallDisabled", + .sndup = "player/cbi/clickon", + .snddn = "player/cbi/clickoff", + .chkgfx = "CheckboxX", + .chkhot = "CheckboxXHot", + .chkact = "CheckboxXActive", + .chkdis = "CheckboxXDisabled", + .w = 10, + .h = 10 + }, + + .scrdef = { + .capS = "ListCapTop", + .capE = "ListCapBottom", + .scrl = "ListScrollbar", + .notchgfx = "ListScrollNotch", + .notchhot = "ListScrollNotchHot", + .scrlw = 8, + .scrlh = 8 + }, + + .slddef = { + .gfx = "Slider", + .snd = "player/cbi/slidertick", + .notch = "SliderNotch", + .notchhot = "SliderNotchHot", + .font = "cbifont", + .pad = 2, + .w = 80, + .h = 7 + }, +}; + +struct gui_presets const *Lith_GUIPreExtern(void) +{ + return &guipre; +} + +// EOF + diff --git a/source/Main/g_scrollbar.c b/source/Main/g_scrollbar.c new file mode 100644 index 0000000..1c4952d --- /dev/null +++ b/source/Main/g_scrollbar.c @@ -0,0 +1,168 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +#include + +// +// Lith_GUI_ScrollBegin_Impl +// +// This function is excessively commented in case I need to change it. +// Reading this function will cause a 5x1d20 hit to your SAN stat. Beware! +// +void Lith_GUI_ScrollBegin_Impl(gui_state_t *g, id_t id, gui_scroll_args_t const *a) +{ + gui_scroll_preset_t const *pre = a->preset ? a->preset : &guipre.scrdef; + gui_scroll_state_t *scr = a->st; + + // sizes + int const blockh = pre->scrlh; // height of graphical block + int const blocks = a->h / blockh - 1; // height in graphical blocks -caps + int const caph = blockh / 2; // size of cap + int const caps = blocks * 2; // height in caps, -caps + int const h = blocks * blockh; // height in pixels -caps + int const realh = h + caph * 2; // height in pixels +caps + + // positions + int x = a->x + pre->scrlw; // base x to draw from + int y = a->y; // base y to draw from + + // check collision - height is minus caps, and y is offset by the top cap + Lith_GUI_Auto(g, id, x - pre->scrlw, y + caph, pre->scrlw, h); + + // add offset + x += g->ox; + y += g->oy; + + // get height of scroller + int notches; // height of scroller in caps + + if(a->contenth > realh) notches = a->h / (float)a->contenth * caps; + else notches = caps; + + int const scrlh = notches * caph; // height in pixels of scroller + float const maxy = (h - scrlh) / (float)h; // normalized maximum y value + + // decrement the sound timer + if(scr->nextsnd) scr->nextsnd--; + + // move scroller + __with(float supposedy = scr->y * h;) + { + if(g->active == id) + { + float const cy = g->cy - y - caph; + + // if it isn't grabbed and the cursor is over the scroller, + // set the grab position to where the cursor is relative to it + if(!scr->grabbed && cy > supposedy && cy < supposedy + scrlh) + { + scr->grabbed = true; + scr->grabpos = cy - supposedy; + } + + // if the scroller is grabbed we set the position relative to where + // we grabbed it from, otherwise we just use the middle of it + if(scr->grabbed) supposedy = cy - scr->grabpos; + else supposedy = cy - scrlh / 2; + + if(g->cy != g->old.cy && scr->nextsnd == 0) + { + ACS_LocalAmbientSound("player/cbi/scroll", 127); + scr->nextsnd = 7; + } + } + else if(scr->grabbed) + { + ACS_LocalAmbientSound("player/cbi/scrollend", 127); + scr->grabbed = false; + scr->nextsnd = 0; + } + + // finally, normalize and clamp + scr->y = supposedy / (float)h; + scr->y = minmax(scr->y, 0, maxy); + } + + // get offset of scroller + __with(int vofs = 0;) // offset in pixels of the content + { + if(a->contenth > realh) + vofs = round((a->contenth - realh) * (scr->y / maxy)); + + // set the scrollbar's offset + scr->ox = a->x + pre->scrlw; // offset by scrollbar width + scr->oy = a->y - vofs; // offset by scroller pos + + // set the top and bottom for occlusion + scr->occludeS = vofs; + scr->occludeE = vofs + realh; + } + + // draw top cap + ifauto(__str, cap, Lith_GUI_Prefix1(g, pre, capS)) + DrawSpritePlain(cap, g->hid--, x + 0.2, y + 0.1, TS); + y += caph; + + // draw middle of bar + __with(__str scrl = Lith_GUI_Prefix1(g, pre, scrl);) + for(int i = 0; i < blocks; i++) + { + if(scrl) DrawSpritePlain(scrl, g->hid--, x + 0.2, y + 0.1, TS); + y += blockh; + } + + // draw bottom cap + ifauto(__str, cap, Lith_GUI_Prefix1(g, pre, capE)) + DrawSpritePlain(cap, g->hid--, x + 0.2, y + 0.1, TS); + + // get base Y + int const ory = a->y + g->oy; + + // draw scroller + __with(__str graphic;) + { + if(g->hot == id || g->active == id) + graphic = Lith_GUI_Prefix1(g, pre, notchhot); + else + graphic = Lith_GUI_Prefix1(g, pre, notchgfx); + + if(graphic) for(int i = 0; i < notches; i++) + { + int const npos = round(caph + h * scr->y + caph * i); + DrawSpritePlain(graphic, g->hid--, x + 0.2, ory + npos + 0.1, + TS); + } + } + + // setup offsets + g->ox += scr->ox; + g->oy += scr->oy; + + // setup clip + Lith_GUI_Clip(g, x, ory, a->w, realh, a->ww); +} + +// +// Lith_GUI_ScrollEnd +// +void Lith_GUI_ScrollEnd(gui_state_t *g, gui_scroll_state_t *scr) +{ + // reset offsets + g->ox -= scr->ox; + g->oy -= scr->oy; + + // reset clip + Lith_GUI_ClipRelease(g); +} + +// +// Lith_GUI_ScrollOcclude +// +bool Lith_GUI_ScrollOcclude(gui_state_t *g, gui_scroll_state_t const *scr, int y, int h) +{ + return y > scr->occludeE || (h && (y + h) - scr->occludeS < 0); +} + +// EOF + diff --git a/source/Main/g_slider.c b/source/Main/g_slider.c new file mode 100644 index 0000000..c35f386 --- /dev/null +++ b/source/Main/g_slider.c @@ -0,0 +1,88 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +#include + +// +// Lith_GUI_Slider_Impl +// +double Lith_GUI_Slider_Impl(gui_state_t *g, id_t id, gui_slider_args_t const *a) +{ + gui_slider_preset_t const *pre = a->preset ? a->preset : &guipre.slddef; + + double w = pre->w - (pre->pad * 2); + + int x = a->x + pre->pad; + int y = a->y; + + Lith_GUI_Auto(g, id, x, y, w, pre->h); + + x += g->ox; + y += g->oy; + + // get a normalized value + double aval; + + aval = (a->val - a->minima) / (a->maxima - a->minima); + aval = minmax(aval, 0, 1); + + double val; + + // move scroll notch + if(g->active == id) + { + val = g->cx - x; + val = minmax(val, 0, w); + val /= w; + + // play sound + if(pre->snd && g->cx != g->old.cx && g->cx >= x && g->cx < x + w) + ACS_LocalAmbientSound(pre->snd, 60); + } + else + val = aval; + + // get result-normalized value + double norm = val * (a->maxima - a->minima) + a->minima; + + if(a->integ) norm = round(norm); + + // draw graphic + ifauto(__str, gfx, Lith_GUI_Prefix1(g, pre, gfx)) + DrawSpritePlain(gfx, g->hid--, (x - pre->pad) + 0.1, y + (pre->h / 2), TS); + + // draw notch + __with(__str graphic;) + { + if(g->hot == id || g->active == id) + graphic = Lith_GUI_Prefix1(g, pre, notchhot); + else + graphic = Lith_GUI_Prefix1(g, pre, notch); + + if(graphic) { + DrawSpritePlain(graphic, g->hid--, x + (int)(val * w) - 1 + 0.1, + y + 0.1, TS); + } + } + + // draw value + if(pre->font) + { + __str suf = a->suf ? a->suf : ""; + float amt = roundf(norm * 100.f) / 100.f; + if(a->integ) HudMessageF(pre->font, "\Cj%i%S", (int)amt, suf); + else HudMessageF(pre->font, "\Cj%.1k%S", (fixed)amt, suf); + } + + HudMessagePlain(g->hid--, x + (pre->w / 2) + 0.4, y + (pre->h / 2), TS); + + // if we've moved it, we return a difference + if(g->active == id && !g->clicklft && !CloseEnough(aval, val)) + return norm - a->val; + else + return 0; +} + +// EOF + diff --git a/source/Main/m_base64.c b/source/Main/m_base64.c new file mode 100644 index 0000000..65b9381 --- /dev/null +++ b/source/Main/m_base64.c @@ -0,0 +1,173 @@ +/* + * Base64 encoding/decoding (RFC1341) + * + * Copyright (c) 2005-2011, Jouni Malinen + * + * This software may be distributed, used, and modified under the terms of + * BSD license: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name(s) of the above-listed copyright holder(s) nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "lith_base64.h" +#include "lith_memory.h" + +#include +#include + +static const byte base64_table[65] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +/** + * base64_encode - Base64 encode + * @src: Data to be encoded + * @len: Length of the data to be encoded + * @out_len: Pointer to output length variable, or %NULL if not used + * Returns: Allocated buffer of out_len bytes of encoded data, + * or %NULL on failure + * + * Caller is responsible for freeing the returned buffer. Returned buffer is + * nul terminated to make it easier to use as a C string. The nul terminator is + * not included in out_len. + */ +byte *base64_encode(const byte *src, size_t len, size_t *out_len) +{ + byte *out, *pos; + const byte *end, *in; + size_t olen; + + olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ + olen++; /* nul termination */ + if (olen < len) + return NULL; /* integer overflow */ + out = Malloc(olen); + if (out == NULL) + return NULL; + + end = src + len; + in = src; + pos = out; + while (end - in >= 3) { + *pos++ = base64_table[in[0] >> 2]; + *pos++ = base64_table[((in[0] & 0x03) << 4) | (in[1] >> 4)]; + *pos++ = base64_table[((in[1] & 0x0f) << 2) | (in[2] >> 6)]; + *pos++ = base64_table[in[2] & 0x3f]; + in += 3; + } + + if (end - in) { + *pos++ = base64_table[in[0] >> 2]; + if (end - in == 1) { + *pos++ = base64_table[(in[0] & 0x03) << 4]; + *pos++ = '='; + } else { + *pos++ = base64_table[((in[0] & 0x03) << 4) | + (in[1] >> 4)]; + *pos++ = base64_table[(in[1] & 0x0f) << 2]; + } + *pos++ = '='; + } + + *pos = '\0'; + if (out_len) + *out_len = pos - out; + return out; +} + + +/** + * base64_decode - Base64 decode + * @src: Data to be decoded + * @len: Length of the data to be decoded + * @out_len: Pointer to output length variable + * Returns: Allocated buffer of out_len bytes of decoded data, + * or %NULL on failure + * + * Caller is responsible for freeing the returned buffer. + */ +byte *base64_decode(const byte *src, size_t len, size_t *out_len) +{ + static byte dtable[256]; + byte *out, *pos, block[4], tmp; + size_t i, count, olen; + int pad = 0; + + memset(dtable, 0x80, 256); + for (i = 0; i < sizeof(base64_table) - 1; i++) + dtable[base64_table[i]] = (byte)i; + dtable['='] = 0; + + count = 0; + for (i = 0; i < len; i++) { + if (dtable[src[i]] != 0x80) + count++; + } + + if (count == 0 || count % 4) + return NULL; + + olen = count / 4 * 3; + pos = out = Malloc(olen); + if (out == NULL) + return NULL; + + count = 0; + for (i = 0; i < len; i++) { + tmp = dtable[src[i]]; + if (tmp == 0x80) + continue; + + if (src[i] == '=') + pad++; + block[count] = tmp; + count++; + if (count == 4) { + *pos++ = ((block[0] << 2) | (block[1] >> 4)) & 0xFF; + *pos++ = ((block[1] << 4) | (block[2] >> 2)) & 0xFF; + *pos++ = ((block[2] << 6) | block[3]) & 0xFF; + count = 0; + if (pad) { + if (pad == 1) + pos--; + else if (pad == 2) + pos -= 2; + else { + /* Invalid padding */ + Dalloc(out); + return NULL; + } + break; + } + } + } + + *out_len = pos - out; + return out; +} + diff --git a/source/Main/m_common.c b/source/Main/m_common.c new file mode 100644 index 0000000..4f07658 --- /dev/null +++ b/source/Main/m_common.c @@ -0,0 +1,181 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +#include +#include + +// Extern Objects ------------------------------------------------------------| + +__str dbgstat[64], dbgnote[64]; +int dbgstatnum, dbgnotenum; + +// Static Functions ----------------------------------------------------------| + +// +// SetInventory +// +[[__call("StkCall")]] +static void SetInventory(__str item, int amount) +{ + int s = InvNum(item) - amount; + if(s < 0) InvTake(item, -s); + else if(s > 0) InvGive(item, s); +} + +// +// SetActorInventory +// +[[__call("StkCall")]] +static void SetActorInventory(int tid, __str item, int amount) +{ + int s = ACS_CheckActorInventory(tid, item) - amount; + if(s < 0) ACS_TakeActorInventory(tid, item, -s); + else if(s > 0) ACS_GiveActorInventory(tid, item, s); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_DumpAlloc +// +[[__call("ScriptS")]] +void Lith_DumpAlloc(void) +{ + __GDCC__alloc_dump(); +} + +// +// Lith_FadeFlash +// +[[__call("StkCall")]] +void Lith_FadeFlash(int r, int g, int b, fixed amount, fixed seconds) +{ + ACS_FadeTo(r, g, b, amount, 0.0); + ACS_FadeTo(r, g, b, 0.0, seconds); +} + +// +// Lith_GetTID +// +[[__call("ScriptS")]] +int Lith_GetTID(int tid, int ptr) +{ + if(tid || ptr) + ACS_SetActivator(tid, ptr); + return ACS_ActivatorTID(); +} + +// +// Lith_GetPlayerNumber +// +[[__call("ScriptS")]] +int Lith_GetPlayerNumber(int tid, int ptr) +{ + if(tid || ptr) + ACS_SetActivator(tid, ptr); + return ACS_PlayerNumber(); +} + +// +// Lith_ValidPointer +// +[[__call("ScriptS")]] +bool Lith_ValidPointer(int tid, int ptr) +{ + if(tid || ptr) + return ACS_SetActivator(tid, ptr); + else + return true; +} + +// +// Lith_SetPointer +// +[[__call("ScriptS")]] +bool Lith_SetPointer(int tid, int ptr, int assign, int tid2, int ptr2, int flags) +{ + if(tid || ptr) + ACS_SetActivator(tid, ptr); + return ACS_SetPointer(assign, tid2, ptr2, flags); +} + +// +// Lith_CheckActorInventory +// +[[__call("StkCall")]] +int Lith_CheckActorInventory(int tid, __str item) +{ + if(tid == 0) return InvNum(item); + else return ACS_CheckActorInventory(tid, item); +} + +// +// Lith_GiveActorInventory +// +[[__call("StkCall")]] +void Lith_GiveActorInventory(int tid, __str item, int amount) +{ + if(tid == 0) InvGive(item, amount); + else ACS_GiveActorInventory(tid, item, amount); +} + +// +// Lith_TakeActorInventory +// +[[__call("StkCall")]] +void Lith_TakeActorInventory(int tid, __str item, int amount) +{ + if(tid == 0) InvTake(item, amount); + else ACS_TakeActorInventory(tid, item, amount); +} + +// +// Lith_SetActorInventory +// +[[__call("StkCall")]] +void Lith_SetActorInventory(int tid, __str item, int amount) +{ + if(tid == 0) SetInventory(item, amount); + else SetActorInventory(tid, item, amount); +} + +// +// Lith_DebugStat +// +void Lith_DebugStat(__str fmt, ...) +{ + if(!(world.dbgLevel & log_devh)) return; + + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + dbgstat[dbgstatnum++] = ACS_EndStrParam(); +} + +// +// Lith_DebugNote +// +void Lith_DebugNote(__str fmt, ...) +{ + if(!(world.dbgLevel & log_devh)) return; + + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + dbgnote[dbgnotenum++] = ACS_EndStrParam(); +} + +// EOF + diff --git a/source/Main/m_cps.c b/source/Main/m_cps.c new file mode 100644 index 0000000..fbc9092 --- /dev/null +++ b/source/Main/m_cps.c @@ -0,0 +1,20 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_cps.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_CPS_Print +// +__str Lith_CPS_Print(u32 *cps) +{ + ACS_BeginPrint(); + + for(int i = 0, ch; (ch = Lith_CPS_GetC(cps, i)); i++) + ACS_PrintChar(ch); + + return ACS_EndStrParam(); +} + +// EOF diff --git a/source/Main/m_file.c b/source/Main/m_file.c new file mode 100644 index 0000000..378a394 --- /dev/null +++ b/source/Main/m_file.c @@ -0,0 +1,349 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#define _GNU_SOURCE // Needed for fopencookie. See: man 7 feature_test_macros + +#include "lith_common.h" +#include "lith_file.h" +#include "lith_world.h" + +#include "lith_base64.h" + +#include + +#define SAVE_BLOCK_SIZE 230 + +// Type Definitions ----------------------------------------------------------| + +// +// memfile_t +// +typedef struct memfile_t +{ + byte *mem; + size_t len; + size_t pos; +} memfile_t; + +// +// netfile_t +// +typedef struct netfile_s +{ + [[__anonymous]] + memfile_t memfile; + __str pcvar; + int pnum; +} netfile_t; + +// Static Functions ----------------------------------------------------------| + +// +// PrintMem +// +void PrintMem(byte const *data, size_t size) +{ + int termpos = 0; + + for(size_t i = 0; i < size; i++) + { + if(termpos + 3 > 79) + { + printf(c"\n"); + termpos = 0; + } + + if(isprint(data[i])) printf(c"%c ", data[i]); + else printf(c"%.2X ", data[i]); + + termpos += 3; + } + + printf(c"\nEOF\n\n"); +} + +// +// NetClose +// +// fclose for netfiles. +// Output to the CVar with a Base64 representation of the output buffer. +// +static int NetClose(void *nfdata) +{ + netfile_t *nf = nfdata; + + // If debugging, print out information about the buffer being written. + if(world.dbgSave) + { + printf(c"NetClose: Writing netfile \"%S\" (%zub)\n", nf->pcvar, nf->pos); + printf(c"Data follows\n"); + PrintMem((void *)nf->mem, nf->pos); + } + + // Base64 encode the buffer. + size_t outsize; + byte *coded = base64_encode((void *)nf->mem, nf->pos, &outsize); + + if(coded) + { + int cvarnum = 0; + + for(byte const *itr = coded; outsize; cvarnum++) + { + size_t itrsize; + + if(outsize <= SAVE_BLOCK_SIZE) + itrsize = outsize; + else + itrsize = SAVE_BLOCK_SIZE; + + ACS_SetUserCVarString(nf->pnum, StrParam("%S_%i", nf->pcvar, cvarnum), StrParam("%.*s", itrsize, itr)); + + itr += itrsize; + outsize -= itrsize; + } + + ACS_SetUserCVarString(nf->pnum, StrParam("%S_%i", nf->pcvar, cvarnum), ""); + + Dalloc(coded); + } + + Dalloc(nf->mem); + Dalloc(nf); + + return 0; +} + +// +// MemRead +// +static ssize_t MemRead(void *memdata, char *buf, size_t size) +{ + memfile_t *mem = memdata; + size_t avail = mem->len - mem->pos; + + if(size > avail) + size = avail; + + memcpy(buf, mem->mem + mem->pos, size); + mem->pos += size; + return size; +} + +// +// MemWrite +// +// +static ssize_t MemWrite(void *memdata, char const *buf, size_t size) +{ + memfile_t *mem = memdata; + size_t avail = mem->len - mem->pos; + + if(size >= avail) + { + size_t len = mem->len + mem->len / 2 + size + 1; + void *newmem = Ralloc(mem->mem, len); + + if(!mem) + return 0; + + mem->len = len; + mem->mem = newmem; + } + + memcpy(mem->mem + mem->pos, buf, size); + mem->mem[mem->pos += size] = '\0'; + return size; +} + +// +// MemSeek +// +static int MemSeek(void *memdata, off_t *offset, int whence) +{ + memfile_t *mem = memdata; + size_t pos; + + switch(whence) + { + case SEEK_SET: pos = *offset; break; + case SEEK_CUR: pos = *offset + mem->pos; break; + case SEEK_END: pos = *offset + mem->len; break; + default: return EOF; + } + + if(pos > mem->len) + return EOF; + + *offset = mem->pos = pos; + + return 0; +} + +// +// MemClose +// +static int MemClose(void *memdata) +{ + memfile_t *mem = memdata; + Dalloc(mem->mem); + Dalloc(mem); + + return 0; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_NFOpen +// +// fopen() equivalent for netfiles. +// +FILE *Lith_NFOpen(int pnum, __str pcvar, char rw) +{ + FILE *fp = null; + + if(rw == 'w') + { + netfile_t *nf = Salloc(netfile_t); + + nf->pcvar = pcvar; + nf->pnum = pnum; + + fp = fopencookie(nf, c"w", (cookie_io_functions_t){ + .write = MemWrite, + .close = NetClose + }); + } + else if(rw == 'r') + { + // Get inputs from all possible CVars. + char *input = null; + size_t inputsz = 0; + + for(int cvarnum;; cvarnum++) + { + __str cvar = ACS_GetUserCVarString(pnum, StrParam("%S_%i", pcvar, cvarnum)); + size_t inlen = ACS_StrLen(cvar); + + if(inlen) + { + input = Ralloc(input, inputsz + inlen + 1); + Lith_strcpy_str(input + inputsz, cvar); + + inputsz += inlen; + } + else + break; + } + + if(input) + { + // Decode the base64 input. + size_t size; + byte *data = base64_decode((void *)input, inputsz, &size); + + Dalloc(input); + + // If debugging, print out information about the buffer being read. + if(world.dbgSave) + { + printf(c"Lith_NFOpen: Opening memfile \"%S\" (%zub)\n", pcvar, size); + printf(c"Data follows\n"); + PrintMem(data, size); + } + + if(data) + { + memfile_t *mem = Salloc(memfile_t); + + mem->mem = data; + mem->len = size; + + fp = fopencookie(mem, c"r", (cookie_io_functions_t){ + .read = MemRead, + .seek = MemSeek, + .close = MemClose, + }); + } + } + } + + return fp; +} + +// +// Lith_FWrite32 +// +// Unpacks integers into a file stream. +// +size_t Lith_FWrite32(void const *restrict ptr, size_t count, size_t bytes, FILE *restrict fp) +{ + size_t res = 0; + + for(byte const *itr = ptr; count--; res += bytes) + { + u32 c = *itr++; + for(int i = 0; i < bytes; i++) + if(fputc((c & (0xFF << (i * 8))) >> (i * 8), fp) == EOF) + return res; + } + + return res; +} + +// +// Lith_FWrite_str +// +size_t Lith_FWrite_str(void const __str_ars *restrict ptr, size_t count, FILE *restrict fp) +{ + size_t res = 0; + + for(char const __str_ars *itr = ptr; count--; res++) + if(fputc(*itr++, fp) == EOF) + return res; + + return res; +} + +// +// Lith_FRead32 +// +// Reads packed integers from a file stream. +// +size_t Lith_FRead32(void *restrict buf, size_t count, size_t bytes, FILE *restrict fp) +{ + size_t res = 0; + + for(char *itr = buf; count--;) + { + int c = 0, t; + + for(int i = 0; i < bytes; i++, res++) + { + if((t = fgetc(fp)) == EOF) + { + *itr = c; + return res; + } + + c |= (t & 0xFF) << (i * 8); + } + + *itr++ = c; + } + + return res; +} + +// +// W_Open +// +FILE *W_Open(__str fname, char const *mode) +{ + __str content = LanguageNull(fname); + if(content) + return __fmemopen_str(content, ACS_StrLen(content), mode); + else + return null; +} + +// EOF diff --git a/source/Main/m_list.c b/source/Main/m_list.c new file mode 100644 index 0000000..4d034bb --- /dev/null +++ b/source/Main/m_list.c @@ -0,0 +1,70 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_list.h" +#include +#include +#include + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_LinkDefault +// +void Lith_LinkDefault(list_t *list, void *object) +{ + list->prev = list->next = list; + list->object = object; +} + +// +// Lith_ListLink +// +void Lith_ListLink(list_t *head, list_t *list) +{ + (list->prev = head->prev)->next = list; + (list->next = head )->prev = list; +} + +// +// Lith_ListUnlink +// +void *Lith_ListUnlink(list_t *list) +{ + list->prev->next = list->next; + list->next->prev = list->prev; + list->prev = list->next = list; + + return list->object; +} + +// +// Lith_ListSize +// +size_t Lith_ListSize(list_t *head) +{ + size_t count = 0; + for(list_t *rover = head->next; rover && rover != head; rover = rover->next) + count++; + return count; +} + +// +// Lith_ListFree +// +void Lith_ListFree(list_t *head, bool dofree) +{ + if(head->next) + { + while(head->next != head) + { + list_t *rover = head->next; + rover->unlink(); + if(dofree) + Dalloc(rover->object); + } + } + else + head->construct(); +} + +// EOF + diff --git a/source/Main/m_math.c b/source/Main/m_math.c new file mode 100644 index 0000000..fb18960 --- /dev/null +++ b/source/Main/m_math.c @@ -0,0 +1,223 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include + +#define BezierImpl(type, ret, func) \ + type xa = func(x1, x2, t); \ + type ya = func(y1, y2, t); \ + type xb = func(x2, x3, t); \ + type yb = func(y2, y3, t); \ + return (ret){func(xa, xb, t), func(ya, yb, t)} + +static u64 lmvar crctable[256]; // NB: Don't try to hash >8bit data. +static bool lmvar crcinit; + +// +// InitCRC64 +// +static void InitCRC64() +{ + u64 const polynomial = 0xC96C5795D7870F42; // ECMA 182 + + for(u64 i = 0; i < 256; i++) + { + u64 remainder = i; + + for(int j = 0; j < 8; j++) { + if(remainder & 1) remainder = (remainder >> 1) ^ polynomial; + else remainder >>= 1; + } + + crctable[i] = remainder; + } + + crcinit = true; +} + +// +// Lith_CRC64 +// +u64 Lith_CRC64(void const *data, size_t len, u64 result) +{ + byte const *ptr = data; + + if(!crcinit) InitCRC64(); + + result = ~result; + + for(size_t i = 0; i < len; i++) + result = crctable[(result ^ ptr[i]) & 0xFF] ^ (result >> 8); + + return ~result; +} + +// +// Lith_CRC64_str +// +u64 Lith_CRC64_str(void __str_ars const *data, size_t len, u64 result) +{ + byte __str_ars const *ptr = data; + + if(!crcinit) InitCRC64(); + + result = ~result; + + for(size_t i = 0; i < len; i++) + result = crctable[(result ^ ptr[i]) & 0xFF] ^ (result >> 8); + + return ~result; +} + +// +// RandomFloat +// +float RandomFloat(float max, float min) +{ + if(max < min) + swap(float, min, max); + + return (ACS_Random(0, 1048576) / 1048576.f) * (max - min) + min; +} + +// +// mag2f +// +float mag2f(float x, float y) +{ + return sqrtf(x * x + y * y); +} + +// +// mag2k +// +[[__call("StkCall")]] +fixed mag2k(fixed x, fixed y) +{ + return ACS_FixedSqrt(x * x + y * y); +} + +// +// mag2i +// +[[__call("StkCall")]] +int mag2i(int x, int y) +{ + return ACS_Sqrt(x * x + y * y); +} + +// +// lerpk +// +fixed lerpk(fixed a, fixed b, fixed t) +{ + fixed ret = ((1.0k - t) * a) + (t * b); + + if(roundk(ret, 10) == b) + return b; + + return ret; +} + +// +// lerplk +// +fixed64 lerplk(fixed64 a, fixed64 b, fixed64 t) +{ + fixed64 ret = ((1.0lk - t) * a) + (t * b); + + if(roundlk(ret, 10) == b) + return b; + + return ret; +} + +// +// lerpf +// +float lerpf(float a, float b, float t) +{ + float ret = ((1.0f - t) * a) + (t * b); + + if((roundf(ret << 10) >> 10) == b) + return b; + + return ret; +} + +// +// lerp +// +double lerp(double a, double b, double t) +{ + #pragma GDCC FIXED_LITERAL OFF + double ret = ((1.0 - t) * a) + (t * b); + + if((round(ret << 10) >> 10) == b) + return b; + + return ret; +} + +// +// aabb +// +[[__call("StkCall")]] +bool aabb(int x, int y, int z, int w, int x2, int y2) +{ + return x2 >= x && y2 >= y && x2 < z && y2 < w; +} + +// +// ceilk +// +[[__call("StkCall")]] +int ceilk(fixed n) +{ + union {int_k_t i; fixed a;} u = {.a = n}; + if(u.i & 0xFFF1) return u.i &= 0xFFFF0000, u.a + 1; + else return (int)u.a; +} + +// +// bzpolyf +// +[[__call("StkCall")]] +float bzpolyf(float a, float b, float t) +{ + return a + ((b - a) * t); +} + +// +// bzpolyi +// +[[__call("StkCall")]] +int bzpolyi(int a, int b, float t) +{ + return a + ((b - a) * t); +} + +// +// qbezierf +// +struct vec2f qbezierf(float x1, float y1, float x2, float y2, float x3, float y3, float t) +{ + BezierImpl(float, struct vec2f, bzpolyf); +} + +// +// qbezieri +// +struct vec2i qbezieri(int x1, int y1, int x2, int y2, int x3, int y3, float t) +{ + BezierImpl(int, struct vec2i, bzpolyi); +} + +// +// ctopol +// +struct polar ctopol(fixed x, fixed y) +{ + return (struct polar){ACS_VectorAngle(x, y), mag2f(x, y)}; +} + +// EOF diff --git a/source/Main/m_namegen.c b/source/Main/m_namegen.c new file mode 100644 index 0000000..5011199 --- /dev/null +++ b/source/Main/m_namegen.c @@ -0,0 +1,201 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// Predefined names and suffixes mostly taken from Kyle873's Doom RPG. +// Used with permission. +#include "lith_common.h" +#include "lith_world.h" +#include + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_RandomName +// +__str Lith_RandomName(int id) +{ + static __str syllables[] = { + /*か*/ "ka","k'","khi","kaz", + /*が*/ "ga","go","gor","got","gn", + /*さ*/ "sha","sk","shu","shi", + /*ざ*/ "zk", + /*た*/ "th","tch","ch","tt","t'","tar","cth", + /*な*/ "nil","n'", + /*だ*/ "do","dak'","dax", + /*は*/ "fta","h", + /*ば*/ "bur","bel'", + /*ま*/ "ma","mo","mar", + /*ら*/ "rly","l","r'", + /*う*/ "u","ul", + /*え*/ "eh","er", + /*無*/ "ver","xel'", + }; + + static __str lul[] = {"ohgodwhat","kdizd","help","ohno","explod","why","fuck"}; + + static __str names[] = { + "Gorgoth", + "Merdiklo", + "Starface", + "Mar'khi", + "Veritt", + "Modoch", + "Vup", + "Helliox", + "Warrdeth", + "Killzor", + "Ikhon", + "Manslayer", + "Fismit", + "Killinger", + "Eradicus", + "Mortarr", + "Pox", + "Murdercles", + "Jerkules", + "Haddrox", + "Persecon", + "Errexioth", + "Satan Jr.", + "Makob", + "Vorbenix", + "Norvenica", + "Mek'tethel", + "Vex'genn", + "Horoxoloth", + "Chaotica", + "Hex'vorr", + "Legetto", + "Fauror", + "Kormat", + "Mogaltu", + "Shel", + "Vameth", + "Dethul", + "Ginavak", + "Kantul", + "Korthaet", + "Laniaro", + "Lortuc", + "Morcatu", + "Ndur", + "Saugur", + "Vathan", + "Caethind", + "Hirthe", + "Inchindr", + "Kaelarmaul", + "Koritu", + "Nakor", + "Ngugobal", + "Obair", + "Rorgia", + "Falau", + "Hethaeg", + "Melulind", + "Morchaur", + "Nilrin", + "Shabakauth", + "Ulkal", + "Valdo", + "Wendun", + "Atund", + "Bagurar", + "Shuldu", + "Be'elzebubba", + "K'banian", + "Faellat", + "G'ldethi", + "Kazgoroth", + "Mathanat", + "Ngot", + "S'goth", + "Sot-ilh", + "Ubote", + "Yar'udab", + "Ulyaoth", + "Xel'lotath", + "Chattur'gha", + "Mantorok", + "Gowron", + "Dak'shira", + "Keghas", + "Pha'otho", + "N'hogura", + "Alevot", + "Arafonad", + "Axurador", + "Erelak", + "Eroam", + "Kazidax", + "Nudob", + "Tarvo", + "Araxidak", + "Duri", + "Kafondam", + "Rilor", + "Ukam", + "Kofarutul", + "Edorir", + "Sofolos", + "Tarivror", + "Xibavel", + "M'Rub", + "P'Noon Ikl", + "Olok", + }; + + static __str suffixes[] = { + "Supreme", + "Lord of Brimstone", + "Eater of Souls", + "Betrayer of All", + "Executioner", + "Seeker of Bloodshed", + "Agent of Damnation", + "Image of Darkness", + "Bringer of Famine", + "Engine of Ruin", + "Ender of Days", + "Lord of Chaos", + "Lord of Darkness", + "Lord of Betrayal", + "Slayer of Worlds", + "Shadow of the Night", + "Dark One", + "Chosen of Sin", + "Cold-eyed Slayer", + "Juggernaut", + "Walking Apocalypse", + "Invincible", + "Final Judgement", + "One Who Seeks Battle", + "Overlord of Pandemonium", + "Lord of Hatred", + "Incarnation of Death", + "Hideous Destructor", + "Horrendeous Tyrant", + }; + + __str ret = ""; + + if(id) + srand(world.mapseed + id); + else + srand(ACS_Random(0, 0x7FFFFFFF)); + + if(id && (rand() % 10) == 0) + ret = names[rand() % countof(names)]; + else + for(int i = 0, n = 3 + (rand() % 6); i < n; i++) + if((rand() % 101) == 0) + ret = StrParam("%S%S", ret, lul[rand() % countof(lul)]); + else + ret = StrParam("%S%S", ret, syllables[rand() % countof(syllables)]); + + if(id) + ret = StrParam("%S, the %S", ret, suffixes[rand() % countof(suffixes)]); + + return StrParam("\Cg%c%S", toupper(ACS_StrLeft(ret, 1)[0]), ACS_StrRight(ret, ACS_StrLen(ret) - 1)); +} + +// EOF + diff --git a/source/Main/m_print.c b/source/Main/m_print.c new file mode 100644 index 0000000..699c7ec --- /dev/null +++ b/source/Main/m_print.c @@ -0,0 +1,169 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" + +#include + +#define DrawSpriteBegin(name) \ + do { \ + if(name[0] == ':') \ + { \ + ACS_BeginPrint(); \ + ACS_BeginPrint(); \ + ACS_PrintString("LITH"); \ + ACS_PrintString(name); \ + ACS_PrintLocalized(ACS_EndStrParam()); \ + ACS_SetFont(ACS_EndStrParam()); \ + } \ + else \ + ACS_SetFont(name); \ + ACS_BeginPrint(); \ + ACS_PrintChar('a'); \ + ACS_MoreHudMessage(); \ + } while(0) + +// +// DrawSprite +// +[[__call("StkCall")]] +void DrawSprite(__str name, int flags, int id, fixed x, fixed y, fixed hold) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(flags|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(); +} + +// +// DrawSpriteX +// +[[__call("StkCall")]] +void DrawSpriteX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(flags|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(a1); +} + +// +// DrawSpriteXX +// +[[__call("StkCall")]] +void DrawSpriteXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(flags|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(a1, a2); +} + +// +// DrawSpriteXXX +// +[[__call("StkCall")]] +void DrawSpriteXXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2, fixed a3) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(flags|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(a1, a2, a3); +} + +// +// DrawSpritePlain +// +[[__call("StkCall")]] +void DrawSpritePlain(__str name, int id, fixed x, fixed y, fixed hold) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(); +} + +// +// DrawSpriteAlpha +// +[[__call("StkCall")]] +void DrawSpriteAlpha(__str name, int id, fixed x, fixed y, fixed hold, fixed alpha) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(HUDMSG_ALPHA|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(alpha); +} + +// +// DrawSpriteFade +// +[[__call("StkCall")]] +void DrawSpriteFade(__str name, int id, fixed x, fixed y, fixed hold, fixed fadetime) +{ + DrawSpriteBegin(name); + ACS_OptHudMessage(HUDMSG_FADEOUT|HUDMSG_NOTWITHFULLMAP, id, CR_UNTRANSLATED, x, y, hold); + ACS_EndHudMessage(fadetime); +} + +// +// HudMessage +// +void HudMessage(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + ACS_MoreHudMessage(); +} + +// +// HudMessageRainbows +// +void HudMessageRainbows(__str fmt, ...) +{ + static char const chars[] = {'g', 'i', 'k', 'd', 'h', 't', 'r'}; + va_list vl; + + ACS_BeginPrint(); + + ACS_PrintChar('\C'); + ACS_PrintChar(chars[(ACS_Timer() / 4) % countof(chars)]); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + ACS_MoreHudMessage(); +} + +// +// Log +// +void Log(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + ACS_EndLog(); +} + +// +// PrintBold +// +void PrintBold(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + ACS_EndPrintBold(); +} + +// EOF diff --git a/source/Main/m_str.c b/source/Main/m_str.c new file mode 100644 index 0000000..587676f --- /dev/null +++ b/source/Main/m_str.c @@ -0,0 +1,180 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" + +#include +#include +#include + +#define StrHashImpl() \ + u32 ret = 0; \ + for(; *s; s++) ret = *s + 101 * ret; \ + return ret + +// +// StrUpper +// +__str StrUpper(__str in) +{ + ACS_BeginStrParam(); + + for(char __str_ars const *c = in; *c; c++) + ACS_PrintChar(toupper(*c)); + + return ACS_EndStrParam(); +} + +// +// StrHash +// +[[__call("StkCall")]] +u32 StrHash(char __str_ars const *s) +{ + StrHashImpl(); +} + +// +// CStrHash +// +[[__call("StkCall")]] +u32 CStrHash(char const *s) +{ + StrHashImpl(); +} + +// +// Lith_strcpy_str +// +char *Lith_strcpy_str(char *dest, char __str_ars const *src) +{ + for(char *i = dest; (*i = *src); ++i, ++src); + return dest; +} + +#define StrCmpImpl() \ + for(; *s1 && *s2; ++s1, ++s2) {if(*s1 != *s2) return *s1 - *s2;} \ + return *s1 - *s2 + +// +// Lith_strcmp_str +// +int Lith_strcmp_str(char const *s1, char __str_ars const *s2) +{ + StrCmpImpl(); +} + +// +// Lith_ScoreSep +// +[[__call("StkCall")]] +__str Lith_ScoreSep(i96 num) +{ + static char out[48]; + + if(!num) return "0"; + + char *outp = out + countof(out) - 1; + int cnum = 0; + + while(num) + { + lldiv_t div = lldiv(num, 10); + *--outp = div.rem + '0'; + num = div.quot; + + if(++cnum == 3) { + *--outp = ','; + cnum = 0; + } + } + + if(!cnum) outp++; + + ACS_BeginPrint(); + ACS_PrintGlobalCharArray((int)outp, __GDCC__Sta); + return ACS_EndStrParam(); +} + +// +// LanguageV +// +static __str LanguageV(__str name) +{ + __str ret = StrParam("%LS", name); + + if(ret[0] == '$') + { + __str sub = ACS_StrMid(ret, 1, 0x7FFFFFFF); + __str nex = StrParam("%LS", sub); + if(sub != nex) + ret = nex; + } + + return ret; +} + +// +// Language +// +__str Language(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + return LanguageV(ACS_EndStrParam()); +} + +// +// LanguageNull +// +__str LanguageNull(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + __str name = ACS_EndStrParam(); + __str alias = LanguageV(name); + + return name == alias ? null : alias; +} + +// +// StrParam +// +__str StrParam(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); + + return ACS_EndStrParam(); +} + +// +// StrParamBegin +// +void StrParamBegin(__str fmt, ...) +{ + va_list vl; + + ACS_BeginPrint(); + + va_start(vl, fmt); + __vnprintf_str(fmt, vl); + va_end(vl); +} + +// EOF diff --git a/source/Main/m_tokbuf.c b/source/Main/m_tokbuf.c new file mode 100644 index 0000000..7038db1 --- /dev/null +++ b/source/Main/m_tokbuf.c @@ -0,0 +1,133 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#include "lith_tokbuf.h" + +#include + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_TBufProc +// +int Lith_TBufProc(struct token *tok, void *udata) +{ + switch(tok->type) + { + default: return tokproc_next; + case tok_eof: return tokproc_done; + case tok_lnend: + case tok_cmtblk: + case tok_cmtlin: return tokproc_skip; + } +} + +// +// Lith_TBufProcL +// +int Lith_TBufProcL(struct token *tok, void *udata) +{ + switch(tok->type) + { + default: return tokproc_next; + case tok_eof: return tokproc_done; + case tok_cmtblk: + case tok_cmtlin: return tokproc_skip; + } +} + +// +// Lith_TBufCtor +// +void Lith_TBufCtor(struct tokbuf *tb) +{ + tb->orig.line = 1; + tb->toks = Calloc(tb->bend, sizeof(struct token)); + if(!tb->tokProcess) tb->tokProcess = Lith_TBufProc; +} + +// +// Lith_TBufDtor +// +void Lith_TBufDtor(struct tokbuf *tb) +{ + if(tb->toks) for(int i = 0; i < tb->bend; i++) + Vec_Clear(tb->toks[i].text); + + Dalloc(tb->toks); +} + +// +// Lith_TBufGet +// +struct token *Lith_TBufGet(struct tokbuf *tb) +{ + if(++tb->tpos < tb->tend) + return &tb->toks[tb->tpos]; + + // Free beginning of buffer. + for(int i = 0; i < tb->bbeg; i++) + { + Vec_Clear(tb->toks[i].text); + tb->toks[i] = (struct token){0}; + } + + // Move end of buffer to beginning. + if(tb->tend) for(int i = tb->tend - tb->bbeg, j = 0; i < tb->tend; i++, j++) + { + tb->toks[j] = tb->toks[i]; + tb->toks[i] = (struct token){0}; + } + + // Get new tokens. + for(tb->tpos = tb->tend = tb->bbeg; tb->tend < tb->bend; tb->tend++) + { + skip: + Lith_ParseToken(tb->fp, &tb->toks[tb->tend], &tb->orig); + + switch(tb->tokProcess(&tb->toks[tb->tend], tb->udata)) { + case tokproc_next: break; + case tokproc_done: goto done; + case tokproc_skip: goto skip; + } + } + +done: + return &tb->toks[tb->tpos]; +} + +// +// Lith_TBufPeek +// +struct token *Lith_TBufPeek(struct tokbuf *tb) +{ + Lith_TBufGet(tb); + return Lith_TBufUnGet(tb); +} + +// +// Lith_TBufUnGet +// +struct token *Lith_TBufUnGet(struct tokbuf *tb) +{ + return &tb->toks[tb->tpos--]; +} + +// +// Lith_TBufReGet +// +struct token *Lith_TBufReGet(struct tokbuf *tb) +{ + return &tb->toks[tb->tpos]; +} + +// +// Lith_TBufDrop +// +bool Lith_TBufDrop(struct tokbuf *tb, int t) +{ + if(Lith_TBufGet(tb)->type != t) + {Lith_TBufUnGet(tb); return false;} + else + return true; +} + +// EOF diff --git a/source/Main/m_token.c b/source/Main/m_token.c new file mode 100644 index 0000000..7a9ffb0 --- /dev/null +++ b/source/Main/m_token.c @@ -0,0 +1,190 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#include "lith_token.h" +#include "lith_darray.h" + +#include + +#define textNext() Vec_Grow(tok->text, 1), Vec_Next(tok->text) + +#define tokText(fn) \ + do { \ + for(int pc = 0; fn(ch); pc = ch, getch()) { \ + advLine(); \ + textNext() = ch; \ + } \ + textNext() = '\0'; \ + unget(); \ + } while(0) + +#define IsIdenti(ch) (isalnum(ch) || (ch) == '_') +#define IsNum(ch) (isalnum(ch) || (ch) == '_' || (ch) == '.') + +#define InComment(ch) ((ch) != '\n' && !feof(fp)) + +#define unget() ((orig->colu -= 1), ungetc(ch, fp)) +#define getch() ((orig->colu += 1), ch = fgetc(fp)) + +#define advLine() \ + switch(ch) { \ + case '\r': if(getch() != '\n') unget(); \ + case '\n': orig->colu = 0; ++orig->line; \ + } + +//#define tok1(tt1) (printf(#tt1 "\n"), tok->type = tt1) +#define tok1(tt1) (tok->orig = *orig, tok->type = tt1) +#define tok2(c2, tt1, tt2) \ + if(getch() == c2) tok1(tt2); \ + else (unget(), tok1(tt1)) +#define tok3(c2, c3, tt1, tt2, tt3) \ + if(getch() == c3) tok1(tt3); \ + else if( ch == c2) tok1(tt2); \ + else (unget(), tok1(tt1)) + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_ParseToken +// +void Lith_ParseToken(FILE *fp, struct token *tok, struct origin *orig) +{ + if(!tok || !fp || !orig) return; + +begin:; + int ch; + + Vec_Clear(tok->text); + + getch(); + if(feof(fp) || ch == EOF) { + unget(); + tok1(tok_eof); + return; + } + + switch(ch) + { + // Whitespace + case '\r': case '\n': tok1(tok_lnend); advLine(); return; + + // 1-op tokens + case ';': tok1(tok_semico); return; + case ',': tok1(tok_comma ); return; + case '$': tok1(tok_dollar); return; + case '[': tok1(tok_bracko); return; + case ']': tok1(tok_brackc); return; + case '{': tok1(tok_braceo); return; + case '}': tok1(tok_bracec); return; + case '(': tok1(tok_pareno); return; + case ')': tok1(tok_parenc); return; + + // 2-op tokens + case '=': tok2('=', tok_eq, tok_eq2 ); return; + case '?': tok2('=', tok_tern, tok_terneq); return; + case '!': tok2('=', tok_not, tok_neq ); return; + case '~': tok2('=', tok_bnot, tok_bneq ); return; + case '*': tok2('=', tok_mul, tok_muleq ); return; + case '@': tok2('@', tok_at, tok_at2 ); return; + + // 3-op tokens + case '<': tok3('<', '=', tok_lt, tok_lt2, tok_le ); return; + case '>': tok3('>', '=', tok_gt, tok_gt2, tok_ge ); return; + case '|': tok3('|', '=', tok_or, tok_or2, tok_oreq ); return; + case '&': tok3('&', '=', tok_and, tok_and2, tok_andeq); return; + case '+': tok3('+', '=', tok_add, tok_add2, tok_addeq); return; + case '%': tok3('%', '=', tok_mod, tok_mod2, tok_modeq); return; + case '^': tok3('^', '=', tok_xor, tok_xor2, tok_xoreq); return; + case ':': tok3(':', '=', tok_col, tok_col2, tok_coleq); return; + + case '-': + if(getch() == '-') tok1(tok_sub2); + else if(ch == '=') tok1(tok_subeq); + else if(ch == '>') tok1(tok_rarrow); + else if(isdigit(ch)) {unget(); ch = '-'; break;} + else {unget(); tok1(tok_sub);} + return; + + case '/': + if(getch() == '=') + tok1(tok_diveq); + else if(ch == '/') + { + tok1(tok_cmtlin); + getch(); + tokText(InComment); + } + else if(ch == '*') + { + tok1(tok_cmtblk); + getch(); + + for(int lvl = 1; lvl && !feof(fp); getch()) + { + if(ch == '/') { + if(getch() == '*') {lvl++; continue;} + else {unget(); ch = '/';} + } else if(ch == '*') { + if(getch() == '/') {lvl--; continue;} + else {unget(); ch = '*';} + } + + advLine(); + textNext() = ch; + } + + unget(); + } + else + {unget(); tok1(tok_div);} + return; + + case '.': + if(getch() == '.') + tok2('.', tok_dot2, tok_dot3); + else if(isdigit(ch)) + {unget(); break;} + else + {unget(); tok1(tok_dot);} + return; + + case '`': + getch(); + tokText(InComment); + tok1(tok_quote); + return; + + case '\'': tok1(tok_charac); goto string; + case '"': tok1(tok_string); goto string; + string: + for(int i = 0, beg = ch; getch() != beg && !feof(fp);) + textNext() = ch; + textNext() = '\0'; + return; + } + + if(isblank(ch)) + { + while(isblank(getch())); + unget(); + goto begin; + } + else if(isdigit(ch) || ch == '.' || ch == '-') + { + tok1(tok_number); + textNext() = ch; + getch(); + tokText(IsNum); + } + else if(IsIdenti(ch)) + { + tok1(tok_identi); + tokText(IsIdenti); + } + else + { + tok1(tok_chrseq); + textNext() = ch; + textNext() = '\0'; + } +} + +// EOF diff --git a/source/Main/p_bip.c b/source/Main/p_bip.c new file mode 100644 index 0000000..c2e61e2 --- /dev/null +++ b/source/Main/p_bip.c @@ -0,0 +1,482 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_bip.h" +#include "lith_list.h" +#include "lith_world.h" +#include "lith_file.h" +#include "lith_tokbuf.h" + +#include + +#define ForCategory() for(int categ = BIPC_NONE + 1; categ < BIPC_MAX; categ++) +#define ForPage() forlist(bippage_t *page, bip->infogr[categ]) +#define ForCategoryAndPage() ForCategory() ForPage() + +// Types ---------------------------------------------------------------------| + +struct page_info +{ + __str shname; + __str flname; + __str body; +}; + +struct page_init +{ + int pclass; + __str name; + bip_unlocks_t unlocks; + bool isfree; +}; + +// Static Functions ----------------------------------------------------------| + +// +// GetPageInfo +// +static struct page_info GetPageInfo(bippage_t const *page) +{ + struct page_info pinf; + + pinf.shname = page->category == BIPC_MAIL + ? page->name + : Language("LITH_TXT_INFO_SHORT_%S", page->name); + + pinf.body = page->body + ? page->body + : Language("LITH_TXT_INFO_DESCR_%S", page->name); + + pinf.flname = page->title + ? page->title + : Language("LITH_TXT_INFO_TITLE_%S", page->name); + + return pinf; +} + +// +// SetCurPage +// +static void SetCurPage(gui_state_t *g, bip_t *bip, bippage_t *page, __str body) +{ + bip->curpage = page; + + Lith_GUI_TypeOn(g, &CBIState(g)->biptypeon, body); + Lith_GUI_ScrollReset(g, &CBIState(g)->bipinfoscr); +} + +// +// UnlockPage +// +static void UnlockPage(bip_t *bip, bippage_t *page, int pclass) +{ + bip->pageavail++; + bip->categoryavail[page->category]++; + page->unlocked = true; + + for(int i = 0; i < countof(page->unlocks) && page->unlocks[i]; i++) + bip->unlock(page->unlocks[i], pclass); +} + +// +// AddToBIP +// +[[__optional_args(1)]] +static void AddToBIP(bip_t *bip, int categ, int pclass, struct page_init const *pinit, bool isfree) +{ + __str image = LanguageNull("LITH_TXT_INFO_IMAGE_%S", pinit->name); + int height = strtoi_str(Language("LITH_TXT_INFO_CSIZE_%S", pinit->name), null, 0); + + bippage_t *page = Salloc(bippage_t); + + page->name = pinit->name; + page->category = categ; + page->unlocked = false; + page->image = image; + page->height = height; + memmove(page->unlocks, pinit->unlocks, sizeof(page->unlocks)); + + page->link.construct(page); + page->link.link(&bip->infogr[categ]); + + // we have to pass along the player's class so discriminators don't fuck up + if(isfree) UnlockPage(bip, page, pclass); +} + +// +// CatFromStr +// +[[__call("StkCall")]] +static int CatFromStr(__str name) +{ +#define LITH_X(n, _) if(name == #n) return BIPC_##n; +#include "lith_bip.h" + return BIPC_NONE; +} + +// +// PClFromStr +// +[[__call("StkCall")]] +static int PClFromStr(__str name) +{ +#define LITH_X(n, pc) if(name == #n || name == #pc) return pc; +#include "lith_player.h" + return 0; +} + +// +// LoadBIPInfo +// +static int LoadBIPInfo(__str fname, bip_t *bip, int pclass) +{ + struct tokbuf tb = { + .bbeg = 4, .bend = 10, + .fp = W_Open(fname, c"r"), + .tokProcess = Lith_TBufProcL + }; + if(!tb.fp) return 0; + + tb.ctor(); + + bool catfree = false; + int categ = BIPC_NONE; + int total = 0; + struct page_init page; + + for(struct token *tok; (tok = tb.get())->type != tok_eof;) switch(tok->type) + { + case tok_lnend: + continue; + case tok_at: + // @ Include + tok = tb.get(); + total += LoadBIPInfo(Lith_TokStr(tok), bip, pclass); + break; + case tok_xor: + // ^ Category [*] + tok = tb.get(); + categ = CatFromStr(Lith_TokStr(tok)); + catfree = tb.drop(tok_mul); + break; + case tok_identi: + // Classes... Name [*] [-> Unlocks...] + page = (struct page_init){}; + + do + page.pclass |= PClFromStr(Lith_TokStr(tok)); + while(tb.drop(tok_or) && (tok = tb.get())); + + tok = tb.get(); + page.name = Lith_TokStr(tok); + page.isfree = tb.drop(tok_mul); + + if(tb.drop(tok_rarrow)) + for(int i = 0; i < countof(page.unlocks) && !tb.drop(tok_lnend); i++) + { + tok = tb.get(); + page.unlocks[i] = Lith_TokStr(tok); + } + + if(categ != BIPC_NONE && pclass & page.pclass) + AddToBIP(bip, categ, pclass, &page, page.isfree || catfree); + total++; + break; + } + + tb.dtor(); + fclose(tb.fp); + + return total; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerInitBIP +// +[[__call("ScriptS")]] +void Lith_PlayerInitBIP(struct player *p) +{ + bip_t *bip = &p->bip; + + ForCategory() + bip->infogr[categ].free(true); + + int total = LoadBIPInfo("LITH_BIPINFO", bip, p->pclass); + if(world.dbgLevel) p->logH("> There are %i info pages!", total); + + ForCategory() + bip->pagemax += bip->categorymax[categ] = bip->infogr[categ].size; + + if(world.dbgBIP) + { + bip->pageavail = bip->pagemax; + + ForCategory() bip->categoryavail[categ] = bip->categorymax[categ]; + ForCategoryAndPage() page->unlocked = true; + } + + bip->init = true; +} + +// +// Lith_DeliverMail +// +[[__call("ScriptS")]] +void Lith_DeliverMail(struct player *p, __str title, int flags) +{ + if(p->pclass & pcl_mods) return; + + p->setActivator(); + + flags |= strtoi_str(Language("LITH_TXT_MAIL_FLAG_%S", title), null, 0); + + ifauto(__str, discrim, p->discrim) { + flags |= strtoi_str(Language("LITH_TXT_MAIL_FLAG_%S%S", title, discrim), null, 0); + if(!(flags & MAILF_AllPlayers)) + title = StrParam("%S%S", title, discrim); + } + + bip_t *bip = &p->bip; + + bippage_t *page = Salloc(bippage_t); + + __str date = LanguageNull("LITH_TXT_MAIL_TIME_%S", title); + __str size = LanguageNull("LITH_TXT_MAIL_SIZE_%S", title); + __str send = LanguageNull("LITH_TXT_MAIL_SEND_%S", title); + __str name = LanguageNull("LITH_TXT_MAIL_NAME_%S", title); + __str body = Language ("LITH_TXT_MAIL_BODY_%S", title); + + if(!send) send = ""; + + page->name = date ? date : world.canontimeshort; + page->title = name ? name : ""; + page->body = StrParam(Language("LITH_TXT_MAIL_TEMPLATE"), send, page->name, body); + page->category = BIPC_MAIL; + page->unlocked = true; + + if(size) page->height = strtoi_str(size, null, 0); + + page->link.construct(page); + page->link.link(&bip->infogr[BIPC_MAIL]); + + bip->mailreceived++; + + if(!(flags & MAILF_NoPrint)) + { + ACS_Delay(20); + + p->log("> Mail received from <\Cj%S\C->.", send); + + if(ACS_Random(1, 10000) == 1) + { + bip->mailtrulyreceived++; + ACS_LocalAmbientSound("player/YOUVEGOTMAIL", 127); + } + else + ACS_LocalAmbientSound("player/cbi/mail", 127); + } +} + +// +// Lith_FindBIPPage +// +bippage_t *Lith_FindBIPPage(bip_t *bip, __str name) +{ + if(!name) + return null; + + ForCategoryAndPage() + if(page->name == name) + return page; + + return null; +} + +// +// Lith_UnlockBIPPage +// +bippage_t *Lith_UnlockBIPPage(bip_t *bip, __str name, int pclass) +{ + bippage_t *page = bip->find(name); + + if(!page && pclass) + ifauto(__str, discrim, Lith_PlayerDiscriminator(pclass)) + { + page = bip->find(StrParam("%S%S", name, discrim)); + } + + if(page && !page->unlocked) + UnlockPage(bip, page, pclass); + + return page; +} + +// +// Lith_DeallocateBIP +// +[[__call("ScriptS")]] +void Lith_DeallocateBIP(bip_t *bip) +{ + ForCategory() + bip->infogr[categ].free(true); + bip->init = false; +} + +// +// CheckMatch +// +[[__call("ScriptS")]] +static bool CheckMatch(struct page_info *pinf, __str query) +{ + return strcasestr_str(pinf->shname, query) || + strcasestr_str(pinf->flname, query) || + strcasestr_str(pinf->body, query); +} + +// +// Lith_CBITab_BIP +// +void Lith_CBITab_BIP(gui_state_t *g, struct player *p) +{ + bip_t *bip = &p->bip; + int avail, max; + + if(bip->curcategory == BIPC_MAIN) + { + int n = 0; + + HudMessageF("CBIFONT", "INFO CATEGORIES"); + HudMessageParams(0, g->hid--, CR_PURPLE, 40.1, 70.1, TS); + + bip->lastcategory = BIPC_MAIN; + + static __str const lines[] = { + "Weapons and weapon upgrades.", + "Enemies and bosses.", + "Armors and other loot.", + "Your attributes, abilities and history.", + "Body upgrades.", + "Places of interest around the galaxy.", + "Important companies, historic and current.", + "Received mail." + }; + + for(int i = 0; i < countof(lines); i++) + { + HudMessageF("CBIFONT", "%S", lines[i]); + HudMessageParams(0, g->hid--, CR_WHITE, 105.1, 85.1 + n + i * 10, TS); + } +#define LITH_X(name, capt) \ + if(Lith_GUI_Button_Id(g, BIPC_##name, capt, 45, 85 + n, Pre(btnbipmain))) \ + { \ + bip->curcategory = BIPC_##name; \ + bip->curpage = null; \ + } \ + n += 10; +#include "lith_bip.h" + + avail = bip->pageavail; + max = bip->pagemax; + } + else + { + list_t *list = &bip->infogr[bip->curcategory]; + size_t n = list->size; + size_t i = 0; + + Lith_GUI_ScrollBegin(g, &CBIState(g)->bipscr, 15, 50, guipre.btnlist.w, 170, guipre.btnlist.h * n); + + forlistIt(bippage_t *page, *list, i++) + { + int y = guipre.btnlist.h * i; + + if(Lith_GUI_ScrollOcclude(g, &CBIState(g)->bipscr, y, guipre.btnlist.h)) + continue; + + struct page_info pinf = GetPageInfo(page); + __str name = StrParam("%S%S", bip->curpage == page ? "\Ci" : "", pinf.shname); + + if(Lith_GUI_Button_Id(g, i, name, 0, y, !page->unlocked || bip->curpage == page, Pre(btnlist))) + SetCurPage(g, bip, page, pinf.body); + } + + Lith_GUI_ScrollEnd(g, &CBIState(g)->bipscr); + + if(bip->curpage) + { + bippage_t *page = bip->curpage; + struct page_info pinf = GetPageInfo(page); + + gui_typeon_state_t const *typeon = Lith_GUI_TypeOnUpdate(g, &CBIState(g)->biptypeon); + + int oy = 0; + + if(page->height) + { + Lith_GUI_ScrollBegin(g, &CBIState(g)->bipinfoscr, 100, 40, 200, 180, page->height, 184); + oy = g->oy - 40; + } + else + ACS_SetHudClipRect(111, 40, 200, 180, 184); + + if(page->image) + DrawSpriteAlpha(page->image, g->hid--, 296.2, 180.2, TS, 0.4); + + DrawSpriteAlpha(":UI:Background", g->hid--, 0.1, 0.1, TS, 0.5); + + HudMessageF("CBIFONT", "\Ci%S", pinf.flname); + HudMessagePlain(g->hid--, 200.4, 45.1 + oy, TS); + + #define DrawText(txt, pos, ...) \ + HudMessageF("CBIFONT", "%.*S%S", pos, txt, pos == typeon->len ? Ticker("\n|", "") : "|"), \ + HudMessageParams(0, g->hid--, __VA_ARGS__ + oy, TS) + + // render an outline if the page has an image + if(page->image) + { + __str s = Lith_RemoveTextColors(typeon->txt, typeon->pos); + int len = ACS_StrLen(s); + + DrawText(s, len, CR_BLACK, 112.1, 61.1); DrawText(s, len, CR_BLACK, 110.1, 61.1); + DrawText(s, len, CR_BLACK, 112.1, 59.1); DrawText(s, len, CR_BLACK, 110.1, 59.1); + + DrawText(s, len, CR_BLACK, 111.1, 59.1); + DrawText(s, len, CR_BLACK, 111.1, 61.1); + + DrawText(s, len, CR_BLACK, 112.1, 60.1); + DrawText(s, len, CR_BLACK, 110.1, 60.1); + } + + DrawText(typeon->txt, typeon->pos, CR_WHITE, 111.1, 60.1); + + if(page->height) Lith_GUI_ScrollEnd(g, &CBIState(g)->bipinfoscr); + else ACS_SetHudClipRect(0, 0, 0, 0); + } + + avail = bip->categoryavail[bip->curcategory]; + max = bip->categorymax[bip->curcategory]; + } + + if(bip->curcategory != BIPC_MAIN) + { + if(Lith_GUI_Button(g, "<BACK", 20, 38, false, Pre(btnbipback))) + bip->curcategory = bip->lastcategory; + } + else + { + DrawSpriteAlpha(":UI:bip", g->hid--, 20.1, 30.1, TS, 0.6); + HudMessageF("CBIFONT", "BIOTIC INFORMATION PANEL ver2.5"); + HudMessagePlain(g->hid--, 35.1, 30.1, TS); + } + + if(max) + { + HudMessageF("CBIFONT", "%i/%i AVAILABLE", avail, max); + HudMessagePlain(g->hid--, 300.2, 30.1, TS); + } +} + +// EOF + diff --git a/source/Main/p_cbi.c b/source/Main/p_cbi.c new file mode 100644 index 0000000..c5e3e8d --- /dev/null +++ b/source/Main/p_cbi.c @@ -0,0 +1,115 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +// vim: columns=120 +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +#define Upgr(name) if(world.cbiupgr[cupg_##name]) + +#define InfoStart int y = 70 +#define InfoSep y += 20 + +#define Info(...) \ + do { \ + HudMessageF("CBIFONT", __VA_ARGS__); \ + HudMessageParams(0, g->hid--, CR_WHITE, 23.1, y+.1, TS); \ + y += 10; \ + } while(0) + +#define Slot(name, x, y) \ + DrawSpritePlain(":UI:" name, g->hid--, (300-x*48) + .2, (48*y-20) + .1, TS) + +#define CPU(num) \ + DrawSpritePlain(":UI:CPU" #num, g->hid--, 0.1, 0.1, TS) + +// Static Functions ----------------------------------------------------------| + +// +// CBITab_Marine +// +static void CBITab_Marine(gui_state_t *g, struct player *p) +{ + int ram; + __str name; + + Upgr(hasupgr2) + {CPU(1); ram = 150; name = Language("LITH_TXT_INFO_TITLE_CBIUpgr2");} + else Upgr(hasupgr1) + {CPU(2); ram = 100; name = Language("LITH_TXT_INFO_TITLE_CBIUpgr1");} + else + {CPU(3); ram = 50; name = "OFMD Spec. Nodea 541 Basic CPU";} + + HudMessageF("CBIFONT", "%S", name); + HudMessageParams(0, g->hid--, CR_WHITE, 20.1, 60.1, TS); + + InfoStart; + + Info("Performance: %i\CbPerf", world.cbiperf); + Info("In use: %i\CbPerf", p->cbi.pruse); + Info("RAM: %iTiB", ram); + + InfoSep; + + Upgr(armorinter) Info("Has Armor Interface"); + Upgr(weapninter) Info("Has Weapon Modification Device"); + Upgr(weapninte2) Info("Has Weapon Refactoring Device"); + Upgr(rdistinter) Info("Has Reality Distortion Interface"); + + Upgr(armorinter) Slot("ArmorInter", 0, 1); + Upgr(weapninter) Slot("WeapnInter", 0, 2); + Upgr(weapninte2) Slot("WeapnInte2", 0, 3); + Upgr(rdistinter) Slot("RDistInter", 0, 4); +} + +// +// CBITab_CyberMage +// +static void CBITab_CyberMage(gui_state_t *g, struct player *p) +{ + CPU(2); + HudMessageF("CBIFONT", "AOF 5900001 Rev7 CPU"); + HudMessageParams(0, g->hid--, CR_WHITE, 20.1, 60.1, TS); + + InfoStart; + + Info("Performance: 34\CbPerf"); + Info("In use: %i\CbPerf", p->cbi.pruse); + Info("RAM: 19TiB"); + + InfoSep; + + Info("\CiBlade Spell Driver \Cbinstalled."); + Info("\CiDelear Spell Driver \Cbinstalled."); + Upgr(c_slot3spell) Info("\CiFeuer Spell Driver \Cbinstalled."); + Upgr(c_slot4spell) Info("\CiRomyetya Spell Driver \Cbinstalled."); + Upgr(c_slot5spell) Info("\CiHulgyon Spell Driver \Cbinstalled."); + Upgr(c_slot6spell) Info("\CiHosh'danma Spell Driver \Cbinstalled."); + Upgr(c_slot7spell) Info("\CgCercle de la Mort Spell Driver \Cbinstalled."); + Upgr(c_rdistinter) Info("Reality Distortion Interface \Cbinstalled."); + + Slot("Slot1Spell", 0, 1); + Slot("Slot2Spell", 0, 2); + Upgr(c_slot3spell) Slot("Slot3Spell", 0, 3); + Upgr(c_slot4spell) Slot("Slot4Spell", 0, 4); + Upgr(c_slot5spell) Slot("Slot5Spell", 1, 1); + Upgr(c_slot6spell) Slot("Slot6Spell", 1, 2); + Upgr(c_slot7spell) Slot("Slot7Spell", 1, 3); + Upgr(c_rdistinter) Slot("RDistInter", 1, 4); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_CBITab_CBI +// +void Lith_CBITab_CBI(gui_state_t *g, struct player *p) +{ + switch(p->pclass) + { + case pcl_marine: CBITab_Marine (g, p); break; + case pcl_cybermage: CBITab_CyberMage(g, p); break; + } +} + + +// EOF diff --git a/source/Main/p_cbigui.c b/source/Main/p_cbigui.c new file mode 100644 index 0000000..752d76d --- /dev/null +++ b/source/Main/p_cbigui.c @@ -0,0 +1,148 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=120 +#include "lith_common.h" +#include "lith_player.h" +#include "lith_hudid.h" +#include "lith_list.h" +#include "lith_world.h" + +// Static Functions ----------------------------------------------------------| + +// +// Lith_CBITab_Arsenal +// +static void Lith_CBITab_Arsenal(gui_state_t *g, struct player *p) +{ + extern void Lith_CBITab_Upgrades(gui_state_t *g, struct player *p); + extern void Lith_CBITab_Shop (gui_state_t *g, struct player *p); + + static __str const tabnames[] = {"Upgrades", "Shop"}; + Lith_GUI_Tabs(g, &CBIState(g)->arsetab, tabnames, 13, 13, 1); + + switch(CBIState(g)->arsetab) { + case cbi_tab_arsenal_upgrades: Lith_CBITab_Upgrades(g, p); break; + case cbi_tab_arsenal_shop: Lith_CBITab_Shop (g, p); break; + } +} + +// +// Lith_CBITab_Stat +// +static void Lith_CBITab_Stat(gui_state_t *g, struct player *p) +{ + extern void Lith_CBITab_CBI (gui_state_t *g, struct player *p); + extern void Lith_CBITab_Status(gui_state_t *g, struct player *p); + + static __str const tabnames[] = {"Attributes", "CBI"}; + Lith_GUI_Tabs(g, &CBIState(g)->stattab, tabnames, 13, 13, 1); + + switch(CBIState(g)->stattab) { + case cbi_tab_stat_attr: Lith_CBITab_Status(g, p); break; + case cbi_tab_stat_cbi: Lith_CBITab_CBI (g, p); break; + } +} + +// +// Lith_CBITab_Info +// +static void Lith_CBITab_Info(gui_state_t *g, struct player *p) +{ + extern void Lith_CBITab_BIP(gui_state_t *g, struct player *p); + extern void Lith_CBITab_Log(gui_state_t *g, struct player *p); + + static __str const tabnames[] = {"BIP", "Log"}; + Lith_GUI_Tabs(g, &CBIState(g)->infotab, tabnames, 13, 13, 1); + + switch(CBIState(g)->infotab) { + case cbi_tab_info_bip: Lith_CBITab_BIP(g, p); break; + case cbi_tab_info_log: Lith_CBITab_Log(g, p); break; + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerUpdateCBIGUI +// +[[__call("ScriptS")]] +void Lith_PlayerUpdateCBIGUI(struct player *p) +{ + gui_state_t *g = &p->cbi.guistate; + + p->cbi.theme = p->getCVarI("lith_gui_theme"); + + if(p->cbi.theme != p->cbi.oldtheme) switch((p->cbi.oldtheme = p->cbi.theme)) + { + default: + case cbi_theme_green: p->cbi.guistate.gfxprefix = ":UI_Green:"; break; + case cbi_theme_rose: p->cbi.guistate.gfxprefix = ":UI_Rose:"; break; + case cbi_theme_umi: p->cbi.guistate.gfxprefix = ":UI_Umi:"; break; + case cbi_theme_ender: p->cbi.guistate.gfxprefix = ":UI_Ender:"; break; + case cbi_theme_orange: p->cbi.guistate.gfxprefix = ":UI_Orange:"; break; + case cbi_theme_grey: p->cbi.guistate.gfxprefix = ":UI_Grey:"; break; + case cbi_theme_bassilla: p->cbi.guistate.gfxprefix = ":UI_Bassilla:"; break; + case cbi_theme_ghost: p->cbi.guistate.gfxprefix = ":UI_Ghost:"; break; + case cbi_theme_winxp: p->cbi.guistate.gfxprefix = ":UI_WinXP:"; break; + } + + Lith_GUI_Begin(g, 320, 240); + + if(!p->indialogue) + Lith_GUI_UpdateState(g, p); + + DrawSpriteAlpha(StrParam("%SBackground", g->gfxprefix), g->hid--, 0.1, 0.1, TS, 0.7); + + if(Lith_GUI_Button(g, .x = 296, 13, Pre(btnexit))) + p->useGUI(GUI_CBI); + + static __str tabnames[] = {"", "Status", "Info", "Settings"}; + tabnames[0] = Language("LITH_TXT_Arsenal%S", p->discrim); + Lith_GUI_Tabs(g, &CBIState(g)->maintab, tabnames, 13, 13, 0); + + extern void Lith_CBITab_Settings(gui_state_t *g, struct player *p); + + switch(CBIState(g)->maintab) + { + case cbi_tab_arsenal: Lith_CBITab_Arsenal (g, p); break; + case cbi_tab_status: Lith_CBITab_Stat (g, p); break; + case cbi_tab_info: Lith_CBITab_Info (g, p); break; + case cbi_tab_settings: Lith_CBITab_Settings(g, p); break; + } + + Lith_GUI_End(g, p->getCVarI("lith_gui_cursor")); +} + +// +// Lith_PlayerResetCBIGUI +// +void Lith_PlayerResetCBIGUI(struct player *p) +{ + p->cbi.guistate.cx = 320 / 2; + p->cbi.guistate.cy = 240 / 2; + + Lith_GUI_Init(&p->cbi.guistate, &p->cbi.st); + + p->cbi.st.upgrselold = -1; + + p->cbi.oldtheme = -1; + + p->bip.curcategory = BIPC_MAIN; + p->bip.curpage = null; +} + +// Scripts -------------------------------------------------------------------| + +// +// Lith_KeyOpenCBI +// +[[__call("ScriptS"), __extern("ACS"), __script("net")]] +void Lith_KeyOpenCBI(void) +{ + if(ACS_Timer() < 10) return; + + withplayer(LocalPlayer) + p->useGUI(GUI_CBI); +} + +// EOF + diff --git a/source/Main/p_data.c b/source/Main/p_data.c new file mode 100644 index 0000000..fed0ac2 --- /dev/null +++ b/source/Main/p_data.c @@ -0,0 +1,399 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_version.h" +#include "lith_world.h" +#include "lith_monster.h" + +#include <math.h> + +// Static Functions ----------------------------------------------------------| + +// +// SetupAttributes +// +static void SetupAttributes(struct player *p) +{ + p->attr.names[at_acc] = "ACC"; + p->attr.names[at_def] = "DEF"; + p->attr.names[at_str] = "STR"; + p->attr.names[at_vit] = "VIT"; + p->attr.names[at_stm] = "STM"; + p->attr.names[at_luk] = "LUK"; + p->attr.names[at_rge] = "RGE"; + + if(p->pclass & pcl_robot) { + p->attr.names[at_vit] = "POT"; + p->attr.names[at_stm] = "REP"; + } else if(p->pclass & pcl_nonhuman) { + p->attr.names[at_vit] = "POT"; + p->attr.names[at_stm] = "REG"; + } + + p->attr.expnext = 500; + p->attr.level = 1; +} + +// +// SetPClass +// +static void SetPClass(struct player *p) +{ + __with(__str cl = p->pcstr = ACS_GetActorClass(0);) { + if(cl == "Lith_MarinePlayer" ) p->pclass = pcl_marine; + else if(cl == "Lith_CyberMagePlayer") p->pclass = pcl_cybermage; + else if(cl == "Lith_InformantPlayer") p->pclass = pcl_informant; + else if(cl == "Lith_WandererPlayer" ) p->pclass = pcl_wanderer; + else if(cl == "Lith_AssassinPlayer" ) p->pclass = pcl_assassin; + else if(cl == "Lith_DarkLordPlayer" ) p->pclass = pcl_darklord; + else if(cl == "Lith_ThothPlayer" ) p->pclass = pcl_thoth; + else if(cl == "FDPlutPlayer" || cl == "FDTNTPlayer" || + cl == "FDDoom2Player" || cl == "FDAliensPlayer" || + cl == "FDJPCPPlayer" || cl == "FDBTSXPlayer") + p->pclass = pcl_fdoomer; + else if(cl == "DoomRLMarine" || cl == "DoomRLScout" || + cl == "DoomRLTechnician" || cl == "DoomRLRenegade" || + cl == "DoomRLDemolitionist" || cl == "DoomRLCommando") + p->pclass = pcl_drla; + else for(;;) + { + Log("Invalid player class detected, everything is going to explode!"); + ACS_Delay(1); + } + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerCurWeaponType +// +[[__call("StkCall")]] +int Lith_PlayerCurWeaponType(struct player *p) +{ + return p->weapon.cur->info->type; +} + +// +// Lith_ButtonPressed +// +[[__call("StkCall")]] +bool Lith_ButtonPressed(struct player *p, int bt) +{ + return p->buttons & bt && !(p->old.buttons & bt); +} + +// +// Lith_SetPlayerVelocity +// +[[__call("StkCall")]] +bool Lith_SetPlayerVelocity(struct player *p, fixed velx, fixed vely, fixed velz, bool add) +{ + if(add) + p->velx += velx, p->vely += vely, p->velz += velz; + else + p->velx = velx, p->vely = vely, p->velz = velz; + + return ACS_SetActorVelocity(p->tid, velx, vely, velz, add, true); +} + +// +// Lith_ValidatePlayerTID +// +void Lith_ValidatePlayerTID(struct player *p) +{ + if(ACS_ActivatorTID() == 0) { + ACS_Thing_ChangeTID(0, p->tid = ACS_UniqueTID()); + LogDebug(log_dev, "set ptid from 0 to %i", p->tid); + } else if(p->tid != ACS_ActivatorTID()) { + LogDebug(log_dev, "set ptid from %i to %i", p->tid, ACS_ActivatorTID()); + p->tid = ACS_ActivatorTID(); + } +} + +// +// Lith_PlayerUpdateData +// +// Update all of the player's data. +// +[[__call("ScriptS")]] +void Lith_PlayerUpdateData(struct player *p) +{ + static int const warpflags = WARPF_NOCHECKPOSITION | WARPF_MOVEPTR | + WARPF_WARPINTERPOLATION | WARPF_COPYINTERPOLATION | WARPF_COPYPITCH; + + ACS_Warp(p->cameratid, 4, 0, ACS_GetActorViewHeight(0), 0, warpflags); + ACS_Warp(p->weathertid, 4, 0, ACS_GetActorViewHeight(0), 0, warpflags); + + p->x = ACS_GetActorX(0); + p->y = ACS_GetActorY(0); + p->z = ACS_GetActorZ(0); + p->floorz = ACS_GetActorFloorZ(0); + + p->velx = ACS_GetActorVelX(0); + p->vely = ACS_GetActorVelY(0); + p->velz = ACS_GetActorVelZ(0); + + p->pitch = ACS_GetActorPitch(0) - p->addpitch; + p->yaw = ACS_GetActorAngle(0) - p->addyaw; + p->roll = ACS_GetActorRoll (0) - p->addroll; + + p->pitchf = ((-p->pitch + 0.25) * 2) * pi; + p->yawf = p->yaw * tau - pi; + + p->pitchv = ACS_GetPlayerInputFixed(-1, INPUT_PITCH); + p->yawv = ACS_GetPlayerInputFixed(-1, INPUT_YAW); + + p->forwardv = ACS_GetPlayerInputFixed(-1, INPUT_FORWARDMOVE); + p->sidev = ACS_GetPlayerInputFixed(-1, INPUT_SIDEMOVE); + p->upv = ACS_GetPlayerInputFixed(-1, INPUT_UPMOVE); + + p->buttons = ACS_GetPlayerInput(-1, INPUT_BUTTONS); + + p->name = StrParam("%tS", p->num); + p->weaponclass = ACS_GetWeapon(); + + p->scopetoken = InvNum("Lith_WeaponScopedToken"); + + p->keys.rc = InvNum("RedCard") || + InvNum("KeyGreen"); + p->keys.yc = InvNum("YellowCard") || + InvNum("KeyYellow"); + p->keys.bc = InvNum("BlueCard") || + InvNum("KeyBlue"); + p->keys.rs = InvNum("RedSkull"); + p->keys.ys = InvNum("YellowSkull"); + p->keys.bs = InvNum("BlueSkull"); + + DebugStat("attr points: %u\nexp: lv.%u %lu/%lu\n", + p->attr.points, p->attr.level, p->attr.exp, p->attr.expnext); + DebugStat("x: %k\ny: %k\nz: %k\n", p->x, p->y, p->z); + DebugStat("vx: %k\nvy: %k\nvz: %k\nvel: %k\n", p->velx, p->vely, p->velz, p->getVel()); + DebugStat("a.y: %k\na.p: %k\n", p->yaw * 360, p->pitch * 360); +} + +// +// Lith_GiveMail +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_GiveMail(int num) +{ + static __str const names[] = { + "Intro", + "Cluster1", + "Cluster2", + "Cluster3", + "Phantom", + "JamesDefeated", + "MakarovDefeated", + "IsaacDefeated" + }; + + num %= countof(names); + + withplayer(LocalPlayer) + p->deliverMail(names[num]); +} + +// +// Lith_ClearTextBuf +// +[[__call("StkCall")]] +void Lith_ClearTextBuf(struct player *p) +{ + memset(p->txtbuf, 0, sizeof(p->txtbuf)); + p->tbptr = 0; +} + +// +// Lith_KeyDown +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_KeyDown(int pnum, int ch) +{ + withplayer(&players[pnum]) + if(p->tbptr + 1 < countof(p->txtbuf)) + p->txtbuf[p->tbptr++] = ch; +} + +// +// Lith_GiveEXP +// +[[__call("StkCall")]] +void Lith_GiveEXP(struct player *p, u64 amt) +{ + #pragma GDCC FIXED_LITERAL OFF + struct player_attributes *a = &p->attr; + + while(a->exp + amt >= a->expnext) { + a->level++; + a->points += 5; + a->expnext = 500 + (a->level * pow(1.385, a->level * 0.2) * 340); + p->attr.sup = p->attr.cur; + } + + a->exp += amt; +} + +// +// Lith_ResetPlayer +// +// Reset some things on the player when they spawn. +// +[[__call("ScriptS")]] +void Lith_ResetPlayer(struct player *p) +{ + // + // Zero-init + + if(!p->wasinit) { + *p = (struct player){}; + p->wasinit = true; + } + + // + // Constant data + + p->active = true; + p->reinit = p->dead = false; + p->num = ACS_PlayerNumber(); + p->bipptr = &p->bip; + + // + // Static data (pre-init) + + if(!p->staticinit) + { + SetPClass(p); + SetupAttributes(p); + + // i cri tears of pain for APROP_SpawnHealth + p->viewheight = ACS_GetActorViewHeight(0); + p->jumpheight = ACS_GetActorPropertyFixed(0, APROP_JumpZ); + p->spawnhealth = ACS_GetActorProperty(0, APROP_Health); + p->spawndfactor = ACS_GetActorPropertyFixed(0, APROP_DamageFactor); + p->maxhealth = p->spawnhealth; + p->discount = 1.0; + p->stepnoise = StrParam("player/%S/step", p->classname); + + switch(ACS_GetPlayerInfo(p->num, PLAYERINFO_GENDER)) + { + case 0: p->pronoun = pro_male; break; + case 1: p->pronoun = pro_female; break; + case 2: p->pronoun = pro_object; break; + } + } + + // + // Map-static data + + p->old = (struct player_delta){}; + + // If the map sets the TID on the first tic, it could already be set here. + p->tid = 0; + p->validateTID(); + + // This keeps spawning more camera actors when you die, but that should be + // OK as long as you don't die 2 billion times. + ACS_SpawnForced("Lith_CameraHax", 0, 0, 0, p->cameratid = ACS_UniqueTID()); + ACS_SpawnForced("Lith_CameraHax", 0, 0, 0, p->weathertid = ACS_UniqueTID()); + + if(world.dbgScore) + p->score = 0xFFFFFFFFFFFFFFFFll; + + // + // Reset data + + // Any linked lists on the player need to be initialized here. + p->loginfo.hud.free(); + p->hudstrlist.free(true); + if(!p->loginfo.full.next) p->loginfo.full.construct(); + if(!p->loginfo.maps.next) p->loginfo.maps.construct(); + + // pls not exit map with murder thingies out + // is bad practice + ACS_SetPlayerProperty(0, false, PROP_INSTANTWEAPONSWITCH); + ACS_SetActorPropertyFixed(0, APROP_ViewHeight, p->viewheight); + InvTake("Lith_WeaponScopedToken", 999); + + Lith_PlayerResetCBIGUI(p); + + p->frozen = 0; + p->semifrozen = 0; + + p->addpitch = 0.0f; + p->addyaw = 0.0f; + p->addroll = 0.0f; + + p->bobpitch = 0.0f; + p->bobyaw = 0.0f; + + p->extrpitch = 0.0f; + p->extryaw = 0.0f; + + p->scoreaccum = 0; + p->scoreaccumtime = 0; + p->scoremul = 1.3; + + p->alpha = 1; + + // + // Re-init data + + if(!p->bip.init) + Lith_PlayerInitBIP(p); + + if(!p->upgrinit) + Lith_PlayerInitUpgrades(p); + else + Lith_PlayerReinitUpgrades(p); + + // + // Static data + + if(!p->staticinit) + { + p->log("> Lithia " Lith_Version " :: Compiled %S", __DATE__); + + if(world.dbgLevel) { + p->logH("> player is %u bytes long!", sizeof(struct player) * 4); + p->logH("> strnull is \"%S\"", strnull); + PrintDmonAllocSize(p); + } else { + p->logH("> Press \"%jS\" to open the menu.", "lith_k_opencbi"); + } + + p->deliverMail("Intro"); + + p->staticinit = true; + } + + if(world.dbgItems) + { + for(int i = weapon_min; i < weapon_max; i++) { + weaponinfo_t const *info = &weaponinfo[i]; + if(info->classname != null && info->pclass & p->pclass && !(info->flags & wf_magic)) + InvGive(info->classname, 1); + } + } +} + +// +// Lith_PlayerUpdateStats +// +[[__call("StkCall")]] +void Lith_PlayerUpdateStats(struct player *p) +{ + fixed boost = 1 + p->jumpboost; + + if(p->frozen != p->old.frozen) + ACS_SetPlayerProperty(0, p->frozen > 0, PROP_TOTALLYFROZEN); + + if(p->speedmul != p->old.speedmul) + ACS_SetActorPropertyFixed(0, APROP_Speed, 0.7 + p->speedmul); + + if(p->jumpboost != p->old.jumpboost) + ACS_SetActorPropertyFixed(0, APROP_JumpZ, p->jumpheight * boost); +} + +// EOF diff --git a/source/Main/p_dialogue.c b/source/Main/p_dialogue.c new file mode 100644 index 0000000..c3d94d1 --- /dev/null +++ b/source/Main/p_dialogue.c @@ -0,0 +1,541 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_world.h" +#include "lith_player.h" +#include "lith_hudid.h" +#include "lith_dialogue.h" + +#define Next_I (*++codeptr) +#define Next_S ((__str)Next_I) + +#define DoCurCode goto *cases[*codeptr] +#define DoNextCode goto *cases[Next_I] +#define Done goto done +#define Op(name) opcase_##name + +// Types ---------------------------------------------------------------------| + +enum +{ + ACT_NONE, + ACT_ACKNOWLEDGE, + ACT_SELOPTION, + ACT_EXIT, +}; + +enum +{ + TACT_NONE, + TACT_LOGON, + TACT_LOGOFF, + TACT_INFO, + TACT_PICT, +}; + +typedef struct dlgoption_s +{ + __str name; + int *ptr; +} dlgoption_t; + +typedef struct dlgcurstate_s +{ + __str trmPict; + int trmActi; + int trmTime; +} dlgcurstate_t; + +typedef struct dlgvmstate_s +{ + __str text; + + int stk[16]; + int *sptr; + + __str sreg[4]; + int rega; + int regb; + int regc; + int regd; + + int action; + + dlgoption_t option[8]; + int optNum; + int optSel; + int concat; + + [[__anonymous]] + dlgcurstate_t cur; + dlgcurstate_t next; +} dlgvmstate_t; + +// Extern Objects ------------------------------------------------------------| + +struct dlgdef *lmvar dlgdefs; + +// Static Functions ----------------------------------------------------------| + +// +// Lith_TerminalGUI +// +[[__call("ScriptS")]] +static void Lith_TerminalGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vmstate) +{ + enum { + // background + sizex = 480, sizey = 360, + right = sizex, + top = sizey*.08, + bottom = sizey*.75, + + midx = right/2, midy = bottom/2, + + // text + tsizex = 640, tsizey = 400, + ttop = tsizey*.08, + tleft = tsizex/2-32 + }; + + __str remote = vmstate->sreg[DSTR_REMOTE] ? + vmstate->sreg[DSTR_REMOTE] : "<unknown>@raddr.4E19"; + + Lith_GUI_Begin(g, hid_end_dialogue, sizex, sizey); + Lith_GUI_UpdateState(g, p); + + // Background + DrawSpritePlain(":Terminal:Back", g->hid--, midx, 0.1, TS); + DrawSpritePlain(":Terminal:Border", g->hid--, midx, 0.1, TS); + + // Top-left text + HudMessageF("LTRMFONT", "SGXLine r4205"); + HudMessageParams(0, g->hid--, CR_RED, 0.1, 0.1, TS); + + // Top-right text + switch(vmstate->trmActi) + { + case TACT_LOGON: HudMessageF("LTRMFONT", "Opening Connection to %S", remote); break; + case TACT_LOGOFF: HudMessageF("LTRMFONT", "Disconnecting..."); break; + default: HudMessageF("LTRMFONT", "Remote: %S", remote); break; + } + HudMessageParams(0, g->hid--, CR_RED, right+.2, 0.1, TS); + + // Bottom-left text + HudMessageF("LTRMFONT", "<55.883.115.7>"); + HudMessageParams(0, g->hid--, CR_RED, 0.1, bottom+.2, TS); + + // Bottom-right text + switch(vmstate->trmActi) + { + case TACT_LOGON: + case TACT_LOGOFF: HudMessageF("LTRMFONT", "%S", world.canondate); break; + default: HudMessageF("LTRMFONT", "Use To Acknowledge"); break; + } + HudMessageParams(0, g->hid--, CR_RED, right+.2, bottom+.2, TS); + + // Contents + __str pict; + + if(vmstate->trmPict) + pict = StrParam(":Terminal:%S", vmstate->trmPict); + + switch(vmstate->trmActi) + { + case TACT_LOGON: + case TACT_LOGOFF: + __with(int y = midy;) + { + if(vmstate->text != "") + { + HudMessageF("LTRMFONT", "%S", vmstate->text); + HudMessagePlain(g->hid--, midx, midy + 35, TS); + y -= 10; + } + + DrawSpritePlain(StrParam(":Terminal:%S", vmstate->trmPict), g->hid--, midx, y, TS); + } + break; + + case TACT_PICT: + DrawSpritePlain(StrParam(":Terminal:%S", vmstate->trmPict), g->hid--, midx/2, midy, TS); + ACS_SetHudSize(tsizex, tsizey, false); + ACS_SetHudClipRect(tleft, ttop, 300, 300, 300); + HudMessageF("LTRMFONT", "%S", vmstate->text); + HudMessagePlain(g->hid--, tleft+.1, ttop+.1, TS); + ACS_SetHudSize(g->w, g->h, false); + ACS_SetHudClipRect(0, 0, 0, 0); + break; + + case TACT_INFO: + HudMessageF("LTRMFONT", "%S", vmstate->text); + HudMessagePlain(g->hid--, midx, midy, TS); + break; + } + + Lith_GUI_End(g, gui_curs_outlineinv); + + if(p->buttons & BT_USE && !(p->old.buttons & BT_USE) && p->old.indialogue) + { + ACS_LocalAmbientSound("player/trmswitch", 127); + vmstate->action = ACT_ACKNOWLEDGE; + return; + } +} + +// +// Lith_DialogueGUI +// +[[__call("ScriptS")]] +static void Lith_DialogueGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vmstate) +{ + enum {left = 37, top = 75}; + __str icon = StrParam(":Dialogue:Icon%S", vmstate->sreg[DSTR_ICON]); + __str name = vmstate->sreg[DSTR_NAME]; + __str remo = vmstate->sreg[DSTR_REMOTE]; + + Lith_GUI_Begin(g, hid_end_dialogue, 320, 240); + Lith_GUI_UpdateState(g, p); + + DrawSpriteAlpha(":Dialogue:Back", g->hid--, 0.1, 0.1, TS, 0.7); + DrawSpriteAlpha(icon, g->hid--, 0.1, 0.1, TS, 0.7); + + HudMessageF("LHUDFONT", "%S", name); + HudMessagePlain(g->hid--, 30.1, 35.1, TS); + + HudMessageF("CBIFONT", "\Cd> Remote: %S\n\Cd> Date: %S\n\n%S", + remo, world.canontime, vmstate->text); + HudMessageParams(0, g->hid--, CR_WHITE, 37.1, 75.1, TS); + + if(vmstate->optNum) + { + int y = 220 - (14 * vmstate->optNum); + for(int i = 0; i < vmstate->optNum; i++, y += 14) + { + if(Lith_GUI_Button_Id(g, i, vmstate->option[i].name, 45, y, Pre(btndlgsel))) + { + vmstate->action = ACT_SELOPTION; + vmstate->optSel = i; + } + } + } + + Lith_GUI_End(g, gui_curs_outlineinv); +} + +// +// AddText +// +static __str AddText(dlgvmstate_t *vmstate, __str s, bool local) +{ + if(!vmstate->concat) { + if(local) return StrParam("%S%LS\n", vmstate->text, s); + else return StrParam("%S%S\n", vmstate->text, s); + } else if(s != "") { + if(local) return StrParam("%S%LS ", vmstate->text, s); + else return StrParam("%S%S ", vmstate->text, s); + } else { + return StrParam("%S\n\n", vmstate->text); + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_TeleportOutEffect +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_TeleportOutEffect(struct player *p) +{ + if(!p) p = LocalPlayer; + + ACS_AmbientSound("misc/teleout", 127); + + ACS_SetHudSize(320, 200); + ACS_SetCameraToTexture(p->tid, "LITHCAM3", 90); + + DrawSpritePlain(":Terminal:TeleportOut", hid_teleportback, + 160.0, 100.0, 1); + + for(int j = 1; j <= 25; j++) + { + fixed e = j / 25.f * 30; + ACS_SetHudSize(320 * e, 240); + DrawSpriteFade("LITHCAM3", hid_teleport, (int)(160 * e), 120, TS, 0.2); + ACS_Delay(1); + } +} + +// +// Lith_DialogueVM +// +// Main dialogue VM. +// +[[__call("ScriptS")]] +void Lith_DialogueVM(struct player *p, int num) +{ + if(p->dead || p->indialogue > 1) + return; + + // Get the dialogue by number. + struct dlgdef *def; + + for(def = dlgdefs; def && def->num != num; def = def->next); + if(!def) return; + + p->indialogue++; + + // GUI state + gui_state_t gst = {}; + gst.gfxprefix = ":UI_Green:"; + Lith_GUI_Init(&gst); + + // VM state + dlgvmstate_t vmstate = {}; + vmstate.text = ""; + for(int i = 0; i < 4; i++) + vmstate.sreg[i] = ""; + vmstate.sptr = &vmstate.stk[0]; + + // terminals are numbered negative + if(num < 0) + { + gst.cx = 320; + gst.cy = 200; + // TODO: determine mission status + } + else + { + gst.cx = 320 / 2; + gst.cy = 200 / 2; + } + + for(int *codeptr = def->codeV + def->pages[0];;) + { + static __label *const cases[] = { + #define DCD(name) &&opcase_DCD_##name, + #include "lith_dialogue.h" + }; + + DoCurCode; + Op(DCD_NOP): DoNextCode; + Op(DCD_DIE): Done; + + Op(DCD_PUSH_I): *(vmstate.sptr++) = Next_I; DoNextCode; + Op(DCD_PUSH_A): *(vmstate.sptr++) = vmstate.rega; DoNextCode; + Op(DCD_PUSH_B): *(vmstate.sptr++) = vmstate.regb; DoNextCode; + Op(DCD_PUSH_C): *(vmstate.sptr++) = vmstate.regc; DoNextCode; + Op(DCD_PUSH_D): *(vmstate.sptr++) = vmstate.regd; DoNextCode; + + Op(DCD_POP): --vmstate.sptr ; DoNextCode; + Op(DCD_POP_A): vmstate.rega = *(--vmstate.sptr); DoNextCode; + Op(DCD_POP_B): vmstate.regb = *(--vmstate.sptr); DoNextCode; + Op(DCD_POP_C): vmstate.regc = *(--vmstate.sptr); DoNextCode; + Op(DCD_POP_D): vmstate.regd = *(--vmstate.sptr); DoNextCode; + + #define Arith(op, r) \ + vmstate.rega op##= r + #define ArithSet(sfx, r) \ + Op(DCD_ADD_##sfx): Arith(+, r); DoNextCode; \ + Op(DCD_SUB_##sfx): Arith(-, r); DoNextCode; \ + Op(DCD_MUL_##sfx): Arith(*, r); DoNextCode; \ + Op(DCD_DIV_##sfx): Arith(/, r); DoNextCode; \ + Op(DCD_MOD_##sfx): Arith(%, r); DoNextCode; \ + Op(DCD_IOR_##sfx): Arith(|, r); DoNextCode; \ + Op(DCD_AND_##sfx): Arith(&, r); DoNextCode; \ + Op(DCD_XOR_##sfx): Arith(^, r); DoNextCode; \ + Op(DCD_LSH_##sfx): Arith(<<, r); DoNextCode; \ + Op(DCD_RSH_##sfx): Arith(>>, r); DoNextCode + ArithSet(I, Next_I); + ArithSet(A, vmstate.rega); + ArithSet(B, vmstate.regb); + ArithSet(C, vmstate.regc); + ArithSet(D, vmstate.regd); + #undef Arith + #undef ArithSet + + Op(DCD_JPAGE): codeptr = def->codeV + def->pages[Next_I]; DoCurCode; + Op(DCD_JMP): codeptr = def->codeV + Next_I; DoCurCode; + + #define GenJump(check) \ + __with(void *jmpto = def->codeV + Next_I;) \ + if(check) {codeptr = jmpto; DoCurCode;} \ + DoNextCode + Op(DCD_JNZ): GenJump(vmstate.sptr[-1] != 0); + Op(DCD_JNITEM): GenJump(!InvNum(Next_S)); + Op(DCD_JNCLASS): GenJump(p->pclass != Next_I); + #undef GenJump + + Op(DCD_SCRIPTI): + __with(int s = Next_I, a = Next_I, b = Next_I, c = Next_I, d = Next_I;) + ACS_ExecuteWithResult(s, a, b, c, d); + DoNextCode; + Op(DCD_SCRIPTS): + __with(__str s = Next_S; int a = Next_I, b = Next_I, c = Next_I, d = Next_I;) + ACS_NamedExecuteWithResult(s, a, b, c, d); + DoNextCode; + + Op(DCD_TELEPORT_INTRALEVEL): + ACS_Delay(5); + ACS_Teleport(0, Next_I, false); + Done; + Op(DCD_TELEPORT_INTERLEVEL): + ACS_Delay(5); + Lith_TeleportOutEffect(p); + ACS_Delay(34); + ACS_Teleport_NewMap(Next_I, 0, 0); + Done; + + Op(DCD_TRACE_S): Log("%S", Next_S ); DoNextCode; + Op(DCD_TRACE_A): Log("%.8X", vmstate.rega); DoNextCode; + Op(DCD_TRACE_B): Log("%.8X", vmstate.regb); DoNextCode; + Op(DCD_TRACE_C): Log("%.8X", vmstate.regc); DoNextCode; + Op(DCD_TRACE_D): Log("%.8X", vmstate.regd); DoNextCode; + + Op(DCD_SETSTRING): + __with(int num = Next_I; __str str = Next_S;) + vmstate.sreg[num] = str; + DoNextCode; + + Op(DCD_SETTEXT): + vmstate.text = Next_S; DoNextCode; + Op(DCD_SETTEXTLOCAL): + vmstate.text = StrParam("%LS", Next_S); DoNextCode; + Op(DCD_ADDTEXT): + vmstate.text = AddText(&vmstate, Next_S, false); DoNextCode; + Op(DCD_ADDTEXTLOCAL): + vmstate.text = AddText(&vmstate, Next_S, true); DoNextCode; + + Op(DCD_CONCAT): + vmstate.concat++; + DoNextCode; + + Op(DCD_CONCATEND): + vmstate.text = StrParam("%S\n", vmstate.text); + vmstate.concat--; + DoNextCode; + + Op(DCD_PUTOPT): + __with(void *jmpto = def->codeV + Next_I;) + { + dlgoption_t *option = vmstate.option + vmstate.optNum++; + + option->name = Next_S; + option->ptr = ++codeptr; + + codeptr = jmpto; + } + DoCurCode; + + Op(DCD_DLGWAIT): + ACS_LocalAmbientSound("player/cbi/dlgopen", 127); + + p->frozen++; + p->setVel(0, 0, 0); + + if(vmstate.text != "") + HudMessageLog("%S", vmstate.text); + + do { + Lith_DialogueGUI(&gst, p, &vmstate); + ACS_Delay(1); + } + while(vmstate.action == ACT_NONE); + + p->frozen--; + goto guiact; + + Op(DCD_LOGON): vmstate.next.trmActi = TACT_LOGON; goto login; + Op(DCD_LOGOFF): vmstate.next.trmActi = TACT_LOGOFF; goto login; + Op(DCD_INFO): vmstate.next.trmActi = TACT_INFO; goto terminal; + Op(DCD_PICT): vmstate.next.trmActi = TACT_PICT; goto pict; + Op(DCD_TRMWAIT): goto terminal; + + login: + vmstate.next.trmTime = 42; + pict: + vmstate.next.trmPict = Next_S; + terminal: + if(vmstate.trmActi != TACT_NONE) + { + if(vmstate.trmActi == TACT_LOGON || vmstate.trmActi == TACT_LOGOFF) + ACS_LocalAmbientSound("player/trmopen", 127); + + bool timer = vmstate.trmTime != 0; + p->frozen++; + p->setVel(0, 0, 0); + + if(vmstate.text != "") + HudMessageLog("%S", vmstate.text); + + do { + Lith_TerminalGUI(&gst, p, &vmstate); + ACS_Delay(1); + } + while(vmstate.action == ACT_NONE && + (!timer || --vmstate.trmTime >= 0)); + + p->frozen--; + } + + vmstate.cur = vmstate.next; + vmstate.next.trmActi = TACT_NONE; + vmstate.next.trmTime = 0; + guiact: + __with(int action = vmstate.action;) + { + vmstate.action = ACT_NONE; + vmstate.text = ""; + + switch(action) + { + case ACT_ACKNOWLEDGE: break; + case ACT_SELOPTION: + codeptr = vmstate.option[vmstate.optSel].ptr; + vmstate.optSel = 0; + vmstate.optNum = 0; + DoCurCode; + case ACT_EXIT: Done; + } + } + DoNextCode; + } + +done: + p->indialogue -= 2; +} + +// +// Lith_RunDialogue +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_RunDialogue(int num) +{ + withplayer(LocalPlayer) if(!p->indialogue) + { + p->dlgnum = num; + p->indialogue++; + } +} + +// +// Lith_RunTerminal +// +// Runs a numbered terminal. +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_RunTerminal(int num) +{ + Lith_RunDialogue(-num); +} + +// +// Lith_RunDialogueInt +// +[[__call("ScriptI"), __address(24244), __extern("ACS")]] +void Lith_RunDialogueInt(int num) +{ + Lith_RunDialogue(num); +} + +// EOF + diff --git a/source/Main/p_log.c b/source/Main/p_log.c new file mode 100644 index 0000000..a25d588 --- /dev/null +++ b/source/Main/p_log.c @@ -0,0 +1,273 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_log.h" +#include "lith_player.h" +#include "lith_list.h" +#include "lith_hudid.h" +#include "lith_world.h" + +#include <stdio.h> + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_LogName +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_LogName(int name) +{ + withplayer(LocalPlayer) + switch(name) + { +#define BOTH(name) case msg_##name: p->log ("%LS", "LITH_TXT_LOG_" #name); break; +#define FULL(name) case msg_##name: p->logF("%LS", "LITH_TXT_LOG_" #name); break; +#define HUDS(name) case msg_##name: p->logH("%LS", "LITH_TXT_LOG_" #name); break; +#define AMMO(name) case msg_##name: if(p->getCVarI("lith_player_ammolog")) p->logH("%LS", "LITH_TXT_LOG_" #name); break; + BOTH(allmap) + HUDS(armorbonus) + BOTH(backpack) + BOTH(berserk) + BOTH(bluearmor) + BOTH(blursphere) + BOTH(greenarmor) + HUDS(healthbonus) + BOTH(infrared) + BOTH(invuln) + BOTH(medikit) + BOTH(megasphere) + BOTH(radsuit) + BOTH(soulsphere) + BOTH(stimpack) + BOTH(redcard) + BOTH(bluecard) + BOTH(yellowcard) + BOTH(redskull) + BOTH(blueskull) + BOTH(yellowskull) + BOTH(doggosphere) + BOTH(dogs) + AMMO(clip) + AMMO(clipbox) + AMMO(shell) + AMMO(shellbox) + AMMO(rocket) + AMMO(rocketbox) + AMMO(cell) + AMMO(cellbox) +#undef BOTH +#undef FULL +#undef HUDS +#undef AMMO + } +} + +// +// Lith_Log +// +void Lith_Log(struct player *p, __str fmt, ...) +{ + va_list vl; + + va_start(vl, fmt); + logdata_t *logdata = Lith_LogV(p, fmt, vl); + va_end(vl); + + logdata->time = LOG_TIME; + logdata->link .link(&p->loginfo.hud); + logdata->linkfull.link(&p->loginfo.full); + logdata->keep = true; + + if(p->loginfo.hud.size > LOG_MAX) + Dalloc(p->loginfo.hud.next->unlink()); +} + +// +// Lith_LogF +// +void Lith_LogF(struct player *p, __str fmt, ...) +{ + va_list vl; + + va_start(vl, fmt); + logdata_t *logdata = Lith_LogV(p, fmt, vl); + va_end(vl); + + logdata->linkfull.link(&p->loginfo.full); + logdata->keep = true; +} + +// +// Lith_LogH +// +void Lith_LogH(struct player *p, __str fmt, ...) +{ + va_list vl; + + va_start(vl, fmt); + logdata_t *logdata = Lith_LogV(p, fmt, vl); + va_end(vl); + + logdata->time = LOG_TIME; + logdata->link.link(&p->loginfo.hud); + + if(p->loginfo.hud.size > LOG_MAX) + Dalloc(p->loginfo.hud.next->unlink()); +} + +// +// Lith_LogV +// +logdata_t *Lith_LogV(struct player *p, __str fmt, va_list vl) +{ + logdata_t *logdata = Salloc(logdata_t); + logdata->link .construct(logdata); + logdata->linkfull.construct(logdata); + + ACS_BeginPrint(); + __vnprintf_str(fmt, vl); + + logdata->info = ACS_EndStrParam(); + logdata->from = world.mapnum; + + return logdata; +} + +// +// Lith_PlayerUpdateLog +// +[[__call("ScriptS")]] +void Lith_PlayerUpdateLog(struct player *p) +{ + forlist(logdata_t *logdata, p->loginfo.hud) + { + if(logdata->time == 0) + { + list_t *next = rover->next; + rover->unlink(); + + if(!logdata->keep) Dalloc(logdata); + } + else + logdata->time--; + } +} + +// +// Lith_HUD_Log +// +[[__call("ScriptS")]] +void Lith_HUD_Log(struct player *p) +{ + if(p->getCVarI("lith_hud_showlog")) + { + int cr; + switch(p->pclass) { + default: cr = CR_GREEN; break; + case pcl_cybermage: cr = CR_RED; break; + case pcl_informant: cr = CR_LIGHTBLUE; break; + } + + ACS_SetHudSize(480, 300); + ACS_SetFont("LOGFONT"); + + int i = 0; + forlistIt(logdata_t *logdata, p->loginfo.hud, i++) + { + int y = 10 * i; + fixed align; + + if(p->getCVarI("lith_hud_logfromtop")) { + y = 20 + y; + align = 0.1; + } else { + y = 255 - y; + align = 0.2; + + switch(p->pclass) { + case pcl_cybermage: y -= 10; break; + case pcl_informant: y -= 15; break; + } + } + + HudMessage("%S", logdata->info); + HudMessageParams(HUDMSG_NOWRAP, hid_logE + i, cr, 0.1, y+align, TS); + + if(logdata->time > LOG_TIME - 10) + { + HudMessage("%S", logdata->info); + HudMessageParams(HUDMSG_NOWRAP | HUDMSG_FADEOUT | HUDMSG_ADDBLEND, hid_logAddE + i, cr, 0.1, y+align, TS, 0.15); + } + } + } +} + +// +// Lith_PlayerLogEntry +// +void Lith_PlayerLogEntry(struct player *p) +{ + logmap_t *logmap = Salloc(logmap_t); + logmap->link.construct(logmap); + + logmap->levelnum = world.mapnum; + logmap->name = StrParam("%tS", PRINTNAME_LEVELNAME); // :| + + logmap->link.link(&p->loginfo.maps); + + p->logF("Entered %S at %S NE", logmap->name, world.canontime); +} + +// +// Lith_CBITab_Log +// +void Lith_CBITab_Log(gui_state_t *g, struct player *p) +{ + size_t num = 0; + int i = 0; + + logmap_t *selmap; + list_t *sel = CBIState(g)->logsel; + + if(!sel) sel = p->loginfo.maps.next; + + if(Lith_GUI_Button(g, .x = 25, 38, Pre(btnprev))) + if((sel = sel->prev) == &p->loginfo.maps) + sel = sel->prev; + + if(Lith_GUI_Button(g, .x = 25 + guipre.btnprev.w, 38, Pre(btnnext))) + if((sel = sel->next) == &p->loginfo.maps) + sel = sel->next; + + CBIState(g)->logsel = sel; + selmap = sel->object; + + HudMessageF("CBIFONT", "%S", selmap->name); + HudMessagePlain(g->hid--, 28.1 + guipre.btnprev.w + guipre.btnnext.w, 40.1, TS); + + forlist(logdata_t *logdata, p->loginfo.full) + num += (logdata->from == selmap->levelnum); + + Lith_GUI_ScrollBegin(g, &CBIState(g)->logscr, 15, 50, 280, 175, num * 8); + + forlist(logdata_t *logdata, p->loginfo.full) + { + if(logdata->from != selmap->levelnum) + continue; + + int y = 8 * i++; + + if(Lith_GUI_ScrollOcclude(g, &CBIState(g)->logscr, y, 8)) + continue; + + DrawSpritePlain(":UI:LogList", g->hid--, g->ox + 0.1, y + g->oy + 0.1, TS); + + HudMessageF("CBIFONT", "%S", logdata->info); + HudMessageParams(0, g->hid--, CR_GREEN, g->ox + 2.1, y + g->oy + 1.1, TS); + } + + + Lith_GUI_ScrollEnd(g, &CBIState(g)->logscr); +} + +// EOF + diff --git a/source/Main/p_magic.c b/source/Main/p_magic.c new file mode 100644 index 0000000..922f773 --- /dev/null +++ b/source/Main/p_magic.c @@ -0,0 +1,207 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +// vim: columns=110 +#include "lith_player.h" +#include "lith_hudid.h" +#include "lith_world.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_Blade +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Blade(bool hit) +{ + ACS_SetHudSize(800, 600); + DrawSpriteX(hit ? ":Weapon:BladeHit" : ":Weapon:Blade", HUDMSG_FADEOUT|HUDMSG_ADDBLEND, hid_blade, 0.1, 0.1, TS * 3, 0.15); + + withplayer(LocalPlayer) + if(p->z > p->floorz) + p->setVel(p->velx / 2, p->vely / 2, 0); +} + +// +// Lith_Rend +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Rend(bool hit, int set) +{ + static int num; + + if(!hit) num = set; + + __str graphic = hit ? StrParam(":Weapon:RendHit%i", num) + : StrParam(":Weapon:Rend%i", num); + + ACS_SetHudSize(800, 600); + DrawSpriteX(graphic, HUDMSG_FADEOUT|HUDMSG_ADDBLEND, hid_blade, 0.1, 0.1, TS * 2, 0.1); + + withplayer(LocalPlayer) + if(p->z > p->floorz) + p->setVel(p->velx / 2, p->vely / 2, 0); +} + +// +// Lith_Feuer +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Feuer(bool left, bool fire) +{ + withplayer(LocalPlayer) + { + __str actor = fire ? "Lith_FeuerExplosion" : "Lith_FeuerTest"; + int pufftid; + ACS_LineAttack(0, p->yaw, p->pitch, 0, "Lith_Dummy", "Lith_NoDamage", 1024, FHF_NORANDOMPUFFZ|FHF_NOIMPACTDECAL, pufftid = ACS_UniqueTID()); + + int sx = p->x; + int sy = p->y; + int sz = p->z + 32; + int ex = ACS_GetActorX(pufftid); + int ey = ACS_GetActorY(pufftid); + int ez = ACS_GetActorZ(pufftid); + + struct polar cpp = ctopol(ex - sx, ey - sy); + cpp.dst /= 4; + if(left) cpp.ang += 0.07; + else cpp.ang -= 0.07; + + int cx = sx + ACS_Cos(cpp.ang) * cpp.dst; + int cy = sy + ACS_Sin(cpp.ang) * cpp.dst; + fixed max = fire ? 20 : 70; + + for(int i = 0; i < max; i++) { + struct vec2i v = qbezieri(sx, sy, cx, cy, ex, ey, i / max); + int tid; + ACS_SpawnForced(actor, v.x, v.y, lerpk(sz, ez, i / max), tid = ACS_UniqueTID()); + if(fire) { + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + ACS_Delay(1); + } + } + + if(fire) { + int tid; + ACS_SpawnForced("Lith_FeuerFinal", ex, ey, ez, tid = ACS_UniqueTID()); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + } + } +} + +// +// Lith_Cercle +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Cercle(void) +{ + withplayer(LocalPlayer) + { + fixed ax, ay, az; + + __with(int pufftid;) + { + ACS_LineAttack(0, p->yaw, p->pitch, 0, "Lith_Dummy", "Lith_NoDamage", 1024, + FHF_NORANDOMPUFFZ|FHF_NOIMPACTDECAL, pufftid = ACS_UniqueTID()); + + ax = ACS_GetActorX(pufftid); + ay = ACS_GetActorY(pufftid); + az = ACS_GetActorFloorZ(pufftid); + } + + world.freeze(true); + ACS_Delay(2); // necessary so sounds may play + + ACS_AmbientSound("weapons/cercle/begin", 127); + + int fxtid = ACS_UniqueTID(); + for(int i = 0; i < 100; i++) + { + fixed px = ACS_Cos(i / 100.0) * 77; + fixed py = ACS_Sin(i / 100.0) * 77; + int tid; + + ACS_SpawnForced("Lith_CircleParticle", ax + px, ay + py, az + 7, tid = ACS_UniqueTID()); + + ACS_SetActorAngle(tid, i / 100.0); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + ACS_Thing_ChangeTID(tid, fxtid); + + ACS_Delay(i % 2 * (i / 30.0)); + } + + ACS_Delay(35); + + int fxtid2 = ACS_UniqueTID(); + ACS_SetUserVariable(fxtid, "user_trigger", true); + ACS_SetUserVariable(fxtid, "user_fxtid", fxtid2); + + ACS_AmbientSound("weapons/cercle/attack", 127); + + ACS_Delay(35); + ACS_SetUserVariable(fxtid2, "user_trigger", true); + + ACS_Delay(7); + ACS_SetUserVariable(fxtid2, "user_trigger", true); + + ACS_Delay(35); + + int fxtid3 = ACS_UniqueTID(); + for(int i = 0; i < 3; i++) + { + fixed px = ACS_Cos(i / 3.0) * 60; + fixed py = ACS_Sin(i / 3.0) * 60; + int tid; + + ACS_SpawnForced("Lith_CircleSpearThrower", ax + px, ay + py, az + 24, tid = ACS_UniqueTID()); + + ACS_SetActorAngle(tid, i / 3.0); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + ACS_Thing_ChangeTID(tid, fxtid3); + + ACS_Delay(7); + } + + ACS_Delay(10); + + // NB: The projectiles take the TIDs of the throwers, so this is actually triggering them. + ACS_SetUserVariable(fxtid3, "user_trigger", true); + + // Just in case. + ACS_Thing_Remove(fxtid); + ACS_Thing_Remove(fxtid2); + + world.freeze(false); + } +} + +// +// Lith_MagicSelect +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_MagicSelect(int num) +{ + withplayer(LocalPlayer) + { + if(!p->getCVarI("lith_weapons_magicselanims")) return; + + switch(num) + { + case 1: + case 4: ACS_FadeTo(255, 255, 0, 0.3, 0.0); break; + case 2: + case 3: ACS_FadeTo(255, 155, 0, 0.3, 0.0); break; + case 6: + case 7: ACS_FadeTo(255, 0, 0, 0.3, 0.0); break; + } + + ACS_FadeTo(0, 0, 0, 0.0, 0.3); + + ACS_SetHudSize(64, 64); + for(int i = 0; i < 4; i++) { + DrawSpriteAlpha(StrParam(":MagicSel:Slot%i_%i", num, i + 1), + hid_magicsel, 0.1, 0.1, TS*3, 0.5); + ACS_Delay(3); + } + } +} + +// EOF diff --git a/source/Main/p_payout.c b/source/Main/p_payout.c new file mode 100644 index 0000000..8ed5bb9 --- /dev/null +++ b/source/Main/p_payout.c @@ -0,0 +1,113 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" +#include "lith_hudid.h" + +// Extern Objects ------------------------------------------------------------| + +extern payoutinfo_t payout; + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerPayout +// +[[__call("ScriptS")]] +void Lith_PlayerPayout(struct player *p) +{ +#define Left(...) \ + ( \ + HudMessageF("CNFONT", __VA_ARGS__), \ + HudMessageParams(HUDMSG_FADEOUT, hid--, CR_WHITE, 16.1, y + .1, TS, .2) \ + ) + +#define Right(...) \ + ( \ + HudMessageF("CNFONT", __VA_ARGS__), \ + HudMessageParams(HUDMSG_FADEOUT, hid--, CR_WHITE, 280.2, y + .1, TS, .2) \ + ) + +#define Head(...) \ + ( \ + HudMessageF("DBIGFONT", __VA_ARGS__), \ + HudMessageParams(HUDMSG_FADEOUT, hid--, CR_WHITE, 8.1, y + 0.1, TS, 0.2) \ + ) + +#define GenCount(word, name) \ + if(1) \ + { \ + Left(word " %.1lk%%", pay.name##pct); \ + \ + if(i < 35) \ + { \ + HudMessageF("CNFONT", "%S\Cnscr", Lith_ScoreSep(lerplk(0, pay.name##scr, i / 34.0lk))); \ + HudMessageParams(HUDMSG_FADEOUT, hid, CR_WHITE, 280.2, y + 0.1, 2, 0.2); \ + } \ + \ + y += 9; \ + hid--; \ + } else (void)0 + + payoutinfo_t pay = payout; + + p->setActivator(); + ACS_Delay(25); + ACS_SetHudSize(320, 240); + + for(int i = 0; i < 35*3; i++) + { + int hid = hid_base_payout; + int y = 20; + bool counting = false; + + Head("RESULTS"); + + if(i < 16) { + HudMessageF("DBIGFONT", "RESULTS"); + HudMessageParams(HUDMSG_FADEOUT | HUDMSG_ADDBLEND, hid, CR_WHITE, 8 + 0.1, y + .1, TS, 0.5); + } + + y += 16; + hid--; + + if(pay.killmax) {GenCount("ELIMINATED", kill); counting |= pay.killnum;} + if(pay.itemmax) {GenCount("ARTIFACTS", item); counting |= pay.itemnum;} + + if(i > 35) {y += 7; Head("TOTAL"); y += 16;} + if(i > 35 * 1.25) {Left("Tax"); Right("%S\Cnscr", Lith_ScoreSep(pay.tax)); y += 9;} + + if(i > 35 * 1.5) + { + Left("Total"); Right("%S\Cnscr", Lith_ScoreSep(pay.total)); y += 16; + + Head("PAYMENT"); y += 16; + Left("Primary Account"); Right("%STRANSACTION CLOSED", (i % 6) == 0 ? "\Cn" : ""); + } + + if(p->getCVarI("lith_player_resultssound")) + { + if(counting) { + if(i < 35) ACS_LocalAmbientSound("player/counter", 80); + else if(i == 35) ACS_LocalAmbientSound("player/counterdone", 80); + } + + if(i == (int)(35 * 1.25) || i == (int)(35 * 1.5)) + ACS_LocalAmbientSound("player/counterdone", 80); + } + + ACS_Delay(1); + } + + ACS_Delay(20); + + p->giveScore(pay.total, true); + +#undef Left +#undef Right +#undef Head +#undef GenCount +} + +// EOF + diff --git a/source/Main/p_pickups.c b/source/Main/p_pickups.c new file mode 100644 index 0000000..e5f4f9b --- /dev/null +++ b/source/Main/p_pickups.c @@ -0,0 +1,271 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" + +#define name(p) {countof(p), p} + +struct pickupname_s { + size_t const num; + __str *const ptr; +}; + +static __str names_unknown[] = { + "Literally What The Fuck", + "How Even", + "Why Are You Doing This" +}; + +static __str names_cfist[] = { + "Chaaji Fisuto", + "Charred Fist", + "Charged Mr. Fisto", + "Chargle Fargle" +}; + +static __str names_pistol[] = { + "Postil", + "Peestol", + "Pinstool", + "Peetool", + "Pistell", + "Pistuh", + "Listep", + "hurty peestal", + "Pete Stool", + "Bandity Pistal" +}; + +static __str names_revolver[] = { + "Rvleolr", + "Revolrvo", + "Volvo", + "Rebolber :=DD" +}; + +static __str names_shotgun[] = { + "Shtegnu", + "Shartgun", + "Shitgun", + "Shtognu", + "Shetgun", + "Sug Glug" +}; + +static __str names_ssg[] = { + "Sbepru Shtetgun", + "Suber Shodgub", + "Soer Shotgan", + "Suupaa Shottogan", + "Susser Sarsaparilla", + "Shovel Subbutt", + "Suggle Kruggle" +}; + +static __str names_rifle[] = { + "Cmobta Riffel", + "Combit Raffle", + "Combat Rifl", + "Rifcom Litbl", + "Bltbm Liffem" +}; + +static __str names_launcher[] = { + "Ruckebt Laurence", + "Rawket Lawnchair", + "Rokkit Luncher", + "Pocket Lunchbox" +}; + +static __str names_plasma[] = { + "Spalmo Rinfer", + "Layzuh Beem", + "Shooty-pew-pew Gun", + "Elfir Amsalp", + "Pulsmer Rifram", + "Plisplam Fimfam", + "Plastic Hamdonk" +}; + +static __str names_bfg[] = { + "Biffgee Nintendo", + "BFG 8000", + "Biffug 9999", + "Bilmap Frignarp Gnu 9", + "Frosty Balga Gams" +}; + +static __str names_c_mateba[] = { + "Metabolism", + "Materberb", + "Beet Tam", + "Able Temabl", + "Tomato", + "Material Defender", + "Murdererererer", + "Mad Bee", + "Matatebb", + "Marteba", + "Metabe", + "Mercury Poisoning" +}; + +static __str names_c_rifle[] = { + "Sock Rifle", + "Shock Stifle", + "Stock Knifle", + "ShohS RifiR", +}; + +static __str names_c_smg[] = { + "Chug Smug", + "Real Supersand", + "Secure Gambler", + "Sag Mill", + "Santa Surprise", + "Sandlebar Snorkel", + "Submarine Screendoor", + "Sbubby Mcgungus", + "Slow Reggae", + "Adolescent Assault Rifle" +}; + +static __str names_c_sniper[] = { + "Iron Raffle", + "Eye on Rustle", + "Onion Riffraff", + "Plasmagun's Lazy Cousin", + "Homemade Pringle Cannon", + "Idle Riffraff", + "Ionic Breeze", + "Ix Rix", + "Io Rofl", + "100% Ion", + "Ions of Ion", + "Slight Chance of Ions Today", + "Illegal Rat", + "Ion Juicer" +}; + +static __str names_c_delear[] = { + "Dleay", + "Bob Dylan", + "Delet Ears", + "Dala Llama", + "Datadoor", + "die pls", + "Delicious", + "Del Taco", + "Deleleleleelear", + "Deadlreadl" +}; + +static __str names_c_starshot[] = { + "Stock Image", + "Star Gnu", + "Stelr Emitroid", + "Silly Blatt", + "Stot Stot", + "Shart Shot", + "Stargle Shargle", + "Stumgus Sungus" +}; + +static __str names_c_shipgun[] = { + "Stahp Blastroyer", + "Rats Derkler", + "Fnukni Gigagnu", + "Solarr Bitchmace", + "Stan Distro", + "Technicolor Bangstick", + "Shooty Shooty Point 'n Shooty", + "The Entire Doomsday Engine", + "Deleterious Thisus", + "S.S. Enterprise", + "Stungle Dungle", + "Srassa Drass" +}; + +static struct pickupname_s const pickupnames[weapon_max_lith] = { + [weapon_unknown] = name(names_unknown), + [weapon_fist] = name(names_unknown), + [weapon_cfist] = name(names_cfist), + [weapon_pistol] = name(names_pistol), + [weapon_revolver] = name(names_revolver), + [weapon_shotgun] = name(names_shotgun), + [weapon_ssg] = name(names_ssg), + [weapon_rifle] = name(names_rifle), + [weapon_launcher] = name(names_launcher), + [weapon_plasma] = name(names_plasma), + [weapon_bfg] = name(names_bfg), + [weapon_c_fist] = name(names_unknown), + [weapon_c_mateba] = name(names_c_mateba), + [weapon_c_rifle] = name(names_c_rifle), + [weapon_c_spas] = name(names_shotgun), + [weapon_c_smg] = name(names_c_smg), + [weapon_c_sniper] = name(names_c_sniper), + [weapon_c_plasma] = name(names_plasma), + [weapon_c_starshot] = name(names_c_starshot), + [weapon_c_shipgun] = name(names_c_shipgun), + [weapon_c_delear] = name(names_c_delear), +}; + +static void Lith_StupidPickup(struct player *p, int weapon) +{ + static __str uncertainty[] = { + "Yes.", + "Maybe.", + "Hmm, yes. Indeed.", + "Yeah.", + "Yep.", + "Ye.", + "Mmyes.", + "Yes. No. Yes?", + "Yes, no, maybe. I don't know." + }; + + static int fmtnum; + struct pickupname_s const *names = &pickupnames[weapon]; + + if(!fmtnum) + fmtnum = strtoi_str(Language("LITH_PICKUP_NUM"), null, 10); + + int ifmt = ACS_Random(0, fmtnum); + int iname = ACS_Random(1, names->num - 1); + int iunc = ACS_Random(0, countof(uncertainty) - 1); + int flag = strtoi_str(Language("LITH_PICKUP_%.3i_FLAGS", ifmt), null, 0); + + if(flag & 2) { + ifmt = ACS_Random(0, fmtnum); + flag = strtoi_str(Language("LITH_PICKUP_%.3i_FLAGS", ifmt), null, 0); + } + + __str fmt = StrParam("> %LS", StrParam("LITH_PICKUP_%.3i", ifmt)); + + if(flag & 1 && flag & 4) + p->log(fmt, names->ptr[iname], names->ptr[iname], uncertainty[iunc]); + else if(flag & 1) + p->log(fmt, names->ptr[iname], names->ptr[iname]); + else if(flag & 4) + p->log(fmt, names->ptr[iname], uncertainty[iunc]); + else + p->log(fmt, names->ptr[iname]); +} + +void Lith_PickupMessage(struct player *p, weaponinfo_t const *info) +{ + if(info->type < weapon_max_lith) + { + if(p->getCVarI("lith_player_stupidpickups")) + Lith_StupidPickup(p, info->type); + else if(info->name) + p->log("> You got the %S!", + Language("LITH_TXT_INFO_SHORT_%S", info->name)); + else + p->log("> Acquired impossible object"); + } + else + p->log("> Slot %i weapon acquired.", info->slot); +} + +// EOF + diff --git a/source/Main/p_player.c b/source/Main/p_player.c new file mode 100644 index 0000000..a6b32ad --- /dev/null +++ b/source/Main/p_player.c @@ -0,0 +1,566 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_list.h" +#include "lith_hudid.h" +#include "lith_world.h" + +#include <limits.h> + +// Extern Objects ------------------------------------------------------------| + +[[__no_init]] struct player players[MAX_PLAYERS]; + +// Static Objects ------------------------------------------------------------| + +static struct {__str on, off;} Lith_GUISounds[GUI_MAX] = { + {}, + {"player/cbi/open", "player/cbi/close"}, +}; + +// Static Functions ----------------------------------------------------------| + +static void Lith_PlayerRunScripts(struct player *p); +[[__call("ScriptS")]] static void Lith_BossWarning(struct player *p); + +// Scripts -------------------------------------------------------------------| + +// +// Lith_PlayerEntry +// +[[__call("ScriptS"), __script("enter")]] +static void Lith_PlayerEntry(void) +{ + if(ACS_GameType() == GAME_TITLE_MAP) + return; + + struct player *p = LocalPlayer; + +reinit: + while(!mapinit) ACS_Delay(1); + + p->reset(); + Lith_PlayerLogEntry(p); + Lith_PlayerEnterUpgrades(p); + p->loadData(); + + Lith_BossWarning(p); + + while(p->active) + { + if(p->reinit) + goto reinit; + + Lith_PlayerUpdateData(p); + + // Check for resurrect. + if(p->health > 0 && p->dead) + p->reinit = true; + + // These can be changed any time, so save them here. + struct player_delta olddelta = p->cur; + int oldhealth = p->health; + + // Run logic and rendering + Lith_PlayerRunScripts(p); + + // Update view + ACS_SetActorPitch(0, ACS_GetActorPitch(0) - p->addpitch); + ACS_SetActorAngle(0, ACS_GetActorAngle(0) - p->addyaw); + ACS_SetActorRoll (0, ACS_GetActorRoll (0) - p->addroll); + + // Tic passes + ACS_Delay(1); + + if(p->dlgnum) + { + [[__call("ScriptS")]] extern void Lith_DialogueVM(struct player *p, int dlgnum); + + Lith_DialogueVM(p, p->dlgnum); + p->dlgnum = 0; + } + + // Update previous-tic values + p->old = olddelta; + p->oldhealth = oldhealth; + + // Reset view for next tic + ACS_SetActorPitch(0, ACS_GetActorPitch(0) + p->addpitch); + ACS_SetActorAngle(0, ACS_GetActorAngle(0) + p->addyaw); + ACS_SetActorRoll (0, ACS_GetActorRoll (0) + p->addroll); + + // If the map changes this we need to make sure it's still correct. + p->validateTID(); + + p->ticks++; + } +} + +// +// Lith_PlayerDeath +// +[[__call("ScriptS"), __script("death")]] +static void Lith_PlayerDeath(void) +{ + struct player *p = LocalPlayer; + + p->dead = true; + + Lith_PlayerDeinitUpgrades(p); + + if(world.singleplayer || ACS_GetCVar("sv_cooploseinventory")) + { + Lith_PlayerDeallocUpgrades(p); + p->bip.deallocate(); + p->score = p->scoreaccum = p->scoreaccumtime = 0; + } + + if(world.singleplayer) + { + if(ACS_GetCVar("lith_sv_revenge")) + { + ACS_LocalAmbientSound("player/death1", 127); + ACS_Delay(35); + InvGive("Lith_PlayerDeath", 1); + ACS_Delay(25); + InvGive("Lith_PlayerDeathNuke", 1); + ACS_Delay(25); + } + + while(p->dead) + { + ACS_Delay(35 * 5); + Log("%S", Language("LITH_DEATHMSG_%.2i", ACS_Random(1, 20))); + } + } +} + +// +// Lith_PlayerRespawn +// +[[__call("ScriptS"), __script("respawn")]] +static void Lith_PlayerRespawn(void) +{ + LocalPlayer->reinit = true; +} + +// +// Lith_PlayerReturn +// +[[__call("ScriptS"), __script("return")]] +static void Lith_PlayerReturn(void) +{ + LocalPlayer->reinit = true; +} + +// +// Lith_PlayerDisconnect +// +[[__call("ScriptS"), __script("disconnect")]] +static void Lith_PlayerDisconnect(void) +{ + struct player *p = LocalPlayer; + + p->bip.deallocate(); + + p->loginfo.hud.free(); + p->hudstrlist.free(true); + p->loginfo.full.free(true); + p->loginfo.maps.free(true); + + upgrademap_t_dtor(&p->upgrademap); + + memset(p, 0, sizeof(*p)); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_RecoilUp +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_RecoilUp(fixed amount) +{ + withplayer(LocalPlayer) p->extrpitch += amount / 180; +} + +#define upgrademap_t_GetKey(o) ((o)->info->key) +#define upgrademap_t_GetNext(o) (&(o)->next) +#define upgrademap_t_GetPrev(o) (&(o)->prev) +#define upgrademap_t_HashKey(k) (k) +#define upgrademap_t_HashObj(o) ((o)->info->key) +#define upgrademap_t_KeyCmp(l, r) ((l) - (r)) +GDCC_HashMap_Defn(upgrademap_t, int, upgrade_t) + +// +// Lith_PlayerGetNamedUpgrade +// +upgrade_t *Lith_PlayerGetNamedUpgrade(struct player *p, int name) +{ + upgrade_t *upgr = p->upgrademap.find(name); + if(!upgr) Log("null pointer trying to find upgrade %i", name); + return upgr; +} + +// +// Lith_PlayerGetUpgradeActive +// +bool Lith_PlayerGetUpgradeActive(struct player *p, int name) +{ + ifauto(upgrade_t *, upgr, p->upgrademap.find(name)) return upgr->active; + else return false; +} + +// +// Lith_GetPlayersExtern +// +struct player (*Lith_GetPlayersExtern(void))[MAX_PLAYERS] +{ + return &players; +} + +// +// Lith_PlayerDiscriminator +// +[[__call("StkCall")]] +__str Lith_PlayerDiscriminator(int pclass) +{ + switch(pclass) { + case pcl_marine: return "Stan"; + case pcl_cybermage: return "Jem"; + case pcl_informant: return "Fulk"; + case pcl_wanderer: return "Luke"; + case pcl_assassin: return "Omi"; + case pcl_darklord: return "Ari"; + case pcl_thoth: return "Kiri"; + default: return "Mod"; + } +} + +// +// Lith_StepSpeed +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_StepSpeed() +{ + struct player *p = LocalPlayer; + + fixed vel = ACS_VectorLength(absk(p->velx), absk(p->vely)); + fixed num = 1k - (vel / 24k); + fixed mul = minmax(num, 0.35k, 1k); + + return 6 * (mul + 0.6k); +} + +// +// Lith_GetPlayer +// +struct player *Lith_GetPlayer(int tid, int ptr) +{ + int pnum = Lith_GetPlayerNumber(tid, ptr); + if(pnum >= 0) return &players[pnum]; + else return null; +} + +// +// Lith_PlayerCloseGUI +// +[[__call("StkCall")]] +void Lith_PlayerCloseGUI(struct player *p) +{ + if(p->activegui != GUI_NONE) + { + p->frozen--; + ACS_LocalAmbientSound(Lith_GUISounds[p->activegui].off, 127); + p->activegui = GUI_NONE; + } +} + +// +// Lith_PlayerUseGUI +// +[[__call("StkCall")]] +void Lith_PlayerUseGUI(struct player *p, int type) +{ + if(p->dead) return; + if(p->activegui == GUI_NONE) + { + p->frozen++; + ACS_LocalAmbientSound(Lith_GUISounds[type].on, 127); + p->activegui = type; + } + else if(p->activegui == type) + p->closeGUI(); + else + { + ACS_LocalAmbientSound(Lith_GUISounds[p->activegui].off, 127); + ACS_LocalAmbientSound(Lith_GUISounds[type].on, 127); + p->activegui = type; + } +} + +// +// Lith_GiveScore +// +i96 Lith_GiveScore(struct player *p, i96 score, bool nomul) +{ + #pragma GDCC FIXED_LITERAL OFF + // Could cause division by zero + if(score == 0) + return 0; + + if(!nomul) { + score *= p->scoremul; + score *= 1 + (double)RandomFloat(0, p->attr.attrs[at_luk] / 77.7); + score *= world.scoremul; + } + + // Get a multiplier for the score accumulator and sound volume + double mul = minmax(score, 0, 15000) / 15000.0; + mul = minmax(mul, 0.1, 1.0); + double vol = 0.7 * mul; + + // Play a sound when we pick up score + if(!IsSmallNumber(vol) && p->getCVarI("lith_player_scoresound")) + ACS_PlaySound(p->cameratid, "player/score", CHAN_ITEM, vol, false, ATTN_STATIC); + + // + if(p->getUpgrActive(UPGR_CyberLegs) && ACS_Random(0, 10000) == 0) { + p->brouzouf += score; + p->log("> You gained brouzouf."); + } + + if(p->getUpgrActive(UPGR_TorgueMode) && ACS_Random(0, 10) == 0) { + p->spuriousexplosions++; + ACS_SpawnForced("Lith_EXPLOOOSION", p->x, p->y, p->z); + } + + // Add score and set score accumulator + p->score += score; + p->scoresum += score; + p->scoreaccum += score; + p->scoreaccumtime += 20 * (mul * 2.0); + + // Log score + if(p->getCVarI("lith_player_scorelog")) + p->logH("> +\Cj%lli\Cnscr", score); + + return score; +} + +// +// Lith_TakeScore +// +[[__call("StkCall")]] +void Lith_TakeScore(struct player *p, i96 score) +{ + if(p->score - score >= 0) { + p->scoreused += score; + p->score -= score; + } else { + p->scoreused += p->score; + p->score = 0; + } + + p->scoreaccum = 0; + p->scoreaccumtime = 0; +} + +// +// Lith_GiveMeAllOfTheScore +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_GiveMeAllOfTheScore(void) +{ + withplayer(LocalPlayer) p->giveScore(0x7FFFFFFFFFFFFFFFFFFFFFFFLL, true); +} + +// +// Lith_GiveHealthBonus +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_GiveHealthBonus(int amount) +{ + withplayer(LocalPlayer) + { + amount += p->health; + if(amount > p->maxhealth + 100) amount = p->maxhealth + 100; + p->health = amount; + } +} + +// +// Lith_GiveHealth +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_GiveHealth(int amount) +{ + withplayer(LocalPlayer) + { + amount += p->health; + amount *= 1 + p->attr.attrs[at_vit] / 80.0; + if(amount > p->maxhealth) amount = p->maxhealth; + p->health = amount; + } +} + +// +// Lith_CheckHealth +// +[[__call("ScriptS"), __extern("ACS")]] +bool Lith_CheckHealth() +{ + withplayer(LocalPlayer) return p->health < p->maxhealth; + return 0; +} + +// +// Lith_Discount +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Discount() +{ + withplayer(LocalPlayer) p->discount = 0.9; +} + +// Static Functions ----------------------------------------------------------| + +// +// Lith_BossWarning +// +[[__call("ScriptS")]] +static void Lith_BossWarning(struct player *p) +{ + ACS_Delay(35 * 5); + + if(world.bossspawned) + p->log("%S", Language("LITH_TXT_LOG_BossWarn%S", p->discrim)); +} + +// +// Lith_PlayerRunScripts +// +// Run main loop scripts. +// +static void Lith_PlayerRunScripts(struct player *p) +{ + [[__call("ScriptS")]] extern void Lith_PlayerPreWeapons(struct player *p); + [[__call("ScriptS")]] static void Lith_PlayerPreScore(struct player *p); + [[__call("ScriptS")]] static void Lith_PlayerPreStats(struct player *p); + + [[__call("ScriptS")]] extern void Lith_PlayerUpdateCBIGUI(struct player *p); + [[__call("ScriptS")]] static void Lith_PlayerUpdateAttributes(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerUpdateUpgrades(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerUpdateWeapons(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerUpdateLog(struct player *p); + + [[__call("ScriptS")]] extern void Lith_PlayerFootstep(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerItemFx(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerDamageBob(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerView(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerRenderUpgrades(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerHUD(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerStyle(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerLevelup(struct player *p); + [[__call("ScriptS")]] extern void Lith_PlayerDebugStats(struct player *p); + + // Pre-logic: Update data from the engine. + Lith_PlayerPreWeapons(p); // Update weapon info + Lith_PlayerPreScore(p); // Update score + + if(ACS_Timer() > 4) + Lith_PlayerPreStats(p); // Update statistics + + if(!p->dead) + Lith_PlayerUpdateUpgrades(p); + + Lith_PlayerRenderUpgrades(p); + + if(!p->dead) + { + // Logic: Update our data. + switch(p->activegui) + case GUI_CBI: Lith_PlayerUpdateCBIGUI(p); + + Lith_PlayerUpdateAttributes(p); + Lith_PlayerUpdateWeapons(p); + Lith_PlayerUpdateLog(p); + + // Post-logic: Update the engine's data. + Lith_PlayerUpdateStats(p); // Update engine info + } + + // Rendering + Lith_PlayerFootstep(p); + Lith_PlayerItemFx(p); + Lith_PlayerDamageBob(p); + Lith_PlayerView(p); + Lith_PlayerHUD(p); + Lith_PlayerStyle(p); + Lith_PlayerLevelup(p); + Lith_PlayerDebugStats(p); +} + +// +// Lith_PlayerUpdateAttributes +// +[[__call("ScriptS")]] +static void Lith_PlayerUpdateAttributes(struct player *p) +{ + fixed acc = p->attr.attrs[at_acc] / 210.0; + fixed def = p->attr.attrs[at_def] / 290.0; + int str = p->attr.attrs[at_str]; + int stm = p->attr.attrs[at_stm]; + int stmt = (ATTR_MAX*1.25 - stm) / (fixed)(ATTR_MAX / 4) * 15; + int rge = p->attr.attrs[at_rge]; + + if(p->health < p->oldhealth) + p->rage += rge * (p->oldhealth - p->health) / 1000.0; + + p->maxhealth = p->spawnhealth + str; + ACS_SetActorPropertyFixed(0, APROP_DamageMultiplier, 1.0 + acc + p->rage); + ACS_SetActorPropertyFixed(0, APROP_DamageFactor, p->spawndfactor - def); + ACS_SetActorProperty (0, APROP_SpawnHealth, p->maxhealth); + + if(p->health < stm+1 && (!stmt || p->ticks % stmt == 0)) + p->health = p->health + 1; + + p->rage = lerpk(p->rage, 0, 0.02); +} + +// +// Lith_PlayerPreScore +// +[[__call("ScriptS")]] +static void Lith_PlayerPreScore(struct player *p) +{ + if(!p->scoreaccumtime || p->score < p->old.score) + { + p->scoreaccum = 0; + p->scoreaccumtime = 0; + } + + if(p->scoreaccumtime > 0) + p->scoreaccumtime--; + else if(p->scoreaccumtime < 0) + p->scoreaccumtime++; +} + +// +// Lith_PlayerPreStats +// +[[__call("ScriptS")]] +static void Lith_PlayerPreStats(struct player *p) +{ + if(p->health < p->oldhealth) + p->healthused += p->oldhealth - p->health; + else if(p->health > p->oldhealth && ACS_Timer() != 1) + p->healthsum += p->health - p->oldhealth; + + if(p->x != p->old.x) p->unitstravelled += abs(p->x - p->old.x); + if(p->y != p->old.y) p->unitstravelled += abs(p->y - p->old.y); + if(p->z != p->old.z) p->unitstravelled += abs(p->z - p->old.z); +} + +// EOF + diff --git a/source/Main/p_render.c b/source/Main/p_render.c new file mode 100644 index 0000000..7b4b4ec --- /dev/null +++ b/source/Main/p_render.c @@ -0,0 +1,299 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// Required for sincos(3). +#define _GNU_SOURCE +#include "lith_common.h" +#include "lith_player.h" +#include "lith_hudid.h" +#include "lith_world.h" + +#include <math.h> + +// Static Functions ----------------------------------------------------------| + +static void HUD_StringStack(struct player *p); +static void HUD_Waves(struct player *p); + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerDebugStats +// +[[__call("ScriptS")]] +void Lith_PlayerDebugStats(struct player *p) +{ + if(!(world.dbgLevel & log_devh)) return; + + ACS_SetHudSize(450, 350); + + ACS_SetFont("LTRMFONT"); + ACS_BeginPrint(); + for(int i = 0; i < dbgstatnum; i++) + ACS_PrintString(dbgstat[i]); + for(int i = 0; i < dbgnotenum; i++) + ACS_PrintString(dbgnote[i]); + ACS_MoreHudMessage(); + HudMessagePlain(hid_debug, 10.1, 20.1, TS); +} + +// +// Lith_PlayerFootstep +// +[[__call("ScriptS")]] +void Lith_PlayerFootstep(struct player *p) +{ + fixed vol = p->getCVarK("lith_player_footstepvol"); + if(!vol || ACS_Timer() % 10 != 0 || p->z - p->floorz > 16) return; + + fixed dstmul = absk(p->getVel()) / 24.0; + if(!(vol *= min(dstmul, 1))) return; + + ACS_PlaySound(p->cameratid, p->stepnoise, CHAN_BODY, vol); +} + +// +// Lith_HUD_DrawWeaponSlots +// +void Lith_HUD_DrawWeaponSlots(struct player *p, int const *ncol, int ncols, char scol, int bx, int by) +{ + for(int i = 1; i < SLOT_MAX; i++) + { + int slot = p->weapon.slot[i]; + if(slot) + { + fixed x = bx+.2 - (8 * (SLOT_MAX - i)); + fixed y = by+.2; + + HudMessageF("LHUDFONTSMALL", "%i", i); + HudMessageParams(0, hid_weapontextE + i, ncol[min(slot - 1, ncols)], x, y, TS); + + if(p->weapon.cur->info->slot == i) + { + HudMessageF("LHUDFONTSMALL", "\C%c%i", scol, i); + HudMessageFade(hid_weaponcurE + i, x, y, TS, 0.2); + } + } + } +} + +// +// Lith_PlayerItemFx +// +[[__call("ScriptS")]] +void Lith_PlayerItemFx(struct player *p) +{ + bool hasir = InvNum("PowerLightAmp"); + + if(!hasir && p->hadinfrared) + ACS_LocalAmbientSound("player/infraredoff", 127); + + p->hadinfrared = hasir; +} + +// +// Lith_PlayerDamageBob +// +// Update view bobbing when you get damaged. +// +[[__call("ScriptS")]] +void Lith_PlayerDamageBob(struct player *p) +{ + if(!InvNum("PowerStrength") && p->health < p->oldhealth) + { + float angle = RandomFloat(tau, -tau); + float distance; + + if(p->bobyaw + p->bobpitch > 0.05) + angle = lerpf(angle, atan2f(p->bobpitch, p->bobyaw), 0.25f); + + distance = mag2f(p->bobyaw, p->bobpitch); + distance += (p->oldhealth - p->health) / (float)p->maxhealth; + distance *= 0.2f; + + float ys, yc; + sincosf(angle, &ys, &yc); + p->bobyaw = ys * distance; + p->bobpitch = yc * distance; + } + + p->bobpitch = lerpf(p->bobpitch, 0.0f, 0.1f); + p->bobyaw = lerpf(p->bobyaw, 0.0f, 0.1f); +} + +// +// Lith_PlayerView +// +// Update additive view. +// +[[__call("ScriptS")]] +void Lith_PlayerView(struct player *p) +{ + float addp = 0, addy = 0; + + if(p->getCVarI("lith_player_damagebob")) + { + float bobmul = p->getCVarK("lith_player_damagebobmul"); + addp += p->bobpitch * bobmul; + addy += p->bobyaw * bobmul; + } + + p->extrpitch = lerpf(p->extrpitch, 0.0f, 0.1f); + p->extryaw = lerpf(p->extryaw, 0.0f, 0.1f); + + p->addpitch = addp + p->extrpitch; + p->addyaw = addy + p->extryaw; + + ifauto(fixed, mul, p->getCVarK("lith_player_viewtilt") * 0.2) { + if(p->sidev) p->addroll = lerpf(p->addroll, -p->sidev * mul, 0.05); + else p->addroll = lerpf(p->addroll, 0, 0.10); + } +} + +// +// Lith_PlayerStyle +// +[[__call("ScriptS")]] +void Lith_PlayerStyle(struct player *p) +{ + if(p->scopetoken) { + ACS_SetActorProperty(0, APROP_RenderStyle, STYLE_Subtract); + ACS_SetActorPropertyFixed(0, APROP_Alpha, p->getCVarK("lith_weapons_scopealpha") * p->alpha); + } else { + ACS_SetActorProperty(0, APROP_RenderStyle, STYLE_Translucent); + ACS_SetActorPropertyFixed(0, APROP_Alpha, p->getCVarK("lith_weapons_alpha") * p->alpha); + } +} + +// +// Lith_PlayerHUD +// +[[__call("ScriptS")]] +void Lith_PlayerHUD(struct player *p) +{ + ACS_SetHudSize(320, 200); + + if(p->old.scopetoken && !p->scopetoken) + { + p->hudstrlist.free(true); + + for(int i = hid_scope_clearS; i <= hid_scope_clearE; i++) + { + HudMessage(""); + HudMessagePlain(i, 0.0, 0.0, 0.0); + } + } + + if(p->scopetoken) + { + if(p->pclass == pcl_cybermage) + { + int time = (ACS_Timer() % 16) / 4; + DrawSpriteXX(StrParam(":HUD_C:ScopeOverlay%i", time + 1), + HUDMSG_ADDBLEND|HUDMSG_FADEOUT|HUDMSG_ALPHA, hid_scope_overlayE + time, 0.1, 0.1, 0.1, 0.25, 0.5); + + for(int i = 0; i < 200; i++) + DrawSpriteXX(":HUD:H_D41", HUDMSG_ADDBLEND|HUDMSG_FADEOUT|HUDMSG_ALPHA, + hid_scope_lineE + i, 32, i+.1, 0.1, 0.1, ACS_RandomFixed(0.3, 0.6)); + } + else if(p->pclass == pcl_informant) + { + fixed a = (1 + ACS_Sin(ACS_Timer() / 70.0)) * 0.25 + 0.5; + DrawSpriteX(":HUD_I:ScopeOverlay", + HUDMSG_ADDBLEND|HUDMSG_ALPHA, hid_scope_overlayE, -2.1, -2.1, + TS, a); + } + else + { + HUD_Waves(p); + HUD_StringStack(p); + } + } +} + +// +// Lith_PlayerLevelup +// +[[__call("ScriptS")]] +void Lith_PlayerLevelup(struct player *p) +{ + if(p->old.attr.level && p->old.attr.level < p->attr.level) { + ACS_LocalAmbientSound("player/levelup", 127); + p->logH(Language("LITH_TXT_LOG_LevelUp%S", p->discrim), p->attr.level); + } +} + +// Static Functions ----------------------------------------------------------| + +// +// HUD_StringStack +// +static void HUD_StringStack(struct player *p) +{ + typedef struct hudstr_s + { + __str str; + list_t link; + } hudstr_t; + + if((ACS_Timer() % 3) == 0) + { + hudstr_t *hudstr = Salloc(hudstr_t); + hudstr->link.construct(hudstr); + hudstr->str = StrParam("%.8X", ACS_Random(0, 0x7FFFFFFF)); + + hudstr->link.link(&p->hudstrlist); + + if(p->hudstrlist.size == 20) + Dalloc(p->hudstrlist.next->unlink()); + } + + ACS_SetHudSize(320, 200); + ACS_SetFont("CONFONT"); + + size_t i = 0; + for(list_t *rover = p->hudstrlist.prev; rover != &p->hudstrlist; rover = rover->prev, i++) + { + hudstr_t *hudstr = rover->object; + HudMessage("%S", hudstr->str); + HudMessageParams(HUDMSG_ALPHA | HUDMSG_ADDBLEND, hid_scope_stringstackS - i, CR_RED, 300.2, 20.1 + (i * 9), 0.0, 0.5); + } +} + +// +// HUD_Waves +// +static void HUD_Waves(struct player *p) +{ + fixed health = (fixed)p->health / (fixed)p->maxhealth; + int frame = minmax(health * 4, 1, 5); + int timer = ACS_Timer(); + int pos; + + ACS_SetHudSize(320, 200); + + // Sine (health) + pos = (10 + timer) % 160; + DrawSpriteFade(StrParam(":HUD:H_D1%i", frame), + hid_scope_sineS - pos, + 300.1 + roundk(ACS_Sin(pos / 32.0) * 7.0, 0), + 25.1 + pos, + 1.5, 0.3); + + // Square + { + fixed a = ACS_Cos(pos / 32.0); + + pos = (7 + timer) % 160; + DrawSpriteFade(roundk(a, 2) != 0.0 ? ":HUD:H_D16" : ":HUD:H_D46", + hid_scope_squareS - pos, + 300.1 + (a >= 0) * 7.0, + 25.1 + pos, + 1.9, 0.1); + } + + // Triangle + pos = (5 + timer) % 160; + DrawSpriteFade(":HUD:H_D14", hid_scope_triS - pos, 300.1 + abs((pos % 16) - 8), 25.1 + pos, 1.2, 0.2); +} + +// EOF + diff --git a/source/Main/p_save.c b/source/Main/p_save.c new file mode 100644 index 0000000..fe4c35b --- /dev/null +++ b/source/Main/p_save.c @@ -0,0 +1,34 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_savedata.h" +#include "lith_file.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PlayerSaveData +// +[[__call("ScriptS")]] +void Lith_PlayerSaveData(struct player *p) +{ + savefile_t *save; + + if((save = Lith_SaveBegin(p))) + Lith_SaveEnd(save); +} + +// +// Lith_PlayerLoadData +// +[[__call("ScriptS")]] +void Lith_PlayerLoadData(struct player *p) +{ + savefile_t *save; + + if((save = Lith_LoadBegin(p))) + Lith_LoadEnd(save); +} + +// EOF + diff --git a/source/Main/p_savedata.c b/source/Main/p_savedata.c new file mode 100644 index 0000000..c585b18 --- /dev/null +++ b/source/Main/p_savedata.c @@ -0,0 +1,122 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_file.h" +#include "lith_savedata.h" +#include "lith_world.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_SaveWriteChunk +// +void Lith_SaveWriteChunk(savefile_t *save, ident_t iden, uint32_t vers, size_t size) +{ + if(world.dbgSave) + Log("Lith_SaveWriteChunk: writing %u version %u size %zu", iden, vers, size); + Lith_FWrite32(&(savechunk_t){iden, vers & Save_VersMask, size}, sizeof(savechunk_t), 4, save->fp); +} + +// +// Lith_SaveBegin +// +savefile_t *Lith_SaveBegin(struct player *p) +{ + savefile_t *save = Salloc(savefile_t); + + if((save->fp = Lith_NFOpen(p->num, "lith_psave", 'w'))) + { + save->p = p; + Lith_SaveWriteChunk(save, Ident_Lith, SaveV_Lith, 0); + return save; + } + + Dalloc(save); + return null; +} + +// +// Lith_SaveEnd +// +[[__call("ScriptS")]] +void Lith_SaveEnd(savefile_t *save) +{ + Lith_SaveWriteChunk(save, Ident_Lend, SaveV_Lend, 0); + fclose(save->fp); + Dalloc(save); +} + +// +// Lith_LoadChunk +// +int Lith_LoadChunk(savefile_t *save, ident_t iden, uint32_t vers, loadchunker_t chunker) +{ + rewind(save->fp); + + if(world.dbgSave) + Log("Lith_LoadChunk: Finding chunk %.4X ver%u", iden, vers); + + for(int i = 0;; i++) + { + savechunk_t chunk; + Lith_FRead32(&chunk, sizeof(chunk), 4, save->fp); + + // End of file reached, or we reached the EOF chunk. + // Otherwise, if the chunk description matches, process it. + // Or, the chunk is not correct, and we skip the data. + if(chunk.iden == Ident_Lend || feof(save->fp)) + break; + else if(chunk.iden == iden && (chunk.vrfl & Save_VersMask) == vers) + { + if(chunker) chunker(save, &chunk); + + if(world.dbgSave) Log("Lith_LoadChunk: Found valid chunk at %i", i); + + return i; + } + else + fseek(save->fp, chunk.size, SEEK_CUR); + } + + if(world.dbgSave) + Log("Lith_LoadChunk: Couldn't find anything"); + + return -1; +} + +// +// Lith_LoadBegin +// +savefile_t *Lith_LoadBegin(struct player *p) +{ + savefile_t *save = Salloc(savefile_t); + + if((save->fp = Lith_NFOpen(p->num, "lith_psave", 'r'))) + { + save->p = p; + + // The Lith chunk must always be the first valid chunk. + if(Lith_LoadChunk(save, Ident_Lith, SaveV_Lith) != 0) + { + Lith_LoadEnd(save); + return null; + } + + return save; + } + + Dalloc(save); + return null; +} + +// +// Lith_LoadEnd +// +void Lith_LoadEnd(savefile_t *save) +{ + fclose(save->fp); + Dalloc(save); +} + +// EOF + diff --git a/source/Main/p_settings.c b/source/Main/p_settings.c new file mode 100644 index 0000000..9ddee9f --- /dev/null +++ b/source/Main/p_settings.c @@ -0,0 +1,313 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#ifdef FromUI +if(p->num == 0) { + Category("Gameplay"); + ServerInt("Difficulty Base", "%", "lith_sv_difficulty", 1, 100); + ServerFloat("Score multiplier", "x", "lith_sv_scoremul", 0, 10); + ServerBool("Explode on death", "lith_sv_revenge"); + ServerInt("Autosave Interval", "min", "lith_sv_autosave", 0, 30); + ServerBool("Disable phantoms", "lith_sv_nobosses"); + ServerBool("Don't pick up ammo when full", "lith_sv_nofullammo"); +} + +Category("GUI"); +Float("Horizontal cursor speed", "x", "lith_gui_xmul", 0.1f, 2.0f); +Float("Vertical cursor speed", "x", "lith_gui_ymul", 0.1f, 2.0f); +Enum("Color theme", "lith_gui_theme", 0, cbi_theme_max-1, "%S", ThemeName(set)); +Enum("Cursor", "lith_gui_cursor", 0, gui_curs_max-1, "%S", CursName(set)); +ServerBool("Pause while in menu", "lith_sv_pauseinmenus"); + +Category("Player"); +Float("Damage bob multiplier", "x", "lith_player_damagebobmul", 0.0f, 1.0f); +Bool("Bob view when damaged", "lith_player_damagebob"); +Float("Footstep volume", "x", "lith_player_footstepvol", 0.0f, 1.0f); +Float("View tilt", "x", "lith_player_viewtilt", 0.0f, 1.0f); +Bool("Log score gained", "lith_player_scorelog"); +Bool("Play a sound when score is gained", "lith_player_scoresound"); +Bool("Play sounds on the results screen", "lith_player_resultssound"); +Bool("Invert mouse in netgames (hack)", "lith_player_invertmouse"); + +Category("Items"); +if(p->num == 0) { + ServerBool("Bright weapon pickups", "lith_player_brightweps"); + ServerBool("No item effects", "lith_player_noitemfx"); +} +Bool("Teleport in bought items and upgrades", "lith_player_teleshop"); +Bool("Stupid pickup messages", "lith_player_stupidpickups"); +Bool("Log ammo pickups", "lith_player_ammolog"); + +Category("Weapons"); +Float("Scope zoom factor", "x", "lith_weapons_zoomfactor", 1.0f, 10.0f); +Float("Scope opacity", "x", "lith_weapons_scopealpha", 0.0f, 1.0f); +Float("Weapon opacity", "x", "lith_weapons_alpha", 0.0f, 1.0f); +Float("Recoil amount", "x", "lith_weapons_recoil", 0.0f, 1.0f); +if(p->pclass == pcl_marine) { + Bool("Modal Rifle scope", "lith_weapons_riflescope"); + Bool("Clear rifle mode on switch", "lith_weapons_riflemodeclear"); +} +if(p->num == 0) { + ServerBool("Emit casings from weapons", "lith_weapons_casings"); + ServerBool("Drop magazines from weapons", "lith_weapons_magdrops"); + ServerBool("Casings fade out", "lith_weapons_casingfadeout"); + ServerBool("Magazines fade out", "lith_weapons_magfadeout"); +} +Bool("Magic selection animations", "lith_weapons_magicselanims"); +Bool("Slot 3 weapons take ammo", "lith_weapons_slot3ammo"); + +Category("Heads Up Display"); +Bool("Show score", "lith_hud_showscore"); +Bool("Show weapons", "lith_hud_showweapons"); +Bool("Show log", "lith_hud_showlog"); +Bool("Draw log from top of screen", "lith_hud_logfromtop"); +Bool("Draw reactive armor indicator", "lith_hud_showarmorind"); + +Int("Crosshair red", "/255", "lith_xhair_r", 0, 255); +Int("Crosshair green", "/255", "lith_xhair_g", 0, 255); +Int("Crosshair blue", "/255", "lith_xhair_b", 0, 255); +Int("Crosshair alpha", "/255", "lith_xhair_a", 0, 255); +Enum("Crosshair style", "lith_xhair_style", 1, 7, "%S", XHairName(set)); +Bool("Crosshair enabled", "lith_xhair_enable"); + +Category("Vital Scanner"); +Int("X offset", "px", "lith_scanner_xoffs", -160, 160); +Int("Y offset", "px", "lith_scanner_yoffs", -180, 20); +Enum("Color", "lith_scanner_color", 'a', 'v', "\C%c%S", set, ColorName(set)); +Bool("Slide to target", "lith_scanner_slide"); +Bool("Health bar", "lith_scanner_bar"); +Bool("Alternate font", "lith_scanner_altfont"); + +if(p->num == 0) { + Category("World"); + ServerBool("Rain in outside areas", "lith_sv_rain"); + ServerBool("Replace skies", "lith_sv_sky"); +} + +#undef Category +#undef Bool +#undef Float +#undef Int +#undef ServerBool +#undef ServerFloat +#undef ServerInt +#undef Enum +#undef CBox +#undef FromUI + +#else + +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +#include <ctype.h> + +// Static Functions ----------------------------------------------------------| + +// +// ColorName +// +static __str ColorName(char ch) +{ + static __str const colors[] = { + "Brick", "Tan", "Grey", "Green", "Brown", "Gold", "Red", "Blue", + "Orange", "White", "Yellow", "Default", "Black", "Light Blue", "Cream", + "Olive", "Dark Green", "Dark Red", "Dark Brown", "Purple", "Dark Grey", + "Cyan" + }; + + if(ch < 'a' || ch > 'v') return "Unknown"; + else return colors[ch - 'a']; +} + +// +// ThemeName +// +static __str ThemeName(int num) +{ + static __str const themes[] = { + "Green", "Rose", "Umi", "Ender", "Orange", "Grey", "Bassilla", "Ghost", + "WinXP", + }; + + if(num < 0 || num >= cbi_theme_max) return "Unknown"; + else return themes[num]; +} + +// +// CursName +// +static __str CursName(int num) +{ + static __str const cursors[] = { + "Green", "Pink", "Blue", "Orange", "Red", "White", "Outline", + "Outline (Tail)", "Inv. Outline", "Inv. Outline (Tail)" + }; + + if(num < 0 || num >= gui_curs_max) return "Unknown"; + else return cursors[num]; +} + +// +// XHairName +// +static __str XHairName(int num) +{ + static __str const xhairs[] = { + "Cross", "Circle", "Delta", "Oval", "Basic", "Delear", "Finirentur" + }; + + if(num < 1 || num > countof(xhairs)) return "Unknown"; + else return xhairs[num - 1]; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_CBITab_Settings +// +void Lith_CBITab_Settings(gui_state_t *g, struct player *p) +{ + int y = 0; + +#define Category(...) y += 20 +#define Bool(...) y += 10 +#define Float(...) y += 10 +#define Int(...) y += 10 +#define ServerBool(...) y += 10 +#define ServerFloat(...) y += 10 +#define ServerInt(...) y += 10 +#define Enum(...) y += 10 +#define CBox(...) y += 10 +#define FromUI +#include "p_settings.c" + + Lith_GUI_ScrollBegin(g, &CBIState(g)->settingscr, 15, 30, 280, 192, y); + + y = 0; + +#define Label(label) \ + do { \ + HudMessageF("CBIFONT", label); \ + HudMessagePlain(g->hid--, g->ox + 2.1, g->oy + y + 0.1, TS); \ + } while(0) + +#define Category(name) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 20)) \ + { \ + HudMessageF("CHFONT", "\Cn" name); \ + HudMessagePlain(g->hid--, g->ox + 140.0, g->oy + y + 5.1, TS); \ + } \ + y += 20; \ + } while(0) + +#define Bool(label, cvar) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(bool on = p->getCVarI(cvar);) \ + { \ + Label(label); \ + if(Lith_GUI_Button(g, on ? "On" : "Off", 280 - guipre.btnlist.w, y, Pre(btnlist))) \ + p->setCVarI(cvar, !on); \ + } \ + y += 10; \ + } while(0) + +#define Float(label, s, cvar, minima, maxima) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(double set = p->getCVarK(cvar), diff;) \ + { \ + Label(label); \ + if((diff = Lith_GUI_Slider(g, 280 - guipre.slddef.w, y, minima, maxima, set, .suf = s))) \ + p->setCVarK(cvar, set + diff); \ + } \ + y += 10; \ + } while(0) + +#define Int(label, s, cvar, minima, maxima) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(int set = p->getCVarI(cvar), diff;) \ + { \ + Label(label); \ + if((diff = Lith_GUI_Slider(g, 280 - guipre.slddef.w, y, minima, maxima, set, true, .suf = s))) \ + p->setCVarI(cvar, set + diff); \ + } \ + y += 10; \ + } while(0) + +#define ServerBool(label, cvar) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(bool on = ACS_GetCVar(cvar);) \ + { \ + Label(label); \ + if(Lith_GUI_Button(g, on ? "On" : "Off", 280 - guipre.btnlist.w, y, Pre(btnlist))) \ + ACS_SetCVar(cvar, !on); \ + } \ + y += 10; \ + } while(0) + +#define ServerFloat(label, s, cvar, minima, maxima) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(double set = ACS_GetCVarFixed(cvar), diff;) \ + { \ + Label(label); \ + if((diff = Lith_GUI_Slider(g, 280 - guipre.slddef.w, y, minima, maxima, set, .suf = s))) \ + ACS_SetCVarFixed(cvar, set + diff); \ + } \ + y += 10; \ + } while(0) + +#define ServerInt(label, s, cvar, minima, maxima) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(int set = ACS_GetCVar(cvar), diff;) \ + { \ + Label(label); \ + if((diff = Lith_GUI_Slider(g, 280 - guipre.slddef.w, y, minima, maxima, set, true, .suf = s))) \ + ACS_SetCVar(cvar, set + diff); \ + } \ + y += 10; \ + } while(0) + +#define Enum(label, cvar, minima, maxima, fmt, ...) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + __with(int set = p->getCVarI(cvar);) \ + { \ + Label(label); \ + if(Lith_GUI_Button_Id(g, 0, .x = 280 - (guipre.btnnexts.w*2), y, set == minima, Pre(btnprevs))) \ + p->setCVarI(cvar, set - 1); \ + if(Lith_GUI_Button_Id(g, 1, .x = 280 - guipre.btnnexts.w , y, set == maxima, Pre(btnnexts))) \ + p->setCVarI(cvar, set + 1); \ + HudMessageF("CBIFONT", fmt, __VA_ARGS__); \ + HudMessagePlain(g->hid--, g->ox + 200.1, g->oy + y + 0.1, TS); \ + } \ + y += 10; \ + } while(0) + +#define CBox(label, on, ...) \ + do { \ + if(!Lith_GUI_ScrollOcclude(g, &CBIState(g)->settingscr, y, 10)) \ + { \ + Label(label); \ + if(Lith_GUI_Checkbox(g, on, 240, y + 5, Pre(cbxsmall))) \ + (__VA_ARGS__); \ + } \ + y += 10; \ + } while(0) + +#define FromUI +#include "p_settings.c" +#undef Label + + Lith_GUI_ScrollEnd(g, &CBIState(g)->settingscr); +} + +#endif + +// EOF + diff --git a/source/Main/p_shop.c b/source/Main/p_shop.c new file mode 100644 index 0000000..5d7459f --- /dev/null +++ b/source/Main/p_shop.c @@ -0,0 +1,141 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=120 +#include "lith_common.h" +#include "lith_player.h" + +// Types ---------------------------------------------------------------------| + +enum { + sif_weapon = 1 << 0, +}; + +typedef struct shopitem_s +{ + [[__anonymous]] shopdef_t shopdef; + int pclass; + int count; + __str classname; + int flags; +} shopitem_t; + +// Static Objects ------------------------------------------------------------| + +static shopitem_t shopitems[] = { +// {{"Name-----------", "BIP------------", Cost---}, Class, Cnt-, "Class---------------", [Flags]}, + {{"RocketAmmo", null, 9000}, gA, 5, "Lith_RocketAmmo"}, + {{"PlasmaAmmo", null, 75750}, gA, 1000, "Lith_PlasmaAmmo"}, + + {{"ChargeFist", "ChargeFist", 100000}, pM, 1, "Lith_ChargeFist", sif_weapon}, + {{"Revolver", "Revolver", 500000}, pM, 1, "Lith_Revolver", sif_weapon}, + {{"LazShotgun", "LazShotgun", 1800000}, pM, 1, "Lith_LazShotgun", sif_weapon}, + {{"SniperRifle", "SniperRifle", 1800000}, pM, 1, "Lith_SniperRifle", sif_weapon}, + {{"MissileLauncher", "MissileLauncher", 2500000}, gO, 1, "Lith_MissileLauncher", sif_weapon}, + {{"PlasmaDiffuser", "PlasmaDiffuser", 2500000}, gO, 1, "Lith_PlasmaDiffuser", sif_weapon}, + + {{"Allmap", null, 100000}, gA, 1, "Allmap"}, + {{"Infrared", null, 70000}, gA, 1, "Infrared"}, + {{"RadSuit", null, 100000}, gA, 1, "RadSuit"}, +}; + +// Static Functions ----------------------------------------------------------| + +// +// Shop_CanBuy +// +static bool Shop_CanBuy(struct player *p, shopdef_t const *, void *item_) +{ + shopitem_t *item = item_; + int cur = InvNum(item->classname); + int max = InvMax(item->classname); + return max == 0 || cur < max; +} + +// +// Shop_Buy +// +static void Shop_Buy(struct player *p, shopdef_t const *, void *item_) +{ + shopitem_t *item = item_; + p->itemsbought++; + InvGive(item->classname, item->count); +} + +// +// Shop_Give +// +static bool Shop_Give(struct player *p, shopdef_t const *, void *item_, int tid) +{ + shopitem_t *item = item_; + p->itemsbought++; + if(item->flags & sif_weapon) { + Lith_GiveActorInventory(p->tid, item->classname, item->count); + return false; + } else { + Lith_GiveActorInventory(tid, item->classname, item->count); + return true; + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_GInit_Shop +// +void Lith_GInit_Shop(void) +{ + for(int i = 0; i < countof(shopitems); i++) + { + shopitem_t *info = &shopitems[i]; + info->shopBuy = Shop_Buy; + info->shopCanBuy = Shop_CanBuy; + info->shopGive = Shop_Give; + } +} + +// +// Lith_CBITab_Shop +// +void Lith_CBITab_Shop(gui_state_t *g, struct player *p) +{ + int nitems = 0; + for(int i = 0; i < countof(shopitems); i++) { + if(shopitems[i].pclass & p->pclass) + nitems++; + } + + Lith_GUI_ScrollBegin(g, &CBIState(g)->shopscr, 15, 36, guipre.btnlist.w, 186, guipre.btnlist.h * nitems); + + for(int i = 0, y = 0; i < countof(shopitems); i++) + { + if(Lith_GUI_ScrollOcclude(g, &CBIState(g)->shopscr, y, guipre.btnlistsel.h) || !(shopitems[i].pclass & p->pclass)) + continue; + + __str name = Language("LITH_TXT_SHOP_TITLE_%S", shopitems[i].name); + + int *shopsel = &CBIState(g)->shopsel; + if(Lith_GUI_Button_Id(g, i, name, 0, y, i == *shopsel, Pre(btnlistsel))) + *shopsel = i; + + y += guipre.btnlistsel.h; + } + + Lith_GUI_ScrollEnd(g, &CBIState(g)->shopscr); + + shopitem_t *item = &shopitems[CBIState(g)->shopsel]; + + ACS_SetHudClipRect(111, 30, 184, 150, 184); + + HudMessageF("CBIFONT", "%LS: %S\Cnscr", "LITH_COST", Lith_ScoreSep(p->getCost(&item->shopdef))); + HudMessagePlain(g->hid--, 111.1, 30.1, TS); + + HudMessageF("CBIFONT", "%S", Language("LITH_TXT_SHOP_DESCR_%S", item->name)); + HudMessageParams(HUDMSG_PLAIN, g->hid--, CR_WHITE, 111.1, 40.1, TS); + + ACS_SetHudClipRect(0, 0, 0, 0); + + if(Lith_GUI_Button(g, "Buy", 259, 170, !p->canBuy(&item->shopdef, item))) + p->buy(&item->shopdef, item, "LITH_TXT_SHOP_TITLE_%S", false); +} + +// EOF + diff --git a/source/Main/p_shopdef.c b/source/Main/p_shopdef.c new file mode 100644 index 0000000..f77fb02 --- /dev/null +++ b/source/Main/p_shopdef.c @@ -0,0 +1,73 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_shopdef.h" +#include "lith_player.h" +#include "lith_world.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_ShopGetCost +// +i96 Lith_ShopGetCost(struct player *p, shopdef_t const *def) +{ + return PlayerDiscount(def->cost); +} + +// +// Lith_ShopCanBuy +// +bool Lith_ShopCanBuy(struct player *p, shopdef_t const *def, void *obj) +{ + return + p->score - p->getCost(def) >= 0 && + (def->shopCanBuy ? def->shopCanBuy(p, def, obj) : true); +} + +// +// Lith_ShopBuy +// +bool Lith_ShopBuy(struct player *p, shopdef_t const *def, void *obj, __str namefmt, bool nodelivery, bool nolog) +{ + if(!p->canBuy(def, obj)) + return false; + + if(!nolog) p->logF("> Bought %S", Language(namefmt, def->name)); + + if(def->bipunlock) p->bipUnlock(def->bipunlock); + + p->takeScore(p->getCost(def)); + + bool delivered = false; + + if(!nodelivery && p->getCVarI("lith_player_teleshop")) + { + int pufftid; + int tid; + + ACS_LineAttack(0, p->yaw, p->pitch, 0, "Lith_Dummy", "Lith_NoDamage", 128.0, FHF_NORANDOMPUFFZ | FHF_NOIMPACTDECAL, pufftid = ACS_UniqueTID()); + + fixed x = ACS_GetActorX(pufftid); + fixed y = ACS_GetActorY(pufftid); + fixed z = ACS_GetActorZ(pufftid); + + if((x || y || z) && ACS_Spawn("Lith_BoughtItem", x, y, z, tid = ACS_UniqueTID())) + { + if(def->shopGive(p, def, obj, tid)) + p->logH("> \CjItem delivered."); + else + ACS_Thing_Remove(tid); + + delivered = true; + } + else + p->logH("> \CgCouldn't deliver item\C-, placing directly in inventory."); + } + + if(!delivered) def->shopBuy(p, def, obj); + + return true; +} + +// EOF + diff --git a/source/Main/p_status.c b/source/Main/p_status.c new file mode 100644 index 0000000..100238f --- /dev/null +++ b/source/Main/p_status.c @@ -0,0 +1,129 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +// Static Functions ----------------------------------------------------------| + +// +// AttrBar +// +static void AttrBar(gui_state_t *g, int x, int y, int w, __str gfx) +{ + Lith_GUI_Clip(g, x, y, w * 2, 8); + DrawSpritePlain(gfx, 0, g->hid--, x+.1, y+.1); + Lith_GUI_ClipRelease(g); +} + +// +// DrawAttr +// +static void DrawAttr(gui_state_t *g, int x, int y, struct player *p, int at) +{ + u32 attr = p->attr.attrs[at]; + __str name = p->attr.names[at]; + fixed helptrns = 0.5; + + if(p->attr.points) { + if(Lith_GUI_Button_Id(g, at, .x = x-42, y-2, .preset = &guipre.btnprev, .slide = true)) + if(p->attr.sup.attrs[at] > attr) + { + p->attr.sup.points++; + p->attr.sup.attrs[at]--; + } + + if(Lith_GUI_Button_Id(g, at, .x = x-42 + guipre.btnprev.w, y-2, .preset = &guipre.btnnext, .slide = true)) + if(p->attr.sup.points && p->attr.sup.attrs[at] < ATTR_MAX) + { + p->attr.sup.points--; + p->attr.sup.attrs[at]++; + } + } + + HudMessageF("CHFONT", "%.3S", name); + HudMessageParams(0, g->hid--, CR_WHITE, x+.1-24, y+.1, TS); + + DrawSpritePlain(":UI:AttrBar1", g->hid--, x+.1, y+.1, TS); + + unsigned satr = p->attr.sup.attrs[at]; + + if(satr != attr) + AttrBar(g, x, y, satr, ":UI:AttrBar3"); + + AttrBar(g, x, y, attr, ":UI:AttrBar2"); + + if(attr > ATTR_VIS_MAX) { + int vatr = attr - ATTR_VIS_MAX; + AttrBar(g, x, y, (vatr / (float)ATTR_VIS_DIFF) * ATTR_VIS_MAX, ":UI:AttrBar4"); + helptrns += 0.3; + } + + HudMessageF("CHFONT", "%u/%i", satr, ATTR_VIS_MAX); + HudMessageParams(0, g->hid--, CR_WHITE, x+202.1, y+.1, TS); + + static __str const helpstrs[at_max] = { + [at_acc] = "Weapon damage", + [at_def] = "Armor efficiency", + [at_str] = "Health capacity", + [at_vit] = "Health pickup efficiency", + [at_stm] = "Health regeneration", + [at_luk] = "Random chance", + [at_rge] = "Damage buff when hit" + }; + + HudMessageF("CHFONT", "%S", helpstrs[at]); + HudMessageParams(HUDMSG_ALPHA, g->hid--, CR_WHITE, x+1.1, y+1.1, TS, helptrns); + + HudMessageF("CHFONT", "%u/%i", satr, ATTR_VIS_MAX); + HudMessageParams(0, g->hid--, CR_WHITE, x+202.1, y+.1, TS); +} + +// +// StatusInfo +// +static void StatusInfo(gui_state_t *g, int x, int y, __str left, __str right) +{ + ACS_SetFont("CHFONT"); + HudMessage("%S", left); + HudMessageParams(0, g->hid--, CR_WHITE, x+ .1, y+.1, TS); + HudMessage("%S", right); + HudMessageParams(0, g->hid--, CR_WHITE, x+80.2, y+.1, TS); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_CBITab_Status +// +void Lith_CBITab_Status(gui_state_t *g, struct player *p) +{ + int x = 30, y = 40; + ACS_SetFont("CHFONT"); + HudMessage("%S", p->name); + HudMessageParams(0, g->hid--, CR_WHITE, x+.1, y+.1, TS); + y += 10; + HudMessage("%S", p->classname); + HudMessageParams(0, g->hid--, CR_WHITE, x+.1, y+.1, TS); + StatusInfo(g, x, y += 10, "Lv.", StrParam("%u", p->attr.level)); + StatusInfo(g, x, y += 10, "HP", StrParam("%i/%i", p->health, p->maxhealth)); + if(p->pclass & pcl_magicuser) + StatusInfo(g, x, y += 10, "MP", StrParam("%i/%i", p->mana, p->manamax)); + StatusInfo(g, x, y += 10, "EXP", StrParam("%lu", p->attr.exp)); + StatusInfo(g, x, y += 10, "Next", StrParam("%lu", p->attr.expnext)); + x = 20; + if(p->pclass & pcl_magicuser) y += 20; + else y += 30; + if(p->attr.points) { + HudMessage("Divide %u points among your attributes.", p->attr.sup.points); + HudMessageParams(0, g->hid--, CR_WHITE, x+.1, y+.1, TS); + } + x = 60; + y += 10; + for(int i = 0; i < at_max; i++, y += 10) + DrawAttr(g, x, y, p, i); + if(p->attr.points) + if(Lith_GUI_Button(g, "Apply", 255, 208)) + p->attr.cur = p->attr.sup; +} + +// EOF diff --git a/source/Main/p_upgrades.c b/source/Main/p_upgrades.c new file mode 100644 index 0000000..da7390d --- /dev/null +++ b/source/Main/p_upgrades.c @@ -0,0 +1,583 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=120 +#include "lith_upgrades_common.h" +#include "lith_world.h" + +#define ForUpgrade(name) \ + for(int _i = 0; _i < p->upgrmax; _i++) \ + __with(upgrade_t *name = &p->upgrades[_i];) + +#define CheckRequires(a1, a2) (upgr->info->requires & a1 && !(a2)) +#define CheckRequires_AI CheckRequires(UR_AI, world.cbiupgr[cupg_armorinter]) +#define CheckRequires_WMD CheckRequires(UR_WMD, world.cbiupgr[cupg_weapninter]) +#define CheckRequires_WRD CheckRequires(UR_WRD, world.cbiupgr[cupg_weapninte2]) +#define CheckRequires_RDI CheckRequires(UR_RDI, world.cbiupgr[cupg_rdistinter]) +#define CheckRequires_RA CheckRequires(UR_RA, p->getUpgr(UPGR_ReactArmor)->owned) + +// Static Objects ------------------------------------------------------------| + +#define Req(arg) .requires = arg +static upgradeinfo_t UpgrInfoBase[UPGR_BASE_MAX] = { +// {{"Name-------", "BIP---------", Cost---}, Classes, UC_Cat-, Perf, Score, [Group], [Requirements]}, + {{"HeadsUpDisp", "HeadsUpDisp", 0 }, pM | gX, UC_Body, 1, -0.05, UG_HUD}, + {{"HeadsUpDis2", "HeadsUpDisp", 0 }, pC | gI, UC_Body, 1, -0.05, UG_HUD}, + {{"JetBooster", "JetBooster", 0 }, pM, UC_Body, 0, -0.05}, + {{"ReflexWetw", "ReflexWetw", 0 }, gO | gX, UC_Body, 5, -0.05}, + {{"Zoom", null, 0 }, gA, UC_Body, 0, 0.00}, + {{"VitalScan", "VitalScanner", 0 }, gA, UC_Body, 2, 0.00}, + {{"CyberLegs", "CyberLegs", 1220000}, pM, UC_Body, 4, 0.00}, + {{"ReactArmor", "Yh0", 3500200}, pM, UC_Body, 20, 0.00, Req(UR_AI)}, + {{"ReactArmor2", "Yh0", 2990200}, pM, UC_Body, 10, 0.00, Req(UR_AI|UR_RA)}, + {{"DefenseNuke", "DefenseNuke", 580030 }, pM, UC_Body, 0, 0.00, Req(UR_AI)}, + {{"Adrenaline", "Adrenaline", 1801000}, pM, UC_Body, 10, 0.00}, + + {{"Magic", "Magic", 0 }, pC, UC_Body, 0, 0.00}, + {{"SoulCleaver", "SoulCleaver", 1100000}, pC, UC_Body, 0, 0.00}, + {{"StealthSys", "StealthSys", 1800450}, pC, UC_Body, 0, 0.00}, + + {{"AutoReload", "AutoReload", 950050 }, gO, UC_Weap, 2, 0.00}, + {{"AutoPistol", null, 140940 }, pM, UC_Weap, 0, 0.00, UG_Pistol}, + {{"PlasPistol", null, 340000 }, pM, UC_Weap, 0, 0.00, UG_Pistol, Req(UR_WMD)}, + {{"GaussShotty", "ShotgunUpgr", 1079430}, pM, UC_Weap, 1, 0.00, UG_Shotgun, Req(UR_WMD)}, + {{"PoisonShot", "ShotgunUpg2", 1010420}, pM, UC_Weap, 0, 0.00, UG_Shotgun, Req(UR_WMD)}, + {{"RifleModes", "RifleUpgr", 340100 }, pM, UC_Weap, 0, 0.00}, + {{"LaserRCW", "RifleUpg2", 1008080}, pM, UC_Weap, 1, 0.00, Req(UR_WMD)}, + {{"ChargeRPG", "LauncherUpgr", 1550000}, pM, UC_Weap, 0, 0.00, UG_Launcher, Req(UR_WMD|UR_WRD)}, + {{"HomingRPG", "LauncherUpg2", 2505010}, pM, UC_Weap, 1, 0.00, UG_Launcher, Req(UR_WMD)}, + {{"PlasLaser", "PlasmaUpgr", 2250000}, pM, UC_Weap, 0, 0.00, UG_Plasma, Req(UR_WMD)}, + {{"PartBeam", "PlasmaUpg2", 2500000}, pM, UC_Weap, 1, 0.00, UG_Plasma, Req(UR_WMD|UR_WRD)}, + {{"PunctCannon", "CannonUpgr", 5100700}, pM, UC_Weap, 0, 0.00, UG_BFG, Req(UR_WMD)}, + {{"OmegaRail", "CannonUpg2", 5800100}, pM, UC_Weap, 5, 0.00, UG_BFG, Req(UR_WMD|UR_WRD)}, + + {{"Mateba_A", "MatebaUpgr", 614100 }, pC, UC_Weap, 0, 0.00, UG_Pistol}, + {{"ShockRif_A", "ShockRifUpgr", 1519590}, pC, UC_Weap, 0, 0.00, UG_Shotgun}, + {{"ShockRif_B", "ShockRifUpg2", 1911590}, pC, UC_Weap, 0, 0.00, UG_Shotgun}, + {{"SPAS_A", "SPASUpgr", 2140400}, pC, UC_Weap, 0, 0.00, UG_SSG}, + {{"SPAS_B", "SPASUpg2", 1511100}, pC, UC_Weap, 0, 0.00, UG_SSG}, + {{"SMG_A", "SMGUpgr", 2055000}, pC, UC_Weap, 0, 0.00}, + {{"SMG_B", "SMGUpg2", 2888000}, pC, UC_Weap, 0, 0.00}, + {{"SMG_C", "SMGUpg3", 998900 }, pC, UC_Weap, 0, 0.00}, + {{"IonRifle_A", "IonRifleUpgr", 1977000}, pC, UC_Weap, 0, 0.00}, + {{"IonRifle_B", "IonRifleUpg2", 2855050}, pC, UC_Weap, 0, 0.00}, + {{"CPlasma_A", "CPlasmaUpgr", 2230500}, pC, UC_Weap, 0, 0.00, UG_Plasma}, + {{"ShipGun_A", "ShipGunUpgr", 6988800}, pC, UC_Weap, 0, 0.00, UG_BFG}, + {{"ShipGun_B", "ShipGunUpg2", 7767700}, pC, UC_Weap, 0, 0.00, UG_BFG}, + + {{"TorgueMode", null, 8000000 }, gA, UC_Extr, 8, 0.00, Req(UR_RDI)}, + {{"7777777", null, 8235430 }, gA, UC_Extr, 7, 0.10, Req(UR_RDI)}, + {{"lolsords", null, 1000000 }, gA, UC_Extr, 0, 0.20, Req(UR_RDI)}, + {{"Goldeneye", null, 70000 }, gA, UC_Extr, 0, 0.07, Req(UR_RDI)}, + + {{"Implying", null, 0 }, gA, UC_Down, 0, 0.20}, + {{"UNCEUNCE", null, 0 }, gA, UC_Down, 0, 0.30}, + {{"InstaDeath", null, 0 }, gA, UC_Down, 0, 0.50}, +}; +#undef Req + +static upgradeinfo_t UpgrInfoEx[UPGR_EXTRA_NUM]; + +static __str const UpgrCateg[UC_MAX] = { + [UC_Body] = "\CnBody", + [UC_Weap] = "\CaWeapon", + [UC_Extr] = "\CfExtra", + [UC_Down] = "\CtDowngrade" +}; + +static upgradeinfo_t *UpgrInfo; +static int UpgrMax = countof(UpgrInfoBase); + +// Static Functions ----------------------------------------------------------| + +// +// Lith_UpgrCanBuy +// +static bool Lith_UpgrCanBuy(struct player *p, shopdef_t const *, void *upgr) +{ + return !((upgrade_t *)upgr)->owned; +} + +// +// Lith_UpgrShopBuy +// +static void Lith_UpgrShopBuy(struct player *p, shopdef_t const *, void *upgr) +{ + ((upgrade_t *)upgr)->setOwned(p); +} + +// +// Lith_UpgrGive +// +static bool Lith_UpgrGive(struct player *, shopdef_t const *, void *upgr_, int tid) +{ + upgrade_t const *upgr = upgr_; + + ACS_SetUserVariable(tid, "user_upgradeid", upgr->info->key); + + switch(upgr->info->category) + { + case UC_Body: ACS_SetUserVariable(tid, "user_upgradebody", true); break; + case UC_Weap: ACS_SetUserVariable(tid, "user_upgradeweap", true); break; + default: ACS_SetUserVariable(tid, "user_upgradeextr", true); break; + } + + return true; +} + +// +// CompUpgrInfo +// +static int CompUpgrInfo(void const *lhs, void const *rhs) +{ + upgradeinfo_t const *u1 = lhs, *u2 = rhs; + int c1 = u1->category - u2->category; + if(c1 != 0) return c1; + else return u1->key - u2->key; +} + +// +// SetDataPtr +// +static void SetDataPtr(struct player *p, upgrade_t *upgr) +{ + upgr->dataptr = &p->upgrdata; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_UpgradeRegister_ +// +upgradeinfo_t *Lith_UpgradeRegister(upgradeinfo_t const *upgr) +{ + upgradeinfo_t *ui = &UpgrInfoEx[UpgrMax++ - UPGR_BASE_MAX]; + *ui = *upgr; + return ui; +} + +// +// Lith_GSReinit_Upgrade +// +void Lith_GSReinit_Upgrade(void) +{ + for(int i = 0; i < UpgrMax; i++) + { + upgradeinfo_t *ui = &UpgrInfo[i]; + + // Set up static function pointers + ui->Init = SetDataPtr; // this is set again by UpgrReinit + + ui->shopBuy = Lith_UpgrShopBuy; + ui->shopCanBuy = Lith_UpgrCanBuy; + ui->shopGive = Lith_UpgrGive; + + // Set up individual upgrades' function pointers + switch(ui->key) + { + #define Ret(n) continue; + #define Fn_F(n, cb) ui->cb = Upgr_##n##_##cb; + #define Fn_S(n, cb) Fn_F(n, cb) + #include "lith_upgradefuncs.h" + continue; + } + } +} + +// +// Lith_GSInit_Upgrade +// +void Lith_GSInit_Upgrade(void) +{ + for(int i = 0; i < countof(UpgrInfoBase); i++) + UpgrInfoBase[i].key = i; + + UpgrInfo = Calloc(UpgrMax, sizeof(upgradeinfo_t)); + memmove(UpgrInfo, UpgrInfoBase, sizeof(UpgrInfoBase)); + + for(int i = 0; i < countof(UpgrInfoEx); i++) + if(UpgrInfoEx[i].name != null) + UpgrInfo[UPGR_BASE_MAX + i] = UpgrInfoEx[i]; + + qsort(UpgrInfo, UpgrMax, sizeof(upgradeinfo_t), CompUpgrInfo); + + for(int i = 0; i < UpgrMax; i++) + UpgrInfo[i].id = i; + + Lith_GSReinit_Upgrade(); +} + +// +// Lith_UpgrSetOwned +// +void Lith_UpgrSetOwned(struct player *p, upgrade_t *upgr) +{ + if(upgr->owned) return; + + upgr->owned = true; + p->upgradesowned++; + + if(upgr->info->category == UC_Body && upgr->info->cost == 0) + upgr->toggle(p); +} + +// +// Lith_PlayerInitUpgrades +// +[[__call("ScriptS")]] +void Lith_PlayerInitUpgrades(struct player *p) +{ + #define CheckPClass() (UpgrInfo[i].pclass & p->pclass) + for(int i = 0; i < UpgrMax; i++) + if(CheckPClass()) + p->upgrmax++; + + upgrademap_t_ctor(&p->upgrademap, p->upgrmax, 1); + + for(int i = 0; i < countof(p->upgrades); i++) + p->upgrades[i] = (upgrade_t){}; + + for(int i = 0, j = 0; i < UpgrMax; i++) + if(CheckPClass()) + { + upgrade_t *upgr = &p->upgrades[j]; + + UpgrInfo[i].Init(p, upgr); + upgr->info = &UpgrInfo[i]; + + p->upgrademap.insert(upgr); + + if(upgr->info->cost == 0 || world.dbgUpgr) + Lith_UpgrBuy(p, upgr, true, true); + + j++; + } + + p->upgrinit = true; + #undef CheckPClass +} + +// +// Lith_PlayerDeallocUpgrades +// +void Lith_PlayerDeallocUpgrades(struct player *p) +{ + upgrademap_t_dtor(&p->upgrademap); + p->upgrmax = 0; + + for(int i = 0; i < countof(p->upgrades); i++) + p->upgrades[i] = (upgrade_t){}; + + p->upgrinit = false; +} + +// +// Lith_PlayerDeinitUpgrades +// +void Lith_PlayerDeinitUpgrades(struct player *p) +{ + ForUpgrade(upgr) + if(upgr->active) + upgr->wasactive = true, upgr->toggle(p); +} + +// +// Lith_PlayerReinitUpgrades +// +void Lith_PlayerReinitUpgrades(struct player *p) +{ + ForUpgrade(upgr) + if(upgr->wasactive) + upgr->wasactive = false, upgr->toggle(p); +} + +// +// Lith_PlayerUpdateUpgrades +// +[[__call("ScriptS")]] +void Lith_PlayerUpdateUpgrades(struct player *p) +{ + ForUpgrade(upgr) + if(upgr->active && upgr->info->Update) + upgr->info->Update(p, upgr); +} + +// +// Lith_PlayerRenderUpgrades +// +[[__call("ScriptS")]] +void Lith_PlayerRenderUpgrades(struct player *p) +{ + ForUpgrade(upgr) if(upgr->active && upgr->info->Render) + { + ACS_SetHudSize(320, 240); + ACS_SetHudClipRect(0, 0, 0, 0); + upgr->info->Render(p, upgr); + } +} + +// +// Lith_PlayerEnterUpgrades +// +void Lith_PlayerEnterUpgrades(struct player *p) +{ + ForUpgrade(upgr) + if(upgr->active && upgr->info->Enter) + upgr->info->Enter(p, upgr); +} + +// +// Lith_UpgrCanActivate +// +bool Lith_UpgrCanActivate(struct player *p, upgrade_t *upgr) +{ + if(!upgr->active) + { + if((p->pclass == pcl_marine && + CheckRequires_AI || + CheckRequires_WMD || + CheckRequires_WRD || + CheckRequires_RDI || + CheckRequires_RA) || + p->cbi.pruse + upgr->info->perf > world.cbiperf) + { + return false; + } + } + + return upgr->owned; +} + +// +// Lith_UpgrToggle +// +bool Lith_UpgrToggle(struct player *p, upgrade_t *upgr) +{ + if(!upgr->canUse(p)) return false; + + upgr->active = !upgr->active; + + if(upgr->active) p->cbi.pruse += upgr->info->perf; + else p->cbi.pruse -= upgr->info->perf; + + if(upgr->active && upgr->info->group) + ForUpgrade(other) + if(other != upgr && other->active && other->info->group == upgr->info->group) + other->toggle(p); + + if(upgr->active) + { + if(upgr->info->Activate) + upgr->info->Activate(p, upgr); + + p->scoremul += upgr->info->scoreadd; + } + else + { + if(upgr->info->Deactivate) + upgr->info->Deactivate(p, upgr); + + p->scoremul -= upgr->info->scoreadd; + } + + return true; +} + +// GUI -----------------------------------------------------------------------| + +// +// GUIUpgradesList +// +static void GUIUpgradesList(gui_state_t *g, struct player *p) +{ + if(Lith_GUI_Button(g, .x = 90, 213, Pre(btnprev))) + if(CBIState(g)->upgrfilter-- <= 0) + CBIState(g)->upgrfilter = UC_MAX; + + if(Lith_GUI_Button(g, .x = 90 + guipre.btnprev.w, 213, Pre(btnnext))) + if(CBIState(g)->upgrfilter++ >= UC_MAX) + CBIState(g)->upgrfilter = 0; + + int numbtns = p->upgrmax + UC_MAX; + int filter = CBIState(g)->upgrfilter - 1; + + if(filter != -1) + { + numbtns = 0; + for(int i = 0; i < p->upgrmax; i++) + if(p->upgrades[i].info->category == filter) + numbtns++; + + HudMessageF("CBIFONT", "Filter: %S", UpgrCateg[filter]); + } + else + HudMessageF("CBIFONT", "Filter: \CjAll"); + HudMessagePlain(g->hid--, 15.1, 215.1, TS); + + Lith_GUI_ScrollBegin(g, &CBIState(g)->upgrscr, 15, 36, guipre.btnlist.w, 178, guipre.btnlist.h * numbtns); + + int curcategory = -1; + + for(int i = 0, y = -guipre.btnlist.h; i < p->upgrmax; i++) + { + upgrade_t *upgr = &p->upgrades[i]; + + if(filter != -1) + {if(upgr->info->category != filter) continue;} + else if(upgr->info->category != curcategory) + { + curcategory = upgr->info->category; + y += guipre.btnlist.h; + //TODO + //PrintTextStr(UpgrCateg[curcategory]); + //PrintText("CBIFONT", CR_WHITE, g->ox + 4,1, y + g->oy + 1,1); + } + + y += guipre.btnlist.h; + + if(Lith_GUI_ScrollOcclude(g, &CBIState(g)->upgrscr, y, guipre.btnlist.h)) + continue; + + __str color; + if(!upgr->owned && !p->canBuy(&upgr->info->shopdef, upgr)) + color = "u"; + else switch(upgr->info->key) + { + case UPGR_TorgueMode: color = "g"; break; + default: color = null; + } + + gui_button_preset_t const *preset; + if(upgr->active) preset = &guipre.btnlistactivated; + else if(upgr->owned) preset = &guipre.btnlistactive; + else preset = &guipre.btnlistsel; + + __str name = Language("LITH_TXT_UPGRADE_TITLE_%S", upgr->info->name); + + int *upgrsel = &CBIState(g)->upgrsel; + if(Lith_GUI_Button_Id(g, i, name, 0, y, i == *upgrsel, .color = color, .preset = preset)) + *upgrsel = i; + } + + Lith_GUI_ScrollEnd(g, &CBIState(g)->upgrscr); +} + +// +// GUIUpgradeRequirements +// +static void GUIUpgradeRequirements(gui_state_t *g, struct player *p, upgrade_t *upgr) +{ + int y = 0; + + #define Req(name) \ + { \ + HudMessageF("CBIFONT", "\CgRequires " name "."); \ + HudMessagePlain(g->hid--, 111.1, 200 + y + 0.2, TS); \ + y -= 10; \ + } + + if(CheckRequires_AI) Req("Armor Interface") + if(CheckRequires_WMD) Req("Weapon Modification Device") + if(CheckRequires_WRD) Req("Weapon Refactoring Device") + if(CheckRequires_RDI) Req("Reality Distortion Interface") + if(CheckRequires_RA) Req("Reactive Armor") + + #undef Req + + // Performance rating + if(upgr->info->perf && p->pclass != pcl_cybermage) + { + bool over = upgr->info->perf + p->cbi.pruse > world.cbiperf; + + if(upgr->active) + HudMessageF("CBIFONT", "Disabling saves \Cn%i\CbPerf\C-.", upgr->info->perf); + else if(over) + HudMessageF("CBIFONT", "Activating requires \Ca%i\CbPerf\C-.", upgr->info->perf); + else + HudMessageF("CBIFONT", "Activating will use \Cj%i\CbPerf\C-.", upgr->info->perf); + + HudMessagePlain(g->hid--, 111.1, 200 + y + 0.2, TS); + y -= 10; + } + + // Score multiplier + if(upgr->info->scoreadd != 0) + { + char cr; + __str op; + bool chk; + + if(upgr->active) {chk = upgr->info->scoreadd > 0; op = "Disabling";} + else {chk = upgr->info->scoreadd < 0; op = "Enabling" ;} + + int perc = abs(ceilk(100.0 * upgr->info->scoreadd)); + if(chk) {cr = 'a'; perc = 100 - perc;} + else {cr = 'n'; perc = 100 + perc;} + + HudMessageF("CBIFONT", "%S will multiply score by \C%c%i\C-%%", op, cr, perc); + HudMessagePlain(g->hid--, 111.1, 200 + y + 0.2, TS); + y -= 10; + } +} + +// +// GUIUpgradeDescription +// +static void GUIUpgradeDescription(gui_state_t *g, struct player *p, upgrade_t *upgr) +{ + ACS_SetHudClipRect(111, 30, 190, 170, 184); + + // Cost + __str mark; + __str cost; + + switch(upgr->info->key) + { + case UPGR_lolsords: mark = "\Cjfolds"; break; + case UPGR_TorgueMode: mark = "\Cd$"; break; + default: mark = "\Cnscr"; break; + } + + if(upgr->info->cost) cost = StrParam("%S%S", Lith_ScoreSep(p->getCost(&upgr->info->shopdef)), mark); + else cost = "Free"; + + HudMessageF("CBIFONT", "%S", cost); + HudMessagePlain(g->hid--, 111.1, 30.1, TS); + + // Category + HudMessageF("CBIFONT", "%S", UpgrCateg[upgr->info->category]); + HudMessagePlain(g->hid--, 111.1, 40.1, TS); + + // Effect + ifauto(__str, effect, LanguageNull("LITH_TXT_UPGRADE_EFFEC_%S", upgr->info->name)) + HudMessageF("CBIFONT", "Effect: %S", effect); + HudMessageParams(HUDMSG_PLAIN, g->hid--, CR_WHITE, 111.1, 50.1, TS); + + ACS_SetHudClipRect(0, 0, 0, 0); +} + +// +// GUIUpgradeButtons +// +static void GUIUpgradeButtons(gui_state_t *g, struct player *p, upgrade_t *upgr) +{ + if(Lith_GUI_Button(g, "Buy", 111, 205, !p->canBuy(&upgr->info->shopdef, upgr))) + Lith_UpgrBuy(p, upgr, false); + + if(Lith_GUI_Button(g, upgr->active ? "Deactivate" : "Activate", 111 + guipre.btndef.w + 2, 205, !upgr->canUse(p))) + upgr->toggle(p); +} + +// +// Lith_CBITab_Upgrades +// +void Lith_CBITab_Upgrades(gui_state_t *g, struct player *p) +{ + GUIUpgradesList(g, p); + + upgrade_t *upgr = &p->upgrades[CBIState(g)->upgrsel]; + + GUIUpgradeDescription (g, p, upgr); + GUIUpgradeButtons (g, p, upgr); + GUIUpgradeRequirements(g, p, upgr); +} + +// EOF diff --git a/source/Main/p_weaponinfo.c b/source/Main/p_weaponinfo.c new file mode 100644 index 0000000..df4e66b --- /dev/null +++ b/source/Main/p_weaponinfo.c @@ -0,0 +1,121 @@ +// This file was generated by wepc. +// Edit only if you aren't going to recompile. +#include "lith_player.h" + +// Extern Objects ------------------------------------------------------------| + +#define Placeholder1 "MMMMHMHMMMHMMM" +#define Placeholder2 "YOUSONOFABITCH" +#define A(a) "Lith_" a "Ammo" +#define P(a) "weapons/" a "/pickup" +#define N(a) .classname = "Lith_" a, .name = a +#define F(...) .flags = __VA_ARGS__ +#define FN(a) .classname = "FD" a, .name = a +#define FDClass(cname) \ + {1, pcl_fdoomer, FN(cname "Fist"), "YOUSONOFABITCH", AT_None}, \ + {1, pcl_fdoomer, FN(cname "Chainsaw"), P("cfist"), AT_None}, \ + {2, pcl_fdoomer, FN(cname "Pistol"), P("pistol"), AT_Ammo, "FD" cname "PistolAmmo"}, \ + {3, pcl_fdoomer, FN(cname "Shotgun"), P("shotgun"), AT_Ammo, "FD" cname "Shells"}, \ + {3, pcl_fdoomer, FN(cname "SuperShotgun"), P("ssg"), AT_Ammo, "FD" cname "Shells"}, \ + {4, pcl_fdoomer, FN(cname "Chaingun"), P("rifle"), AT_Ammo, "FD" cname "Bullets"}, \ + {5, pcl_fdoomer, FN(cname "RocketLauncher"), P("rocket"), AT_Ammo, "FD" cname "Rocket"}, \ + {6, pcl_fdoomer, FN(cname "PlasmaRifle"), P("plasma"), AT_Ammo, "FD" cname "Cell"}, \ + {7, pcl_fdoomer, FN(cname "BFG9000"), P("cannon"), AT_Ammo, "FD" cname "BFGCharge"}, +weaponinfo_t const weaponinfo[weapon_max] = { + {0, pcl_any, null, "MMMMHMHMMMHMMM"}, + + {1, pcl_outcasts, N("ChargeFist"), P("cfist"), AT_None}, + {5, pcl_outcasts, N("MissileLauncher"), P("missile"), AT_AMag, A("Rocket")}, + {6, pcl_outcasts, N("PlasmaDiffuser"), P("plasdiff"), AT_Ammo, A("Plasma")}, + {1, pcl_marine, N("Fist"), Placeholder1, AT_None}, + {2, pcl_marine, N("Pistol"), P("pistol"), AT_NMag}, + {2, pcl_marine, N("Revolver"), P("revolver"), AT_NMag}, + {3, pcl_marine, N("Shotgun"), P("shotgun"), AT_None}, + {3, pcl_marine, N("LazShotgun"), P("lshotgun"), AT_None}, + {3, pcl_marine, N("SuperShotgun"), P("ssg"), AT_Ammo, A("Shell")}, + {4, pcl_marine, N("CombatRifle"), P("rifle"), AT_NMag}, + {4, pcl_marine, N("SniperRifle"), P("sniper"), AT_NMag}, + {5, pcl_marine, N("GrenadeLauncher"), P("rocket"), AT_Ammo, A("Rocket")}, + {6, pcl_marine, N("PlasmaRifle"), P("plasma"), AT_Ammo, A("Plasma")}, + {7, pcl_marine, N("BFG9000"), P("cannon"), AT_Ammo, A("Cannon")}, + {1, pcl_cybermage, N("CFist"), Placeholder2, AT_None}, + {2, pcl_cybermage, N("Mateba"), P("mateba"), AT_NMag}, + {3, pcl_cybermage, N("ShockRifle"), P("erifle"), AT_NMag}, + {3, pcl_cybermage, N("SPAS"), P("cshotgun"), AT_AMag, A("Shell")}, + {4, pcl_cybermage, N("SMG"), P("smg"), AT_NMag}, + {5, pcl_cybermage, N("IonRifle"), P("ionrifle"), AT_AMag, A("Rocket")}, + {6, pcl_cybermage, N("CPlasmaRifle"), P("plasma"), AT_Ammo, A("Plasma")}, + {7, pcl_cybermage, N("StarDestroyer"), P("shipgun"), AT_Ammo, A("Cannon")}, + {0, pcl_cybermage, N("Blade"), Placeholder1, AT_Ammo, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("Delear"), Placeholder1, AT_AMag, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("Feuer"), Placeholder1, AT_Ammo, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("Rend"), Placeholder1, AT_Ammo, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("Hulgyon"), Placeholder1, AT_Ammo, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("StarShot"), Placeholder1, AT_AMag, "Lith_Mana", F(wf_magic)}, + {0, pcl_cybermage, N("Cercle"), Placeholder1, AT_Ammo, "Lith_Mana", F(wf_magic)}, + + FDClass("Plut") + FDClass("TNT") + FDClass("Doom2") + FDClass("Aliens") + FDClass("JPCP") + FDClass("BTSX") +}; +#undef FDClass + +// Extern Functions ----------------------------------------------------------| + +int Lith_WeaponFromName(struct player *p, int name) +{ + switch(p->pclass) + { + case pcl_marine: + switch(name) { + case wepnam_fist: return weapon_fist; + case wepnam_chainsaw: return weapon_cfist; + case wepnam_pistol: return weapon_pistol; + case wepnam_shotgun: return weapon_shotgun; + case wepnam_supershotgun: return weapon_ssg; + case wepnam_chaingun: return weapon_rifle; + case wepnam_rocketlauncher: return weapon_launcher; + case wepnam_plasmarifle: return weapon_plasma; + case wepnam_bfg9000: return weapon_bfg; + } + case pcl_cybermage: + switch(name) { + case wepnam_fist: return weapon_c_fist; + case wepnam_chainsaw: return weapon_cfist; + case wepnam_pistol: return weapon_c_mateba; + case wepnam_shotgun: return weapon_c_rifle; + case wepnam_supershotgun: return weapon_c_spas; + case wepnam_chaingun: return weapon_c_smg; + case wepnam_rocketlauncher: return weapon_c_sniper; + case wepnam_plasmarifle: return weapon_c_plasma; + case wepnam_bfg9000: return weapon_c_shipgun; + } + + case pcl_fdoomer: + #define FDClass(cname, ctype) \ + if(p->pcstr == "FD" cname "Player") \ + switch(name) { \ + case wepnam_fist: return weapon_fd_##ctype##_fist; \ + case wepnam_chainsaw: return weapon_fd_##ctype##_chainsaw; \ + case wepnam_pistol: return weapon_fd_##ctype##_pistol; \ + case wepnam_shotgun: return weapon_fd_##ctype##_shotgun; \ + case wepnam_supershotgun: return weapon_fd_##ctype##_ssg; \ + case wepnam_chaingun: return weapon_fd_##ctype##_chaingun; \ + case wepnam_rocketlauncher: return weapon_fd_##ctype##_launcher; \ + case wepnam_plasmarifle: return weapon_fd_##ctype##_plasma; \ + case wepnam_bfg9000: return weapon_fd_##ctype##_bfg; \ + } + FDClass("Plut", plut) + FDClass("TNT", tnt) + FDClass("Doom2", doom2) + FDClass("Aliens", aliens) + FDClass("JPCP", jpcp) + FDClass("BTSX", btsx) + #undef FDClass + } +} + +// EOF diff --git a/source/Main/p_weapons.c b/source/Main/p_weapons.c new file mode 100644 index 0000000..f645951 --- /dev/null +++ b/source/Main/p_weapons.c @@ -0,0 +1,393 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=110 +#include "lith_player.h" +#include "lith_monster.h" +#include "lith_hudid.h" + +#include <math.h> + +// Static Functions ----------------------------------------------------------| + +// +// GiveWeaponItem +// +static void GiveWeaponItem(int parm, int slot) +{ + switch(parm) + { + case weapon_c_fist: + case weapon_fist: InvGive("Lith_Death", 1); break; + case weapon_c_spas: InvGive("Lith_ShellAmmo", 8); break; + case weapon_ssg: InvGive("Lith_ShellAmmo", 4); break; + case weapon_c_sniper: InvGive("Lith_RocketAmmo", 6); break; + case weapon_launcher: InvGive("Lith_RocketAmmo", 2); break; + case weapon_c_plasma: + case weapon_plasma: InvGive("Lith_PlasmaAmmo", 1500); break; + case weapon_c_shipgun: InvGive("Lith_CannonAmmo", 5); break; + case weapon_bfg: InvGive("Lith_CannonAmmo", 4); break; + + case weapon_fd_jpcp_chainsaw: + InvGive("FDGotChainsaw", 1); + break; + } + + if(parm > weapon_max_lith) switch(slot) + { + case 2: InvGive("Lith_BulletAmmo", 20); break; + case 3: InvGive("Lith_ShellAmmo", 10); break; + case 4: InvGive("Lith_BulletAmmo", 40); break; + case 5: InvGive("Lith_RocketAmmo", 5); break; + case 6: InvGive("Lith_PlasmaAmmo", 50); break; + case 7: InvGive("Lith_CannonAmmo", 2); break; + } +} + +// +// WeaponGrab +// +static void WeaponGrab(struct player *p, weaponinfo_t const *info) +{ + if(!p->getUpgrActive(UPGR_7777777)) ACS_LocalAmbientSound(info->pickupsound, 127); + else ACS_LocalAmbientSound("marathon/pickup", 127); + + switch(info->slot) + { + default: Lith_FadeFlash(255, 255, 255, 0.5, 0.4); break; + case 3: Lith_FadeFlash(0, 255, 0, 0.5, 0.5); break; + case 4: Lith_FadeFlash(255, 255, 0, 0.5, 0.5); break; + case 5: Lith_FadeFlash(255, 64, 0, 0.5, 0.6); break; + case 6: Lith_FadeFlash(0, 0, 255, 0.5, 0.6); break; + case 7: Lith_FadeFlash(255, 0, 0, 0.5, 0.7); break; + } +} + +// +// Lith_PickupScore +// +static void Lith_PickupScore(struct player *p, int parm) +{ + weaponinfo_t const *info = &weaponinfo[parm]; + + i96 score = 4000 * info->slot; + + GiveWeaponItem(parm, info->slot); + score = p->giveScore(score); + + if(info->type < weapon_max_lith) + p->log("> Sold the %S for %lli\Cnscr\C-.", Language("LITH_TXT_INFO_SHORT_%S", info->name), score); + else + p->log("> Sold the slot %i weapon for %lli\Cnscr\C-.", info->slot, score); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_WeaponPickup +// +[[__call("ScriptS"), __extern("ACS")]] +bool Lith_WeaponPickup(int name) +{ + extern void Lith_PickupMessage(struct player *p, weaponinfo_t const *info); + extern int Lith_WeaponFromName(struct player *p, int name); + + struct player *p = LocalPlayer; + if(NoPlayer(p)) return false; + + bool weaponstay = ACS_GetCVar("sv_weaponstay"); + int parm = weapon_unknown; + + parm = Lith_WeaponFromName(p, name); + + if(parm >= weapon_max || parm < weapon_min) + return true; + + weaponinfo_t const *info = &weaponinfo[parm]; + + if(HasWeapon(p, parm)) + { + if(!weaponstay) { + WeaponGrab(p, info); + Lith_PickupScore(p, parm); + } + + return !weaponstay; + } + else + { + WeaponGrab(p, info); + + p->weaponsheld++; + p->bipUnlock(info->name); + + GiveWeaponItem(parm, info->slot); + Lith_PickupMessage(p, info); + + if(info->type != weapon_fd_jpcp_chainsaw) // fuck a bitch + InvGive(info->classname, 1); + + return !weaponstay; + } +} + +// +// Lith_CircleSpread +// +[[__call("ScriptS"), __extern("ACS")]] +fixed Lith_CircleSpread(fixed mdx, fixed mdy, bool getpitch) +{ + static fixed A; + static fixed P; + + if(!getpitch) + { + fixed dx = ACS_RandomFixed(mdx, 0.0); + fixed dy = ACS_RandomFixed(mdy, 0.0); + fixed a = ACS_RandomFixed(1.0, -1.0); + + A = ACS_Sin(a) * dx; + P = ACS_Cos(a) * dy; + + return A; + } + else + return P; +} + +// +// Lith_ChargeFistDamage +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_ChargeFistDamage() +{ + int amount = InvNum("Lith_FistCharge"); + InvTake("Lith_FistCharge", 0x7FFFFFFF); + return amount * ACS_Random(1, 3); +} + +// +// Lith_GSInit_Weapon +// +void Lith_GSInit_Weapon(void) +{ + for(int i = 0; i < weapon_max; i++) + { + weaponinfo_t *info = (weaponinfo_t *)&weaponinfo[i]; + info->type = i; + } +} + +// +// Lith_PlayerPreWeapons +// +// Update information on what weapons we have. +// +[[__call("ScriptS")]] +void Lith_PlayerPreWeapons(struct player *p) +{ + weapondata_t *w = &p->weapon; + + w->prev = w->cur; + + // Reset data temporarily. + w->cur = null; + for(int i = 0; i < SLOT_MAX; i++) + w->slot[i] = 0; + + // Iterate over each weapon setting information on it. + for(int i = weapon_min; i < weapon_max; i++) + { + weaponinfo_t const *info = &weaponinfo[i]; + invweapon_t *wep = &w->inv[i]; + + if(!(p->pclass & info->pclass) || !(wep->owned = InvNum(info->classname))) + continue; + + w->slot[info->slot] += wep->owned; + + // Check for currently held weapon. + if(!w->cur && p->weaponclass == info->classname) + w->cur = wep; + + wep->info = info; + wep->ammotype = info->defammotype; + wep->ammoclass = info->defammoclass; + + // Special exceptions. + switch(i) + { + case weapon_shotgun: + if(p->getUpgrActive(UPGR_GaussShotty)) { + wep->ammotype = AT_NMag; + wep->ammoclass = "Lith_GaussShotsFired"; + } + break; + case weapon_c_spas: + if(p->getUpgrActive(UPGR_SPAS_B)) + wep->ammotype = AT_Ammo; + break; + case weapon_c_smg: + if(p->getUpgrActive(UPGR_SMG_A)) + wep->ammoclass = "Lith_SMGShotsFired2"; + break; + } + + // Set magazine class if this weapon doesn't take ammo. + if(wep->ammotype & AT_NMag && !(wep->ammotype & AT_Ammo)) + wep->magclass = wep->ammoclass; + + // Check for currently held weapon. + if(!w->cur && ACS_StrICmp(p->weaponclass, info->classname) == 0) + w->cur = wep; + + // Remove inactive magic weapons. + else if(info->flags & wf_magic && ++wep->magictake > 20) + { + InvTake(info->classname, 1); + wep->magictake = 0; + continue; + } + + // Auto-reload anything else. + if(p->autoreload && wep->ammotype & AT_NMag && !(info->flags & wf_magic)) + { + if(wep->autoreload >= 35 * 5) + ACS_TakeInventory(wep->magclass, 999); + + if(w->cur != wep) wep->autoreload++; + else wep->autoreload = 0; + } + } + + if(!w->cur) w->cur = &w->inv[weapon_unknown]; +} + +// +// Lith_PlayerUpdateWeapons +// +[[__call("ScriptS")]] +void Lith_PlayerUpdateWeapons(struct player *p) +{ + __with(int heat = ACS_CheckInventory("Lith_SMGHeat");) { + if(heat < 100) ACS_TakeInventory("Lith_SMGHeat", 5); + else if(heat < 200) ACS_TakeInventory("Lith_SMGHeat", 4); + else if(heat < 300) ACS_TakeInventory("Lith_SMGHeat", 3); + else if(heat < 400) ACS_TakeInventory("Lith_SMGHeat", 2); + else ACS_TakeInventory("Lith_SMGHeat", 1); + } + + if(p->weapontype == weapon_c_delear) + ACS_GiveInventory("Lith_DelearSpriteDisplay", 1); +} + +// +// Lith_AmmoRunOut +// +[[__call("ScriptS"), __extern("ACS")]] +fixed Lith_AmmoRunOut(bool ro, fixed mul) +{ + withplayer(LocalPlayer) + { + __str cl = p->weapon.cur->magclass; + fixed inv = InvNum(cl) / (fixed)InvMax(cl); + mul = mul ? mul : 1.2; + if(ro) inv = inv * mul; + else inv = mul - inv * 0.35; + return minmax(inv, 0.0, 1.0); + } + + return 0; +} + +// +// Lith_GetFinalizerMaxHealth +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_GetFinalizerMaxHealth(void) +{ + int sh = ACS_GetActorProperty(0, APROP_SpawnHealth); + + ifauto(dmon_t *, m, DmonPtr()) + return sh + (m->maxhealth - sh) * 0.5; + else + return sh; +} + +// +// Lith_SwitchRifleMode +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SwitchRifleFiremode(void) +{ + withplayer(LocalPlayer) + { + int max = rifle_firemode_max; + + if(!p->getUpgrActive(UPGR_RifleModes)) + max--; + + p->riflefiremode = ++p->riflefiremode % max; + ACS_LocalAmbientSound("weapons/rifle/firemode", 127); + } +} + +// +// Lith_ResetRifleMode +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_ResetRifleMode() +{ + withplayer(LocalPlayer) + if(p->getCVarI("lith_weapons_riflemodeclear")) + p->riflefiremode = rifle_firemode_auto; +} + +// +// Lith_SurgeOfDestiny +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SurgeOfDestiny(void) +{ + for(int i = 0; i < (35 * 7) / 2; i++) { + InvGive("Lith_SurgeOfDestiny", 1); + ACS_Delay(2); + } +} + +// +// Lith_GetWRF +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_GetWRF(void) +{ + enum + { + WRF_NOBOB = 1, + WRF_NOSWITCH = 2, + WRF_NOPRIMARY = 4, + WRF_NOSECONDARY = 8, + WRF_NOFIRE = WRF_NOPRIMARY | WRF_NOSECONDARY, + WRF_ALLOWRELOAD = 16, + WRF_ALLOWZOOM = 32, + WRF_DISABLESWITCH = 64, + WRF_ALLOWUSER1 = 128, + WRF_ALLOWUSER2 = 256, + WRF_ALLOWUSER3 = 512, + WRF_ALLOWUSER4 = 1024 + }; + + int flags = 0; + + withplayer(LocalPlayer) + { + if(p->semifrozen) + flags |= WRF_NOFIRE; + + if(p->pclass & (pcl_marine | pcl_darklord)) + flags |= WRF_ALLOWUSER4; + } + + return flags; +} + +// EOF + diff --git a/source/Main/u_7777777.c b/source/Main/u_7777777.c new file mode 100644 index 0000000..129ca6a --- /dev/null +++ b/source/Main/u_7777777.c @@ -0,0 +1,34 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_7777777_Activate(struct player *p, upgrade_t *upgr) +{ + ACS_SetActorPropertyFixed(0, APROP_Gravity, 0.0); +} + +// +// Deactivate +// +void Upgr_7777777_Deactivate(struct player *p, upgrade_t *upgr) +{ + ACS_SetActorPropertyFixed(0, APROP_Gravity, 1.0); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_7777777_Update(struct player *p, upgrade_t *upgr) +{ + fixed vel = -2; + if(p->velz > 0) vel = p->velz; + p->setVel(p->velx, p->vely, vel); +} + +// EOF + diff --git a/source/Main/u_adrenaline.c b/source/Main/u_adrenaline.c new file mode 100644 index 0000000..311fe0f --- /dev/null +++ b/source/Main/u_adrenaline.c @@ -0,0 +1,82 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_Adrenaline(upgr) +#define CHARGE_MAX (30 * 35) + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_Adrenaline_Activate(struct player *p, upgrade_t *upgr) +{ + InvTake("Lith_AdrenalineToken", 1); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_Adrenaline_Update(struct player *p, upgrade_t *upgr) +{ + // Charge + if(UData.charge < CHARGE_MAX) + UData.charge++; + + // Prepare + else if(!UData.readied) + { + ACS_PlaySound(0, "player/adren/ready", 5|CHAN_NOPAUSE|CHAN_MAYBE_LOCAL|CHAN_UI, 1.0, false, ATTN_STATIC); + p->logH(">>>>> Adrenaline injector ready."); + UData.readied = true; + } + + // Ready to use + else + { + // Ready + if(!InvNum("Lith_AdrenalineToken")) + InvGive("Lith_AdrenalineProjectileChecker", 1); + + // Use + if(InvNum("Lith_AdrenalineToken")) + { + InvTake("Lith_AdrenalineToken", 1); + + ACS_PlaySound(0, "player/adren/inj", 5|CHAN_NOPAUSE|CHAN_MAYBE_LOCAL|CHAN_UI, 1.0, false, ATTN_STATIC); + p->logH(">>>>> Adrenaline administered."); + + UData.charge = UData.readied = 0; + + InvGive("Lith_TimeHax2", 1); + ACS_Delay(36); + InvTake("Lith_TimeHax2", 1); + } + } + + InvTake("Lith_AdrenalineToken", 1); +} + +// +// Render +// +void Upgr_Adrenaline_Render(struct player *p, upgrade_t *upgr) +{ + if(!p->getUpgrActive(UPGR_HeadsUpDisp)) return; + + int timemod = p->ticks % 45; + float amt = UData.charge / (float)CHARGE_MAX; + + DrawSpriteXX(UData.readied ? ":HUD:H_D24" : ":HUD:H_D21", + HUDMSG_FADEOUT | HUDMSG_ALPHA, + hid_adrenind_fxS - timemod, + 77.1 - timemod, + 224.1, + (fixed)(0.3f * amt), + (fixed)(0.6f * amt), + 0.8); +} + +// EOF + diff --git a/source/Main/u_autoreload.c b/source/Main/u_autoreload.c new file mode 100644 index 0000000..3908e4d --- /dev/null +++ b/source/Main/u_autoreload.c @@ -0,0 +1,23 @@ +// Copyright © 2018 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_AutoReload_Activate(struct player *p, upgrade_t *upgr) +{ + p->autoreload = true; +} + +// +// Deactivate +// +void Upgr_AutoReload_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->autoreload = false; +} + +// EOF + diff --git a/source/Main/u_cyberlegs.c b/source/Main/u_cyberlegs.c new file mode 100644 index 0000000..84eef92 --- /dev/null +++ b/source/Main/u_cyberlegs.c @@ -0,0 +1,46 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_CyberLegs_Activate(struct player *p, upgrade_t *upgr) +{ + p->speedmul += 0.2; + p->jumpboost += 0.5; +} + +// +// Deactivate +// +void Upgr_CyberLegs_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->speedmul -= 0.2; + p->jumpboost -= 0.5; +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_CyberLegs_Update(struct player *p, upgrade_t *upgr) +{ + fixed absvel = absk(p->old.velz) * 10.0k; + + if(p->velz == 0 && absvel > 160) + { + for(fixed i = absvel; i >= 100; i -= 100) + { + int tid; + ACS_SpawnForced("Lith_ExplodoBoots", p->x, p->y, p->z, tid = ACS_UniqueTID()); + ACS_SetActivator(tid); + ACS_SetPointer(AAPTR_TARGET, p->tid); + p->setActivator(); + } + } +} + +// EOF + diff --git a/source/Main/u_defensenuke.c b/source/Main/u_defensenuke.c new file mode 100644 index 0000000..ee7f878 --- /dev/null +++ b/source/Main/u_defensenuke.c @@ -0,0 +1,15 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Enter +// +void Upgr_DefenseNuke_Enter(struct player *p, upgrade_t *upgr) +{ + InvGive("Lith_Nuke", 1); +} + +// EOF + diff --git a/source/Main/u_goldeneye.c b/source/Main/u_goldeneye.c new file mode 100644 index 0000000..88a2f3c --- /dev/null +++ b/source/Main/u_goldeneye.c @@ -0,0 +1,21 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_Goldeneye_Update(struct player *p, upgrade_t *upgr) +{ + if(ACS_Random(0, 0x7F) < 0x50) + { + fixed dist = ACS_RandomFixed(128, 256); + fixed angl = ACS_RandomFixed(0, 1); + ACS_SpawnForced("Lith_GEExplosion", p->x + ACS_Cos(angl) * dist, p->y + ACS_Sin(angl) * dist, p->z + 32); + } +} + +// EOF + diff --git a/source/Main/u_headsupdis2.c b/source/Main/u_headsupdis2.c new file mode 100644 index 0000000..06a2061 --- /dev/null +++ b/source/Main/u_headsupdis2.c @@ -0,0 +1,146 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Static Functions ----------------------------------------------------------| + +// +// HUD_Weapons +// +static void HUD_Weapons(struct player *p) +{ + DrawSpritePlain(":HUD_C:Bar", hid_weaponbg, 320.2, 220.2, TS); + + static int const ncolor[] = { + CR_DARKRED, + CR_DARKGREEN, + CR_BLUE + }; + + Lith_HUD_DrawWeaponSlots(p, ncolor, countof(ncolor), 'g', 323, 219); +} + +// +// HUD_Ammo +// +static void HUD_Ammo(struct player *p) +{ + invweapon_t const *wep = p->weapon.cur; + weaponinfo_t const *info = wep->info; + + __str typegfx = null; + + if(wep->ammotype & AT_NMag) + { + int max = ACS_GetMaxInventory(0, wep->magclass); + int cur = ACS_CheckInventory(wep->magclass); + + typegfx = ":HUD_C:MAG"; + HudMessageF("LHUDFONT", "%i/%i", max - cur, max); + HudMessageParams(0, hid_ammo1, CR_DARKRED, 242.1, 229.0, TS); + } + + if(wep->ammotype & AT_Ammo && !(wep->info->flags & wf_magic)) + { + int x = 0; + + if(wep->ammotype & AT_NMag) { + DrawSpritePlain(":HUD_C:Back", hid_ammobg2, 240.2, 238.2, TS); + x = -58; + } + + typegfx = ":HUD_C:AMMO"; + HudMessageF("LHUDFONT", "%i", ACS_CheckInventory(wep->ammoclass)); + HudMessageParams(0, hid_ammo2, CR_DARKRED, x+242.1, 229.0, TS); + } + + if(typegfx) { + DrawSpritePlain(":HUD_C:SplitFront", hid_ammobg1, 320.2, 238.2, TS); + DrawSpritePlain(typegfx, hid_ammotype, 316.2, 235.2, TS); + } + + if(p->weapontype == weapon_c_smg) + { + DrawSpritePlain(":HUD_C:BarSmall", hid_rifleheatbg, 320.2, 205.2, TS); + ACS_SetHudClipRect(320-63, 205-9, (ACS_CheckInventory("Lith_SMGHeat")/500.k) * 63, 9); + DrawSpritePlain(":HUD_C:HeatBar", hid_rifleheat, 320.2, 205.2, TS); + ACS_SetHudClipRect(0, 0, 0, 0); + } +} + +// +// HUD_Health +// +static void HUD_Health(struct player *p) +{ + DrawSpritePlain(":HUD_C:SplitBack", hid_healthbg, 0.1, 239.2, TS); + + if(p->dead) HudMessageF("LHUDFONT", "---"); + else HudMessageF("LHUDFONT", "%i", p->health); + HudMessageParams(0, hid_health, CR_DARKRED, 21.1, 229.0, TS); + + DrawSpritePlain(":HUD_C:VIT", hid_healthtxt, 2.1, 237.2, TS); +} + +// +// HUD_Score +// +static void HUD_Score(struct player *p) +{ + HudMessageF("CNFONT", "\Ca%S\Cnscr", Lith_ScoreSep(p->score)); + HudMessageParams(HUDMSG_PLAIN, hid_score, CR_WHITE, 160.0, 3.1, 0.1); +} + +// +// HUD_KeyInd +// +static void HUD_KeyInd(struct player *p) +{ + if(p->keys.rs) DrawSpriteAlpha(":HUD:H_KS1", hid_key_redskull, 180.2, 11.1, 0.1, 0.8); + if(p->keys.ys) DrawSpriteAlpha(":HUD:H_KS2", hid_key_yellowskull, 170.2, 11.1, 0.1, 0.8); + if(p->keys.bs) DrawSpriteAlpha(":HUD:H_KS3", hid_key_blueskull, 160.2, 10.1, 0.1, 0.8); + if(p->keys.rc) DrawSpriteAlpha(":HUD:H_KC1", hid_key_red, 150.2, 10.1, 0.1, 0.8); + if(p->keys.yc) DrawSpriteAlpha(":HUD:H_KC2", hid_key_yellow, 140.2, 11.1, 0.1, 0.8); + if(p->keys.bc) DrawSpriteAlpha(":HUD:H_KC3", hid_key_blue, 130.2, 12.1, 0.1, 0.8); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_HeadsUpDis2_Activate(struct player *p, upgrade_t *upgr) +{ + p->hudenabled = true; +} + +// +// Disable +// +void Upgr_HeadsUpDis2_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->hudenabled = false; +} + +// +// Render +// +void Upgr_HeadsUpDis2_Render(struct player *p, upgrade_t *upgr) +{ + // Log + Lith_HUD_Log(p); + + // Inventory + HUD_KeyInd(p); + + if(p->getCVarI("lith_hud_showscore")) + HUD_Score(p); + if(p->getCVarI("lith_hud_showweapons")) + HUD_Weapons(p); + + // Status + HUD_Ammo(p); + HUD_Health(p); +} + +// EOF + diff --git a/source/Main/u_headsupdisp.c b/source/Main/u_headsupdisp.c new file mode 100644 index 0000000..33620bb --- /dev/null +++ b/source/Main/u_headsupdisp.c @@ -0,0 +1,242 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_HeadsUpDisp(upgr) + +// Static Functions ----------------------------------------------------------| + +// +// HUD_IndicatorLine +// +static void HUD_IndicatorLine(struct player *p, __str image, int hid, int yadd) +{ + int pos = (8 + p->ticks) % 57; + + if(pos < 11) + yadd += 11 - (pos % 12); + + DrawSpriteFade(image, hid, 88.1 - pos, 214.1 + yadd, 0.2, 0.7); +} + +// +// HUD_Weapons +// +static void HUD_Weapons(struct player *p) +{ + DrawSpritePlain(":HUD:Bar", hid_weaponbg, 279.2, 238.2, TS); + + static int const ncolor[] = { + CR_UNTRANSLATED, + CR_LIGHTBLUE, + CR_BRICK + }; + + Lith_HUD_DrawWeaponSlots(p, ncolor, countof(ncolor), 'k', 282, 237); +} + +// +// HUD_Ammo +// +static void HUD_Ammo(struct player *p) +{ + invweapon_t const *wep = p->weapon.cur; + weaponinfo_t const *info = wep->info; + + __str typegfx = null; + __str typebg; + + int y; + + if(p->getCVarI("lith_hud_showweapons")) { + typebg = ":HUD:SplitRight"; + y = 14; + } else { + typebg = ":HUD:SplitFront"; + y = 0; + } + + if(wep->ammotype & AT_NMag) + { + int max = ACS_GetMaxInventory(0, wep->magclass); + int cur = ACS_CheckInventory(wep->magclass); + + typegfx = ":HUD:MAG"; + HudMessageF("LHUDFONT", "%i/%i", max - cur, max); + HudMessagePlain(hid_ammo1, 224.1, 229.0-y, TS); + } + + if(wep->ammotype & AT_Ammo) + { + int x = 0; + + if(wep->ammotype & AT_NMag) { + DrawSpritePlain(":HUD:BarBig", hid_ammobg2, 220.2, 238.2-y, TS); + x = -59; + } + + typegfx = ":HUD:AMMO"; + HudMessageF("LHUDFONT", "%i", ACS_CheckInventory(wep->ammoclass)); + HudMessagePlain(hid_ammo2, x+224.1, 229.0-y, TS); + } + + if(typegfx) + { + DrawSpritePlain(typebg, hid_ammotypebg, 320.2, 238.2, TS); + DrawSpritePlain(":HUD:BarBig", hid_ammobg1, 279.2, 238.2-y, TS); + + DrawSpritePlain(typegfx, hid_ammotype, 282.1, 236.2, TS); + } +} + +// +// HUD_Health +// +static void HUD_Health(struct player *p) +{ + static __str weapongfx[SLOT_MAX] = { + [0] = ":HUD:H_D27", + [1] = ":HUD:H_D28", + [2] = ":HUD:H_D24", + [3] = ":HUD:H_D23", + [4] = ":HUD:H_D22", + [5] = ":HUD:H_D21", + [6] = ":HUD:H_D25", + [7] = ":HUD:H_D26" + }; + + DrawSpritePlain( + ACS_CheckInventory("PowerStrength") ? ":HUD:SplitBackRed" : ":HUD:SplitBack", + hid_healthbg, 0.1, 239.2, TS); + + if(p->dead) HudMessageF("LHUDFONT", "---"); + else HudMessageF("LHUDFONT", "%i", p->health); + + HudMessagePlain(hid_health, 34.1, 231.0, TS); + + DrawSpritePlain(":HUD:VIT", hid_healthtxt, 2.1, 237.2, TS); + + if(!p->dead) + { + int cr = 0; + fixed ft; + + if(p->health < p->oldhealth) + { + cr = CR_YELLOW; + ft = (p->oldhealth - p->health) / 30.0; + ft = minmax(ft, 0.1, 3.0); + } + else if(p->health > p->oldhealth) + { + cr = CR_PURPLE; + ft = 0.2; + } + + if(cr) + { + HudMessageF("LHUDFONT", "%i", p->health); + HudMessageParams(HUDMSG_FADEOUT, hid_healthhit, cr, 34.1, 231.0, 0.1, ft); + } + } + + HUD_IndicatorLine(p, weapongfx[p->weapon.cur->info->slot], hid_healthbg_fxS - (p->ticks % 32), 9); +} + +// +// HUD_Score +// +static void HUD_Score(struct player *p) +{ + HudMessageF("CNFONT", "%S\Cnscr", Lith_ScoreSep(p->score)); + HudMessageParams(HUDMSG_PLAIN, hid_score, CR_WHITE, 320.2, 3.1, 0.1); + + if(p->score > p->old.score) + { + HudMessageF("CNFONT", "%S\Cnscr", Lith_ScoreSep(p->score)); + HudMessageParams(HUDMSG_FADEOUT, hid_scorehit, CR_ORANGE, 320.2, 3.1, 0.1, 0.2); + } + else if(p->score < p->old.score) + { + fixed ft = minmax((p->old.score - p->score) / 3000.0, 0.1, 3.0); + HudMessageF("CNFONT", "%S\Cnscr", Lith_ScoreSep(p->score)); + HudMessageParams(HUDMSG_FADEOUT, hid_scorehit, CR_PURPLE, 320.2, 3.1, 0.1, ft); + } + + if(p->scoreaccumtime > 0) + { + HudMessageF("CNFONT", "%+S", Lith_ScoreSep(p->scoreaccum)); + HudMessageParams(HUDMSG_FADEOUT, hid_scoreaccum, CR_WHITE, 320.2, 13.1, 0.1, 0.4); + } +} + +// +// HUD_KeyInd +// +static void HUD_KeyInd(struct player *p) +{ + if(p->keys.ys) DrawSpriteAlpha(":HUD:H_KS2", hid_key_yellowskull, 310.2, 10.1, 0.1, 0.8); + if(p->keys.rs) DrawSpriteAlpha(":HUD:H_KS1", hid_key_redskull, 320.2, 10.1, 0.1, 0.8); + if(p->keys.bs) DrawSpriteAlpha(":HUD:H_KS3", hid_key_blueskull, 300.2, 10.1, 0.1, 0.8); + if(p->keys.rc) DrawSpriteAlpha(":HUD:H_KC1", hid_key_red, 290.2, 10.1, 0.1, 0.8); + if(p->keys.yc) DrawSpriteAlpha(":HUD:H_KC2", hid_key_yellow, 280.2, 10.1, 0.1, 0.8); + if(p->keys.bc) DrawSpriteAlpha(":HUD:H_KC3", hid_key_blue, 270.2, 10.1, 0.1, 0.8); +} + +// +// HUD_Mode +// +static void HUD_Mode(struct player *p) +{ + if(p->weapontype == weapon_rifle) + { + int addy = p->getUpgrActive(UPGR_RifleModes) ? 0 : 16; + DrawSpritePlain(":HUD:H_W3", hid_riflemodebg, 215.2, 240.2 + addy, TS); + DrawSpritePlain(StrParam(":HUD:H_W%i", + (rifle_firemode_max - p->riflefiremode) + 3), + hid_riflemode, 215.2, 208.2 + (p->riflefiremode * 16) + addy, TS); + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_HeadsUpDisp_Activate(struct player *p, upgrade_t *upgr) +{ + p->hudenabled = true; +} + +// +// Disable +// +void Upgr_HeadsUpDisp_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->hudenabled = false; +} + +// +// Render +// +void Upgr_HeadsUpDisp_Render(struct player *p, upgrade_t *upgr) +{ + // Log + Lith_HUD_Log(p); + + // Inventory + HUD_KeyInd(p); + + if(p->getCVarI("lith_hud_showscore")) + HUD_Score(p); + if(p->getCVarI("lith_hud_showweapons")) + HUD_Weapons(p); + + HUD_Mode(p); + + // Status + HUD_Ammo(p); + HUD_Health(p); +} + +// EOF + diff --git a/source/Main/u_homingrpg.c b/source/Main/u_homingrpg.c new file mode 100644 index 0000000..c302a53 --- /dev/null +++ b/source/Main/u_homingrpg.c @@ -0,0 +1,61 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" +#include "lith_world.h" + +#define UData UData_HomingRPG(upgr) + +// Static Functions ----------------------------------------------------------| + +// +// CheckTarget +// +[[__call("ScriptS")]] +static int CheckTarget(struct player *p) +{ + if(ACS_SetActivator(0, AAPTR_PLAYER_GETTARGET)) + return Lith_UniqueID(0); + else + return 0; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_HomingMissile +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_HomingMissile() +{ + struct player *p = Lith_GetPlayer(0, AAPTR_TARGET); + ACS_SetPointer(AAPTR_TRACER, p->tid, AAPTR_TRACER); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_HomingRPG_Update(struct player *p, upgrade_t *upgr) +{ + if(p->weapontype == weapon_launcher) + { + if(p->buttons & BT_ALTATTACK) + { + int id; + if((id = CheckTarget(p)) && id != UData.id) + { + ACS_LocalAmbientSound("weapons/rocket/mark", 127); + ACS_SetPointer(AAPTR_TRACER, 0, AAPTR_PLAYER_GETTARGET); + UData.id = id; + } + } + + if(ACS_SetActivator(0, AAPTR_TRACER) && ACS_GetActorProperty(0, APROP_Health) > 0) + ACS_SpawnForced("Lith_TargetMarker", + ACS_GetActorX(0), + ACS_GetActorY(0), + ACS_GetActorZ(0) + (ACS_GetActorPropertyFixed(0, APROP_Height) / 2k)); + } +} + +// EOF + diff --git a/source/Main/u_implying.c b/source/Main/u_implying.c new file mode 100644 index 0000000..9ebdbe0 --- /dev/null +++ b/source/Main/u_implying.c @@ -0,0 +1,55 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_Implying(upgr) + +// Extern Functions ----------------------------------------------------------| + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_Implying_Update(struct player *p, upgrade_t *upgr) +{ + static __str strings[] = { + "\Cd>implying", + "\Cd>doombabbies", + "\Cd>implying", + "\Cd>doom shitters", + "\Cd>>>>>>>clip", + "\Cd>implying", + "\CjReport and ignore.", + "\Cjcaleb when?", + "\Cd>implying", + "\Cd>", + "\Cd>>>", + "\Cd>>>>>>", + "\Cjis this compatible with brutal doom?", + "\Cd>>>>>>>>>", + "\Cd>>>>>>>>>>>>", + "\Cd>>>>>>>>>>>>>>>", + "\Cd>doom >2012", + "\Cq<", + }; + + static int const num_strings = countof(strings); + static int const id_max = hid_implyingE - hid_implyingS; + + int id = UData.hudid; + for(int i = 0, n = ACS_Random(0, 40); i < n; i++) + { + id = ++id % id_max; + + HudMessageF("DBIGFONT", "%S", strings[ACS_Random(0, num_strings - 1)]); + HudMessageFade(hid_implyingE + id, + ACS_RandomFixed(0.0, 1.0), + ACS_RandomFixed(0.0, 1.0), + ACS_RandomFixed(0.1, 0.4), + 0.1); + } + + UData.hudid = id; +} + +// EOF + diff --git a/source/Main/u_instadeath.c b/source/Main/u_instadeath.c new file mode 100644 index 0000000..e9806d8 --- /dev/null +++ b/source/Main/u_instadeath.c @@ -0,0 +1,17 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_InstaDeath_Update(struct player *p, upgrade_t *upgr) +{ + if(p->health < p->oldhealth) + InvGive("Lith_Die", 1); +} + +// EOF + diff --git a/source/Main/u_jetbooster.c b/source/Main/u_jetbooster.c new file mode 100644 index 0000000..9607998 --- /dev/null +++ b/source/Main/u_jetbooster.c @@ -0,0 +1,71 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_JetBooster(upgr) + +#define CHARGE_MAX (35 * 7) + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_JetBooster_Activate(struct player *p, upgrade_t *upgr) +{ + UData.charge = CHARGE_MAX; +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_JetBooster_Update(struct player *p, upgrade_t *upgr) +{ + UData.discharged = UData.charge > 60 && UData.charge < CHARGE_MAX; + + if(UData.charge < CHARGE_MAX) + UData.charge++; + + if(p->frozen) return; + + fixed grounddist = p->z - p->floorz; + + if(p->buttonPressed(BT_SPEED) && grounddist > 16.0 && UData.charge >= CHARGE_MAX) + { + fixed angle = p->yaw - ACS_VectorAngle(p->forwardv, p->sidev); + + ACS_PlaySound(0, "player/rocketboost"); + InvGive("Lith_RocketBooster", 1); + p->setVel(p->velx + (ACS_Cos(angle) * 16.0), p->vely + (ACS_Sin(angle) * 16.0), 10.0); + + UData.charge = 0; + UData_ReflexWetw(p->getUpgr(UPGR_ReflexWetw)).leaped = 0; + } +} + +// +// Render +// +void Upgr_JetBooster_Render(struct player *p, upgrade_t *upgr) +{ + if(!p->hudenabled || UData.charge == CHARGE_MAX) return; + + fixed rocket = UData.charge / (fixed)CHARGE_MAX; + int max = (hid_jetS - hid_jetE) * rocket; + + DrawSpriteFade(":HUD:H_B3", hid_jetbg, 320.2, 80.1, 0.0, 0.5); + + HudMessageF("SMALLFNT", "Jet"); + HudMessageParams(HUDMSG_FADEOUT, hid_jettext, CR_RED, 320.2, 160.1, 0.1, 0.5); + + for(int i = 0; i < max; i++) + DrawSpriteXX(UData.discharged ? ":HUD:H_C1" : ":HUD:H_C2", + HUDMSG_FADEOUT | HUDMSG_ADDBLEND | HUDMSG_ALPHA, + hid_jetS - i, + 320.2, + 150.1 - (i * 5), + 0.1, 0.5, 0.5); +} + +// EOF + diff --git a/source/Main/u_lolsords.c b/source/Main/u_lolsords.c new file mode 100644 index 0000000..047cdd5 --- /dev/null +++ b/source/Main/u_lolsords.c @@ -0,0 +1,36 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_lolsords(upgr) + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_lolsords_Activate(struct player *p, upgrade_t *upgr) +{ + UData.origweapon = p->weaponclass; + InvGive("Lith_Sword", 1); +} + +// +// Deactivate +// +void Upgr_lolsords_Deactivate(struct player *p, upgrade_t *upgr) +{ + InvTake("Lith_Sword", 1); + ACS_SetWeapon(UData.origweapon); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_lolsords_Update(struct player *p, upgrade_t *upgr) +{ + ACS_SetWeapon("Lith_Sword"); +} + +// EOF + diff --git a/source/Main/u_magic.c b/source/Main/u_magic.c new file mode 100644 index 0000000..87c4a31 --- /dev/null +++ b/source/Main/u_magic.c @@ -0,0 +1,197 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" +#include "lith_world.h" + +#define UData UData_Magic(upgr) + +// Types ---------------------------------------------------------------------| + +struct magic_info { + int st; + int x, y; + __str name; + __str classname; +}; + +// Static Objects ------------------------------------------------------------| + +#define N(name) name, "Lith_" name +static struct magic_info const minf[] = { + {-1, 130, 180, N("Blade") }, + {-1, 60, 140, N("Delear") }, + {cupg_c_slot3spell, 60, 60, N("Feuer") }, + {cupg_c_slot4spell, 130, 10, N("Rend") }, + {cupg_c_slot5spell, 205, 60, N("Hulgyon") }, + {cupg_c_slot6spell, 205, 140, N("StarShot")}, + {cupg_c_slot7spell, 130, 100, N("Cercle") }, +}; + +// Static Functions ----------------------------------------------------------| + +// +// GiveMagic +// +[[__call("ScriptS")]] +static void GiveMagic(struct magic_info const *m) +{ + InvGive(m->classname, 1); + ACS_SetWeapon(m->classname); +} + +// +// UpdateMagicUI +// +[[__call("ScriptS")]] +static void UpdateMagicUI(struct player *p, upgrade_t *upgr) +{ + gui_state_t *g = &UData.gst; + + Lith_GUI_Begin(g, hid_end_dialogue, 320, 240); + Lith_GUI_UpdateState(g, p); + + DrawSpritePlain(":UI:MagicSelectBack", g->hid--, 0.1, 0.1, TS); + + bool any = false; + + for(int i = 0; i < countof(minf); i++) + { + struct magic_info const *m = &minf[i]; + + if(m->st != -1 && !world.cbiupgr[m->st]) + continue; + + gui_button_preset_t pre = { + .gfx = StrParam(":UI:%S", m->name), + .hot = StrParam(":UI:%SSel", m->name), + .snd = "player/cbi/buttonpress", + .cdef = "d", + .cact = "r", + .chot = "k", + .cdis = "m", + .font = "cbifont", + .external = true, + .w = 64, + .h = 64 + }; + + __str name = Language("LITH_TXT_INFO_SHORT_%S", m->name); + + if(Lith_GUI_Button_FId(g, i + 1, name, m->x, m->y, .preset = &pre)) + GiveMagic(m); + } + + Lith_GUI_End(g, gui_curs_outline); +} + +// +// GivePlayerZ +// +[[__call("ScriptS")]] +static void GivePlayerZ(int tid, struct player *p, __str name) +{ + while(ACS_ThingCount(T_NONE, tid)) { + ACS_SetUserVariable(tid, name, p->z); + ACS_Delay(1); + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_SetMagicUI +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SetMagicUI(bool on) +{ + withplayer(LocalPlayer) + { + if(p->dead) return; + + upgrade_t *upgr = p->getUpgr(UPGR_Magic); + + if(on) + { + UData.ui = true; + p->semifrozen++; + + UData.gst.gfxprefix = ":UI:"; + UData.gst.cx = 320/2; + UData.gst.cy = 240/2; + + Lith_GUI_Init(&UData.gst); + } + else if(!on && UData.ui) + { + if(UData.gst.hot) GiveMagic(&minf[UData.gst.hot - 1]); + + UData.ui = false; + p->semifrozen--; + + UData.gst = (gui_state_t){}; + } + } +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_Magic_Update(struct player *p, upgrade_t *upgr) +{ + fixed manaperc = p->mana / (fixed)p->manamax; + + if(UData.manaperc < 1 && manaperc == 1) + ACS_LocalAmbientSound("player/manafull", 127); + + UData.manaperc = manaperc; + + if(p->weapontype != weapon_c_fist) { + if(p->buttons & BT_USER4 && !(p->old.buttons & BT_USER4)) + Lith_SetMagicUI(true); + else if(!(p->buttons & BT_USER4) && p->old.buttons & BT_USER4) + Lith_SetMagicUI(false); + } + + if(UData.ui) + UpdateMagicUI(p, upgr); + + if(manaperc >= 0.7) + for(int i = 0; i < 5 * manaperc; i++) + { + fixed dst = ACS_RandomFixed(32, 56); + fixed ang = ACS_RandomFixed(0, 1); + int tid = ACS_UniqueTID(); + int x = ACS_Cos(ang) * dst; + int y = ACS_Sin(ang) * dst; + int z = ACS_Random(8, 48); + ACS_Spawn("Lith_ManaLeak", p->x + x, p->y + y, p->z + z, tid); + ACS_SetUserVariable(tid, "user_x", x); + ACS_SetUserVariable(tid, "user_y", y); + ACS_SetActorPropertyFixed(tid, APROP_Alpha, manaperc / 2); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_MASTER, p->tid); + GivePlayerZ(tid, p, "user_z"); + } +} + +// +// Render +// +void Upgr_Magic_Render(struct player *p, upgrade_t *upgr) +{ + int hprc = ceilk(min(UData.manaperc, 0.5) * 2 * 33); + int fprc = ceilk(max(UData.manaperc - 0.5, 0.0) * 2 * 33); + + DrawSpritePlain(":HUD_C:MagicIcon", hid_magicsymbol, 75.1, 238.2, TS); + DrawSpritePlain(":HUD_C:BarVert", hid_magicammobg, 67.1, 238.2, TS); + + ACS_SetHudClipRect(68, 237 - hprc, 5, hprc); + DrawSpritePlain(":HUD_C:ManaBar1", hid_magicammo1, 68.1, 237.2, TS); + ACS_SetHudClipRect(0, 0, 0, 0); + + ACS_SetHudClipRect(68, 237 - fprc, 5, fprc); + DrawSpritePlain(":HUD_C:ManaBar2", hid_magicammo2, 68.1, 237.2, TS); + ACS_SetHudClipRect(0, 0, 0, 0); +} + +// EOF + diff --git a/source/Main/u_punctcannon.c b/source/Main/u_punctcannon.c new file mode 100644 index 0000000..f0ac697 --- /dev/null +++ b/source/Main/u_punctcannon.c @@ -0,0 +1,63 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// Required for sincos(3). +#define _GNU_SOURCE +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PunctuatorFire +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PunctuatorFire(void) +{ + withplayer(LocalPlayer) + { + int ptid = ACS_UniqueTID(); + + ACS_LineAttack(0, p->yaw, p->pitch, 128, "Lith_PunctuatorPuff", "None", 2048.0, FHF_NORANDOMPUFFZ, ptid); + + if(ACS_ThingCount(T_NONE, ptid)) + { + fixed x = ACS_GetActorX(ptid); + fixed y = ACS_GetActorY(ptid); + fixed z = ACS_GetActorZ(ptid); + + float yaw = atan2f(p->y - y, p->x - x); + + float ps, cz; + float ys, yc; + sincosf(p->pitchf, &ps, &cz); + sincosf(yaw, &ys, &yc); + + float cx = ps * yc; + float cy = ps * ys; + + for(int i = 0; i < 10; i++) + { + float sx = x + (cx * -(32 * i)); + float sy = y + (cy * -(32 * i)); + float sz = z + (cz * -(32 * i)); + + int etid = ACS_UniqueTID(); + + ACS_SpawnForced("Lith_PunctuatorExplosion", sx, sy, sz, etid); + + ACS_SetActivator(etid); + ACS_SetPointer(AAPTR_TARGET, p->tid); + p->setActivator(); + } + } + } +} + +// +// Deactivate +// +void Upgr_PunctCannon_Deactivate(struct player *p, upgrade_t *upgr) +{ + InvGive("Lith_GTFO", 1); +} + +// EOF + diff --git a/source/Main/u_reactarmor.c b/source/Main/u_reactarmor.c new file mode 100644 index 0000000..12fd8a4 --- /dev/null +++ b/source/Main/u_reactarmor.c @@ -0,0 +1,104 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_ReactArmor(upgr) + +// Static Objects ------------------------------------------------------------| + +static struct {__str abbr, full;} const ArmorNames[] = { + "BUL", "Bullets", + "ENE", "Energy", + "FIR", "Fire", + "XMG", "FireMagic", + "MAG", "Magic", + "MEL", "Melee", + "SHR", "Shrapnel", + "ICE", "Ice", +}; + +// Static Functions ----------------------------------------------------------| + +// +// RA_Take +// +static void RA_Take(int n) +{ + InvTake(StrParam("Lith_RA_Bullets%i", n), 999); + InvTake(StrParam("Lith_RA_Energy%i", n), 999); + InvTake(StrParam("Lith_RA_Fire%i", n), 999); + InvTake(StrParam("Lith_RA_FireMagic%i", n), 999); + InvTake(StrParam("Lith_RA_Magic%i", n), 999); + InvTake(StrParam("Lith_RA_Melee%i", n), 999); + InvTake(StrParam("Lith_RA_Shrapnel%i", n), 999); + InvTake(StrParam("Lith_RA_Ice%i", n), 999); +} + +// +// RA_Give +// +static void RA_Give(__str name, int n) +{ + InvGive(StrParam("Lith_RA_%S%i", name, n), 1); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_RA_Give +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_RA_Give(int num) +{ + withplayer(LocalPlayer) + { + if(!p->getUpgrActive(UPGR_ReactArmor)) + return; + + upgrade_t *upgr = p->getUpgr(UPGR_ReactArmor); + + if(UData.activearmor != num + 1) + { + __str name = ArmorNames[num].full; + + UData.activearmor = num + 1; + + RA_Take(1); + RA_Take(2); + + ACS_LocalAmbientSound("player/rarmor/mode", 127); + + p->logH(">>>>> Activating Armor->%S()", name); + + if(p->getUpgrActive(UPGR_ReactArmor2)) RA_Give(name, 2); + else RA_Give(name, 1); + } + } +} + +// +// Deactivate +// +void Upgr_ReactArmor_Deactivate(struct player *p, upgrade_t *upgr) +{ + UData.activearmor = 0; + + RA_Take(1); + RA_Take(2); +} + +// +// Render +// +void Upgr_ReactArmor_Render(struct player *p, upgrade_t *upgr) +{ + if(UData.activearmor && p->getCVarI("lith_hud_showarmorind")) + { + DrawSpritePlain(":HUD:SplitLeft", hid_rarmorbg, 12.1, 208.2, TS); + + HudMessageF("LHUDFONT", "\Cn%S", ArmorNames[UData.activearmor - 1].abbr); + HudMessagePlain(hid_rarmortxt, 32.1, 199.0, TS); + } +} + +// EOF + diff --git a/source/Main/u_reflexwetw.c b/source/Main/u_reflexwetw.c new file mode 100644 index 0000000..5719b56 --- /dev/null +++ b/source/Main/u_reflexwetw.c @@ -0,0 +1,96 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_ReflexWetw(upgr) + +#define CHARGE_MAX (35 * 0.8) + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_DodgeView +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_DodgeView() +{ + withplayer(LocalPlayer) + { + fixed vh = p->viewheight; + + for(int i = 0; i < 20; i++) + { + fixed mul = 1.0 - (ACS_Sin(i / 40.0) * 0.6); + ACS_SetActorPropertyFixed(0, APROP_ViewHeight, vh * mul); + ACS_Delay(1); + } + + ACS_SetActorPropertyFixed(0, APROP_ViewHeight, vh); + } +} + +// +// Activate +// +void Upgr_ReflexWetw_Activate(struct player *p, upgrade_t *upgr) +{ + p->speedmul += 0.3; + UData.charge = CHARGE_MAX; + UData.leaped = 0; +} + +// +// Deactivate +// +void Upgr_ReflexWetw_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->speedmul -= 0.3; +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_ReflexWetw_Update(struct player *p, upgrade_t *upgr) +{ + if(UData.charge < CHARGE_MAX) + UData.charge++; + + if(p->frozen) return; + + fixed grounddist = p->z - p->floorz; + + if(UData.charge >= CHARGE_MAX) + { + if(grounddist == 0.0) + UData.leaped = 0; + + if(p->buttons & BT_SPEED && (grounddist <= 16 || + !p->getUpgrActive(UPGR_JetBooster) || + UData_JetBooster(p->getUpgr(UPGR_JetBooster)).discharged)) + { + fixed angle = p->yaw - ACS_VectorAngle(p->forwardv, p->sidev); + + ACS_LocalAmbientSound("player/slide", 127); + p->setVel(p->velx + (ACS_Cos(angle) * 32.0), p->vely + (ACS_Sin(angle) * 32.0), 0); + + Lith_DodgeView(); + + UData.charge = 0; + } + } + + if(p->buttonPressed(BT_JUMP) && !InvNum("PowerFlight") && + !InvNum("Lith_RocketBooster") && !UData.leaped && + ((grounddist <= 16.0 && UData.charge < CHARGE_MAX) || grounddist > 16.0)) + { + fixed angle = p->yaw - ACS_VectorAngle(p->forwardv, p->sidev); + + ACS_LocalAmbientSound("player/doublejump", 127); + p->setVel(p->velx + (ACS_Cos(angle) * 4.0), p->vely + (ACS_Sin(angle) * 4.0), 12.0); + + UData.leaped = 1; + } +} + +// EOF + diff --git a/source/Main/u_riflemodes.c b/source/Main/u_riflemodes.c new file mode 100644 index 0000000..958bed4 --- /dev/null +++ b/source/Main/u_riflemodes.c @@ -0,0 +1,35 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Deactivate +// +void Upgr_RifleModes_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->riflefiremode = 0; +} + +// +// Render +// +void Upgr_RifleModes_Render(struct player *p, upgrade_t *upgr) +{ + if(p->getCVarI("lith_weapons_riflescope") && + p->weapontype == weapon_rifle && + p->riflefiremode == rifle_firemode_burst) + { + ACS_SetHudClipRect(40, 108, 240, 40); + + ACS_SetCameraToTexture(p->cameratid, "LITHCAM1", 34); + DrawSpritePlain("LITHCAM1", hid_rifle_scope_cam, 0.1, 128.0, TS); + + DrawSpritePlain(":RifleScope", hid_rifle_scope_img, 40.1, 108.1, TS); + + ACS_SetHudClipRect(0, 0, 0, 0); + } +} + +// EOF + diff --git a/source/Main/u_stealthsys.c b/source/Main/u_stealthsys.c new file mode 100644 index 0000000..092abbd --- /dev/null +++ b/source/Main/u_stealthsys.c @@ -0,0 +1,33 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +#define UData UData_StealthSys(upgr) + +// Extern Functions ----------------------------------------------------------| + +// +// Deactivate +// +void Upgr_StealthSys_Deactivate(struct player *p, upgrade_t *upgr) +{ + p->alpha = 1; + InvTake("Lith_StealthSystem", 1); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_StealthSys_Update(struct player *p, upgrade_t *upgr) +{ + fixed vel = absk(p->getVel()) / 10.0; + p->alpha = UData.mulvel = lerpk(UData.mulvel, vel, 0.02); + + int time = UData.mulvel * 20; + if(!time || ACS_Timer() % time == 0) + InvGive("Lith_StealthSystem", 1); + else + InvTake("Lith_StealthSystem", 1); +} + +// EOF diff --git a/source/Main/u_unceunce.c b/source/Main/u_unceunce.c new file mode 100644 index 0000000..648189f --- /dev/null +++ b/source/Main/u_unceunce.c @@ -0,0 +1,39 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_upgrades_common.h" + +// Extern Functions ----------------------------------------------------------| + +// +// Activate +// +void Upgr_UNCEUNCE_Activate(struct player *p, upgrade_t *upgr) +{ + ACS_SetMusic("lmusic/Unce.ogg"); +} + +// +// Deactivate +// +void Upgr_UNCEUNCE_Deactivate(struct player *p, upgrade_t *upgr) +{ + ACS_SetMusic("*"); + ACS_FadeTo(0, 0, 0, 0, 0); +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_UNCEUNCE_Update(struct player *p, upgrade_t *upgr) +{ + fixed reeeed = ACS_Sin(p->ticks / 35.0) + 1.0 / 2.0; + fixed greeen = ACS_Cos(p->ticks / 24.0) + 1.0 / 2.0; + fixed bluuue = ACS_Sin(p->ticks / 13.0) + 1.0 / 2.0; + + ACS_FadeTo(reeeed * 255, greeen * 255, bluuue * 255, 0.6, TS); + p->extrpitch += bluuue * 0.015; + p->extryaw += greeen * 0.01; +} + +// EOF + diff --git a/source/Main/u_vitalscan.c b/source/Main/u_vitalscan.c new file mode 100644 index 0000000..89d029b --- /dev/null +++ b/source/Main/u_vitalscan.c @@ -0,0 +1,172 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// Required for sincos(3). +#define _GNU_SOURCE +#include "lith_upgrades_common.h" +#include "lith_world.h" +#include "lith_monster.h" + +#define UData UData_VitalScan(upgr) + +// Extern Functions ----------------------------------------------------------| + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_VitalScan_Update(struct player *p, upgrade_t *upgr) +{ + ACS_SetActivator(0, AAPTR_PLAYER_GETTARGET); + + bool six = ACS_StrCmp(ACS_GetActorClass(0), "RLDeVileSix", 11) == 0; + + bool validtarget = + six || + ACS_CheckFlag(0, "COUNTKILL") || + ACS_PlayerNumber() != -1; + + if(ACS_GetActorProperty(0, APROP_Health) <= 0) + UData.target = UData.oldtarget = 0; + else if(validtarget) + { + bool legendary = world.legendoom && InvNum("LDLegendaryMonsterToken"); + bool henshin = world.legendoom && InvNum("LDLegendaryMonsterTransformed"); + + bool phantom = InvNum("Lith_IsPhantom"); + + bool freak = ACS_CheckFlag(0, "INVULNERABLE") || ACS_CheckFlag(0, "NODAMAGE"); + bool boss = ACS_CheckFlag(0, "BOSS"); + bool shadow = ACS_CheckFlag(0, "SHADOW"); + + int chp = ACS_GetActorProperty(0, APROP_Health); + int shp = ACS_GetActorProperty(0, APROP_SpawnHealth); + + int id = Lith_UniqueID(); + dmon_t *m = DmonPtr(); + + bool healthset = false; + + if((freak || boss) && !phantom) + { + extern __str Lith_RandomName(int id); + + UData.tagstr = Lith_RandomName(freak ? 0 : id); + + if(p->getCVarI("lith_scanner_bar")) + { + UData.oldhealth = UData.health = ACS_Random(0, 666666); + UData.maxhealth = ACS_Random(0, 666666); + healthset = true; + } + } + else + { + char color = p->getCVarI("lith_scanner_color") & 0x7F; + + if(six) UData.tagstr = "\Cg6"; + else if(henshin) UData.tagstr = StrParam("\CgLegendary\C%c %tS", color, 0); + else if(phantom) UData.tagstr = StrParam("\Cg%tS", 0); + else UData.tagstr = StrParam("\C%c%tS", color, 0); + } + + if(!healthset) + { + UData.oldhealth = UData.health; + UData.health = chp; + + if(m) UData.maxhealth = m->maxhealth; + else UData.maxhealth = shp; + } + + if(m) + { + int level = shadow ? m->level - ACS_Random(-5, 5) : m->level; + int nsplit = min(m->maxhealth / (fixed)shp, 7); + int split = ceilk((chp / (fixed)m->maxhealth) * nsplit); + int splith = m->maxhealth / (fixed)nsplit; + UData.tagstr = StrParam("%S lv.%i", UData.tagstr, level); + UData.rank = m->rank; + UData.splitfrac = (chp - (splith * (split - 1))) / (fixed)splith; + UData.split = minmax(split, 1, 7); + } + else + { + UData.rank = 0; + UData.splitfrac = chp / (fixed)shp; + UData.split = 1; + } + + UData.freak = six || freak || phantom || boss; + UData.cangle = ACS_VectorAngle(p->x - ACS_GetActorX(0), p->y - ACS_GetActorY(0)) * tau; + + if((UData.oldtarget = UData.target) != (UData.target = id)) + UData.oldhealth = UData.health; + } +} + +// +// Render +// +void Upgr_VitalScan_Render(struct player *p, upgrade_t *upgr) +{ + if((!p->hudenabled && !(p->pclass & pcl_mods)) || !UData.target) + return; + + int ox = p->getCVarI("lith_scanner_xoffs"); + int oy = p->getCVarI("lith_scanner_yoffs"); + + if(p->getCVarI("lith_scanner_slide")) + { + float diff = p->yawf - UData.cangle; + fixed ds = ACS_Sin(diff / tau) * tau; + fixed dc = ACS_Cos(diff / tau) * tau; + UData.oangle = lerpf(UData.oangle, atan2f(ds, dc), 0.1); + ox += UData.oangle * 64; + } + + // Rank + if(UData.rank) for(int i = 1; i <= UData.rank; i++) + DrawSpriteFade(StrParam(":UI:Rank%i", i), + hid_vscrankS - (i - 1), 100.1 + ox + (i * 6), 216.1 + oy, 0.1, 0.1); + + // Hit indicator + if(UData.health < UData.oldhealth) + { + int delta = UData.oldhealth - UData.health; + + HudMessageF("CBIFONT", "-%i", delta); + HudMessageParams(HUDMSG_FADEOUT, hid_vschitS, CR_RED, 160.4 + ox, 235.2 + oy, 0.1, 0.4); + + for(int i = 1; i < 5 && delta >= 100 * i; i++) + { + HudMessageF("CBIFONT", "-%i", delta); + HudMessageParams(HUDMSG_FADEOUT|HUDMSG_ADDBLEND, hid_vschitS - i, CR_RED, 160.4 + ox, 235.2 + oy, 0.1, 0.4); + } + } + + // Tag and health + bool afnt = p->getCVarI("lith_scanner_altfont"); + __str font = afnt ? "CHFONT" : "CBIFONT"; + + HudMessageF(font, "%S", UData.tagstr); + HudMessageParams(HUDMSG_FADEOUT, hid_vsctag, CR_WHITE, 160.4 + ox, 216.2 + oy, 0.1, 0.4); + + ACS_SetFont(UData.freak ? "ALIENFONT" : font); + if(UData.maxhealth) HudMessage("%i/%i", UData.health, UData.maxhealth); + else HudMessage("%ihp", UData.health); + HudMessageParams(HUDMSG_FADEOUT, hid_vschp, CR_WHITE, 160.4 + ox, 225.2 + oy, 0.1, 0.4); + + // Health bar + if(p->getCVarI("lith_scanner_bar")) + { + int y = afnt ? 201 : 205; + ACS_SetHudClipRect(120 + ox, y + oy, 80 * UData.splitfrac, 2); + DrawSpritePlain(StrParam(":UI:HealthBar%i", UData.split), hid_vscbar, 120.1+ox, y+.1+oy, 0.1); + ACS_SetHudClipRect(0, 0, 0, 0); + + if(UData.split > 1) + DrawSpritePlain(StrParam(":UI:HealthBar%i", UData.split - 1), hid_vscbarn, 120.1+ox, y+.1+oy, 0.1); + } +} + +// EOF + diff --git a/source/Main/u_zoom.c b/source/Main/u_zoom.c new file mode 100644 index 0000000..9a8925e --- /dev/null +++ b/source/Main/u_zoom.c @@ -0,0 +1,95 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// Required for sincos(3). +#define _GNU_SOURCE +#include "lith_upgrades_common.h" + +#define UData UData_Zoom(upgr) + +#define IsKindaSmallNumber(x) ((x) > -0.5 && (x) < 0.5) +#define KindaCloseEnough(x, y) (IsKindaSmallNumber(x - y)) + +// Scripts -------------------------------------------------------------------| + +// +// Lith_KeyZoom +// +[[__call("ScriptS"), __extern("ACS"), __script("net")]] +void Lith_KeyZoom(int amt) +{ + if(ACS_Timer() < 10) return; + + withplayer(LocalPlayer) + { + upgrade_t *upgr = p->getUpgr(UPGR_Zoom); + if(upgr) { + if(upgr->active) UData.zoom += amt; + if(UData.zoom < 0) UData.zoom = 0; + if(UData.zoom > 80) UData.zoom = 80; + } + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Deactivate +// +void Upgr_Zoom_Deactivate(struct player *p, upgrade_t *upgr) +{ + UData.zoom = UData.vzoom = 0; +} + +// +// Update +// +[[__call("ScriptS")]] +void Upgr_Zoom_Update(struct player *p, upgrade_t *upgr) +{ + if(UData.vzoom < UData.zoom) + UData.vzoom = lerpf(UData.vzoom, UData.zoom, 0.099); + else + UData.vzoom = lerpf(UData.vzoom, UData.zoom, 0.2); + + if(!KindaCloseEnough(UData.vzoom, UData.zoom)) + { + if(UData.vzoom < UData.zoom) + ACS_LocalAmbientSound("player/zoomin", 30); + else + ACS_LocalAmbientSound("player/zoomout", 30); + } + else + UData.vzoom = UData.zoom; +} + + +// +// Render +// +void Upgr_Zoom_Render(struct player *p, upgrade_t *upgr) +{ + if(UData.vzoom) + { + DrawSpriteAlpha(":Vignette", hid_zoomvignette, 160, 120, TS, 0.3); + + ACS_SetCameraToTexture(p->cameratid, "LITHCAM2", 90 - UData.vzoom); + DrawSpritePlain("LITHCAM2", hid_zoomcam, 160, 120, TS); + + DrawSpriteAlpha(":ZoomOverlay", hid_zoombase, 160, 120, TS, 0.5); + + __str points[8] = {"E", "SE", "S", "SW", "W", "NW", "N", "NE"}; + + for(int i = 0; i < 8; i++) + { + float xang = p->yawf + pi + (pi4 * i); + float xs, xc; + sincosf(xang, &xs, &xc); + int x = atan2f(xs, xc) * 320; + + HudMessageF("CBIFONT", points[i]); + HudMessagePlain(hid_zoomcomp + i, 160 + x, 120, TS); + } + } +} + +// EOF + diff --git a/source/Main/w_boss.c b/source/Main/w_boss.c new file mode 100644 index 0000000..a931444 --- /dev/null +++ b/source/Main/w_boss.c @@ -0,0 +1,266 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +// vim: columns=100 +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" + +// Types ---------------------------------------------------------------------| + +struct boss +{ + __str const name; + int const phasenum; + + int phase; + bool dead; + + list_t link; +}; + +enum +{ + diff_easy, + diff_medi, + diff_hard, + diff_any, + diff_max +}; + +// Static Objects ------------------------------------------------------------| + +static struct boss bosses_easy[] = { + {"James", 2}, +}; + +static struct boss bosses_medi[] = { + {"Makarov", 3}, +}; + +static struct boss bosses_hard[] = { + {"Isaac", 3}, +}; + +static struct boss *lmvar boss; +static int lmvar bosstid; + +static bool alldead[diff_max]; + +static int rewardnum; +static int difficulty; +static struct boss *lastboss; +static i96 scorethreshold = 1000000; + +// Static Functions ----------------------------------------------------------| + +// +// Lith_SpawnBossReward +// +static void Lith_SpawnBossReward(void) +{ + int x = ACS_GetActorX(0); + int y = ACS_GetActorY(0); + int z = ACS_GetActorZ(0); + + switch(rewardnum++) + { + case 0: ACS_SpawnForced("Lith_BossReward1", x, y, z); break; + case 1: ACS_SpawnForced("Lith_BossReward2", x, y, z); break; + case 2: ACS_SpawnForced("Lith_BossReward3", x, y, z); break; + case 3: ACS_SpawnForced("Lith_BossReward4", x, y, z); break; + case 4: ACS_SpawnForced("Lith_BossReward5", x, y, z); break; + case 7: ACS_SpawnForced("Lith_BossReward6", x, y, z); break; + } +} + +// +// Lith_TriggerBoss +// +static void Lith_TriggerBoss(void) +{ + static bool firstboss = true; + + if(!boss) return; + + if(boss->dead) { + Log("Lith_TriggerBoss: %S is dead, invalid num", boss->name); + boss = null; + return; + } + + if(boss->phase > boss->phasenum) { + Log("Lith_TriggerBoss: invalid boss phase"); + boss = null; + return; + } + + if(!boss->phase) + boss->phase = 1; + + LogDebug(log_boss, "Lith_TriggerBoss: Spawning boss %S phase %i", boss->name, boss->phase); + + //TODO HERMES("TriggerBoss"); + + if(firstboss) { + firstboss = false; + Lith_ForPlayer() + p->deliverMail("Phantom"); + } +} + +// +// CheckDead +// +static bool CheckDead(struct boss *b, int num) +{ + for(int i = 0; i < num; i++) + if(!b[i].dead) return false; + return true; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_PhantomSound +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PhantomSound(void) +{ + ACS_AmbientSound("enemies/phantom/spawned", 127); +} + +// +// Lith_PhantomTeleport +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PhantomTeleport(void) +{ + fixed ang = ACS_GetActorAngle(0); + + ACS_ThrustThing(ang * 256, 64, true, 0); + + for(int i = 0; i < 15; i++) { + InvGive("Lith_PhantomTeleport", 1); + ACS_Delay(1); + } +} + +// +// Lith_PhantomDeath +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PhantomDeath(void) +{ + ACS_StopSound(0, 7); + + if(boss->phase == boss->phasenum) + { + // Death + ACS_AmbientSound("player/death1", 127); + ACS_Delay(35); + InvGive("Lith_PlayerDeath", 1); + ACS_Delay(25); + InvGive("Lith_PlayerDeathNuke", 1); + ACS_Delay(25); + Lith_ForPlayer() p->deliverMail(StrParam("%SDefeated", boss->name)); + boss->dead = true; + + if(difficulty != diff_any) difficulty++; + } + else + { + // Escape + ACS_AmbientSound("enemies/phantom/escape", 127); + ACS_SetActorState(0, "GetOutOfDodge"); + ACS_Delay(5); + InvGive("Lith_PhantomOut", 1); + ACS_Delay(2); + } + + LogDebug(log_boss, "Lith_PhantomDeath: %S phase %i defeated", boss->name, boss->phase); + + Lith_SpawnBossReward(); + + scorethreshold = scorethreshold * 17 / 10; + DebugNote("score threshold raised to %lli", scorethreshold); + + boss->phase++; + boss = null; + + world.bossspawned = false; +} + +// +// Lith_SpawnBoss +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SpawnBoss(void) +{ + if(!boss) return; + + bosstid = ACS_ActivatorTID(); + bosstid = bosstid ? bosstid : ACS_UniqueTID(); + + //TODO HERMES("SpawnBoss", StrParam("Lith_Boss_%S", boss->name), boss->phase); + + LogDebug(log_boss, "Lith_SpawnBoss: Boss %s phase %i spawned", boss->name, boss->phase); + DebugNote("boss: %S phase %i spawned\n", boss->name, boss->phase); + + world.bossspawned = true; +} + +// +// Lith_TriggerBoss_Script +// +[[__call("ScriptS"), __extern("ACS"), __address("Lith_TriggerBoss"), __optional_args(1)]] +void Lith_TriggerBoss_Script(int diff, int num, int phase) +{ + switch(diff) + { + case diff_easy: boss = &bosses_easy[num]; break; + case diff_medi: boss = &bosses_medi[num]; break; + case diff_hard: boss = &bosses_hard[num]; break; + } + + if(phase) + {boss->dead = false; boss->phase = phase;} + + Lith_TriggerBoss(); +} + +// +// Lith_SpawnBosses +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SpawnBosses(i96 sum, bool force) +{ + if(!force && sum < scorethreshold) return; + + alldead[diff_easy] = CheckDead(bosses_easy, countof(bosses_easy)); + alldead[diff_medi] = CheckDead(bosses_medi, countof(bosses_medi)); + alldead[diff_hard] = CheckDead(bosses_hard, countof(bosses_hard)); + + int diff = + difficulty == diff_any ? ACS_Random(diff_easy, diff_hard) : difficulty; + + if(alldead[diff]) + { + LogDebug(log_boss, "Lith_SpawnBosses: All dead, returning"); + return; + } + + LogDebug(log_boss, "Lith_SpawnBosses: Spawning boss, difficulty %i", diff); + + if(!lastboss || lastboss->dead) switch(diff) + { + case diff_easy: do boss = &bosses_easy[ACS_Random(1, countof(bosses_easy)) - 1]; while(boss->dead); break; + case diff_medi: do boss = &bosses_medi[ACS_Random(1, countof(bosses_medi)) - 1]; while(boss->dead); break; + case diff_hard: do boss = &bosses_hard[ACS_Random(1, countof(bosses_hard)) - 1]; while(boss->dead); break; + } + else + boss = lastboss; + + Lith_TriggerBoss(); +} + +// EOF + diff --git a/source/Main/w_cbi.c b/source/Main/w_cbi.c new file mode 100644 index 0000000..d124228 --- /dev/null +++ b/source/Main/w_cbi.c @@ -0,0 +1,102 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_world.h" +#include "lith_player.h" + +static int lmvar cbispawn[cupg_max]; +static int lmvar cbispawniter; + +struct cupgdef +{ + int pclass; + int key; + __str msg; + __str bipunlock; +}; + +static struct cupgdef const cdefs[] = { + {pM, cupg_weapninter, "MWeapnInter", "WeapnInter"}, + {pM, cupg_weapninte2, "MWeapnInte2", "WeapnInte2"}, + {pM, cupg_armorinter, "MArmorInter", "ArmorInter"}, + {pM, cupg_hasupgr1, "MUpgr1", "CBIUpgr1" }, + {pM, cupg_hasupgr2, "MUpgr2", "CBIUpgr2" }, + {pM, cupg_rdistinter, "MRDistInter" }, + + {pC, cupg_c_slot3spell, "CSlot3Spell", "Feuer" }, + {pC, cupg_c_slot4spell, "CSlot4Spell", "Rend" }, + {pC, cupg_c_slot5spell, "CSlot5Spell", "Hulgyon" }, + {pC, cupg_c_slot6spell, "CSlot6Spell", "StarShot"}, + {pC, cupg_c_slot7spell, "CSlot7Spell", "Cercle" }, + {pC, cupg_c_rdistinter, "CRDistInter" }, +}; + +// +// GetCUpgr +// +struct cupgdef const *GetCUpgr(int pclass, int num) +{ + for(int i = 0; i < countof(cdefs); i++) { + struct cupgdef const *c = &cdefs[i]; + if(c->pclass & pclass && c->key == num) + return c; + } + return null; +} + +// +// Lith_InstallCBIItem +// +void Lith_InstallCBIItem(int num) +{ + if(num < 0 || num >= cupg_max || world.cbiupgr[num]) + return; + + world.cbiupgr[num] = true; + + switch(num) { + case cupg_hasupgr1: world.cbiperf += 20; break; + case cupg_hasupgr2: world.cbiperf += 40; break; + } + + Lith_ForPlayer() { + ifauto(struct cupgdef const *, c, GetCUpgr(p->pclass, num)) + if(c->bipunlock) p->bipUnlock(c->bipunlock); + } +} + +// +// Lith_InstallSpawnedCBIItems +// +void Lith_InstallSpawnedCBIItems(void) +{ + for(int i = 0; i < cbispawniter; i++) + Lith_InstallCBIItem(cbispawn[i]); +} + +// +// Lith_CBIItemWasSpawned +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_CBIItemWasSpawned(int num) +{ + cbispawn[cbispawniter++] = num; +} + +// +// Lith_PickupCBIItem +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PickupCBIItem(int num) +{ + withplayer(LocalPlayer) + Lith_FadeFlash(0, 255, 0, 0.7, 0.5); + + Lith_ForPlayer() { + ifauto(struct cupgdef const *, c, GetCUpgr(p->pclass, num)) + if(c->msg) p->log("%S", Language("LITH_TXT_LOG_CBI_%S", c->msg)); + } + + Lith_InstallCBIItem(num); +} + +// EOF diff --git a/source/Main/w_decorate.c b/source/Main/w_decorate.c new file mode 100644 index 0000000..d13098c --- /dev/null +++ b/source/Main/w_decorate.c @@ -0,0 +1,176 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_weapons.h" +#include "lith_player.h" +#include "lith_hudid.h" +#include "lith_world.h" + +#include <math.h> + +// How to make DECORATE into a decent VM: Registers! + +#define PVarFunc(fn, expr) \ + [[__call("ScriptS"), __extern("ACS")]] \ + int fn \ + { \ + withplayer(LocalPlayer) { \ + int *val = &p->decvars[var - 1]; \ + return expr; \ + } \ + return 0; \ + } + +#define WVarFunc(fn, expr) \ + [[__call("ScriptS"), __extern("ACS")]] \ + int fn {int *val = &world.decvars[var - 1]; return expr;} + +#define RegisterMachine(reg, name) \ + reg(L##name##Get(int var ), (*val) ) \ + reg(L##name##Inc(int var ), (*val)++ ) \ + reg(L##name##Dec(int var ), (*val)-- ) \ + reg(L##name##Set(int var, int num), (*val) = num) \ + reg(L##name##Add(int var, int num), (*val) += num) \ + reg(L##name##Sub(int var, int num), (*val) -= num) \ + reg(L##name##Mul(int var, int num), (*val) *= num) \ + reg(L##name##Div(int var, int num), (*val) /= num) \ + reg(L##name##Mod(int var, int num), (*val) %= num) \ + reg(L##name##Min(int var, int num), (*val) = min(*val, num)) \ + reg(L##name##Max(int var, int num), (*val) = max(*val, num)) + +RegisterMachine(PVarFunc, PVar) +RegisterMachine(WVarFunc, WVar) + +// +// Lith_UniqueTID +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_UniqueTID(void) +{ + return ACS_UniqueTID(); +} + +// +// Lith_Timer +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_Timer(void) +{ + return ACS_Timer(); +} + +// +// Lith_UpdateScore +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_UpdateScore(void) +{ + i96 score = ACS_CheckInventory("Lith_ScoreCount") * (double)RandomFloat(0.7f, 1.2f); + Lith_GiveAllScore(score, false); + ACS_TakeInventory("Lith_ScoreCount", 0x7FFFFFFF); +} + +// +// Lith_Velocity +// +[[__call("ScriptS"), __extern("ACS")]] +fixed Lith_Velocity(fixed velx, fixed vely) +{ + fixed x = ACS_GetActorX(0); + fixed y = ACS_GetActorY(0); + return ACS_FixedSqrt((x * x) + (y * y)); +} + +// +// Lith_VelHax +// +[[__call("ScriptS"), __extern("ACS")]] +int Lith_VelHax(int fuck) +{ + ACS_SetActivator(0, AAPTR_MASTER); + + switch(fuck) + { + case 1: return ACS_GetActorVelX(0); + case 2: return ACS_GetActorVelY(0); + case 3: return ACS_GetActorVelZ(0); + } + + return -1; +} + +// +// Lith_Barrier +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_Barrier() +{ + withplayer(LocalPlayer) + for(int i = 0; p->active && i < 35 * 30; i++) + { + ACS_GiveInventory("Lith_BarrierSpell", 1); + ACS_Delay(1); + } +} + +// +// Lith_BarrierBullets +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_BarrierBullets() +{ + struct player *p = Lith_GetPlayer(0, AAPTR_TARGET); + + fixed ang = ACS_VectorAngle(ACS_GetActorX(0) - p->x, ACS_GetActorY(0) - p->y); + fixed xang = ACS_VectorAngle(p->x - ACS_GetActorX(0), p->y - ACS_GetActorY(0)); + fixed zdiff = p->z - ACS_GetActorZ(0); + fixed s = ACS_Sin(ang) * 48.0; + fixed c = ACS_Cos(ang) * 48.0; + fixed z = (p->z + p->viewheight / 2) - (zdiff / 2); + + ACS_SpawnForced("Lith_BarrierFX", p->x + c, p->y + s, z); + ACS_LineAttack(p->tid, ang + ACS_RandomFixed(-0.1, 0.1), PITCH_BASE + ACS_RandomFixed(0.45, 0.55), 10); +} + +// +// Lith_BarrierCheck +// +[[__call("ScriptS"), __extern("ACS")]] +bool Lith_BarrierCheck() +{ + ACS_SetActivatorToTarget(0); + return ACS_CheckFlag(0, "COUNTKILL"); +} + +// +// Lith_PoisonFXTicker +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_PoisonFXTicker() +{ + for(int i = 0; i < 17; i++) + { + if(ACS_CheckInventory("Lith_PoisonFXReset")) + { + ACS_TakeInventory("Lith_PoisonFXReset", 999); + ACS_TakeInventory("Lith_PoisonFXTimer", 999); + ACS_GiveInventory("Lith_PoisonFXGiverGiver", 1); + return; + } + } + + if(ACS_GetActorProperty(0, APROP_Health) <= 0) + { + ACS_TakeInventory("Lith_PoisonFXReset", 999); + ACS_TakeInventory("Lith_PoisonFXTimer", 999); + ACS_TakeInventory("Lith_PoisonFXGiverGiver", 999); + return; + } + + if(ACS_CheckInventory("Lith_PoisonFXTimer")) + { + ACS_GiveInventory("Lith_PoisonFXGiver", 1); + ACS_TakeInventory("Lith_PoisonFXTimer", 1); + } +} + +// EOF diff --git a/source/Main/w_dialogue.c b/source/Main/w_dialogue.c new file mode 100644 index 0000000..3c84318 --- /dev/null +++ b/source/Main/w_dialogue.c @@ -0,0 +1,675 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_world.h" +#include "lith_player.h" +#include "lith_dialogue.h" +#include "lith_file.h" +#include "lith_tokbuf.h" + +#define LogTok(tok, s) \ + Log("(%i:%i) " s " (%i:\"%s\")", tok->orig.line, tok->orig.colu, tok->type, \ + tok->textV ? tok->textV : c"<no string>") + +#define LogOri(tok, s) \ + Log("(%i:%i) " s, tok->orig.line, tok->orig.colu) + +// Extern Objects ------------------------------------------------------------| + +extern struct dlgdef *lmvar dlgdefs; + +// Static Functions ----------------------------------------------------------| + +[[__optional_args(1)]] +static int *NextCode(struct pstate *d); +static void GetStatement(struct pstate *d); + +// Types ---------------------------------------------------------------------| + +enum +{ + #define Str(name, str) STR_##name, + #include "lith_dlgstrtable.h" + STR_MAX +}; + +struct strent { + char const *key, *str; + int name; + size_t keyhash; + struct strent *next, **prev; +}; + +struct dlgfunc { + char const *name, *args; + int lit[4]; + void (*genCode)(struct pstate *d, union arg *argv, int argc); + size_t keyhash; + struct dlgfunc *next, **prev; +}; + +union arg { + __str s; + int i; +}; + +struct pstate { + __prop nextCode {call: NextCode(this)} + + struct tokbuf tb; + struct dlgdef *def; +}; + +GDCC_HashMap_Decl(strtable_t, char const *, struct strent) +GDCC_HashMap_Decl(functable_t, char const *, struct dlgfunc) + +// Static Objects ------------------------------------------------------------| + +static strtable_t stbl; +static functable_t ftbl; + +// Static Functions ----------------------------------------------------------| + +#define strtable_t_GetKey(o) ((o)->key) +#define strtable_t_GetNext(o) (&(o)->next) +#define strtable_t_GetPrev(o) (&(o)->prev) +#define strtable_t_HashKey(k) (CStrHash(k)) +#define strtable_t_HashObj(o) ((o)->keyhash) +#define strtable_t_KeyCmp(l, r) (strcmp(l, r)) +GDCC_HashMap_Defn(strtable_t, char const *, struct strent) + +#define functable_t_GetKey(o) ((o)->name) +#define functable_t_GetNext(o) (&(o)->next) +#define functable_t_GetPrev(o) (&(o)->prev) +#define functable_t_HashKey(k) (CStrHash(k)) +#define functable_t_HashObj(o) ((o)->keyhash) +#define functable_t_KeyCmp(l, r) (strcmp(l, r)) +GDCC_HashMap_Defn(functable_t, char const *, struct dlgfunc) + +// +// StrName +// +static int StrName(char const *s) +{ + ifauto(struct strent *, e, stbl.find(s)) + return e->name; + else + return STR_NULL; +} + +// +// NextCode +// +static int *NextCode(struct pstate *d) +{ + Vec_GrowN(d->def->code, 1, 32); + return &Vec_Next(d->def->code); +} + +#define GenCode_Reg(code) \ + if(argv[0].s == "a") *d->nextCode() = DCD_##code##_A; \ + else if(argv[0].s == "b") *d->nextCode() = DCD_##code##_B; \ + else if(argv[0].s == "c") *d->nextCode() = DCD_##code##_C; \ + else if(argv[0].s == "d") *d->nextCode() = DCD_##code##_D; \ + else + +// +// GenCode_Trace +// +static void GenCode_Trace(struct pstate *d, union arg *argv, int argc) +{ + GenCode_Reg(TRACE) + { + *d->nextCode() = DCD_TRACE_S; + *d->nextCode() = argv[0].i; + } +} + +// +// GenCode_Push +// +static void GenCode_Push(struct pstate *d, union arg *argv, int argc) +{ + GenCode_Reg(PUSH) + { + *d->nextCode() = DCD_PUSH_I; + *d->nextCode() = strtoi_str(argv[0].s, null, 0); + } +} + +// +// GenCode_Pop +// +static void GenCode_Pop(struct pstate *d, union arg *argv, int argc) +{ + GenCode_Reg(POP) + { + struct token *tok = d->tb.reget(); + LogOri(tok, "GenCode_Pop: invalid argument"); + } +} + +#define GenCode_Arith(code) \ + static void GenCode_Arith_##code(struct pstate *d, union arg *argv, int argc) \ + { \ + GenCode_Reg(code) \ + { \ + *d->nextCode() = DCD_##code##_I; \ + *d->nextCode() = strtoi_str(argv[0].s, null, 0); \ + } \ + } + +GenCode_Arith(ADD) +GenCode_Arith(SUB) +GenCode_Arith(MUL) +GenCode_Arith(DIV) +GenCode_Arith(MOD) +GenCode_Arith(IOR) +GenCode_Arith(AND) +GenCode_Arith(XOR) +GenCode_Arith(LSH) +GenCode_Arith(RSH) + +#undef GenCode_Arith + +// +// GenCode_Generic +// +static void GenCode_Generic(struct pstate *d, union arg *argv, int argc) +{ + for(int i = 0; i < argc; i++) + *d->nextCode() = argv[i].i; +} + +// +// GetCode_Cond +// +// Parses and generates code for a conditional statement. +// +static void GetCode_Cond(struct pstate *d) +{ + int code = DCD_NOP; + struct token *tok = d->tb.get(); + + // Get the code to generate. + if(tok->type == tok_identi) + { + switch(StrName(tok->textV)) { + case STR_item: code = DCD_JNITEM; break; + case STR_class: code = DCD_JNCLASS; break; + default: LogOri(tok, "GetCode_Cond: invalid conditional"); return; + } + } + else + LogTok(tok, "GetCode_Cond: expected identifier"); + + // Generate code. + int ptr = 0; + + tok = d->tb.get(); + if(tok->type == tok_identi || tok->type == tok_string) + { + *d->nextCode() = code; + ptr = d->def->codeC; + d->nextCode(); + + if(code == DCD_JNCLASS) + { + switch(StrName(tok->textV)) { + case STR_Marine: *d->nextCode() = pcl_marine; break; + case STR_CyberMage: *d->nextCode() = pcl_cybermage; break; + case STR_Informant: *d->nextCode() = pcl_informant; break; + default: LogOri(tok, "GetCode_Cond: invalid playerclass type"); return; + } + } + else + *d->nextCode() = (int)Lith_TokStr(tok); + } + else + LogOri(tok, "GetCode_Cond: invalid token in conditional statement"); + + // Generate statement. + GetStatement(d); + + tok = d->tb.get(); + if(tok->type == tok_identi && StrName(tok->textV) == STR_else) + { + int tmp = ptr; + + // Add jump to end. + *d->nextCode() = DCD_JMP; + ptr = d->def->codeC; + d->nextCode(); + + // Set original jump target to here. + d->def->codeV[tmp] = d->def->codeC; + + // Generate statement. + GetStatement(d); + } + else + d->tb.unget(); + + // Set the pointer in the generated code to be after the statement. + if(ptr) d->def->codeV[ptr] = d->def->codeC; +} + +// +// GetCode_Option +// +// Parses and generates code for an option statement. +// +static void GetCode_Option(struct pstate *d) +{ + struct token *tok = d->tb.get(); + + // Generate code. + int ptr = 0; + if(tok->type == tok_identi || tok->type == tok_string) + { + *d->nextCode() = DCD_PUTOPT; + ptr = d->def->codeC; + d->nextCode(); + *d->nextCode() = (int)Lith_TokStr(tok); + } + else + LogOri(tok, "GetCode_Option: invalid option parameter"); + + // Generate statement. + GetStatement(d); + + // Set the pointer in the generated code to be after the statement. + if(ptr) d->def->codeV[ptr] = d->def->codeC; +} + +// +// GetCode_Exec +// +// Parses and generates code for an exec statement. +// +static void GetCode_Exec(struct pstate *d) +{ + *d->nextCode() = DCD_TRMWAIT; + GetStatement(d); +} + +// +// GetCode_Generic +// +// Parses and generates code for a generic statement. +// +static void GetCode_Generic(struct pstate *d) +{ + struct token *tok = d->tb.reget(); + LogDebug(log_dlg, "call: %s", tok->textV); + + // Get the function to generate. + struct dlgfunc const *func = ftbl.find(tok->textV); + if(!func) { + LogOri(tok, "GetCode_Generic: invalid function in dialogue code"); + return; + } + + // Get arguments. + union arg argv[8] = {}; + int argc = 0; + int lit = 0; + + while(func->args[argc]) + { + if(func->args[argc] == 'L') + { + argv[argc++].i = func->lit[lit++]; + continue; + } + + if(!(tok = d->tb.get())->textV) + { + LogTok(tok, "GetCode_Generic: invalid token in argument list"); + return; + } + + switch(func->args[argc]) + { + case 'I': argv[argc++].i = strtoi(tok->textV, null, 0); break; + case 'S': argv[argc++].s = Lith_TokStr(tok); break; + } + + LogDebug(log_dlg, "arg %i: %s", argc, tok->textV); + + if(!d->tb.drop(tok_comma) || d->tb.drop(tok_semico)) + break; + } + + // Fill in unfinished arguments. + while(func->args[argc]) + { + switch(func->args[argc]) + { + case 'I': argv[argc++].i = 0; break; + case 'S': argv[argc++].s = ""; break; + case 'L': argv[argc++].i = func->lit[lit++]; break; + } + + LogDebug(log_dlg, "arg %i emptied", argc); + } + + func->genCode(d, argv, argc); +} + +// +// GetCode_Text +// +static void GetCode_Text(struct pstate *d, struct token *tok, int code) +{ + *d->nextCode() = code; + *d->nextCode() = (int)Lith_TokStr(tok); +} + +// +// GetCode_Line +// +// Parse and generate a line of code. +// +static void GetCode_Line(struct pstate *d) +{ + struct token *tok = d->tb.get(); + + switch(tok->type) + { + case tok_identi: + LogDebug(log_dlg, "GetCode_Line: %s", tok->textV); + switch(StrName(tok->textV)) { + case STR_if: GetCode_Cond (d); break; + case STR_option: GetCode_Option (d); break; + case STR_exec: GetCode_Exec (d); break; + default: GetCode_Generic(d); break; + } + break; + case tok_quote: GetCode_Text(d, d->tb.reget(), DCD_ADDTEXT); break; + case tok_dollar: GetCode_Text(d, d->tb. get(), DCD_ADDTEXTLOCAL); break; + case tok_semico: + case tok_eof: + break; + default: + LogTok(tok, "GetCode_Line: invalid token in line"); + } +} + +// +// GetBlock +// +// Parse and generate a block statement. +// +static void GetBlock(struct pstate *d) +{ + while(!d->tb.drop(tok_bracec) && !d->tb.drop(tok_eof)) + GetStatement(d); +} + +// +// GetConcatBlock +// +// Parse and generate a concat block statement. +// +static void GetConcatBlock(struct pstate *d) +{ + *d->nextCode() = DCD_CONCAT; + while(!d->tb.drop(tok_at2) && !d->tb.drop(tok_eof)) + GetStatement(d); + *d->nextCode() = DCD_CONCATEND; +} + +// +// GetStatement +// +// Parse and generate a statement. +// +static void GetStatement(struct pstate *d) +{ + if(d->tb.drop(tok_braceo)) GetBlock(d); + else if(d->tb.drop(tok_at2)) GetConcatBlock(d); + else GetCode_Line(d); +} + +// +// SetupDialogue +// +static void SetupDialogue(struct pstate *d, int num) +{ + struct dlgdef *last = d->def; + + d->def = Salloc(struct dlgdef); + d->def->num = num; + + if(!last) dlgdefs = d->def; + else last->next = d->def; + + LogDebug(log_dlg, "set up dialogue %i", num); +} + +// +// GetDecl_Dialogue +// +static void GetDecl_Dialogue(struct pstate *d) +{ + struct token *tok = d->tb.get(); + + if(tok->type == tok_number) { + SetupDialogue(d, strtoi(tok->textV, null, 0)); + LogDebug(log_dlg, "\n---\ndialogue %i (%i)\n---", + d->def->num, d->def->codeC); + } else { + LogOri(tok, "GetDecl_Dialogue: invalid dialogue number token"); + } +} + +// +// GetDecl_Terminal +// +static void GetDecl_Terminal(struct pstate *d) +{ + struct token *tok = d->tb.get(); + + if(tok->type == tok_number) { + SetupDialogue(d, -strtoi(tok->textV, null, 0)); + LogDebug(log_dlg, "\n---\nterminal %i (%i)\n---", + -d->def->num, d->def->codeC); + } else { + LogOri(tok, "GetDecl_Terminal: invalid terminal number token"); + } +} + +// +// SetupPage +// +static void SetupPage(struct pstate *d, int num) +{ + d->def->pages[num] = d->def->codeC; + + LogDebug(log_dlg, "--- page %i (%i)", num, d->def->codeC); +} + +// +// GetDecl_Page +// +static void GetDecl_Page(struct pstate *d) +{ + struct token *tok = d->tb.get(); + + if(tok->type == tok_number) + SetupPage(d, strtoi(tok->textV, null, 0)); + else + LogOri(tok, "GetDecl_Page: invalid page number token"); + + GetStatement(d); + + *d->nextCode() = DCD_DLGWAIT; + *d->nextCode() = DCD_DIE; +} + +// +// GetDecl_TrmPage +// +static void GetDecl_TrmPage(struct pstate *d, int num) +{ + SetupPage(d, num); + GetStatement(d); + *d->nextCode() = DCD_TRMWAIT; + *d->nextCode() = DCD_DIE; +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_GSInit_Dialogue +// +// Loads all string indices into the global stbl, and all function +// prototypes into the global ftbl. +// +void Lith_GSInit_Dialogue(void) +{ + #pragma GDCC STRENT_LITERAL OFF + + static struct dlgfunc funcs[] = { + {"nop", "L", DCD_NOP}, + + {"push", "S", .genCode = GenCode_Push}, + {"pop", "S", .genCode = GenCode_Pop}, + + {"add", "S", .genCode = GenCode_Arith_ADD}, + {"sub", "S", .genCode = GenCode_Arith_SUB}, + {"mul", "S", .genCode = GenCode_Arith_MUL}, + {"div", "S", .genCode = GenCode_Arith_DIV}, + {"mod", "S", .genCode = GenCode_Arith_MOD}, + {"ior", "S", .genCode = GenCode_Arith_IOR}, + {"and", "S", .genCode = GenCode_Arith_AND}, + {"xor", "S", .genCode = GenCode_Arith_XOR}, + {"lsh", "S", .genCode = GenCode_Arith_LSH}, + {"rsh", "S", .genCode = GenCode_Arith_RSH}, + + {"die", "L", DCD_DIE}, + {"exit", "L", DCD_DIE}, + + {"page", "LI", DCD_JPAGE}, + + {"script", "LIIIII", DCD_SCRIPTI}, + {"scriptnamed", "LSIIII", DCD_SCRIPTS}, + + {"trace", "S", .genCode = GenCode_Trace}, + + {"intralevelteleport", "LI", DCD_TELEPORT_INTRALEVEL}, + {"interlevelteleport", "LI", DCD_TELEPORT_INTERLEVEL}, + + {"text", "LS", DCD_SETTEXT}, + {"local", "LS", DCD_SETTEXTLOCAL}, + {"addtext", "LS", DCD_ADDTEXT}, + {"addlocal", "LS", DCD_ADDTEXTLOCAL}, + {"setstr", "LIS", DCD_SETSTRING}, + {"name", "LLS", DCD_SETSTRING, DSTR_NAME}, + {"icon", "LLS", DCD_SETSTRING, DSTR_ICON}, + {"remote", "LLS", DCD_SETSTRING, DSTR_REMOTE}, + {"concat", "L", DCD_CONCAT}, + {"endconcat", "L", DCD_CONCATEND}, + + {"dlgwait", "L", DCD_DLGWAIT}, + + {"logon", "LS", DCD_LOGON}, + {"logoff", "LS", DCD_LOGOFF}, + {"info", "L", DCD_INFO}, + {"pict", "LS", DCD_PICT}, + {"trmwait", "L", DCD_TRMWAIT}, + }; + + static struct strent strs[] = { + #define Str(name, str) {#name, #str}, + #include "lith_dlgstrtable.h" + }; + + strtable_t_ctor(&stbl, countof(strs), 1); + for(int i = 0; i < countof(strs); i++) { + strs[i].keyhash = CStrHash(strs[i].key); + strs[i].name = i; + stbl.insert(&strs[i]); + } + + functable_t_ctor(&ftbl, countof(funcs), 1); + for(int i = 0; i < countof(funcs); i++) { + funcs[i].keyhash = CStrHash(funcs[i].name); + if(!funcs[i].genCode) funcs[i].genCode = GenCode_Generic; + ftbl.insert(&funcs[i]); + } +} + +// +// Lith_LoadMapDialogue +// +void Lith_LoadMapDialogue(void) +{ + // Free any previous dialogue definitions. + if(dlgdefs) + { + for(struct dlgdef *def = dlgdefs; def;) { + struct dlgdef *next = def->next; + Vec_Clear(def->code); + Dalloc(def); + def = next; + } + + Dalloc(dlgdefs); + dlgdefs = null; + } + + struct pstate d = {{ + .bbeg = 4, .bend = 10, + .fp = W_Open(StrParam("LITH_DLG_SCRIPT_%tS", PRINTNAME_LEVEL), c"r") + }}; + + if(!d.tb.fp) return; + + d.tb.ctor(); + + for(struct token *tok; (tok = d.tb.get())->type != tok_eof;) + { + if(tok->type != tok_identi) { + LogTok(tok, "Lith_LoadMapDialogue: invalid toplevel token"); + break; + } + + switch(StrName(tok->textV)) + { + case STR_dialogue: GetDecl_Dialogue(&d); break; + case STR_page: GetDecl_Page (&d); break; + case STR_terminal: GetDecl_Terminal(&d); break; + case STR_failure: GetDecl_TrmPage (&d, DTRMPAGE_FAILURE); break; + case STR_finished: GetDecl_TrmPage (&d, DTRMPAGE_FINISHED); break; + case STR_unfinished: GetDecl_TrmPage (&d, DTRMPAGE_UNFINISHED); break; + default: + Log("Lith_LoadMapDialogue: invalid identifier \"%s\"", tok->textV); + goto done; + } + } + +done: + d.tb.dtor(); + fclose(d.tb.fp); + + if(world.dbgLevel & log_dlg) + { + static __str const dcdnames[] = { + #define DCD(name) #name, + #include "lith_dialogue.h" + }; + + for(struct dlgdef *def = dlgdefs; def; def = def->next) { + Log("Dumping code for script %i...", def->num); + for(int i = 0; i < def->codeC; i++) + Log("%i (%S)", def->codeV[i], def->codeV[i] < countof(dcdnames) + ? dcdnames[def->codeV[i]] : "<none>"); + } + + Log("Done."); + } +} + +// EOF + diff --git a/source/Main/w_dmon.c b/source/Main/w_dmon.c new file mode 100644 index 0000000..99f76e4 --- /dev/null +++ b/source/Main/w_dmon.c @@ -0,0 +1,102 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_monster.h" +#include "lith_world.h" +#include "lith_player.h" + +#define DMON_MAX 0x7FFF + +// Static Objects ------------------------------------------------------------| + +// This is lazy-allocated. Don't touch or GDCC will break your computer's face. +[[__no_init]] static dmon_t dmonalloc[DMON_MAX]; + +// Extern Objects ------------------------------------------------------------| + +__addrdef __mod_arr dmonarr; + +int dmonarr dmonid; + +// Extern Functions ----------------------------------------------------------| + +// +// PrintDmonAllocSize +// +void PrintDmonAllocSize(struct player *p) +{ + p->logH("> dmonalloc is %.2k megabytes!", (sizeof(dmonalloc) * 4) / 1024 / 1024.0); +} + +// +// DmonDebugInfo +// +void DmonDebugInfo(void) +{ + static int lmvar idprev; + + if(world.dbgLevel < log_dmon) + return; + + if(idprev < dmonid) { + int hilvl = 0, lolvl = MAXLEVEL; + int hirnk = 0, lornk = MAXRANK; + + for(int i = idprev; i < dmonid; i++) { + dmon_t *m = &dmonalloc[i]; + if(m->level < lolvl) lolvl = m->level; + if(m->level > hilvl) hilvl = m->level; + if(m->rank < lornk) lornk = m->rank; + if(m->rank > hirnk) hirnk = m->rank; + } + + Log("\Cghighest\C- level enemy: lv.%i", hilvl); + Log("\Chlowest \C- level enemy: lv.%i", lolvl); + Log("\Cghighest\C- rank enemy: r%i", hirnk); + Log("\Chlowest \C- rank enemy: r%i", lornk); + } + + idprev = dmonid; +} + +// +// DmonPtr +// +[[__call("ScriptS")]] +dmon_t *DmonPtr(int tid, int ptr) +{ + if(tid || ptr) + ACS_SetActivator(tid, ptr); + + ifauto(int, id, InvNum("Lith_MonsterID")) + return Dmon(id - 1); + else + return null; +} + +// +// Dmon +// +dmon_t *Dmon(int id) +{ + if(dmonalloc[id].active) + return &dmonalloc[id]; + else + return null; +} + +// +// AllocDmon +// +dmon_t *AllocDmon(void) +{ + dmon_t *m = &dmonalloc[dmonid]; + *m = (struct dmon){}; + + m->active = true; + m->id = dmonid; + + dmonid++; + + return m; +} + +// EOF diff --git a/source/Main/w_monster.c b/source/Main/w_monster.c new file mode 100644 index 0000000..177c267 --- /dev/null +++ b/source/Main/w_monster.c @@ -0,0 +1,511 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_monster.h" +#include "lith_player.h" +#include "lith_world.h" +#include "lith_scorenums.h" + +#include <math.h> + +#define HasResistances(m) ((m)->rank >= 2) + +#define GetInfo(m) \ + do { \ + (m)->ms->x = ACS_GetActorX(0); \ + (m)->ms->y = ACS_GetActorY(0); \ + (m)->ms->z = ACS_GetActorZ(0); \ + \ + (m)->ms->r = ACS_GetActorPropertyFixed(0, APROP_Radius); \ + (m)->ms->h = ACS_GetActorPropertyFixed(0, APROP_Height); \ + \ + (m)->ms->health = ACS_GetActorProperty(0, APROP_Health); \ + } while(0) + +// Types ---------------------------------------------------------------------| + +struct dmon_stat { + fixed x, y, z; + fixed r, h; + int health; + int painwait; + bool finalized; +}; + +struct monster_info { + u64 exp; + i96 score; + enum mtype type; + __str name; + int flags; +}; + +enum { + mif_full = 1 << 0 +}; + +// Static Objects ------------------------------------------------------------| + +#define M(name) Exp_##name, Score_##name +static struct monster_info const monsterinfo[] = { +#if 0 + // Hexen + {9999, Score_ShotgunGuy, mtype_imp, "Ettin", mif_full}, + {9999, Score_Imp, mtype_lostsoul, "FireDemon", mif_full}, + {9999, Score_Arachnotron, mtype_arachnotron, "CentaurLeader", mif_full}, + {9999, Score_Demon, mtype_demon, "Centaur", mif_full}, + {9999, Score_Mancubus, mtype_hellknight, "IceGuy", mif_full}, + {9999, Score_Mancubus, mtype_hellknight, "SerpentLeader", mif_full}, + {9999, Score_Arachnotron, mtype_hellknight, "Serpent", mif_full}, + {9999, Score_HellKnight, mtype_hellknight, "Demon1", mif_full}, + {9999, Score_BaronOfHell, mtype_baron, "Demon2", mif_full}, + {9999, Score_Cacodemon, mtype_mancubus, "Bishop", mif_full}, + {9999, Score_HellKnight, mtype_lostsoul, "Wraith", mif_full}, + {9999, Score_CyberDemon, mtype_cyberdemon, "Dragon", mif_full}, + {9999, Score_CyberDemon, mtype_phantom, "ClericBoss", mif_full}, + {9999, Score_CyberDemon, mtype_phantom, "FighterBoss", mif_full}, + {9999, Score_CyberDemon, mtype_phantom, "MageBoss", mif_full}, + {9999, Score_CyberDemon, mtype_cyberdemon, "Heresiarch", mif_full}, + {9999, Score_DSparil * 2, mtype_cyberdemon, "Korax", mif_full}, +#endif + + // Doom 2 + {M(ZombieMan), mtype_zombie, "ZombieMan" }, + {M(ShotgunGuy), mtype_zombie, "ShotgunGuy" }, + {M(ChaingunGuy), mtype_zombie, "ChaingunGuy" }, + {M(Imp), mtype_imp, "Imp" }, + {M(Demon), mtype_demon, "Demon" }, + {M(Spectre), mtype_demon, "Spectre" }, + {M(LostSoul), mtype_lostsoul, "LostSoul" }, + {M(Mancubus), mtype_mancubus, "Fatso" }, + {M(Mancubus), mtype_mancubus, "Mancubus" }, + {M(Arachnotron), mtype_arachnotron, "Arachnotron" }, + {M(Cacodemon), mtype_cacodemon, "Cacodemon" }, + {M(HellKnight), mtype_hellknight, "Knight" }, + {M(BaronOfHell), mtype_baron, "Baron" }, + {M(Revenant), mtype_revenant, "Revenant" }, + {M(PainElemental), mtype_painelemental, "PainElemental" }, + {M(Archvile), mtype_archvile, "Archvile" }, + {M(SpiderDemon), mtype_mastermind, "SpiderMastermind"}, + {M(CyberDemon), mtype_cyberdemon, "Cyberdemon" }, + + // Heretic + {M(Imp), mtype_imp, "Gargoyle" }, + {M(Demon), mtype_demon, "Golem" }, + {M(Nitrogolem), mtype_demon, "Nitrogolem"}, + {M(Spectre), mtype_demon, "Sabreclaw" }, + {M(Cacodemon), mtype_mancubus, "Disciple" }, + {M(Ophidian), mtype_arachnotron, "Ophidian" }, + {M(HellKnight), mtype_hellknight, "Warrior" }, + {M(BaronOfHell), mtype_cacodemon, "IronLich" }, + {M(Maulotaur), mtype_mastermind, "Maulotaur" }, + {M(DSparil), mtype_cyberdemon, "DSparil" }, + + // Lithium + {1000, 0, mtype_phantom, "James" }, + {2000, 0, mtype_phantom, "Makarov" }, + {3000, 0, mtype_phantom, "Isaac" }, + {0, 0, mtype_cyberdemon, "Steggles"}, + + // Cheogsh.wad + {M(Imp), mtype_imp, "Howler", mif_full}, + {M(Imp), mtype_imp, "SoulHarvester", mif_full}, + {M(Demon), mtype_demon, "Satyr", mif_full}, + {M(BaronOfHell), mtype_baron, "HellWarrior", mif_full}, + {M(CyberDemon), mtype_cyberdemon, "Cheogsh", mif_full}, + {M(Spectre), mtype_demon, "MaulerDemon", mif_full}, + {M(Spectre), mtype_demon, "KDiZDNightmare", mif_full}, + + // ed4_rfo1.wad + {M(CyberDemon), mtype_cacodemon, "RealAbstractPain", mif_full}, + {M(Arachnotron), mtype_arachnotron, "RailSpider", mif_full}, + {M(PainElemental), mtype_painelemental, "EDPE", mif_full}, + {M(Arachnotron), mtype_arachnotron, "Arachnophyte", mif_full}, + {M(Imp), mtype_imp, "DragonFamiliar", mif_full}, + {M(Imp), mtype_imp, "BatFamiliar", mif_full}, + {M(Imp), mtype_imp, "SnakeImp", mif_full}, + {M(DRLACaptain), mtype_zombie, "BazookaZombie", mif_full}, + {M(Imp), mtype_imp, "DarkImp", mif_full}, + {M(Imp), mtype_imp, "ImpWarlord", mif_full}, + + // dop.pk3 + {M(LostSoul), mtype_lostsoul, "LostGhoul", mif_full}, + + // DoomRL Arsenal Monsters + {M(ZombieMan), mtype_zombie, "FormerHuman" }, + {M(ShotgunGuy), mtype_zombie, "FormerSergeant"}, + {M(ChaingunGuy), mtype_zombie, "FormerCommando"}, + {M(DRLACaptain), mtype_zombie, "Former"}, // hue + + // Colorful Hell + {M(ZombieMan), mtype_zombie, "Zombie"}, + {M(ShotgunGuy), mtype_zombie, "SG" }, + {M(ChaingunGuy), mtype_zombie, "CGuy" }, + {M(LostSoul), mtype_lostsoul, "LSoul" }, + {M(HellKnight), mtype_hellknight, "HK" }, + {M(Arachnotron), mtype_arachnotron, "SP1" }, + {M(Cacodemon), mtype_cacodemon, "Caco" }, + {M(Archvile), mtype_archvile, "Arch" }, + {M(PainElemental), mtype_painelemental, "PE" }, + {M(SpiderDemon), mtype_mastermind, "Mind" }, + {M(CyberDemon), mtype_cyberdemon, "Cybie" }, + + // Shut Up and Lithium + {M(ZombieMan), mtype_imp, "Roach", mif_full}, + {M(ZombieMan), mtype_imp, "Remnant", mif_full}, + {M(Imp), mtype_imp, "Turmoil", mif_full}, + {M(ShotgunGuy), mtype_imp, "Pitkis", mif_full}, + {M(ChaingunGuy), mtype_imp, "Helliate", mif_full}, + {M(Demon), mtype_demon, "Satyr", mif_full}, + {M(Spectre), mtype_demon, "Mush", mif_full}, + {M(LostSoul), mtype_lostsoul, "Gsoul", mif_full}, + {M(Cacodemon), mtype_cacodemon, "Accuser", mif_full}, + {M(Revenant), mtype_revenant, "Famine", mif_full}, + {M(PainElemental), mtype_arachnotron, "Writhe", mif_full}, + {M(HellKnight), mtype_hellknight, "Sonnelion", mif_full}, + {M(LostSoul), mtype_lostsoul, "Eotu", mif_full}, + {M(Arachnotron), mtype_arachnotron, "Lolth", mif_full}, + {M(Mancubus), mtype_mancubus, "Malbouge", mif_full}, + {M(BaronOfHell), mtype_baron, "Abaddon", mif_full}, + {M(Archvile), mtype_archvile, "Pestilence", mif_full}, + {M(SpiderDemon), mtype_mastermind, "Granfalloon", mif_full}, + {M(CyberDemon), mtype_cyberdemon, "SoF", mif_full}, + {M(LostSoul), mtype_lostsoul, "Karkass"}, + {M(HellKnight), mtype_imp, "Doorman", mif_full}, + {M(LostSoul), mtype_lostsoul, "UnbodiedFury", mif_full}, + {M(ShotgunGuy), mtype_imp, "Bloodfiend", mif_full}, + {M(Demon), mtype_demon, "Golem", mif_full}, + {M(Demon), mtype_demon, "Phantasm", mif_full}, + {M(Demon), mtype_demon, "Mortuus", mif_full}, + {M(ChaingunGuy), mtype_imp, "Malum", mif_full}, + {M(ShotgunGuy), mtype_imp, "Phasma", mif_full}, + {M(Spectre), mtype_demon, "Licho", mif_full}, + {M(Cacodemon), mtype_cacodemon, "Mandingo", mif_full}, + {M(Cacodemon), mtype_cacodemon, "Hierophant", mif_full}, + {M(CyberDemon), mtype_cyberdemon, "Burrower", mif_full}, + {M(Archvile), mtype_arachnotron, "Aranearum", mif_full}, + {M(Cacodemon), mtype_cacodemon, "Lividus", mif_full}, + {M(HellKnight), mtype_hellknight, "Deepone", mif_full}, + {M(BaronOfHell), mtype_baron, "Deeptwo", mif_full}, +}; +#undef M + +static __str const dmgtype_names[dmgtype_max] = { + "Bullets", + "Energy", + "Fire", + "Magic", + "Melee", + "Shrapnel" +}; + +// Static Functions ----------------------------------------------------------| + +// +// ApplyLevels +// +static void ApplyLevels(dmon_t *m, int prev) +{ + GetInfo(m); + + for(int i = prev + 1; i <= m->level; i++) + { + if(i % 10 == 0) + { + // if we have resistances, randomly pick a resistance we already have + if(HasResistances(m)) + { + int r; + do {r = ACS_Random(0, dmgtype_max-1);} while(m->resist[r] == 0); + m->resist[r] += 2; + } + } + } + + if(m->level >= 5) + { + float rn = m->rank / 10.f; + int hp10 = m->maxhealth / 10; + int newh = (m->level - prev) * hp10 * RandomFloat(rn - .1f, rn + .1f); + ACS_SetActorProperty(0, APROP_Health, m->ms->health + newh); + m->maxhealth += newh; + } + + for(int i = 0; i < dmgtype_max; i++) { + ifauto(int, resist, m->resist[i] / 15.0) { + InvGive(StrParam("Lith_M_%S%i", dmgtype_names[i], + min(resist, MAXRANK)), 1); + } + } +} + +// +// ShowBarrier +// +[[__call("StkCall")]] +static void ShowBarrier(dmon_t const *m, fixed alpha) +{ + bool anyplayer = false; + + // Optimization: Check for players nearby first. + int const xw1 = m->ms->x - 192, xw2 = m->ms->x + 192; + int const yw1 = m->ms->y - 192, yw2 = m->ms->y + 192; + + Lith_ForPlayer() if(aabb(xw1, yw1, xw2, yw2, p->x, p->y)) + {anyplayer = true; break;} + + if(!anyplayer) + return; + + world.begAngles(m->ms->x, m->ms->y); + ACS_GiveInventory("Lith_MonsterBarrierLook", 1); + + for(int i = 0; i < world.a_cur; i++) + { + struct polar *a = &world.a_angles[i]; + + fixed dst = m->ms->r / 2 + a->dst / 4; + fixed x = m->ms->x + ACS_Cos(a->ang) * dst; + fixed y = m->ms->y + ACS_Sin(a->ang) * dst; + int tid = ACS_UniqueTID(); + __str bar = m->rank >= 5 ? "Lith_MonsterHeptaura" : "Lith_MonsterBarrier"; + + ACS_SpawnForced(bar, x, y, m->ms->z + m->ms->h / 2, tid); + ACS_SetActorPropertyFixed(tid, APROP_Alpha, + (1 - a->dst / (256 * (m->rank - 1))) * alpha); + } +} + +// +// BaseMonsterLevel +// +static void BaseMonsterLevel(dmon_t *m) +{ + fixed rn1 = ACS_RandomFixed(1, MAXRANK); + fixed rn2 = ACS_RandomFixed(1, MAXLEVEL); + fixed bias; + + switch(world.game) { + case Game_Episodic: bias = world.mapscleared / 10.0; break; + default: bias = world.mapscleared / 40.0; break; + } + + Lith_ForPlayer() { + rn2 += p->attr.level / 2.0; + break; + } + + bias *= bias; + bias += (ACS_GameSkill() / (fixed)skill_nightmare) * 0.1; + bias += world.difficulty / 100.0; + bias *= ACS_RandomFixed(1, 1.5); + + m->rank = minmax(rn1 * bias * 2, 1, MAXRANK); + m->level = minmax(rn2 * bias * 1, 1, MAXLEVEL); + + if(HasResistances(m)) { + for(int i = 0; i < m->rank; i++) + m->resist[ACS_Random(1, dmgtype_max)-1] += 5; + } + + ApplyLevels(m, 0); +} + +// +// ApplyPainResist +// +static void ApplyPainResist(dmon_t *m) +{ + if(!m->ms->painwait) { + ACS_GiveInventory("Lith_MonsterUsePain", 1); + m->ms->painwait = m->painresist; + } else { + ACS_GiveInventory("Lith_MonsterNoPain", 1); + m->ms->painwait--; + } +} + +// +// SoulCleave +// +// Spawn a Monster Soul and temporarily set the species of it until the +// actor is no longer solid, so it won't explode immediately. +// +[[__call("ScriptS")]] +static void SoulCleave(dmon_t *m, struct player *p) +{ + int tid = ACS_UniqueTID(); + ACS_SpawnForced("Lith_MonsterSoul", m->ms->x, m->ms->y, m->ms->z + 16, tid); + ACS_SetActorProperty(tid, APROP_Damage, 7 * m->rank * ACS_Random(1, 8)); + + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + ACS_SetActorPropertyString(tid, APROP_Species, + ACS_GetActorPropertyString(0, APROP_Species)); + + for(int i = 0; ACS_CheckFlag(0, "SOLID") && i < 15; i++) + ACS_Delay(1); + + ACS_SetActorPropertyString(tid, APROP_Species, "Lith_Player"); +} + +// +// SpawnManaPickup +// +static void SpawnManaPickup(dmon_t *m, struct player *p) +{ + int i = 0; + do { + int tid = ACS_UniqueTID(); + int x = m->ms->x + ACS_Random(-8, 8); + int y = m->ms->y + ACS_Random(-8, 8); + ACS_Spawn("Lith_ManaPickup", x, y, m->ms->z + 4, tid); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TRACER, p->tid); + Lith_SetPointer(tid, AAPTR_DEFAULT, AAPTR_TARGET, p->tid); + i += 150; + } while(i < m->maxhealth); +} + +// +// OnFinalize +// +static void OnFinalize(dmon_t *m) +{ + withplayer(Lith_GetPlayer(0, AAPTR_TARGET)) + { + if(p->sigil.acquired) + { + if(p->weapon.cur->info->type == weapon_c_starshot && rand() == 1) + ACS_Teleport_EndGame(); + + if(m->type == mtype_imp && m->level >= 50 && m->rank >= 4) + ACS_SpawnForced("Lith_ClawOfImp", m->ms->x, m->ms->y, m->ms->z); + } + + if(!m->ms->finalized) + { + if(p->getUpgrActive(UPGR_Magic) && p->mana != p->manamax && + (m->type != mtype_zombie || ACS_Random(0, 50) < 10)) + { + SpawnManaPickup(m, p); + } + + if(p->getUpgrActive(UPGR_SoulCleaver)) + SoulCleave(m, p); + } + + if(p->health < 5) p->giveEXP(50); + else if(p->health < 15) p->giveEXP(25); + else if(p->health < 25) p->giveEXP(10); + + Lith_GiveAllEXP(m->exp + m->level + (m->rank - 1) * 10); + } + + m->ms->finalized = true; +} + +// +// OnDeath +// +static void OnDeath(dmon_t *m) +{ + LogDebug(log_dmon, "monster %i is ded", m->id); + m->wasdead = true; + + OnFinalize(m); + + // If enemies emit score on death we only need to give extra rank score. + Lith_GiveAllScore((world.enemycompat ? 0 : m->score) + m->rank * 500, false); +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_MonsterMain +// +[[__call("ScriptS"), __alloc_Aut(0x7F)]] +void Lith_MonsterMain(dmon_t *m) +{ + struct dmon_stat ms = {}; + + InvGive("Lith_MonsterID", m->id + 1); + + m->ms = &ms; + GetInfo(m); + m->maxhealth = m->ms->health; + + BaseMonsterLevel(m); + + LogDebug(log_dmonV, "monster %-4i \Cdr%i \Cgl%-3i \C-running on %S", + m->id, m->rank, m->level, ACS_GetActorClass(0)); + + for(int tic = 0;; tic++) + { + GetInfo(m); + + if(m->ms->health <= 0) + { + OnDeath(m); + + do {ACS_Delay(3); GetInfo(m);} while(m->ms->health <= 0); + + LogDebug(log_dmon, "monster %i resurrected", m->id); + } + + if(HasResistances(m) && m->level >= 20) + ShowBarrier(m, m->level / (fixed)MAXLEVEL); + + if(ACS_CheckInventory("Lith_Ionized") && tic % 5 == 0) + ACS_GiveInventory("Lith_IonizedFXSpawner", 1); + + if(m->painresist) ApplyPainResist(m); + + ACS_Delay(2); + } +} + +// +// Lith_MonsterInfo +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_MonsterInfo(int tid) +{ + if(tid) ACS_SetActivator(tid); + while(!world.gsinit) ACS_Delay(1); + + __str cname = ACS_GetActorClass(0); + + for(int i = 0; i < countof(monsterinfo); i++) + { + struct monster_info const *mi = &monsterinfo[i]; + bool init; + + if(mi->flags & mif_full) init = cname == mi->name; + else init = strstr_str(cname, mi->name); + + if(init) + { + ifauto(dmon_t *, m, AllocDmon()) { + m->type = mi->type; + m->score = mi->score; + m->exp = mi->exp; + Lith_MonsterMain(m); + } + return; + } + } + + LogDebug(log_dmon, "no monster %S", cname); + + // If the monster failed all checks, give them this so we don't need to recheck every tick. + InvGive("Lith_MonsterInvalid", 1); +} + +// +// Lith_MonsterFinalized +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_MonsterFinalized() +{ + ifauto(dmon_t *, m, DmonPtr()) + OnFinalize(m); +} + +// EOF diff --git a/source/Main/w_title.c b/source/Main/w_title.c new file mode 100644 index 0000000..efe1468 --- /dev/null +++ b/source/Main/w_title.c @@ -0,0 +1,79 @@ +// Copyright © 2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" + +// Types ---------------------------------------------------------------------| + +enum +{ + hid_t_begin = 10, + hid_t_blinker, + hid_t_opener, +}; + +// Static Functions ----------------------------------------------------------| + +// +// Blinker +// +[[__call("ScriptS")]] +void Blinker(void) +{ + static int const time = 20; + + fixed a = 0; + + for(int t = 0;; t++) + { + if(t < time) + { + HudMessage("\Cd[Press any key to begin]"); + HudMessageAlpha(hid_t_blinker, 0.5, 0.8, TS, a); + a += 0.006; + } + else if(t >= time*2) + { + t = 0; + a += 0.004; + } + + if(a > 1) a = 1; + + ACS_Delay(1); + } +} + +// Extern Functions ----------------------------------------------------------| + +// +// Lith_Title +// +[[__call("ScriptS")]] +void Lith_Title(void) +{ + ACS_Delay(35*5); + + Blinker(); + + ACS_SetHudSize(320, 240); + + __str txt = Language("LITH_TXT_OPENER"); + int len = ACS_StrLen(txt); + int pos = 0; + + int t = 0; + + for(;;) + { + if(pos < len) pos++; + + HudMessage("%.*S", pos, txt); + HudMessageParams(HUDMSG_FADEOUT, hid_t_opener, CR_GREEN, 7.1, 6.1, 7, 7.0); + + if(pos == len) + return; + + ACS_Delay(txt[pos] == '\n' ? 20 : 1); + } +} + +// EOF diff --git a/source/Main/w_world.c b/source/Main/w_world.c new file mode 100644 index 0000000..df9dcb4 --- /dev/null +++ b/source/Main/w_world.c @@ -0,0 +1,749 @@ +// Copyright © 2016-2017 Graham Sanderson, all rights reserved. +#include "lith_common.h" +#include "lith_player.h" +#include "lith_world.h" +#include "lith_monster.h" +#include "lith_version.h" + +#include <math.h> + +#define InSecret \ + (world.game == Game_Doom2 && (world.cluster == 9 || world.cluster == 10)) + +#define InHell \ + (world.game == Game_Doom2 && world.cluster >= 8) + +#define OnEarth \ + (world.game == Game_Doom2 && world.cluster == 7) + +// Extern Objects ------------------------------------------------------------| + +__addrdef __mod_arr lmvar; +__addrdef __hub_arr lwvar; + +bool lmvar mapinit; +int lmvar mapid; + +worldinfo_t world = {.apiversion = Lith_APIVersion}; +payoutinfo_t payout; + +// Static Objects ------------------------------------------------------------| + +static bool lmvar rain_chk; +static fixed lmvar rain_px; +static fixed lmvar rain_py; +static int lmvar rain_dist; + +static bool reopen; +static bool dorain; + +// Extern Functions ----------------------------------------------------------| + +[[__call("ScriptS"), __extern("ACS")]] +void Lith_SpawnBosses(i96 sum, bool force); + +// +// Lith_GetWorldExtern +// +worldinfo_t *Lith_GetWorldExtern(void) +{ + return &world; +} + +// +// Lith_FreezeTime +// +[[__call("StkCall")]] +void Lith_FreezeTime(bool on) +{ + static int lmvar frozen; + + if(on) + { + if(!frozen++) + { + Lith_ForPlayer() + { + p->frozen++; + p->setVel(0, 0, 0); + } + + Lith_ForPlayer() + { + Lith_GiveActorInventory(p->tid, "Lith_TimeHax", 1); + Lith_GiveActorInventory(p->tid, "Lith_TimeHax2", 1); + break; + } + } + } + else + { + if(!--frozen) + { + Lith_ForPlayer() p->frozen--; + + Lith_ForPlayer() + { + Lith_TakeActorInventory(p->tid, "PowerTimeFreezer", 1); + Lith_TakeActorInventory(p->tid, "Lith_TimeHax2", 1); + break; + } + } + } +} + +// +// Lith_BeginAngles +// +[[__call("StkCall")]] +void Lith_BeginAngles(int x, int y) +{ + world.a_cur = 0; + for(int i = 0; i < countof(world.a_angles); i++) + { + world.a_angles[i].ang = 0; + world.a_angles[i].dst = 0; + } + world.a_x = x; + world.a_y = y; +} + +// +// Lith_AddAngle +// +[[__call("StkCall")]] +fixed Lith_AddAngle(int x, int y) +{ + if(world.a_cur >= countof(world.a_angles)) + return 0; + + struct polar *p = &world.a_angles[world.a_cur++]; + *p = ctopol(x - world.a_x, y - world.a_y); + return p->ang; +} + +// +// Lith_AddAngleScript +// +[[__call("ScriptS"), __extern("ACS"), __address("Lith_AddAngle")]] +void Lith_AddAngleScript(int x, int y) +{ + Lith_AddAngle(x, y); +} + +// +// Lith_CanonTime +// +__str Lith_CanonTime(int type) +{ + int seconds = 53 + (world.ticks / 35); + int minutes = 30 + (seconds / 60); + int hours = 14 + (minutes / 60); + int days = 25 + (hours / 24); // pls + + switch(type) + { + case CANONTIME_FULL: + return StrParam("%0.2i:%0.2i:%0.2i %i-7-1649", + hours % 24, minutes % 60, seconds % 60, days); + case CANONTIME_SHORT: + return StrParam("%0.2i:%0.2i %i-7-49", + hours % 24, minutes % 60, days); + case CANONTIME_DATE: + return StrParam("%i-7-1649", days); + } +} + +// +// Lith_UniqueID +// +int Lith_UniqueID(int tid) +{ + int pn; + + // Negative values are for players. + if((pn = Lith_GetPlayerNumber(tid)) != -1) + return -(pn + 1); + + // If we already have a unique identifier, return that. + int id = Lith_CheckActorInventory(tid, "Lith_UniqueID"); + + // Otherwise we have to give a new unique identifier. + if(id == 0) + Lith_GiveActorInventory(tid, "Lith_UniqueID", id = ++mapid); + + return id; +} + +// +// Lith_EmitScore +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_EmitScore(int amount) +{ + Lith_GiveAllScore(amount, false); +} + +// +// Lith_EmitEXP +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_EmitEXP(int amount) +{ + Lith_GiveAllEXP(amount); +} + +// +// Lith_MakeSerious +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_MakeSerious() +{ + ACS_SetActorProperty(0, APROP_RenderStyle, STYLE_None); + ACS_SetActorPropertyString(0, APROP_ActiveSound, "silence"); + ACS_SetActorPropertyString(0, APROP_DeathSound, "silence"); + ACS_SetActorPropertyString(0, APROP_PainSound, "silence"); +} + +// +// LPData +// +[[__call("ScriptS"), __extern("ACS")]] +int LPData(int info, int permutation, bool target) +{ + if(target) ACS_SetActivatorToTarget(0); + + withplayer(LocalPlayer) + switch(info) + { + case pdata_upgrade: return p->getUpgrActive(permutation); + case pdata_buttons: return p->buttons; + case pdata_rifle_firemode: return p->riflefiremode; + case pdata_has_sigil: return p->sigil.acquired; + case pdata_weapon_zoom: return bitsk(p->getCVarK("lith_weapons_zoomfactor")); + case pdata_pclass: return p->pclass; + } + + return 0; +} + +// +// LWData +// +[[__call("ScriptS"), __extern("ACS")]] +int LWData(int info) +{ + switch(info) + { + case wdata_bossspawned: return world.bossspawned; + case wdata_enemycheck: return world.enemycheck; + case wdata_ptid: Lith_ForPlayer() return p->tid; + case wdata_pclass: Lith_ForPlayer() return p->pclass; + case wdata_magdrops: Lith_ForPlayer() + return p->getCVarI("lith_weapons_magdrops"); + } + + return 0; +} + +// +// Lith_RainDropSpawn +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_RainDropSpawn() +{ + if(rain_chk) + { + int dist = + mag2i(ACS_GetActorX(0) - rain_px, ACS_GetActorY(0) - rain_py); + if(dist < rain_dist) + rain_dist = dist; + } +} + +// Static Functions ----------------------------------------------------------| + +// +// DoRain +// +[[__call("ScriptS")]] +static void DoRain() +{ + // Doesn't work in multiplayer, sorry! + if(ACS_PlayerCount() > 1) + return; + + dorain = true; + + struct player *p = &players[0]; + p->setActivator(); + + ACS_PlaySound(p->weathertid, "amb/wind", CHAN_BODY, 0.001, true, ATTN_NONE); + ACS_PlaySound(p->weathertid, "amb/rain", CHAN_VOICE, 0.001, true, ATTN_NONE); + + fixed skydist, curskydist = 1; + for(;;) + { + if((rain_chk = !ACS_CheckActorCeilingTexture(0, "F_SKY1"))) + { + rain_dist = 1024; + rain_px = p->x; + rain_py = p->y; + } + else + InvTake("Lith_SMGHeat", 1); + + if((InHell || InSecret) && !world.islithmap) + ACS_GiveActorInventory(p->tid, "Lith_SpawnBloodRain", 1); + else + ACS_GiveActorInventory(p->tid, "Lith_SpawnRain", 1); + + ACS_Delay(1); + + if(rain_chk) + { + skydist = rain_dist / 1024.0; + skydist = minmax(skydist, 0, 1); + } + else + skydist = 0; + + curskydist = lerpk(curskydist, skydist, 0.035); + ACS_SoundVolume(p->weathertid, CHAN_BODY, 1 - curskydist); + ACS_SoundVolume(p->weathertid, CHAN_VOICE, 1 - curskydist); + } +} + +// +// DoPayout +// +static void DoPayout(void) +{ + fixed64 taxpct = ACS_RandomFixed(0, 4 / 100.0); + + #define GenPay(name) \ + if(payout.name##max) \ + { \ + payout.name##pct = (payout.name##num / (fixed64)payout.name##max) * 100; \ + payout.name##scr = payout.name##pct * 600; \ + } + + GenPay(kill) + GenPay(item) + + #undef GenPay + + payout.total = payout.killscr + payout.itemscr; + payout.total -= payout.tax = payout.total * taxpct; + + Lith_ForPlayer() + { + [[__call("ScriptS")]] + extern void Lith_PlayerPayout(struct player *p); + + Lith_PlayerPayout(p); + } + + payout = (payoutinfo_t){}; +} + +// +// CheckEnemyCompat +// +[[__call("ScriptS")]] +static void CheckEnemyCompat(void) +{ + if(ACS_GetCVar("sv_nomonsters") || world.enemycheck) + return; + + int tid; + if(ACS_SpawnForced("ZombieMan", 0, 0, 0, tid = ACS_UniqueTID(), 0)) + { + ACS_SetActivator(tid); + InvGive("Lith_EnemyChecker", 1); + + __str cl = ACS_GetActorClass(0); + + LogDebug(log_dev, "Enemy check on %S", cl); + + if(strstr_str(cl, "Lith_") || ACS_StrCmp(cl, "RLFormer", 8) == 0) + world.enemycompat = true; + + if(world.enemycompat) LogDebug(log_dev, "Enemies are \Cdcompatible"); + else LogDebug(log_dev, "Enemies are \Cgnot compatible"); + + world.enemycheck = true; + ACS_Thing_Remove(0); + } +} + +// +// SpawnBoss +// +[[__call("ScriptS")]] +static void SpawnBoss() +{ + ACS_Delay(1); // Delay another tic for monster spawners. + + Lith_ForPlayer() { + Lith_SpawnBosses(p->scoresum, false); + break; + } +} + +// +// GetDebugInfo +// +static void GetDebugInfo(void) +{ + bool all = ACS_GetCVar("__lith_debug_all"); + + world.dbgLevel = ACS_GetCVar("__lith_debug_level"); + world.dbgItems = all || ACS_GetCVar("__lith_debug_items"); + world.dbgBIP = all || ACS_GetCVar("__lith_debug_bip"); + world.dbgScore = all || ACS_GetCVar("__lith_debug_score"); + world.dbgUpgr = all || ACS_GetCVar("__lith_debug_upgrades"); + world.dbgSave = all || ACS_GetCVar("__lith_debug_save"); + world.dbgNoMon = ACS_GetCVar("__lith_debug_nomonsters"); +} + +// +// CheckModCompat +// +static void CheckModCompat(void) +{ + int tid; + + if((world.legendoom = ACS_SpawnForced("LDLegendaryMonsterMarker", 0, 0, 0, tid = ACS_UniqueTID(), 0))) ACS_Thing_Remove(tid); + + world.drlamonsters = ACS_GetCVar("DRLA_is_using_monsters"); +} + +// +// UpdateGame +// +static void UpdateGame(void) +{ + #define Update(n) \ + if(ACS_GetCVarFixed("__lith_version") < n) \ + __with(ACS_SetCVarFixed("__lith_version", n);) + + Update(15.1) ACS_SetCVarFixed("lith_sv_scoremul", 1.25); // 2.0=>1.25 + Update(15.2) ACS_SetCVar("lith_sv_difficulty", 10); // 1=>10 + Update(16.0) + Lith_ForPlayer() p->setCVarK("lith_player_footstepvol", 0.2); // 1.0=>0.2 + + #undef Update +} + +// +// GSInit +// +static void GSInit(void) +{ + extern void Lith_GInit_Shop(void); + extern void Lith_GSReinit_Upgrade(void); + extern void Lith_GSInit_Upgrade(void); + extern void Lith_GSInit_Weapon(void); + extern void Lith_GSInit_Dialogue(void); + extern void Lith_InstallCBIItem(int num); + + LogDebug(log_dev, "GINIT RUNNING"); + + CheckModCompat(); + UpdateGame(); + GetDebugInfo(); + Lith_GInit_Shop(); + + if(!world.gsinit) + { + LogDebug(log_dev, "GSINIT RUNNING"); + + Lith_GSInit_Upgrade(); + Lith_GSInit_Weapon(); + Lith_GSInit_Dialogue(); + + CheckEnemyCompat(); + + world.game = ACS_GetCVar("__lith_game"); + world.singleplayer = ACS_GameType() == GAME_SINGLE_PLAYER; + + world.cbiperf = 10; + if(ACS_GetCVar("lith_sv_nobosses") || world.dbgItems) + for(int i = 0; i < cupg_max; i++) + Lith_InstallCBIItem(i); + + world.gsinit = true; + } + else + Lith_GSReinit_Upgrade(); +} + +// +// MInit +// +static void MInit(void) +{ + LogDebug(log_dev, "MINIT RUNNING"); + + extern void Lith_LoadMapDialogue(void); + Lith_LoadMapDialogue(); + + world.islithmap = (world.mapnum & 0xFFFFFC00) == 0x01202000; + + // Init a random seed from the map. + world.mapseed = ACS_Random(0, 0x7FFFFFFF); + + // Init global score multiplier per-map. + world.scoremul = round(ACS_GetCVarFixed("lith_sv_scoremul") * 10) / 10; + + // Give players some extra score if they're playing on extra hard or above. + if(ACS_GameSkill() >= skill_extrahard) + world.scoremul += 0.15; + + // Set the air control because ZDoom's default sucks. + ACS_SetAirControl(0.77); + + // Set up translations. + for(int i = 0; i < 8; i++) + { + static struct {int r,g,b;} const trs[8] = { + {0xF5,0x22,0x22}, + {0xF5,0x22,0xC4}, + {0xC0,0x22,0xF5}, + {0x50,0x22,0xF5}, + {0x22,0xF5,0xF5}, + {0x22,0xF5,0x8C}, + {0xF5,0xF5,0x22}, + {0xF5,0xB2,0x22}, + }; + ACS_CreateTranslationStart(42470 + i); + ACS_CreateTranslationRGB(80, 111, trs[i].r, trs[i].g, trs[i].b, + trs[i].r/4, trs[i].g/4, trs[i].b/4); + ACS_CreateTranslationEnd(); + } +} + +// +// MSInit +// +static void MSInit(void) +{ + LogDebug(log_dev, "MSINIT RUNNING"); + + payout.killmax += world.mapkillmax; + payout.itemmax += world.mapitemmax; + + // Line 1888300 is used as a control line for mod features. + // Check for if rain should be used. + if(!ACS_GetLineUDMFInt(1888300, "user_lith_norain") && + (ACS_GetCVar("lith_sv_rain") || ACS_GetLineUDMFInt(1888300, "user_lith_userain"))) + DoRain(); +} + +// +// WSInit +// +static void WSInit(void) +{ + LogDebug(log_dev, "WSINIT RUNNING"); + + dmonid = 0; + world.bossspawned = false; + + if(world.unloaded) + world.mapscleared++; + + if(ACS_GetCVar("lith_sv_sky") && !world.islithmap) + { + if(InHell) + { + ACS_ChangeSky("LITHSKRD", "LITHSKRD"); + ACS_SetSkyScrollSpeed(1, 0.01); + } + else if(OnEarth) + ACS_ChangeSky("LITHSKDE", "LITHSKDE"); + else + ACS_ChangeSky("LITHSKS1", "LITHSKS1"); + } +} + +// +// WInit +// +static void WInit(void) +{ + LogDebug(log_dev, "WINIT RUNNING"); + + if(!ACS_GetCVar("lith_sv_nobosses")) + SpawnBoss(); + + // Payout, which is not done on the first map. + if(world.mapscleared != 0) + DoPayout(); + + // Cluster messages. + #define Message(cmp, n, name) \ + if(world.cluster cmp && !msgs[n]) { \ + Lith_ForPlayer() \ + p->deliverMail(name); \ + msgs[n] = true; \ + } else ((void)0) + + static bool msgs[5]; + + if(world.game == Game_Doom2) + { + Message(>= 6, 0, "Cluster1"); + Message(>= 7, 1, "Cluster2"); + Message(== 8, 2, "Cluster3"); + Message(== 9, 3, "Secret1"); + Message(== 10, 4, "Secret2"); + } +} + +// Scripts -------------------------------------------------------------------| + +// +// Lith_World +// +[[__call("ScriptS"), __script("open")]] +static void Lith_World(void) +{ +begin: + if(ACS_GameType() == GAME_TITLE_MAP) { + [[__call("ScriptS")]] + extern void Lith_Title(void); + Lith_Title(); + return; + } + + LogDebug(log_dev, "LITH OPEN"); + + if(world.mapnum == 1911777) + { + ACS_Exit_Normal(0); + return; + } + + dbgnotenum = 0; + + ACS_Delay(1); + + GSInit(); // Init global state. + MInit(); // Map init. + + // World-static pre-player init. + bool doworldinit = false; + + if(ACS_Timer() <= 2) + { + WSInit(); + doworldinit = true; + } + + world.unloaded = false; // World unloaded flag can be reset now. + mapinit = true; // Sigil for when Lith_PlayerEntry can run. + + ACS_Delay(1); // Delay so players get initialized. + + // World-static post-player init. + if(doworldinit) + WInit(); + + // Map-static post-world init. + MSInit(); + + // Main loop. + int prevsecrets = 0; + int prevkills = 0; + int previtems = 0; + + int missionkill = 0; + int missionprc = 0; + + for(;;) + { + if(reopen) { + mapinit = reopen = false; + goto begin; + } + + if(world.ticks > 67 * 35 * 60 * 60 && !world.islithmap) + ACS_Teleport_NewMap(1911777, 0, 0); + + int secrets = world.mapsecrets; + int kills = world.mapkills; + int items = world.mapitems; + + if(secrets > prevsecrets) { + int delta = secrets - prevsecrets; + Lith_GiveAllScore(9000 * delta, true); + world.secretsfound += delta; + } + + if(kills > prevkills) payout.killnum += kills - prevkills; + if(items > previtems) payout.itemnum += items - previtems; + + prevsecrets = secrets; + prevkills = kills; + previtems = items; + + if(world.enemycheck && !world.dbgNoMon) { + extern void DmonDebugInfo(void); + ACS_SpawnForced("Lith_MonsterInfoEmitter", 0, 0, 0); + DmonDebugInfo(); + } + + if(ACS_Timer() % 5 == 0 && missionkill < kills) + { + if(++missionprc >= 150) { + Lith_SpawnBosses(0, true); + missionprc = 0; + } + missionkill = kills; + } + + DebugStat("mission%%: %i\n", missionprc); + + ACS_Delay(1); + + dbgstatnum = 0; + world.ticks++; + + if(world.autosave && world.ticks % (35 * 60 * world.autosave) == 0) + ACS_Autosave(); + } +} + +// +// Lith_WorldReopen +// +[[__call("ScriptS"), __extern("ACS")]] +void Lith_WorldReopen(void) +{ + reopen = true; +} + +// +// Lith_WorldUnload +// +[[__call("ScriptS"), __script("unloading")]] +static void Lith_WorldUnload(void) +{ + extern void Lith_InstallSpawnedCBIItems(void); + world.unloaded = true; + LogDebug(log_dev, "WORLD UNLOADED"); + + Lith_InstallSpawnedCBIItems(); + + Lith_ForPlayer() { + p->setActivator(); + Lith_PlayerDeinitUpgrades(p); + p->closeGUI(); + Lith_PlayerUpdateStats(p); + } +} + +// EOF + diff --git a/source/Weapons.txt b/source/Weapons.txt new file mode 100644 index 0000000..c76de43 --- /dev/null +++ b/source/Weapons.txt @@ -0,0 +1,45 @@ +Weapons to be processed into C files. Colon denotes a pclass group. +Left brace denotes a weapon. Semicolon denotes a pickup group. +Percent denotes flags. Any other text is ignored by the parser. + +:outcasts +{cfist 1 ChargeFist P("cfist") None +{missile 5 MissileLauncher P("missile") AMag A("Rocket") +{plasmadiff 6 PlasmaDiffuser P("plasdiff") Ammo A("Plasma") + +:marine +{fist 1 Fist Placeholder1 None +{pistol 2 Pistol P("pistol") NMag +{revolver 2 Revolver P("revolver") NMag +{shotgun 3 Shotgun P("shotgun") None +{lazshotgun 3 LazShotgun P("lshotgun") None +{ssg 3 SuperShotgun P("ssg") Ammo A("Shell") +{rifle 4 CombatRifle P("rifle") NMag +{sniper 4 SniperRifle P("sniper") NMag +{launcher 5 GrenadeLauncher P("rocket") Ammo A("Rocket") +{plasma 6 PlasmaRifle P("plasma") Ammo A("Plasma") +{bfg 7 BFG9000 P("cannon") Ammo A("Cannon") +;fist cfist pistol shotgun ssg rifle launcher plasma bfg + +:cybermage +{c_fist 1 CFist Placeholder2 None +{c_mateba 2 Mateba P("mateba") NMag +{c_rifle 3 ShockRifle P("erifle") NMag +{c_spas 3 SPAS P("cshotgun") AMag A("Shell") +{c_smg 4 SMG P("smg") NMag +{c_sniper 5 IonRifle P("ionrifle") AMag A("Rocket") +{c_plasma 6 CPlasmaRifle P("plasma") Ammo A("Plasma") +{c_shipgun 7 StarDestroyer P("shipgun") Ammo A("Cannon") +;c_fist cfist c_mateba c_rifle c_spas c_smg c_sniper c_plasma c_shipgun + +%wf_magic +{c_blade 0 Blade Placeholder1 Ammo "Lith_Mana" +{c_delear 0 Delear Placeholder1 AMag "Lith_Mana" +{c_fire 0 Feuer Placeholder1 Ammo "Lith_Mana" +{c_rend 0 Rend Placeholder1 Ammo "Lith_Mana" +{c_hulgyon 0 Hulgyon Placeholder1 Ammo "Lith_Mana" +{c_starshot 0 StarShot Placeholder1 AMag "Lith_Mana" +{c_cercle 0 Cercle Placeholder1 Ammo "Lith_Mana" +% + +EOF diff --git a/strh.rb b/strh.rb new file mode 100644 index 0000000..39205b4 --- /dev/null +++ b/strh.rb @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby +## Copyright © 2017 Graham Sanderson, all rights reserved. +## strh: Simple string hash utility. + +res = 0 + +for ch in ARGV[0].each_codepoint + res = res * 101 + ch + res &= 0x7FFFFFFF +end + +print res + +## EOF diff --git a/wepc.rb b/wepc.rb new file mode 100644 index 0000000..8877e5e --- /dev/null +++ b/wepc.rb @@ -0,0 +1,208 @@ +#!/usr/bin/env ruby +## Copyright © 2017 Graham Sanderson, all rights reserved. +## wepc: Weapon info text compiler. +## vim: columns=110 + +def outHeader fp, weps + fp.puts <<-END +// dec output: pk/lscripts/Headers/lith_weapons.h + +// This file was generaed by wepc. +// Edit only if you aren't going to recompile. + +enum // Lith_WeaponNum +{ + weapon_min = 1, + weapon_unknown = 0, + +#{ + ret = "" + for wep in weps + ret += " #{wep.nam},\n" + end + ret +} + weapon_max_lith, + weapon_nonlith_start = weapon_max_lith - 1, + +#{ + ret = "" + for cl in ["plut", "tnt", "doom2", "aliens", "jpcp", "btsx"] + for wp in ["fist", "chainsaw", "pistol", "shotgun", "ssg", "chaingun", "launcher", "plasma", "bfg"] + ret += " weapon_fd_#{cl}_#{wp},\n" + end + end + ret +} + weapon_max +}; + +enum // Lith_WeaponName +{ + wepnam_fist, + wepnam_chainsaw, + wepnam_pistol, + wepnam_shotgun, + wepnam_supershotgun, + wepnam_chaingun, + wepnam_rocketlauncher, + wepnam_plasmarifle, + wepnam_bfg9000, + + wepnam_max, +}; + +enum // Lith_RifleMode +{ + rifle_firemode_auto, + rifle_firemode_grenade, + rifle_firemode_burst, + rifle_firemode_max +}; + +// EOF +END +end + +def outSource fp, weps, wepn + fp.puts <<-END +// This file was generated by wepc. +// Edit only if you aren't going to recompile. +#include "lith_player.h" + +// Extern Objects ------------------------------------------------------------| + +#define Placeholder1 "MMMMHMHMMMHMMM" +#define Placeholder2 "YOUSONOFABITCH" +#define A(a) "Lith_" a "Ammo" +#define P(a) "weapons/" a "/pickup" +#define N(a) .classname = "Lith_" a, .name = a +#define F(...) .flags = __VA_ARGS__ +#define FN(a) .classname = "FD" a, .name = a +#define FDClass(cname) \\ + {1, pcl_fdoomer, FN(cname "Fist"), "YOUSONOFABITCH", AT_None}, \\ + {1, pcl_fdoomer, FN(cname "Chainsaw"), P("cfist"), AT_None}, \\ + {2, pcl_fdoomer, FN(cname "Pistol"), P("pistol"), AT_Ammo, "FD" cname "PistolAmmo"}, \\ + {3, pcl_fdoomer, FN(cname "Shotgun"), P("shotgun"), AT_Ammo, "FD" cname "Shells"}, \\ + {3, pcl_fdoomer, FN(cname "SuperShotgun"), P("ssg"), AT_Ammo, "FD" cname "Shells"}, \\ + {4, pcl_fdoomer, FN(cname "Chaingun"), P("rifle"), AT_Ammo, "FD" cname "Bullets"}, \\ + {5, pcl_fdoomer, FN(cname "RocketLauncher"), P("rocket"), AT_Ammo, "FD" cname "Rocket"}, \\ + {6, pcl_fdoomer, FN(cname "PlasmaRifle"), P("plasma"), AT_Ammo, "FD" cname "Cell"}, \\ + {7, pcl_fdoomer, FN(cname "BFG9000"), P("cannon"), AT_Ammo, "FD" cname "BFGCharge"}, +weaponinfo_t const weaponinfo[weapon_max] = { + {0, pcl_any, null, "MMMMHMHMMMHMMM"}, + +#{ + ret = "" + for wep in weps + ret += " {#{wep.slt}, #{wep.pcl}, #{wep.res.join ", "}},\n" + end + ret +} + FDClass("Plut") + FDClass("TNT") + FDClass("Doom2") + FDClass("Aliens") + FDClass("JPCP") + FDClass("BTSX") +}; +#undef FDClass + +// Extern Functions ----------------------------------------------------------| + +int Lith_WeaponFromName(struct player *p, int name) +{ + switch(p->pclass) + { +#{ + ret = "" + for pcl, wpns in wepn + wepnames = ["wepnam_fist", "wepnam_chainsaw", "wepnam_pistol", "wepnam_shotgun", + "wepnam_supershotgun", "wepnam_chaingun", "wepnam_rocketlauncher", + "wepnam_plasmarifle", "wepnam_bfg9000"] + ret += " case #{pcl}:\n switch(name) {\n" + for wep, i in wpns.each_with_index + ret += " case #{wepnames[i]}: return #{wep};\n" + end + ret += " }\n" + end + ret +} + case pcl_fdoomer: + #define FDClass(cname, ctype) \\ + if(p->pcstr == "FD" cname "Player") \\ + switch(name) { \\ + case wepnam_fist: return weapon_fd_##ctype##_fist; \\ + case wepnam_chainsaw: return weapon_fd_##ctype##_chainsaw; \\ + case wepnam_pistol: return weapon_fd_##ctype##_pistol; \\ + case wepnam_shotgun: return weapon_fd_##ctype##_shotgun; \\ + case wepnam_supershotgun: return weapon_fd_##ctype##_ssg; \\ + case wepnam_chaingun: return weapon_fd_##ctype##_chaingun; \\ + case wepnam_rocketlauncher: return weapon_fd_##ctype##_launcher; \\ + case wepnam_plasmarifle: return weapon_fd_##ctype##_plasma; \\ + case wepnam_bfg9000: return weapon_fd_##ctype##_bfg; \\ + } + FDClass("Plut", plut) + FDClass("TNT", tnt) + FDClass("Doom2", doom2) + FDClass("Aliens", aliens) + FDClass("JPCP", jpcp) + FDClass("BTSX", btsx) + #undef FDClass + } +} + +// EOF +END +end + +class LithWep + attr_reader :pcl + attr_reader :nam + attr_reader :slt + attr_reader :res + + def initialize pcl, wf, spl + @pcl = pcl + @nam = "weapon_#{spl.shift}" + @slt = spl.shift + @res = [ + "N(\"#{spl.shift}\")", + spl.shift, + "AT_#{spl.shift}", + *spl + ] + @res.push "F(#{wf})" unless wf.empty? + end +end + +def procFile ifp, ofh, ofc + pcl = "pcl_any" + wf = "" + weps = [] + wepn = {} + + for ln in ifp + ln.chomp! + next if ln.empty? + + pre = ln[0] + res = ln[1..-1] + case pre + when ':' then pcl = "pcl_" + res + when '%' then wf = res + when '{' then weps.push LithWep.new(pcl, wf, res.split) + when ';' then wepn[pcl] = res.split.map {|s| "weapon_#{s}"} + end + end + + outHeader ofh, weps + outSource ofc, weps, wepn +end + +for arg in ARGV + ifn, ofh, ofc = arg.split(',') + procFile open(ifn, "rt"), open(ofh, "wt"), open(ofc, "wt") +end + +## EOF