diff --git a/CMake/Assets.cmake b/CMake/Assets.cmake index d2e1b0e72..7da1a6126 100644 --- a/CMake/Assets.cmake +++ b/CMake/Assets.cmake @@ -178,18 +178,14 @@ set(devilutionx_assets txtdata/sound/effects.tsv txtdata/spells/spelldat.tsv ui_art/diablo.pal - ui_art/hellfire.pal ui_art/creditsw.clx ui_art/dvl_but_sml.clx ui_art/dvl_lrpopup.clx - ui_art/hf_titlew.clx - ui_art/mainmenuw.clx - ui_art/supportw.clx) + ui_art/mainmenuw.clx) if(NOT UNPACKED_MPQS) list(APPEND devilutionx_assets - data/inv/objcurs-widths.txt - data/inv/objcurs2-widths.txt) + data/inv/objcurs-widths.txt) endif() if(NOT USE_SDL1 AND NOT VITA) diff --git a/CMake/Mods.cmake b/CMake/Mods.cmake index 2ae23c59b..a488803fa 100644 --- a/CMake/Mods.cmake +++ b/CMake/Mods.cmake @@ -5,10 +5,19 @@ endif() set(hellfire_mod lua/mods/Hellfire/init.lua txtdata/items/unique_itemdat.tsv + txtdata/missiles/misdat.tsv + txtdata/missiles/missile_sprites.tsv txtdata/monsters/monstdat.tsv ui_art/diablo.pal + ui_art/hf_titlew.clx + ui_art/supportw.clx ui_art/mainmenuw.clx) +if(NOT UNPACKED_MPQS) + list(APPEND devilutionx_assets + data/inv/objcurs2-widths.txt) +endif() + foreach(asset_file ${hellfire_mod}) set(src "${CMAKE_CURRENT_SOURCE_DIR}/mods/Hellfire/${asset_file}") set(dst "${DEVILUTIONX_MODS_OUTPUT_DIRECTORY}/Hellfire/${asset_file}") diff --git a/Source/DiabloUI/credits.cpp b/Source/DiabloUI/credits.cpp index 41b765b0e..3edd70953 100644 --- a/Source/DiabloUI/credits.cpp +++ b/Source/DiabloUI/credits.cpp @@ -179,8 +179,8 @@ bool UiCreditsDialog() bool UiSupportDialog() { - if (gbIsHellfire) { - ArtBackgroundWidescreen = LoadOptionalClx("ui_art\\supportw.clx"); + ArtBackgroundWidescreen = LoadOptionalClx("ui_art\\supportw.clx"); + if (ArtBackgroundWidescreen.has_value()) { LoadBackgroundArt("ui_art\\support"); } else { ArtBackgroundWidescreen = LoadOptionalClx("ui_art\\creditsw.clx"); diff --git a/Source/DiabloUI/diabloui.cpp b/Source/DiabloUI/diabloui.cpp index 0293be586..aa5c9679e 100644 --- a/Source/DiabloUI/diabloui.cpp +++ b/Source/DiabloUI/diabloui.cpp @@ -589,9 +589,8 @@ void LoadHeros() void LoadUiGFX() { - if (gbIsHellfire) { - ArtLogo = LoadPcxSpriteList("ui_art\\hf_logo2", /*numFrames=*/16, /*transparentColor=*/0); - } else { + ArtLogo = LoadPcxSpriteList("ui_art\\hf_logo2", /*numFrames=*/16, /*transparentColor=*/0); + if (!ArtLogo.has_value()) { ArtLogo = LoadPcxSpriteList("ui_art\\smlogo", /*numFrames=*/15, /*transparentColor=*/250); } DifficultyIndicator = LoadPcx("ui_art\\r1_gry", /*transparentColor=*/0); diff --git a/Source/DiabloUI/title.cpp b/Source/DiabloUI/title.cpp index c9d8bfb5b..890fb5848 100644 --- a/Source/DiabloUI/title.cpp +++ b/Source/DiabloUI/title.cpp @@ -20,9 +20,9 @@ std::vector> vecTitleScreen; void TitleLoad() { - if (gbIsHellfire) { + ArtBackgroundWidescreen = LoadOptionalClx("ui_art\\hf_titlew.clx"); + if (ArtBackgroundWidescreen.has_value()) { LoadBackgroundArt("ui_art\\hf_logo1", 16); - ArtBackgroundWidescreen = LoadOptionalClx("ui_art\\hf_titlew.clx"); } else { LoadBackgroundArt("ui_art\\title"); DiabloTitleLogo = LoadPcxSpriteList("ui_art\\logo", /*numFrames=*/15, /*transparentColor=*/250); @@ -44,7 +44,7 @@ void UiTitleDialog() { TitleLoad(); const Point uiPosition = GetUIRectangle().position; - if (gbIsHellfire) { + if (ArtBackgroundWidescreen.has_value()) { SDL_Rect rect = MakeSdlRect(0, uiPosition.y, 0, 0); if (ArtBackgroundWidescreen) vecTitleScreen.push_back(std::make_unique((*ArtBackgroundWidescreen)[0], rect, UiFlags::AlignCenter)); diff --git a/Source/cursor.cpp b/Source/cursor.cpp index ea5885f8e..3b9438ecd 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -74,7 +74,7 @@ bool IsValidMonsterForSelection(const Monster &monster) bool TrySelectMonster(bool flipflag, Point tile, tl::function_ref isValidMonster) { auto checkPosition = [&](SelectionRegion selectionRegion, Displacement displacement) { - Point posToCheck = tile + displacement; + const Point posToCheck = tile + displacement; if (!InDungeonBounds(posToCheck) || dMonster[posToCheck.x][posToCheck.y] == 0) return; const uint16_t monsterId = std::abs(dMonster[posToCheck.x][posToCheck.y]) - 1; @@ -102,7 +102,7 @@ bool TrySelectMonster(bool flipflag, Point tile, tl::function_ref ReadWidths(const char *path) +std::vector ReadWidths(AssetRef &&ref) { - size_t len; - const std::unique_ptr data = LoadFileInMem(path, &len); + const size_t len = ref.size(); + if (len == 0) { + app_fatal("Missing widths"); + } + std::unique_ptr data { new char[len] }; + + AssetHandle handle = OpenAsset(std::move(ref)); + if (!handle.ok() || !handle.read(data.get(), len)) { + app_fatal("Failed to load widths"); + } + std::string_view str { data.get(), len }; std::vector result; while (!str.empty()) { @@ -385,7 +394,7 @@ std::vector ReadWidths(const char *path) const ParseIntResult parseResult = ParseInt(str, std::numeric_limits::min(), std::numeric_limits::max(), &end); if (!parseResult.has_value()) { - app_fatal(StrCat("Failed to parse ", path, ": [", str, "]")); + app_fatal(StrCat("Failed to parse width value from: [", str, "]")); } result.push_back(parseResult.value()); str.remove_prefix(end - str.data()); @@ -424,13 +433,12 @@ void InitCursor() assert(!pCursCels); #ifdef UNPACKED_MPQS pCursCels = LoadClx("data\\inv\\objcurs.clx"); - if (gbIsHellfire) { - pCursCels2 = LoadClx("data\\inv\\objcurs2.clx"); - } + pCursCels2 = LoadOptionalClx("data\\inv\\objcurs2.clx"); #else - pCursCels = LoadCel("data\\inv\\objcurs", ReadWidths("data\\inv\\objcurs-widths.txt").data()); - if (gbIsHellfire) { - pCursCels2 = LoadCel("data\\inv\\objcurs2", ReadWidths("data\\inv\\objcurs2-widths.txt").data()); + pCursCels = LoadCel("data\\inv\\objcurs", ReadWidths(FindAsset("data\\inv\\objcurs-widths.txt")).data()); + AssetRef ref = FindAsset("data\\inv\\objcurs2-widths.txt"); + if (ref.ok()) { + pCursCels2 = LoadOptionalCel("data\\inv\\objcurs2", ReadWidths(std::move(ref)).data()); } #endif ClearCursor(); @@ -450,7 +458,7 @@ ClxSprite GetInvItemSprite(int cursId) if (static_cast(cursId) <= numSprites) { return (*pCursCels)[cursId - 1]; } - assert(gbIsHellfire); + assert(pCursCels2.has_value()); assert(cursId - numSprites <= pCursCels2->numSprites()); return (*pCursCels2)[cursId - numSprites - 1]; } @@ -476,7 +484,7 @@ void CreateHalfSizeItemSprites() if (HalfSizeItemSprites != nullptr) return; const uint32_t numInvItems = pCursCels->numSprites() - (static_cast(CURSOR_FIRSTITEM) - 1) - + (gbIsHellfire ? pCursCels2->numSprites() : 0); + + (pCursCels2.has_value() ? pCursCels2->numSprites() : 0); HalfSizeItemSprites = new OptionalOwnedClxSpriteList[numInvItems]; HalfSizeItemSpritesRed = new OptionalOwnedClxSpriteList[numInvItems]; const uint8_t *redTrn = GetInfravisionTRN(); @@ -513,7 +521,7 @@ void CreateHalfSizeItemSprites() for (size_t i = static_cast(CURSOR_FIRSTITEM) - 1, n = pCursCels->numSprites(); i < n; ++i, ++outputIndex) { createHalfSize((*pCursCels)[i], outputIndex); } - if (gbIsHellfire) { + if (pCursCels2.has_value()) { for (size_t i = 0, n = pCursCels2->numSprites(); i < n; ++i, ++outputIndex) { createHalfSize((*pCursCels2)[i], outputIndex); } diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 2cba929e6..4658c216b 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1304,17 +1304,22 @@ tl::expected LoadLvlGFX() }; switch (leveltype) { - case DTYPE_TOWN: - if (gbIsHellfire) { - return loadAll( - "nlevels\\towndata\\town.cel", - "nlevels\\towndata\\town.til", - "levels\\towndata\\towns"); + case DTYPE_TOWN: { + auto cel = LoadFileInMemWithStatus("nlevels\\towndata\\town.cel"); + if (!cel.has_value()) { + ASSIGN_OR_RETURN(pDungeonCels, LoadFileInMemWithStatus("levels\\towndata\\town.cel")); + } else { + pDungeonCels = std::move(*cel); } - return loadAll( - "levels\\towndata\\town.cel", - "levels\\towndata\\town.til", - "levels\\towndata\\towns"); + auto til = LoadFileInMemWithStatus("nlevels\\towndata\\town.til"); + if (!til.has_value()) { + ASSIGN_OR_RETURN(pMegaTiles, LoadFileInMemWithStatus("levels\\towndata\\town.til")); + } else { + pMegaTiles = std::move(*til); + } + ASSIGN_OR_RETURN(pSpecialCels, LoadCelWithStatus("levels\\towndata\\towns", SpecialCelWidth)); + return {}; + } case DTYPE_CATHEDRAL: return loadAll( "levels\\l1data\\l1.cel", @@ -1359,7 +1364,7 @@ tl::expected LoadAllGFX() IncProgress(); RETURN_IF_ERROR(InitObjectGFX()); IncProgress(); - RETURN_IF_ERROR(InitMissileGFX(gbIsHellfire)); + RETURN_IF_ERROR(InitMissileGFX()); IncProgress(); return {}; } @@ -3101,7 +3106,7 @@ tl::expected LoadGameLevelSetLevel(bool firstflag, lvl_entry #if !defined(USE_SDL1) && !defined(__vita__) InitVirtualGamepadGFX(); #endif - RETURN_IF_ERROR(InitMissileGFX(gbIsHellfire)); + RETURN_IF_ERROR(InitMissileGFX()); IncProgress(); } InitCorpses(); @@ -3162,7 +3167,7 @@ tl::expected LoadGameLevelStandardLevel(bool firstflag, lvl_e IncProgress(); - RETURN_IF_ERROR(InitMissileGFX(gbIsHellfire)); + RETURN_IF_ERROR(InitMissileGFX()); IncProgress(); IncProgress(); diff --git a/Source/engine/load_cel.hpp b/Source/engine/load_cel.hpp index 83739a040..501556281 100644 --- a/Source/engine/load_cel.hpp +++ b/Source/engine/load_cel.hpp @@ -26,6 +26,14 @@ inline OwnedClxSpriteList LoadCel(const char *pszName, uint16_t width) return LoadCelListOrSheet(pszName, PointerOrValue { width }).list(); } +inline OptionalOwnedClxSpriteList LoadOptionalCel(const char *pszName, uint16_t width) +{ + tl::expected result = LoadCelListOrSheetWithStatus(pszName, PointerOrValue { width }); + if (!result.has_value()) + return std::nullopt; + return (*std::move(result)).list(); +} + inline tl::expected LoadCelWithStatus(const char *pszName, uint16_t width) { ASSIGN_OR_RETURN(OwnedClxSpriteListOrSheet result, LoadCelListOrSheetWithStatus(pszName, PointerOrValue { width })); @@ -37,6 +45,14 @@ inline OwnedClxSpriteList LoadCel(const char *pszName, const uint16_t *widths) return LoadCelListOrSheet(pszName, PointerOrValue { widths }).list(); } +inline OptionalOwnedClxSpriteList LoadOptionalCel(const char *pszName, const uint16_t *widths) +{ + tl::expected result = LoadCelListOrSheetWithStatus(pszName, PointerOrValue { widths }); + if (!result.has_value()) + return std::nullopt; + return (*std::move(result)).list(); +} + inline tl::expected LoadCelWithStatus(const char *pszName, const uint16_t *widths) { ASSIGN_OR_RETURN(OwnedClxSpriteListOrSheet result, LoadCelListOrSheetWithStatus(pszName, PointerOrValue { widths })); diff --git a/Source/misdat.cpp b/Source/misdat.cpp index 5dc496ac6..51809974c 100644 --- a/Source/misdat.cpp +++ b/Source/misdat.cpp @@ -383,7 +383,7 @@ void LoadMisdat() } // Sanity check because we do not actually parse the IDs yet. - assert(static_cast(MissileID::LAST) + 1 == MissilesData.size()); + assert(static_cast(MissileID::LastDiablo) + 1 == MissilesData.size() || static_cast(MissileID::LAST) + 1 == MissilesData.size()); MissilesData.shrink_to_fit(); } @@ -443,14 +443,12 @@ const MissileData &GetMissileData(MissileID missileId) return MissilesData[static_cast>(missileId)]; } -tl::expected InitMissileGFX(bool loadHellfireGraphics) +tl::expected InitMissileGFX() { if (HeadlessMode) return {}; for (size_t mi = 0; mi < MissileSpriteData.size(); ++mi) { - if (!loadHellfireGraphics && mi >= static_cast(MissileGraphicID::HorkSpawn)) - break; if (MissileSpriteData[mi].flags == MissileGraphicsFlags::MonsterOwned) continue; RETURN_IF_ERROR(MissileSpriteData[mi].LoadGFX()); diff --git a/Source/misdat.h b/Source/misdat.h index 3be438c6a..3c2c08d3d 100644 --- a/Source/misdat.h +++ b/Source/misdat.h @@ -246,7 +246,7 @@ MissileFileData &GetMissileSpriteData(MissileGraphicID graphicId); void LoadMissileData(); -tl::expected InitMissileGFX(bool loadHellfireGraphics = false); +tl::expected InitMissileGFX(); void FreeMissileGFX(); } // namespace devilution diff --git a/Source/panels/spell_icons.cpp b/Source/panels/spell_icons.cpp index ad07ecaa4..52ad89f2e 100644 --- a/Source/panels/spell_icons.cpp +++ b/Source/panels/spell_icons.cpp @@ -86,21 +86,19 @@ const SpellIcon SpellITbl[] = { tl::expected LoadLargeSpellIcons() { - if (!gbIsHellfire) { #ifdef UNPACKED_MPQS + LargeSpellIcons = LoadOptionalClx("data\\spelicon_fg.clx"); + LargeSpellIconsBackground = LoadOptionalClx("data\\spelicon_bg.clx"); + if (!LargeSpellIcons.has_value() || !LargeSpellIconsBackground.has_value()) { ASSIGN_OR_RETURN(LargeSpellIcons, LoadClxWithStatus("ctrlpan\\spelicon_fg.clx")); ASSIGN_OR_RETURN(LargeSpellIconsBackground, LoadClxWithStatus("ctrlpan\\spelicon_bg.clx")); + } #else + LargeSpellIcons = LoadOptionalCel("data\\spelicon", SPLICONLENGTH); + if (!LargeSpellIcons.has_value()) { ASSIGN_OR_RETURN(LargeSpellIcons, LoadCelWithStatus("ctrlpan\\spelicon", SPLICONLENGTH)); -#endif - } else { -#ifdef UNPACKED_MPQS - ASSIGN_OR_RETURN(LargeSpellIcons, LoadClxWithStatus("data\\spelicon_fg.clx")); - ASSIGN_OR_RETURN(LargeSpellIconsBackground, LoadClxWithStatus("data\\spelicon_bg.clx")); -#else - ASSIGN_OR_RETURN(LargeSpellIcons, LoadCelWithStatus("data\\spelicon", SPLICONLENGTH)); -#endif } +#endif SetSpellTrans(SpellType::Skill); return {}; } diff --git a/Source/spelldat.h b/Source/spelldat.h index f60188cce..df8e3c34d 100644 --- a/Source/spelldat.h +++ b/Source/spelldat.h @@ -168,6 +168,7 @@ enum class MissileID : int8_t { RedPortal, DiabloApocalypseBoom, DiabloApocalypse, + LastDiablo = DiabloApocalypse, Mana, Magi, LightningWall, diff --git a/assets/txtdata/missiles/misdat.tsv b/assets/txtdata/missiles/misdat.tsv index 986f99a93..3d7688d86 100644 --- a/assets/txtdata/missiles/misdat.tsv +++ b/assets/txtdata/missiles/misdat.tsv @@ -67,43 +67,3 @@ WeaponExplosion AddWeaponExplosion ProcessWeaponExplosion Physical RedPortal AddRedPortal ProcessRedPortal SpellPortal RedPortal Physical DiabloApocalypseBoom AddApocalypseBoom ProcessApocalypseBoom DiabloApocalypseBoom Physical DiabloApocalypse AddDiabloApocalypse Physical,Invisible -Mana AddMana Physical,Invisible -Magi AddMagi Physical,Invisible -LightningWall AddLightningWall ProcessLightningWall SpellLightningWall SpellLightningHit Lightning Lightning -LightningWallControl AddWallControl ProcessWallControl Lightning Lightning,Invisible -Immolation AddNova ProcessImmolation SpellFirebolt SpellFireHit Fireball Fire -SpectralArrow AddSpectralArrow ProcessSpectralArrow Arrow Physical,Arrow -FireballBow AddImmolation ProcessFireball ShootFireballBow SpellFireHit Fireball Fire Blockable -LightningBow AddLightningBow ProcessLightningBow ShootFireballBow Lightning Lightning,Invisible -ChargedBoltBow AddChargedBoltBow ProcessChargedBolt SpellChargedBolt ChargedBolt Lightning Blockable -HolyBoltBow AddHolyBolt ProcessHolyBolt SpellHolyBolt SpellLightningHit HolyBolt Physical Blockable -Warp AddWarp ProcessTeleport SpellEtherealize Physical,Invisible -Reflect AddReflect SpellManaShield Reflect Physical,Invisible -Berserk AddBerserk Physical,Invisible -RingOfFire AddRingOfFire ProcessRingOfFire FireWall Fire,Invisible -StealPotions AddStealPotions Physical,Invisible -StealMana AddStealMana SpellEnd Physical,Invisible -RingOfLightning Lightning Lightning,Invisible -Search AddSearch ProcessSearch Physical,Invisible -Aura SpellLightningHit FlashBottom Magic,Invisible -Aura2 FlashTop Magic,Invisible -SpiralFireball SpellFirebolt SpellFireHit Fireball Fire -RuneOfFire AddRuneOfFire ProcessRune Rune Physical -RuneOfLight AddRuneOfLight ProcessRune Rune Physical -RuneOfNova AddRuneOfNova ProcessRune Rune Physical -RuneOfImmolation AddRuneOfImmolation ProcessRune Rune Physical -RuneOfStone AddRuneOfStone ProcessRune Rune Physical -BigExplosion AddBigExplosion ProcessBigExplosion BigExplosion BigExplosion BigExplosion Fire -HorkSpawn AddHorkSpawn ProcessHorkSpawn Physical,Invisible -Jester AddJester Physical,Invisible -OpenNest AddOpenNest Physical,Invisible -OrangeFlare AddGenericMagicMissile ProcessGenericProjectile OrangeFlare Magic Blockable -BlueFlare AddGenericMagicMissile ProcessGenericProjectile BlueFlare2 Magic Blockable -RedFlare AddGenericMagicMissile ProcessGenericProjectile RedFlare Magic Blockable -YellowFlare AddGenericMagicMissile ProcessGenericProjectile YellowFlare Magic Blockable -BlueFlare2 AddGenericMagicMissile ProcessGenericProjectile BlueFlare2 Magic Blockable -YellowExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit YellowFlareExplosion Physical -RedExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit RedFlareExplosion Physical -BlueExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit BlueFlareExplosion Physical -BlueExplosion2 AddMissileExplosion ProcessMissileExplosion SpellFireHit BlueFlareExplosion2 Physical -OrangeExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit OrangeFlareExplosion Physical diff --git a/assets/txtdata/missiles/missile_sprites.tsv b/assets/txtdata/missiles/missile_sprites.tsv index 571609e6f..df77a38dc 100644 --- a/assets/txtdata/missiles/missile_sprites.tsv +++ b/assets/txtdata/missiles/missile_sprites.tsv @@ -45,16 +45,3 @@ BloodStarYellow 96 16 scubmisc 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16 BloodStarYellowExplosion 128 32 scbsexpc 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 BloodStarRed 96 16 scubmisd 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 BloodStarRedExplosion 128 32 scbsexpd 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 -HorkSpawn 96 16 spawns 8 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 -Reflect 160 64 reflect 1 NotAnimated 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 -OrangeFlare 96 8 ms_ora 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 -BlueFlare 96 8 ms_bla 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 -RedFlare 96 8 ms_reb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 -YellowFlare 96 8 ms_yeb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 -Rune 96 8 rglows1 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 -YellowFlareExplosion 220 78 ex_yel2 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 -BlueFlareExplosion 212 86 ex_blu2 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 -RedFlareExplosion 292 114 ex_red3 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 -BlueFlare2 96 8 ms_blb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 -OrangeFlareExplosion 96 -12 ex_ora1 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 -BlueFlareExplosion2 292 114 ex_blu3 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 diff --git a/assets/data/inv/objcurs2-widths.txt b/mods/Hellfire/data/inv/objcurs2-widths.txt similarity index 100% rename from assets/data/inv/objcurs2-widths.txt rename to mods/Hellfire/data/inv/objcurs2-widths.txt diff --git a/mods/Hellfire/txtdata/missiles/misdat.tsv b/mods/Hellfire/txtdata/missiles/misdat.tsv new file mode 100644 index 000000000..986f99a93 --- /dev/null +++ b/mods/Hellfire/txtdata/missiles/misdat.tsv @@ -0,0 +1,109 @@ +id addFn processFn castSound hitSound graphic flags movementDistribution +Arrow AddArrow ProcessArrow Arrow Physical,Arrow Blockable +Firebolt AddFirebolt ProcessGenericProjectile SpellFirebolt SpellFireHit Fireball Fire Blockable +Guardian AddGuardian ProcessGuardian SpellGuardian Guardian Physical +Phasing AddPhasing ProcessTeleport SpellTeleport Physical,Invisible +NovaBall AddNovaBall ProcessNovaBall Lightning Lightning Unblockable +FireWall AddFireWall ProcessFireWall SpellFireWall SpellFireHit FireWall Fire +Fireball AddFireball ProcessFireball SpellFirebolt SpellFireHit Fireball Fire Blockable +LightningControl AddLightningControl ProcessLightningControl Lightning Lightning,Invisible +Lightning AddLightning ProcessLightning SpellLightning SpellLightningHit Lightning Lightning +MagmaBallExplosion AddMissileExplosion ProcessMissileExplosion MagmaBallExplosion Physical +TownPortal AddTownPortal ProcessTownPortal SpellPortal TownPortal Magic +FlashBottom AddFlashBottom ProcessFlashBottom SpellNova SpellLightningHit FlashBottom Magic +FlashTop AddFlashTop ProcessFlashTop FlashTop Magic +ManaShield AddManaShield SpellManaShield ManaShield Magic,Invisible +FlameWave AddFlameWave ProcessFlameWave FireWall Fire Unblockable +ChainLightning AddChainLightning ProcessChainLightning SpellLightning SpellLightningHit Lightning Lightning +ChainBall Lightning Lightning +BloodHit SpellBloodStar SpellBloodStarHit BloodHit Physical +BoneHit BoneHit Physical +MetalHit MetalHit Physical +Rhino AddRhino ProcessRhino Physical Blockable +MagmaBall AddMagmaBall ProcessGenericProjectile MagmaBall Fire Blockable +ThinLightningControl AddLightningControl ProcessLightningControl ThinLightning Lightning,Invisible +ThinLightning AddLightning ProcessLightning ThinLightning Lightning +BloodStar AddGenericMagicMissile ProcessGenericProjectile BloodStar Magic Blockable +BloodStarExplosion AddMissileExplosion ProcessMissileExplosion BloodStarExplosion Magic +Teleport AddTeleport ProcessTeleport SpellElemental Physical,Invisible +FireArrow AddElementalArrow ProcessElementalArrow FireArrow Fire,Arrow Blockable +DoomSerpents SpellDoomSerpents DoomSerpents Magic,Invisible +FireOnly FireWall Fire +StoneCurse AddStoneCurse ProcessStoneCurse SpellStoneCurse Magic,Invisible +BloodRitual Physical +Invisibility SpellInvisibility Physical,Invisible +Golem AddGolem SpellGolem Physical,Invisible +Etherealize SpellEtherealize Etherealize Physical +Spurt Spurt Physical +ApocalypseBoom AddApocalypseBoom ProcessApocalypseBoom ApocalypseBoom Physical +Healing AddHealing Physical,Invisible +FireWallControl AddWallControl ProcessWallControl FireWall Fire,Invisible +Infravision AddInfravision ProcessInfravision SpellInfravision Physical,Invisible +Identify AddIdentify Physical,Invisible +FlameWaveControl AddFlameWaveControl ProcessFlameWaveControl SpellFlameWave FireWall Fire +Nova AddNova ProcessNova SpellNova Lightning Lightning +Rage AddRage ProcessRage Physical,Invisible +Apocalypse AddApocalypse ProcessApocalypse SpellApocalypse ApocalypseBoom Magic +ItemRepair AddItemRepair Physical,Invisible +StaffRecharge AddStaffRecharge Physical,Invisible +TrapDisarm AddTrapDisarm SpellTrapDisarm Physical,Invisible +Inferno AddInferno ProcessInferno SpellInferno Inferno Fire +InfernoControl AddInfernoControl ProcessInfernoControl Fire,Invisible +FireMan Physical Blockable +Krull Krull Fire,Arrow Blockable +ChargedBolt AddChargedBolt ProcessChargedBolt SpellChargedBolt ChargedBolt Lightning Blockable +HolyBolt AddHolyBolt ProcessHolyBolt SpellHolyBolt SpellLightningHit HolyBolt Physical Blockable +Resurrect AddResurrect SpellResurrect Magic,Invisible +Telekinesis AddTelekinesis SpellEtherealize Physical,Invisible +LightningArrow AddElementalArrow ProcessElementalArrow LightningArrow Lightning,Arrow Blockable +Acid AddAcid ProcessGenericProjectile SpellAcid Acid Acid Blockable +AcidSplat AddMissileExplosion ProcessAcidSplate AcidSplat Acid +AcidPuddle AddAcidPuddle ProcessAcidPuddle SpellPuddle AcidPuddle Acid +HealOther AddHealOther Physical,Invisible +Elemental AddElemental ProcessElemental SpellElemental Elemental Fire Unblockable +ResurrectBeam AddResurrectBeam ProcessResurrectBeam Resurrect Physical +BoneSpirit AddBoneSpirit ProcessBoneSpirit SpellBoneSpirit SpellBoneSpiritHit BoneSpirit Magic Blockable +WeaponExplosion AddWeaponExplosion ProcessWeaponExplosion Physical +RedPortal AddRedPortal ProcessRedPortal SpellPortal RedPortal Physical +DiabloApocalypseBoom AddApocalypseBoom ProcessApocalypseBoom DiabloApocalypseBoom Physical +DiabloApocalypse AddDiabloApocalypse Physical,Invisible +Mana AddMana Physical,Invisible +Magi AddMagi Physical,Invisible +LightningWall AddLightningWall ProcessLightningWall SpellLightningWall SpellLightningHit Lightning Lightning +LightningWallControl AddWallControl ProcessWallControl Lightning Lightning,Invisible +Immolation AddNova ProcessImmolation SpellFirebolt SpellFireHit Fireball Fire +SpectralArrow AddSpectralArrow ProcessSpectralArrow Arrow Physical,Arrow +FireballBow AddImmolation ProcessFireball ShootFireballBow SpellFireHit Fireball Fire Blockable +LightningBow AddLightningBow ProcessLightningBow ShootFireballBow Lightning Lightning,Invisible +ChargedBoltBow AddChargedBoltBow ProcessChargedBolt SpellChargedBolt ChargedBolt Lightning Blockable +HolyBoltBow AddHolyBolt ProcessHolyBolt SpellHolyBolt SpellLightningHit HolyBolt Physical Blockable +Warp AddWarp ProcessTeleport SpellEtherealize Physical,Invisible +Reflect AddReflect SpellManaShield Reflect Physical,Invisible +Berserk AddBerserk Physical,Invisible +RingOfFire AddRingOfFire ProcessRingOfFire FireWall Fire,Invisible +StealPotions AddStealPotions Physical,Invisible +StealMana AddStealMana SpellEnd Physical,Invisible +RingOfLightning Lightning Lightning,Invisible +Search AddSearch ProcessSearch Physical,Invisible +Aura SpellLightningHit FlashBottom Magic,Invisible +Aura2 FlashTop Magic,Invisible +SpiralFireball SpellFirebolt SpellFireHit Fireball Fire +RuneOfFire AddRuneOfFire ProcessRune Rune Physical +RuneOfLight AddRuneOfLight ProcessRune Rune Physical +RuneOfNova AddRuneOfNova ProcessRune Rune Physical +RuneOfImmolation AddRuneOfImmolation ProcessRune Rune Physical +RuneOfStone AddRuneOfStone ProcessRune Rune Physical +BigExplosion AddBigExplosion ProcessBigExplosion BigExplosion BigExplosion BigExplosion Fire +HorkSpawn AddHorkSpawn ProcessHorkSpawn Physical,Invisible +Jester AddJester Physical,Invisible +OpenNest AddOpenNest Physical,Invisible +OrangeFlare AddGenericMagicMissile ProcessGenericProjectile OrangeFlare Magic Blockable +BlueFlare AddGenericMagicMissile ProcessGenericProjectile BlueFlare2 Magic Blockable +RedFlare AddGenericMagicMissile ProcessGenericProjectile RedFlare Magic Blockable +YellowFlare AddGenericMagicMissile ProcessGenericProjectile YellowFlare Magic Blockable +BlueFlare2 AddGenericMagicMissile ProcessGenericProjectile BlueFlare2 Magic Blockable +YellowExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit YellowFlareExplosion Physical +RedExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit RedFlareExplosion Physical +BlueExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit BlueFlareExplosion Physical +BlueExplosion2 AddMissileExplosion ProcessMissileExplosion SpellFireHit BlueFlareExplosion2 Physical +OrangeExplosion AddMissileExplosion ProcessMissileExplosion SpellFireHit OrangeFlareExplosion Physical diff --git a/mods/Hellfire/txtdata/missiles/missile_sprites.tsv b/mods/Hellfire/txtdata/missiles/missile_sprites.tsv new file mode 100644 index 000000000..571609e6f --- /dev/null +++ b/mods/Hellfire/txtdata/missiles/missile_sprites.tsv @@ -0,0 +1,60 @@ +id width width2 name numFrames flags frameDelay frameLength +Arrow 96 16 arrows 1 NotAnimated 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +Fireball 96 16 fireba 16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 +Guardian 96 16 guard 3 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 15,14,3,0,0,0,0,0,0,0,0,0,0,0,0,0 +Lightning 96 16 lghning 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +FireWall 128 32 firewal 2 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +MagmaBallExplosion 128 32 magblos 1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 +TownPortal 96 16 portal 2 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +FlashBottom 160 48 bluexfr 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19 +FlashTop 160 48 bluexbk 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19 +ManaShield 96 16 manashld 1 NotAnimated 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +BloodHit 96 16 4 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +BoneHit 128 32 3 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +MetalHit 96 16 3 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 +FireArrow 96 16 farrow 16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 +DoomSerpents 96 16 doom 9 MonsterOwned 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +Golem 0 0 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +Spurt 128 32 2 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +ApocalypseBoom 96 16 newexp 1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +StoneCurseShatter 128 32 shatter1 1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 +BigExplosion 160 48 bigexp 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +Inferno 96 16 inferno 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20 +ThinLightning 96 16 thinlght 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +BloodStar 128 32 flare 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +BloodStarExplosion 128 32 flareexp 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +MagmaBall 128 32 magball 8 MonsterOwned 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +Krull 96 16 krull 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 +ChargedBolt 64 0 miniltng 1 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +HolyBolt 96 16 holy 16 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 +HolyBoltExplosion 160 48 holyexpl 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +LightningArrow 96 16 larrow 16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 +FireArrowExplosion 64 0 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 +Acid 96 16 acidbf 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +AcidSplat 96 16 acidspla 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +AcidPuddle 96 16 acidpud 2 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 9,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +Etherealize 96 16 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +Elemental 96 16 firerun 8 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 +Resurrect 96 16 ressur1 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +BoneSpirit 96 16 sklball 9 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 16,16,16,16,16,16,16,16,8,0,0,0,0,0,0,0 +RedPortal 96 16 rportal 2 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +DiabloApocalypseBoom 160 48 fireplar 1 MonsterOwned 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 +BloodStarBlue 96 16 scubmisb 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +BloodStarBlueExplosion 128 32 scbsexpb 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 +BloodStarYellow 96 16 scubmisc 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +BloodStarYellowExplosion 128 32 scbsexpc 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 +BloodStarRed 96 16 scubmisd 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16 +BloodStarRedExplosion 128 32 scbsexpd 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 +HorkSpawn 96 16 spawns 8 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 +Reflect 160 64 reflect 1 NotAnimated 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +OrangeFlare 96 8 ms_ora 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +BlueFlare 96 8 ms_bla 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +RedFlare 96 8 ms_reb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +YellowFlare 96 8 ms_yeb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +Rune 96 8 rglows1 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 +YellowFlareExplosion 220 78 ex_yel2 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 +BlueFlareExplosion 212 86 ex_blu2 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 +RedFlareExplosion 292 114 ex_red3 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +BlueFlare2 96 8 ms_blb 16 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 +OrangeFlareExplosion 96 -12 ex_ora1 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 +BlueFlareExplosion2 292 114 ex_blu3 1 MonsterOwned 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 diff --git a/assets/ui_art/hf_titlew.clx b/mods/Hellfire/ui_art/hf_titlew.clx similarity index 100% rename from assets/ui_art/hf_titlew.clx rename to mods/Hellfire/ui_art/hf_titlew.clx diff --git a/assets/ui_art/supportw.clx b/mods/Hellfire/ui_art/supportw.clx similarity index 100% rename from assets/ui_art/supportw.clx rename to mods/Hellfire/ui_art/supportw.clx