├── .gitattributes ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Readme.md ├── doc ├── Readme 1.1.0.md ├── Readme 1.4.0.md └── Readme 1.6.0.md ├── include ├── CMakeLists.txt ├── Changelog.txt ├── H3API.hpp ├── H3API.natvis ├── H3Types.hpp ├── Readme.md ├── h3api │ ├── CMakeLists.txt │ ├── H3AI.hpp │ ├── H3AI │ │ ├── CMakeLists.txt │ │ ├── H3PathNode.cpp │ │ ├── H3PathNode.hpp │ │ ├── H3Pathfinder.cpp │ │ ├── H3Pathfinder.hpp │ │ ├── H3SimulatedCombat.cpp │ │ ├── H3SimulatedCombat.hpp │ │ ├── H3SimulatedCreature.cpp │ │ ├── H3SimulatedCreature.hpp │ │ ├── H3SimulatedHero.cpp │ │ ├── H3SimulatedHero.hpp │ │ ├── H3SimulatedSpell.cpp │ │ ├── H3SimulatedSpell.hpp │ │ ├── H3SpellCastInfo.cpp │ │ ├── H3SpellCastInfo.hpp │ │ ├── H3SpellData.cpp │ │ └── H3SpellData.hpp │ ├── H3AdventureMap.hpp │ ├── H3AdventureMap │ │ ├── CMakeLists.txt │ │ ├── H3GlobalObjectSettings.cpp │ │ ├── H3GlobalObjectSettings.hpp │ │ ├── H3MapArtifact.cpp │ │ ├── H3MapArtifact.hpp │ │ ├── H3MapBlackMarket.cpp │ │ ├── H3MapBlackMarket.hpp │ │ ├── H3MapBoat.cpp │ │ ├── H3MapBoat.hpp │ │ ├── H3MapCampfire.cpp │ │ ├── H3MapCampfire.hpp │ │ ├── H3MapCorpse.cpp │ │ ├── H3MapCorpse.hpp │ │ ├── H3MapCreatureBank.cpp │ │ ├── H3MapCreatureBank.hpp │ │ ├── H3MapEvent.cpp │ │ ├── H3MapEvent.hpp │ │ ├── H3MapFlotsam.cpp │ │ ├── H3MapFlotsam.hpp │ │ ├── H3MapFountainFortune.cpp │ │ ├── H3MapFountainFortune.hpp │ │ ├── H3MapGarrison.cpp │ │ ├── H3MapGarrison.hpp │ │ ├── H3MapGenerator.cpp │ │ ├── H3MapGenerator.hpp │ │ ├── H3MapHero.cpp │ │ ├── H3MapHero.hpp │ │ ├── H3MapItems.cpp │ │ ├── H3MapItems.hpp │ │ ├── H3MapLeanTo.cpp │ │ ├── H3MapLeanTo.hpp │ │ ├── H3MapLearningStone.cpp │ │ ├── H3MapLearningStone.hpp │ │ ├── H3MapLighthouse.cpp │ │ ├── H3MapLighthouse.hpp │ │ ├── H3MapMagicShrine.cpp │ │ ├── H3MapMagicShrine.hpp │ │ ├── H3MapMagicSpring.cpp │ │ ├── H3MapMagicSpring.hpp │ │ ├── H3MapMine.cpp │ │ ├── H3MapMine.hpp │ │ ├── H3MapMonolith.cpp │ │ ├── H3MapMonolith.hpp │ │ ├── H3MapMonster.cpp │ │ ├── H3MapMonster.hpp │ │ ├── H3MapMysticGarden.cpp │ │ ├── H3MapMysticGarden.hpp │ │ ├── H3MapObelisk.cpp │ │ ├── H3MapObelisk.hpp │ │ ├── H3MapOceanBottle.cpp │ │ ├── H3MapOceanBottle.hpp │ │ ├── H3MapPandorasBox.cpp │ │ ├── H3MapPandorasBox.hpp │ │ ├── H3MapPrison.cpp │ │ ├── H3MapPrison.hpp │ │ ├── H3MapPyramid.cpp │ │ ├── H3MapPyramid.hpp │ │ ├── H3MapQuestGuard.cpp │ │ ├── H3MapQuestGuard.hpp │ │ ├── H3MapRefugeeCamp.cpp │ │ ├── H3MapRefugeeCamp.hpp │ │ ├── H3MapResource.cpp │ │ ├── H3MapResource.hpp │ │ ├── H3MapScholar.cpp │ │ ├── H3MapScholar.hpp │ │ ├── H3MapScroll.cpp │ │ ├── H3MapScroll.hpp │ │ ├── H3MapSeaChest.cpp │ │ ├── H3MapSeaChest.hpp │ │ ├── H3MapSeerHut.cpp │ │ ├── H3MapSeerHut.hpp │ │ ├── H3MapShipwreckSurvivor.cpp │ │ ├── H3MapShipwreckSurvivor.hpp │ │ ├── H3MapShipyard.cpp │ │ ├── H3MapShipyard.hpp │ │ ├── H3MapSign.cpp │ │ ├── H3MapSign.hpp │ │ ├── H3MapTown.cpp │ │ ├── H3MapTown.hpp │ │ ├── H3MapTreasureChest.cpp │ │ ├── H3MapTreasureChest.hpp │ │ ├── H3MapTreeOfKnowledge.cpp │ │ ├── H3MapTreeOfKnowledge.hpp │ │ ├── H3MapUniversity.cpp │ │ ├── H3MapUniversity.hpp │ │ ├── H3MapWagon.cpp │ │ ├── H3MapWagon.hpp │ │ ├── H3MapWarriorsTomb.cpp │ │ ├── H3MapWarriorsTomb.hpp │ │ ├── H3MapWaterMill.cpp │ │ ├── H3MapWaterMill.hpp │ │ ├── H3MapWindmill.cpp │ │ ├── H3MapWindmill.hpp │ │ ├── H3MapWitchHut.cpp │ │ ├── H3MapWitchHut.hpp │ │ ├── H3ObjectAttributes.cpp │ │ ├── H3ObjectAttributes.hpp │ │ ├── H3ObjectDetails.cpp │ │ ├── H3ObjectDetails.hpp │ │ ├── H3TileVision.cpp │ │ └── H3TileVision.hpp │ ├── H3Artifacts.hpp │ ├── H3Artifacts │ │ ├── CMakeLists.txt │ │ ├── H3Artifact.cpp │ │ ├── H3Artifact.hpp │ │ ├── H3ArtifactSetup.cpp │ │ ├── H3ArtifactSetup.hpp │ │ ├── H3CombinationArtifacts.cpp │ │ └── H3CombinationArtifacts.hpp │ ├── H3Assets.hpp │ ├── H3Assets │ │ ├── CMakeLists.txt │ │ ├── H3DefFrame.cpp │ │ ├── H3DefFrame.hpp │ │ ├── H3Font.cpp │ │ ├── H3Font.hpp │ │ ├── H3LoadedDef.cpp │ │ ├── H3LoadedDef.hpp │ │ ├── H3LoadedPcx.cpp │ │ ├── H3LoadedPcx.hpp │ │ ├── H3LoadedPcx16.cpp │ │ ├── H3LoadedPcx16.hpp │ │ ├── H3LoadedPcx24.cpp │ │ ├── H3LoadedPcx24.hpp │ │ ├── H3Lod.cpp │ │ ├── H3Lod.hpp │ │ ├── H3Palette32.cpp │ │ ├── H3Palette32.hpp │ │ ├── H3Palette565.cpp │ │ ├── H3Palette565.hpp │ │ ├── H3Palette888.cpp │ │ ├── H3Palette888.hpp │ │ ├── H3Pixels.cpp │ │ ├── H3Pixels.hpp │ │ ├── H3QuestsText.cpp │ │ ├── H3QuestsText.hpp │ │ ├── H3Resource.cpp │ │ ├── H3Resource.hpp │ │ ├── H3ResourceManager.cpp │ │ ├── H3ResourceManager.hpp │ │ ├── H3SecondarySkillInfo.cpp │ │ ├── H3SecondarySkillInfo.hpp │ │ ├── H3SpellbookText.cpp │ │ ├── H3SpellbookText.hpp │ │ ├── H3TextFile.cpp │ │ ├── H3TextFile.hpp │ │ ├── H3TextTable.cpp │ │ ├── H3TextTable.hpp │ │ ├── H3WavFile.cpp │ │ └── H3WavFile.hpp │ ├── H3Base.hpp │ ├── H3Base │ │ ├── CMakeLists.txt │ │ ├── H3Allocator.cpp │ │ ├── H3Allocator.hpp │ │ ├── H3Bitfield.cpp │ │ ├── H3Bitfield.hpp │ │ ├── H3Config.hpp │ │ ├── H3Core.cpp │ │ ├── H3Core.hpp │ │ ├── H3Functions.cpp │ │ └── H3Functions.hpp │ ├── H3Campaign.hpp │ ├── H3Campaign │ │ ├── CMakeLists.txt │ │ ├── H3CmpHeader.cpp │ │ ├── H3CmpHeader.hpp │ │ ├── H3CmpInfo.cpp │ │ ├── H3CmpInfo.hpp │ │ ├── H3CmpPrologue.cpp │ │ ├── H3CmpPrologue.hpp │ │ ├── H3CmpScenarioHeader.cpp │ │ ├── H3CmpScenarioHeader.hpp │ │ ├── H3CmpScenarioInfo.cpp │ │ ├── H3CmpScenarioInfo.hpp │ │ ├── H3CmpStartingBonusDetails.cpp │ │ ├── H3CmpStartingBonusDetails.hpp │ │ ├── H3CmpStartingOptions.cpp │ │ ├── H3CmpStartingOptions.hpp │ │ ├── H3CmpVideo.cpp │ │ └── H3CmpVideo.hpp │ ├── H3Combat.hpp │ ├── H3Combat │ │ ├── CMakeLists.txt │ │ ├── H3AdjacentSquares.cpp │ │ ├── H3AdjacentSquares.hpp │ │ ├── H3CombatCreature.cpp │ │ ├── H3CombatCreature.hpp │ │ ├── H3CombatSquare.cpp │ │ ├── H3CombatSquare.hpp │ │ ├── H3MagicAnimation.cpp │ │ ├── H3MagicAnimation.hpp │ │ ├── H3Obstacle.cpp │ │ ├── H3Obstacle.hpp │ │ ├── H3ObstacleInfo.cpp │ │ ├── H3ObstacleInfo.hpp │ │ ├── H3ValidCatapultTargets.cpp │ │ ├── H3ValidCatapultTargets.hpp │ │ ├── H3WallSection.cpp │ │ └── H3WallSection.hpp │ ├── H3Constants.hpp │ ├── H3Constants │ │ ├── CMakeLists.txt │ │ ├── H3CstArtifact.hpp │ │ ├── H3CstAssets.hpp │ │ ├── H3CstCampaigns.hpp │ │ ├── H3CstCombat.hpp │ │ ├── H3CstCreatures.hpp │ │ ├── H3CstDlg.hpp │ │ ├── H3CstDlgControls.hpp │ │ ├── H3CstExperienceLevels.hpp │ │ ├── H3CstHeroes.hpp │ │ ├── H3CstMapEditor.hpp │ │ ├── H3CstMessages.hpp │ │ ├── H3CstMouseCursor.hpp │ │ ├── H3CstNetwork.hpp │ │ ├── H3CstObjects.hpp │ │ ├── H3CstPlayers.hpp │ │ ├── H3CstQuest.hpp │ │ ├── H3CstReplayActions.hpp │ │ ├── H3CstResources.hpp │ │ ├── H3CstSkills.hpp │ │ ├── H3CstSpells.hpp │ │ ├── H3CstTerrain.hpp │ │ ├── H3CstTowns.hpp │ │ ├── H3CstVKey.hpp │ │ ├── H3CstVictoryLoss.hpp │ │ └── H3Limits.hpp │ ├── H3Containers.hpp │ ├── H3Containers │ │ ├── CMakeLists.txt │ │ ├── H3Bitset.hpp │ │ ├── H3Set.hpp │ │ ├── H3String.cpp │ │ ├── H3String.hpp │ │ ├── H3Vector.cpp │ │ └── H3Vector.hpp │ ├── H3Creatures.hpp │ ├── H3Creatures │ │ ├── CMakeLists.txt │ │ ├── H3Army.cpp │ │ ├── H3Army.hpp │ │ ├── H3Creature.cpp │ │ ├── H3Creature.hpp │ │ ├── H3CreatureAnimation.cpp │ │ ├── H3CreatureAnimation.hpp │ │ ├── H3CreatureInformation.cpp │ │ └── H3CreatureInformation.hpp │ ├── H3Defines.hpp │ ├── H3Defines │ │ ├── CMakeLists.txt │ │ ├── H3DataArrayPointers.hpp │ │ ├── H3DataPointers.hpp │ │ ├── H3PrimitiveArrayPointers.hpp │ │ └── H3PrimitivePointers.hpp │ ├── H3DialogControls.hpp │ ├── H3DialogControls │ │ ├── CMakeLists.txt │ │ ├── H3DlgCaptionButton.cpp │ │ ├── H3DlgCaptionButton.hpp │ │ ├── H3DlgCustomButton.cpp │ │ ├── H3DlgCustomButton.hpp │ │ ├── H3DlgDef.cpp │ │ ├── H3DlgDef.hpp │ │ ├── H3DlgDefButton.cpp │ │ ├── H3DlgDefButton.hpp │ │ ├── H3DlgEdit.cpp │ │ ├── H3DlgEdit.hpp │ │ ├── H3DlgFrame.cpp │ │ ├── H3DlgFrame.hpp │ │ ├── H3DlgHighlightable.cpp │ │ ├── H3DlgHighlightable.hpp │ │ ├── H3DlgHintBar.cpp │ │ ├── H3DlgHintBar.hpp │ │ ├── H3DlgItem.cpp │ │ ├── H3DlgItem.hpp │ │ ├── H3DlgPcx.cpp │ │ ├── H3DlgPcx.hpp │ │ ├── H3DlgPcx16.cpp │ │ ├── H3DlgPcx16.hpp │ │ ├── H3DlgScrollableText.cpp │ │ ├── H3DlgScrollableText.hpp │ │ ├── H3DlgScrollbar.cpp │ │ ├── H3DlgScrollbar.hpp │ │ ├── H3DlgText.cpp │ │ ├── H3DlgText.hpp │ │ ├── H3DlgTextPcx.cpp │ │ ├── H3DlgTextPcx.hpp │ │ ├── H3DlgTextScrollbar.cpp │ │ ├── H3DlgTextScrollbar.hpp │ │ ├── H3DlgTransparentItem.cpp │ │ └── H3DlgTransparentItem.hpp │ ├── H3Dialogs.hpp │ ├── H3Dialogs │ │ ├── CMakeLists.txt │ │ ├── H3AdventureMgrDlg.cpp │ │ ├── H3AdventureMgrDlg.hpp │ │ ├── H3BaseDialog.cpp │ │ ├── H3BaseDialog.hpp │ │ ├── H3CombatDlg.cpp │ │ ├── H3CombatDlg.hpp │ │ ├── H3CreatureInfoDlg.cpp │ │ ├── H3CreatureInfoDlg.hpp │ │ ├── H3CustomDialog.cpp │ │ ├── H3CustomDialog.hpp │ │ ├── H3DialogPanel.cpp │ │ ├── H3DialogPanel.hpp │ │ ├── H3HiScoreDlg.cpp │ │ ├── H3HiScoreDlg.hpp │ │ ├── H3Message.cpp │ │ ├── H3Message.hpp │ │ ├── H3Messagebox.cpp │ │ ├── H3Messagebox.hpp │ │ ├── H3NetworkDialog.cpp │ │ ├── H3NetworkDialog.hpp │ │ ├── H3OracleDlg.cpp │ │ ├── H3OracleDlg.hpp │ │ ├── H3ResourceBarPanel.cpp │ │ ├── H3ResourceBarPanel.hpp │ │ ├── H3ScreenChat.cpp │ │ ├── H3ScreenChat.hpp │ │ ├── H3SelectScenarioDialog.cpp │ │ ├── H3SelectScenarioDialog.hpp │ │ ├── H3TownAlignmentDlg.cpp │ │ ├── H3TownAlignmentDlg.hpp │ │ ├── H3TownDlg.cpp │ │ ├── H3TownDlg.hpp │ │ ├── HDDialog.cpp │ │ └── HDDialog.hpp │ ├── H3GameData.hpp │ ├── H3GameData │ │ ├── CMakeLists.txt │ │ ├── H3GarrisonInterface.cpp │ │ ├── H3GarrisonInterface.hpp │ │ ├── H3GlobalEvent.cpp │ │ ├── H3GlobalEvent.hpp │ │ ├── H3LossCondition.cpp │ │ ├── H3LossCondition.hpp │ │ ├── H3Main.cpp │ │ ├── H3Main.hpp │ │ ├── H3MainSetup.cpp │ │ ├── H3MainSetup.hpp │ │ ├── H3MapInfo.cpp │ │ ├── H3MapInfo.hpp │ │ ├── H3Network.cpp │ │ ├── H3Network.hpp │ │ ├── H3RandomDwelling.cpp │ │ ├── H3RandomDwelling.hpp │ │ ├── H3Resources.cpp │ │ ├── H3Resources.hpp │ │ ├── H3ScenarioMapInformation.cpp │ │ ├── H3ScenarioMapInformation.hpp │ │ ├── H3Spell.cpp │ │ ├── H3Spell.hpp │ │ ├── H3TurnTimer.cpp │ │ ├── H3TurnTimer.hpp │ │ ├── H3VictoryCondition.cpp │ │ └── H3VictoryCondition.hpp │ ├── H3GzWrapper.hpp │ ├── H3GzWrapper │ │ ├── CMakeLists.txt │ │ ├── H3GzFile.cpp │ │ ├── H3GzFile.hpp │ │ ├── H3GzInflateBuf.cpp │ │ ├── H3GzInflateBuf.hpp │ │ ├── H3GzStream.cpp │ │ ├── H3GzStream.hpp │ │ ├── H3ZStream.cpp │ │ └── H3ZStream.hpp │ ├── H3Heroes.hpp │ ├── H3Heroes │ │ ├── CMakeLists.txt │ │ ├── H3CustomHeroData.cpp │ │ ├── H3CustomHeroData.hpp │ │ ├── H3Hero.cpp │ │ ├── H3Hero.hpp │ │ ├── H3HeroInfo.cpp │ │ ├── H3HeroInfo.hpp │ │ ├── H3HeroPlaceholder.cpp │ │ ├── H3HeroPlaceholder.hpp │ │ ├── H3HeroSpecialty.cpp │ │ ├── H3HeroSpecialty.hpp │ │ ├── H3ScenarioHeroInfo.cpp │ │ ├── H3ScenarioHeroInfo.hpp │ │ ├── H3SetupHero.cpp │ │ └── H3SetupHero.hpp │ ├── H3Managers.hpp │ ├── H3Managers │ │ ├── CMakeLists.txt │ │ ├── H3AdventureManager.cpp │ │ ├── H3AdventureManager.hpp │ │ ├── H3BaseManager.cpp │ │ ├── H3BaseManager.hpp │ │ ├── H3CombatManager.cpp │ │ ├── H3CombatManager.hpp │ │ ├── H3ExecutiveMgr.cpp │ │ ├── H3ExecutiveMgr.hpp │ │ ├── H3HiScoreManager.cpp │ │ ├── H3HiScoreManager.hpp │ │ ├── H3InputManager.cpp │ │ ├── H3InputManager.hpp │ │ ├── H3MouseManager.cpp │ │ ├── H3MouseManager.hpp │ │ ├── H3RecruitManager.cpp │ │ ├── H3RecruitManager.hpp │ │ ├── H3SoundManager.cpp │ │ ├── H3SoundManager.hpp │ │ ├── H3SwapManager.cpp │ │ ├── H3SwapManager.hpp │ │ ├── H3TownManager.cpp │ │ ├── H3TownManager.hpp │ │ ├── H3WindowManager.cpp │ │ └── H3WindowManager.hpp │ ├── H3Players.hpp │ ├── H3Players │ │ ├── CMakeLists.txt │ │ ├── H3Player.cpp │ │ ├── H3Player.hpp │ │ ├── H3PlayerAttributes.cpp │ │ ├── H3PlayerAttributes.hpp │ │ ├── H3PlayersInfo.cpp │ │ ├── H3PlayersInfo.hpp │ │ ├── H3ScenarioPlayer.cpp │ │ └── H3ScenarioPlayer.hpp │ ├── H3RMG.hpp │ ├── H3RMG │ │ ├── CMakeLists.txt │ │ ├── H3RmgGroundTile.cpp │ │ ├── H3RmgGroundTile.hpp │ │ ├── H3RmgGroundTileData.cpp │ │ ├── H3RmgGroundTileData.hpp │ │ ├── H3RmgLocalMap.cpp │ │ ├── H3RmgLocalMap.hpp │ │ ├── H3RmgMap.cpp │ │ ├── H3RmgMap.hpp │ │ ├── H3RmgMapInfo.cpp │ │ ├── H3RmgMapInfo.hpp │ │ ├── H3RmgMapItem.cpp │ │ ├── H3RmgMapItem.hpp │ │ ├── H3RmgMovementCost.cpp │ │ ├── H3RmgMovementCost.hpp │ │ ├── H3RmgObject.cpp │ │ ├── H3RmgObject.hpp │ │ ├── H3RmgObjectMonster.cpp │ │ ├── H3RmgObjectMonster.hpp │ │ ├── H3RmgObjectProperties.cpp │ │ ├── H3RmgObjectProperties.hpp │ │ ├── H3RmgObjectSeer.cpp │ │ ├── H3RmgObjectSeer.hpp │ │ ├── H3RmgObjectTown.cpp │ │ ├── H3RmgObjectTown.hpp │ │ ├── H3RmgParameters.cpp │ │ ├── H3RmgParameters.hpp │ │ ├── H3RmgRandomMapGenerator.cpp │ │ ├── H3RmgRandomMapGenerator.hpp │ │ ├── H3RmgTemplate.cpp │ │ ├── H3RmgTemplate.hpp │ │ ├── H3RmgZone.cpp │ │ ├── H3RmgZone.hpp │ │ ├── H3RmgZoneConnection.cpp │ │ ├── H3RmgZoneConnection.hpp │ │ ├── H3RmgZoneData.cpp │ │ ├── H3RmgZoneData.hpp │ │ ├── H3RmgZoneGenerator.cpp │ │ └── H3RmgZoneGenerator.hpp │ ├── H3Skills.hpp │ ├── H3Skills │ │ ├── CMakeLists.txt │ │ ├── H3Diplomacy.cpp │ │ ├── H3Diplomacy.hpp │ │ ├── H3PrimarySkills.cpp │ │ ├── H3PrimarySkills.hpp │ │ ├── H3SecondarySkill.cpp │ │ └── H3SecondarySkill.hpp │ ├── H3Towns.hpp │ ├── H3Towns │ │ ├── CMakeLists.txt │ │ ├── H3BuildingCosts.cpp │ │ ├── H3BuildingCosts.hpp │ │ ├── H3CastleEvent.cpp │ │ ├── H3CastleEvent.hpp │ │ ├── H3OraclePuzzle.cpp │ │ ├── H3OraclePuzzle.hpp │ │ ├── H3SetupTown.cpp │ │ ├── H3SetupTown.hpp │ │ ├── H3Town.cpp │ │ ├── H3Town.hpp │ │ ├── H3TownCreatureTypes.cpp │ │ ├── H3TownCreatureTypes.hpp │ │ ├── H3TownDependencies.cpp │ │ └── H3TownDependencies.hpp │ ├── H3Utilities.hpp │ ├── H3Utilities │ │ ├── CMakeLists.txt │ │ ├── H3Bitmap.cpp │ │ ├── H3Bitmap.hpp │ │ ├── H3Exception.cpp │ │ ├── H3Exception.hpp │ │ ├── H3Ini.cpp │ │ ├── H3Ini.hpp │ │ ├── H3Memory.cpp │ │ ├── H3Memory.hpp │ │ ├── H3Path.cpp │ │ ├── H3Path.hpp │ │ ├── H3Plugins.cpp │ │ ├── H3Plugins.hpp │ │ ├── H3Random.cpp │ │ ├── H3Random.hpp │ │ ├── H3Range.hpp │ │ ├── H3Stream.cpp │ │ ├── H3Stream.hpp │ │ └── H3Tree.hpp │ ├── H3Version.hpp │ ├── PreprocessorCleanup.hpp │ └── Readme.md └── patcher_x86.hpp ├── scripts ├── amalgamate.py └── single.template └── single_header ├── H3API.hpp └── Readme.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.17) 2 | 3 | set(CMAKE_GENERATOR_PLATFORM Win32) 4 | 5 | project (H3API) 6 | 7 | add_library(H3API STATIC "") 8 | 9 | add_subdirectory(include) 10 | 11 | add_compile_definitions(_H3API_LIBRARY_) 12 | 13 | include_directories("${PROJECT_SOURCE_DIR}/include/") 14 | 15 | file(GLOB_RECURSE _source_list *.cpp* *.hpp*) 16 | foreach(_source IN ITEMS ${_source_list}) 17 | get_filename_component(_source_path "${_source}" PATH) 18 | string(REPLACE "${CMAKE_SOURCE_DIR}" "" _group_path "${_source_path}") 19 | string(REPLACE "/" "\\" _group_path "${_group_path}") 20 | source_group("${_group_path}" FILES "${_source}") 21 | endforeach() 22 | 23 | if(NOT BINARY_CUSTOM_DIR) 24 | set_target_properties(H3API PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) 25 | install(TARGETS H3API DESTINATION lib) 26 | endif() -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 RoseKavalier 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(h3api) 2 | 3 | target_sources(H3API PUBLIC 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3API.hpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/patcher_x86.hpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Types.hpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3API.natvis" 8 | ) -------------------------------------------------------------------------------- /include/h3api/H3AI.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3AI/H3Pathfinder.hpp" 14 | #include "h3api/H3AI/H3PathNode.hpp" 15 | #include "h3api/H3AI/H3SimulatedCombat.hpp" 16 | #include "h3api/H3AI/H3SimulatedCreature.hpp" 17 | #include "h3api/H3AI/H3SimulatedHero.hpp" 18 | #include "h3api/H3AI/H3SimulatedSpell.hpp" 19 | #include "h3api/H3AI/H3SpellCastInfo.hpp" 20 | #include "h3api/H3AI/H3SpellData.hpp" 21 | -------------------------------------------------------------------------------- /include/h3api/H3AI/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Pathfinder.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PathNode.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedCombat.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedCreature.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedHero.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedSpell.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SpellCastInfo.cpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SpellData.cpp" 10 | ) 11 | 12 | target_sources(H3API PUBLIC 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Pathfinder.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PathNode.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedCombat.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedCreature.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedHero.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SimulatedSpell.hpp" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SpellCastInfo.hpp" 20 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SpellData.hpp" 21 | ) -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SimulatedCombat.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SimulatedCombat.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3SimulatedCombat::DeleteCreatures() 16 | { 17 | THISCALL_2(VOID, 0x424880, this, 1); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SimulatedCreature.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SimulatedCreature.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SimulatedHero.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SimulatedHero.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SimulatedSpell.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SimulatedSpell.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SpellCastInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SpellCastInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SpellData.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AI/H3SpellData.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AI/H3SpellData.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(SpellData); 18 | typedef H3SpellData H3AiSpellData; 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3SpellData 23 | { 24 | _H3API_SIZE_(0x24); 25 | 26 | INT32 spellId; 27 | INT32 expertise; 28 | INT32 _f_08; 29 | INT32 _f_0C; 30 | INT32 _f_10; 31 | INT32 actionParameter; 32 | INT32 _f_18; 33 | INT32 spellValue; 34 | INT32 _f_20; 35 | }; 36 | _H3API_ASSERT_SIZE_(H3SpellData); 37 | 38 | #pragma pack(pop) /* align-4 */ 39 | 40 | } /* namespace h3 */ 41 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3GlobalObjectSettings.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3GlobalObjectSettings.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapArtifact.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapArtifact.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3MapArtifact* H3MapitemArtifact::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3MapArtifact* H3MapitemArtifact::Get(H3Main* main) 21 | { 22 | return hasSetup ? &main->mainSetup.artifactResource[id] : nullptr; 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapBlackMarket.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapBlackMarket.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3BlackMarket* H3MapitemBlackMarket::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3BlackMarket* H3MapitemBlackMarket::Get(H3Main* main) 21 | { 22 | return &main->blackMarkets[id]; 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapBoat.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapBoat.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Boat* H3MapitemBoat::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Boat* H3MapitemBoat::Get(H3Main* main) 21 | { 22 | return &main->boats[index]; 23 | } 24 | 25 | 26 | } /* namespace h3 */ 27 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapCampfire.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapCampfire.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eResource H3MapitemCampfire::GetType() 16 | { 17 | return eResource(resType); 18 | } 19 | _H3API_ INT32 H3MapitemCampfire::GetGold() 20 | { 21 | return GetResourceAmount() * 100; 22 | } 23 | _H3API_ INT32 H3MapitemCampfire::GetResourceAmount() 24 | { 25 | return resValue; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapCorpse.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapCorpse.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eArtifact H3MapitemCorpse::GetArtifact() 16 | { 17 | return eArtifact(artifactID); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapEvent.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapEvent.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Event* H3MapitemEvent::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Event* H3MapitemEvent::Get(H3Main* main) 21 | { 22 | return reinterpret_cast(&main->mainSetup.pandoraEvents[id]); 23 | } 24 | _H3API_ H3PlayersBitfield H3MapitemEvent::EnabledPlayers() 25 | { 26 | return H3PlayersBitfield(enabled); 27 | } 28 | _H3API_ VOID H3MapitemEvent::SetEnabled(const H3PlayersBitfield& players) 29 | { 30 | enabled = players.bits; 31 | } 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapFlotsam.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapFlotsam.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | _H3API_ INT32 H3MapitemFlotsam::GetWood() const 17 | { 18 | switch (type) 19 | { 20 | case WOOD5: 21 | case WOOD5_GOLD200: 22 | return 5; 23 | case WOOD10_GOLD500: 24 | return 10; 25 | default: 26 | return 0; 27 | } 28 | } 29 | _H3API_ INT32 H3MapitemFlotsam::GetGold() const 30 | { 31 | switch (type) 32 | { 33 | case WOOD5_GOLD200: 34 | return 200; 35 | case WOOD10_GOLD500: 36 | return 500; 37 | default: 38 | return 0; 39 | } 40 | } 41 | 42 | } /* namespace h3 */ 43 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapFlotsam.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemFlotsam); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for Flotsam on adventure map*/ 22 | struct H3MapitemFlotsam 23 | { 24 | enum eType : INT32 25 | { 26 | EMPTY, 27 | WOOD5, 28 | WOOD5_GOLD200, 29 | WOOD10_GOLD500, 30 | }; 31 | eType type; 32 | 33 | _H3API_ INT32 GetWood() const; 34 | _H3API_ INT32 GetGold() const; 35 | }; 36 | 37 | #pragma pack(pop) /* align-4 */ 38 | 39 | } /* namespace h3 */ 40 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapFountainFortune.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapFountainFortune.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemFountainFortune::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ VOID H3MapitemFountainFortune::SetVisited(const H3PlayersBitfield& players) 20 | { 21 | visited = players.bits; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapGarrison.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapGarrison.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Garrison* H3MapitemGarrison::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Garrison* H3MapitemGarrison::Get(H3Main* main) 21 | { 22 | return &main->garrisons[index]; 23 | } 24 | 25 | } /* namespace h3 */ 26 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapGenerator.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapGenerator.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Generator* H3MapitemGenerator::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Generator* H3MapitemGenerator::Get(H3Main* main) 21 | { 22 | return &main->dwellings[id]; 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapHero.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapHero.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Hero* H3MapitemHero::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Hero* H3MapitemHero::Get(H3Main* main) 21 | { 22 | return main->GetHero(index); 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapHero.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemHero); 18 | struct H3Main; 19 | struct H3Hero; 20 | 21 | #pragma pack(push, 4) 22 | 23 | /** @brief data for hero on adventure map*/ 24 | struct H3MapitemHero 25 | { 26 | /** @brief [00] hero's identity*/ 27 | INT32 index; 28 | 29 | _H3API_ H3Hero* Get(); 30 | _H3API_ H3Hero* Get(H3Main* main); 31 | }; 32 | 33 | #pragma pack(pop) /* align-4 */ 34 | 35 | } /* namespace h3 */ 36 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapLeanTo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapLeanTo.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eResource H3MapitemLeanTo::GetType() 16 | { 17 | return eResource(resType); 18 | } 19 | _H3API_ INT32 H3MapitemLeanTo::GetAmount() 20 | { 21 | return resValue; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapLearningStone.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapLearningStone.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapLearningStone.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemLearningStone); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for learning stone on adventure map*/ 22 | struct H3MapitemLearningStone 23 | { 24 | /** @brief [00] heroes can only visit 32 learning stones*/ 25 | INT32 id; 26 | }; 27 | 28 | #pragma pack(pop) /* align-4 */ 29 | 30 | } /* namespace h3 */ 31 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapLighthouse.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapLighthouse.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapLighthouse.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3AdventureMap/H3MapMine.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(MapitemLighthouse); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3Lighthouse : H3Mine 23 | { 24 | }; 25 | 26 | struct H3MapitemLighthouse : H3MapitemMine 27 | { 28 | }; 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMagicShrine.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapMagicShrine.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eSpell H3MapitemMagicShrine::GetSpell() 16 | { 17 | return eSpell(spell); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMagicShrine.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstSpells.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(MapitemMagicShrine); 19 | 20 | #pragma pack(push, 4) 21 | 22 | /** @brief data for magic shrine on adventure map*/ 23 | struct H3MapitemMagicShrine 24 | { 25 | /** @brief [00]*/ 26 | unsigned _u1 : 13; 27 | /** @brief [13] 0..1023 spell ID*/ 28 | unsigned spell : 10; 29 | /** @brief [23]*/ 30 | unsigned _u2 : 9; 31 | 32 | _H3API_ eSpell GetSpell(); 33 | }; 34 | 35 | #pragma pack(pop) /* align-4 */ 36 | 37 | } /* namespace h3 */ 38 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMagicSpring.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapMagicSpring.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMagicSpring.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemMagicSpring); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for magic spring on adventure map*/ 22 | struct H3MapitemMagicSpring 23 | { 24 | /** @brief [00] 0..31 Magic Spring index*/ 25 | unsigned id : 5; 26 | /** @brief [05]*/ 27 | unsigned _u1 : 1; 28 | /** @brief [06] did a hero already visit this week*/ 29 | unsigned used : 1; 30 | /** @brief [07]*/ 31 | unsigned _u2 : 25; 32 | }; 33 | 34 | #pragma pack(pop) /* align-4 */ 35 | 36 | } /* namespace h3 */ 37 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMine.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapMine.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Mine* H3MapitemMine::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Mine* H3MapitemMine::Get(H3Main* main) 21 | { 22 | return &main->minesLighthouses[index]; 23 | } 24 | _H3API_ BOOL H3Mine::IsAbandonned() const 25 | { 26 | return abandoned; 27 | } 28 | 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMonolith.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapMonolith.hpp" 12 | #include "h3api/H3AdventureMap/H3MapItems.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ INT32 H3MapitemMonolith::GetSubtype() 17 | { 18 | return reinterpret_cast(this)->objectSubtype; 19 | } 20 | } /* namespace h3 */ 21 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMonolith.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemMonolith); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for monoliths on adventure map*/ 22 | struct H3MapitemMonolith 23 | { 24 | /** @brief [00] only really used for 2-way monoliths, such that entrance != exit*/ 25 | INT32 index; 26 | 27 | _H3API_ INT32 GetSubtype(); 28 | }; 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapMysticGarden.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapMysticGarden.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ INT32 H3MapitemMysticGarden::GetAmount() 16 | { 17 | return GetType() == eResource::GOLD ? 500 : 5; 18 | } 19 | _H3API_ eResource H3MapitemMysticGarden::GetType() 20 | { 21 | return eResource(resType); 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapObelisk.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapObelisk.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapObelisk.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemObelisk); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for obelisks on adventure map*/ 22 | struct H3MapitemObelisk 23 | { 24 | UINT32 id; 25 | }; 26 | 27 | #pragma pack(pop) /* align-4 */ 28 | 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapOceanBottle.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapOceanBottle.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapOceanBottle.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3AdventureMap/H3MapSign.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(MapitemOceanBottle); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3OceanBottle : H3Signpost 23 | { 24 | }; 25 | 26 | struct H3MapitemOceanBottle : H3MapitemSign 27 | { 28 | }; 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapPandorasBox.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapPandorasBox.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3PandorasBox* H3MapitemPandorasBox::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | 21 | _H3API_ H3PandorasBox* H3MapitemPandorasBox::Get(H3Main* main) 22 | { 23 | return &main->mainSetup.pandoraEvents[id]; 24 | } 25 | } /* namespace h3 */ 26 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapPrison.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapPrison.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapPrison.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3AdventureMap/H3MapHero.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(MapitemPrison); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3MapitemPrison : H3MapitemHero 23 | { 24 | }; 25 | 26 | #pragma pack(pop) /* align-4 */ 27 | 28 | } /* namespace h3 */ 29 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapPyramid.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapPyramid.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemPyramid::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ VOID H3MapitemPyramid::SetVisited(const H3PlayersBitfield& players) 20 | { 21 | visited = players.bits; 22 | } 23 | _H3API_ eSpell H3MapitemPyramid::GetSpell() 24 | { 25 | return eSpell(spell); 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapRefugeeCamp.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapRefugeeCamp.hpp" 12 | #include "h3api/H3AdventureMap/H3MapItems.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ INT32 H3MapitemRefugeeCamp::CreatureType() 17 | { 18 | return reinterpret_cast(this)->objectSubtype; 19 | } 20 | } /* namespace h3 */ 21 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapRefugeeCamp.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemRefugeeCamp); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for refugee camps on adventure map*/ 22 | struct H3MapitemRefugeeCamp 23 | { 24 | INT32 amount; 25 | 26 | INT32 CreatureType(); 27 | }; 28 | 29 | #pragma pack(pop) /* align-4 */ 30 | 31 | } /* namespace h3 */ 32 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapResource.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapResource.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | #include "h3api/H3AdventureMap/H3MapItems.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_ H3MapResource* H3MapitemResource::Get() 18 | { 19 | return Get(H3Main::Get()); 20 | } 21 | _H3API_ H3MapResource* H3MapitemResource::Get(H3Main* main) 22 | { 23 | return hasSetup ? reinterpret_cast(&main->mainSetup.artifactResource[setupIndex]) : nullptr; 24 | } 25 | _H3API_ eResource H3MapitemResource::GetType() 26 | { 27 | return eResource(reinterpret_cast(this)->objectSubtype); 28 | } 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapScholar.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapScholar.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3MapitemScholar::eType H3MapitemScholar::GetType() 16 | { 17 | return eType(type); 18 | } 19 | _H3API_ ePrimary H3MapitemScholar::GetPrimary() 20 | { 21 | return ePrimary(pSkill); 22 | } 23 | _H3API_ eSecondary H3MapitemScholar::GetSecondary() 24 | { 25 | return eSecondary(sSkill); 26 | } 27 | _H3API_ eSpell H3MapitemScholar::GetSpell() 28 | { 29 | return eSpell(spell); 30 | } 31 | } /* namespace h3 */ 32 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapScroll.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapScroll.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3MapArtifact* H3MapitemScroll::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3MapArtifact* H3MapitemScroll::Get(H3Main* main) 21 | { 22 | return hasSetup ? &main->mainSetup.artifactResource[id] : nullptr; 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapSeaChest.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapSeaChest.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3MapitemSeaChest::eType H3MapitemSeaChest::GetType() 16 | { 17 | return eType(level); 18 | } 19 | _H3API_ eArtifact H3MapitemSeaChest::GetArtifact() 20 | { 21 | return eArtifact(artifactID); 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapShipwreckSurvivor.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapShipwreckSurvivor.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapShipwreckSurvivor.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemShipwreckSurvivor); 18 | 19 | #pragma pack(push, 4) 20 | 21 | /** @brief data for shipwreck survivors on adventure map*/ 22 | struct H3MapitemShipwreckSurvivor 23 | { 24 | INT32 artifactId; 25 | }; 26 | 27 | #pragma pack(pop) /* align-4 */ 28 | 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapShipyard.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapShipyard.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ ePlayer H3MapitemShipyard::GetOwner() 16 | { 17 | return ePlayer(owner); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapShipyard.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstPlayers.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(MapitemShipyard); 19 | 20 | #pragma pack(push, 4) 21 | 22 | /** @brief data for shipyard on adventure map*/ 23 | struct H3MapitemShipyard 24 | { 25 | /** @brief [00] current owner 0..8 */ 26 | unsigned owner : 8; 27 | /** @brief [08]*/ 28 | unsigned x : 8; 29 | /** @brief [16]*/ 30 | unsigned y : 8; 31 | /** @brief [24]*/ 32 | unsigned _u3 : 8; 33 | 34 | _H3API_ ePlayer GetOwner(); 35 | }; 36 | 37 | #pragma pack(pop) /* align-4 */ 38 | 39 | } /* namespace h3 */ 40 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapSign.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapSign.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Signpost* H3MapitemSign::Get() 17 | { 18 | return Get(H3Main::Get()); 19 | } 20 | _H3API_ H3Signpost* H3MapitemSign::Get(H3Main* main) 21 | { 22 | return &main->signpostsBottles[id]; 23 | } 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapTown.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapTown.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | #include "h3api/H3Towns/H3Town.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_ H3Town* H3MapitemTown::Get() 18 | { 19 | return Get(H3Main::Get()); 20 | } 21 | _H3API_ H3Town* H3MapitemTown::Get(H3Main* main) 22 | { 23 | return &main->towns[id]; 24 | } 25 | } /* namespace h3 */ 26 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapTown.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(MapitemTown); 18 | struct H3Main; 19 | struct H3Town; 20 | 21 | #pragma pack(push, 4) 22 | 23 | /** @brief data for towns on adventure map*/ 24 | struct H3MapitemTown 25 | { 26 | INT32 id; 27 | 28 | _H3API_ H3Town* Get(); 29 | _H3API_ H3Town* Get(H3Main* main); 30 | }; 31 | 32 | #pragma pack(pop) /* align-4 */ 33 | 34 | } /* namespace h3 */ 35 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapTreasureChest.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapTreasureChest.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eArtifact H3MapitemTreasureChest::GetArtifact() 16 | { 17 | return eArtifact(artifactID); 18 | } 19 | _H3API_ INT32 H3MapitemTreasureChest::GetGold() 20 | { 21 | return 500 * bonus; 22 | } 23 | _H3API_ INT32 H3MapitemTreasureChest::GetExperience() 24 | { 25 | return GetGold() - 500; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapTreeOfKnowledge.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapTreeOfKnowledge.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemTreeOfKnowledge::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ VOID H3MapitemTreeOfKnowledge::SetVisited(const H3PlayersBitfield& players) 20 | { 21 | visited = players.bits; 22 | } 23 | _H3API_ H3MapitemTreeOfKnowledge::eType H3MapitemTreeOfKnowledge::GetType() 24 | { 25 | return eType(type); 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapWagon.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapWagon.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemWagon::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ VOID H3MapitemWagon::SetVisited(const H3PlayersBitfield& players) 20 | { 21 | visited = players.bits; 22 | } 23 | _H3API_ eArtifact H3MapitemWagon::GetArtifact() 24 | { 25 | return eArtifact(artifactID); 26 | } 27 | _H3API_ eResource H3MapitemWagon::GetResourceType() 28 | { 29 | return eResource(resType); 30 | } 31 | _H3API_ INT32 H3MapitemWagon::GetResourceAmount() 32 | { 33 | return resValue; 34 | } 35 | } /* namespace h3 */ 36 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapWarriorsTomb.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapWarriorsTomb.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemWarriorsTomb::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ eArtifact H3MapitemWarriorsTomb::GetArtifact() 20 | { 21 | return eArtifact(artifactID); 22 | } 23 | _H3API_ VOID H3MapitemWarriorsTomb::SetVisited(const H3PlayersBitfield& players) 24 | { 25 | visited = players.bits; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapWaterMill.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapWaterMill.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3PlayersBitfield H3MapitemWaterMill::GetVisiters() 16 | { 17 | return H3PlayersBitfield(visited); 18 | } 19 | _H3API_ VOID H3MapitemWaterMill::SetVisited(const H3PlayersBitfield& players) 20 | { 21 | visited = players.bits; 22 | } 23 | _H3API_ INT32 H3MapitemWaterMill::GetGold() 24 | { 25 | return bonus * 500; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapWindmill.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapWindmill.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eResource H3MapitemWindmill::GetType() 16 | { 17 | return eResource(resType); 18 | } 19 | _H3API_ INT32 H3MapitemWindmill::GetAmount() 20 | { 21 | return resValue; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3MapWitchHut.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3MapWitchHut.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ eSecondary H3MapitemWitchHut::GetSkill() 16 | { 17 | return eSecondary(sSkill); 18 | } 19 | _H3API_ H3PlayersBitfield H3MapitemWitchHut::GetVisiters() 20 | { 21 | return H3PlayersBitfield(visited); 22 | } 23 | _H3API_ VOID H3MapitemWitchHut::SetVisited(const H3PlayersBitfield& players) 24 | { 25 | visited = players.bits; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3ObjectAttributes.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3ObjectAttributes.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3AdventureMap/H3ObjectDetails.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3AdventureMap/H3ObjectDetails.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Artifacts.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Artifacts/H3Artifact.hpp" 14 | #include "h3api/H3Artifacts/H3ArtifactSetup.hpp" 15 | #include "h3api/H3Artifacts/H3CombinationArtifacts.hpp" 16 | -------------------------------------------------------------------------------- /include/h3api/H3Artifacts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Artifact.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ArtifactSetup.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombinationArtifacts.cpp" 5 | ) 6 | 7 | target_sources(H3API PUBLIC 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Artifact.hpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ArtifactSetup.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombinationArtifacts.hpp" 11 | ) -------------------------------------------------------------------------------- /include/h3api/H3Artifacts/H3ArtifactSetup.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-29 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Artifacts/H3ArtifactSetup.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ BOOL H3ArtifactSetup::IsPartOfCombo() const 16 | { 17 | return combinationArtifactId != eArtifact::NONE; 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3Artifacts/H3CombinationArtifacts.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-29 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Artifacts/H3CombinationArtifacts.hpp" 12 | #include "h3api/H3Artifacts/H3Artifact.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ BOOL H3ComboArtifactSetup::IsPartOfCombo(eArtifact id) const 17 | { 18 | return artifacts.Test(id); 19 | } 20 | _H3API_ BOOL H3ComboArtifactSetup::IsPartOfCombo(const H3Artifact& art) const 21 | { 22 | return IsPartOfCombo(art.GetId()); 23 | } 24 | 25 | 26 | } /* namespace h3 */ 27 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3DefFrame.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Assets/H3DefFrame.hpp" 12 | #include "h3api/H3Assets/H3LoadedPcx16.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ VOID H3DefFrame::DrawToPcx16(INT src_x, INT src_y, INT src_width, INT src_height, 17 | H3LoadedPcx16* pcx16, INT dst_x, INT dst_y, H3Palette565* palette565, BOOL mirror, BOOL do_not_use_special_colors) 18 | { 19 | THISCALL_14(VOID, 0x47BE90, this, src_x, src_y, src_width, src_height, pcx16->buffer, 20 | dst_x, dst_y, pcx16->width, pcx16->height, pcx16->scanlineSize, palette565, mirror, do_not_use_special_colors); 21 | } 22 | } /* namespace h3 */ 23 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3Palette32.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Assets/H3Palette32.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3ARGB888& H3Palette32::operator[](UINT index) 16 | { 17 | return colors[index]; 18 | } 19 | _H3API_ H3ARGB888 H3Palette32::operator[](UINT index) const 20 | { 21 | return colors[index]; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3Palette32.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Assets/H3Pixels.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(Palette32); 19 | 20 | #pragma pack(push, 4) 21 | 22 | /** @brief a 256 argb palette of colors for indexed images, introduced by HDmod*/ 23 | struct H3Palette32 24 | { 25 | H3ARGB888 colors[256]; 26 | 27 | _H3API_ H3ARGB888& operator[](UINT index); 28 | _H3API_ H3ARGB888 operator[](UINT index) const; 29 | }; 30 | 31 | #pragma pack(pop) /* align-4 */ 32 | 33 | } /* namespace h3 */ 34 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3QuestsText.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Assets/H3QuestsText.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3SecondarySkillInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Assets/H3SecondarySkillInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3SecondarySkillInfo.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(SecondarySkillText); 18 | _H3API_TYPE_DECLARE_(H3SecondarySkillText, SecondarySkillInfo); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3SecondarySkillText 23 | { 24 | _H3API_SIZE_(0x10); 25 | _H3API_GET_INFO_(0x67DCF0, H3SecondarySkillText); 26 | 27 | LPCSTR name; 28 | LPCSTR description[3]; 29 | }; 30 | _H3API_ASSERT_SIZE_(H3SecondarySkillText); 31 | 32 | #pragma pack(pop) /* align-4 */ 33 | 34 | } /* namespace h3 */ 35 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3SpellbookText.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Assets/H3SpellbookText.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Assets/H3SpellbookText.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(SpellbookText); 18 | 19 | #pragma pack(push, 4) 20 | 21 | struct H3SpellbookText 22 | { 23 | _H3API_GET_INFO_(0x59DBB0 + 3, H3SpellbookText); 24 | struct TextPair 25 | { 26 | LPCSTR text; 27 | LPCSTR description; 28 | }; 29 | 30 | TextPair previousPage; 31 | TextPair nextPage; 32 | TextPair adventureMapSpells; 33 | TextPair combatSpells; 34 | TextPair schoolSpells[5]; // air, fire, water, earth, all 35 | TextPair spellPoints; 36 | TextPair closeSpellbook; 37 | }; 38 | 39 | #pragma pack(pop) /* align-4 */ 40 | 41 | } /* namespace h3 */ 42 | -------------------------------------------------------------------------------- /include/h3api/H3Base.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base/H3Allocator.hpp" 14 | #include "h3api/H3Base/H3Bitfield.hpp" 15 | #include "h3api/H3Base/H3Config.hpp" 16 | #include "h3api/H3Base/H3Core.hpp" 17 | #include "h3api/H3Base/H3Functions.hpp" 18 | -------------------------------------------------------------------------------- /include/h3api/H3Base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Allocator.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Bitfield.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Core.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Functions.cpp" 6 | ) 7 | 8 | target_sources(H3API PUBLIC 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Allocator.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Bitfield.hpp" 11 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Config.hpp" 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Core.hpp" 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Functions.hpp" 14 | ) -------------------------------------------------------------------------------- /include/h3api/H3Campaign.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Campaign/H3CmpHeader.hpp" 14 | #include "h3api/H3Campaign/H3CmpInfo.hpp" 15 | #include "h3api/H3Campaign/H3CmpPrologue.hpp" 16 | #include "h3api/H3Campaign/H3CmpScenarioHeader.hpp" 17 | #include "h3api/H3Campaign/H3CmpScenarioInfo.hpp" 18 | #include "h3api/H3Campaign/H3CmpStartingBonusDetails.hpp" 19 | #include "h3api/H3Campaign/H3CmpStartingOptions.hpp" 20 | #include "h3api/H3Campaign/H3CmpVideo.hpp" 21 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpHeader.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpInfo.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpPrologue.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpScenarioHeader.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpScenarioInfo.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpStartingBonusDetails.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpStartingOptions.cpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpVideo.cpp" 10 | ) 11 | 12 | target_sources(H3API PUBLIC 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpHeader.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpInfo.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpPrologue.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpScenarioHeader.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpScenarioInfo.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpStartingBonusDetails.hpp" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpStartingOptions.hpp" 20 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CmpVideo.hpp" 21 | ) -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpHeader.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpHeader.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpPrologue.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpPrologue.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpPrologue.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Containers/H3String.hpp" 15 | #include "h3api/H3Constants/H3CstCampaigns.hpp" 16 | 17 | namespace h3 18 | { 19 | _H3API_DECLARE_(CmpPrologue); 20 | 21 | #pragma pack(push, 4) 22 | 23 | struct H3CmpPrologue 24 | { 25 | _H3API_SIZE_(0x18); 26 | 27 | /** @brief [00]*/ 28 | eCampaignMovie movie; 29 | /** @brief [04]*/ 30 | eCampaignMusic music; 31 | /** @brief [08]*/ 32 | H3String text; 33 | }; 34 | _H3API_ASSERT_SIZE_(H3CmpPrologue); 35 | 36 | #pragma pack(pop) /* align-4 */ 37 | 38 | } /* namespace h3 */ 39 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpScenarioHeader.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpScenarioHeader.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpScenarioInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-17 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpScenarioInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpScenarioInfo.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-17 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(CmpScenarioInfo); 18 | 19 | #pragma pack(push, 4) 20 | 21 | struct H3CmpScenarioInfo 22 | { 23 | _H3API_SIZE_(0x14); 24 | /** @brief [00]*/ 25 | BOOL8 completed; 26 | /** @brief [04] total time required*/ 27 | INT32 days; 28 | /** @brief [08]*/ 29 | INT32 score; 30 | /** @brief [0C]*/ 31 | INT32 corroverArrayIndex; 32 | /** @brief [10]*/ 33 | INT32 completionOrder; 34 | }; 35 | _H3API_ASSERT_SIZE_(H3CmpScenarioInfo); 36 | 37 | #pragma pack(pop) /* align-4 */ 38 | 39 | } /* namespace h3 */ 40 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpStartingBonusDetails.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpStartingBonusDetails.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpStartingOptions.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-11 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpStartingOptions.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpVideo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-18 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Campaign/H3CmpVideo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Campaign/H3CmpVideo.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-18 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_DECLARE_(CmpVideo); 18 | 19 | #pragma pack(push, 4) 20 | 21 | struct H3CmpVideo 22 | { 23 | _H3API_SIZE_(0x14); 24 | _H3API_GET_INFO_(0x44D5C3 + 2, H3CmpVideo); 25 | 26 | LPCSTR name; 27 | LPCSTR loopName; 28 | BOOL8 isBink; 29 | BOOL8 fadein; 30 | BOOL8 fadeout; 31 | h3unk32 _f_0C[2]; 32 | }; 33 | 34 | #pragma pack(pop) /* align-4 */ 35 | 36 | } /* namespace h3 */ 37 | -------------------------------------------------------------------------------- /include/h3api/H3Combat.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Combat/H3AdjacentSquares.hpp" 14 | #include "h3api/H3Combat/H3CombatCreature.hpp" 15 | #include "h3api/H3Combat/H3CombatSquare.hpp" 16 | #include "h3api/H3Combat/H3MagicAnimation.hpp" 17 | #include "h3api/H3Combat/H3Obstacle.hpp" 18 | #include "h3api/H3Combat/H3ObstacleInfo.hpp" 19 | #include "h3api/H3Combat/H3ValidCatapultTargets.hpp" 20 | #include "h3api/H3Combat/H3WallSection.hpp" 21 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3AdjacentSquares.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombatCreature.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombatSquare.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3MagicAnimation.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Obstacle.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ObstacleInfo.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ValidCatapultTargets.cpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3WallSection.cpp" 10 | ) 11 | 12 | target_sources(H3API PUBLIC 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3AdjacentSquares.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombatCreature.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CombatSquare.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3MagicAnimation.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Obstacle.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ObstacleInfo.hpp" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ValidCatapultTargets.hpp" 20 | "${CMAKE_CURRENT_SOURCE_DIR}/H3WallSection.hpp" 21 | ) -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3AdjacentSquares.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3AdjacentSquares.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3AdjacentSquares.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstCombat.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(AdjacentSquares); 19 | 20 | #pragma pack(push, 4) 21 | 22 | /** @brief index of adjacent squares, -1 if outside battlefield boundaries*/ 23 | struct H3AdjacentSquares 24 | { 25 | _H3API_SIZE_(0xC); 26 | 27 | INT16 topRight; 28 | INT16 right; 29 | INT16 bottomRight; 30 | INT16 bottomLeft; 31 | INT16 left; 32 | INT16 topLeft; 33 | }; 34 | _H3API_ASSERT_SIZE_(H3AdjacentSquares); 35 | 36 | #pragma pack(pop) /* align-4 */ 37 | 38 | } /* namespace h3 */ 39 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3CombatSquare.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3CombatSquare.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3CombatCreature* H3CombatSquare::GetMonster() 16 | { 17 | return GetCreature(); 18 | } 19 | _H3API_ H3CombatCreature* H3CombatSquare::GetCreature() 20 | { 21 | return THISCALL_1(H3CombatCreature*, 0x4E7230, this); 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3MagicAnimation.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3MagicAnimation.hpp" 12 | #include "h3api/H3GameData/H3Spell.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3MagicAnimation* H3MagicAnimation::GetAnim(INT32 spellId) 17 | { 18 | H3Spell* spellInfo = &H3Spell::Get()[spellId]; 19 | if (spellInfo->animationIndex < 0) 20 | { 21 | return nullptr; 22 | } 23 | H3MagicAnimation* animTable = H3MagicAnimation::Get(); 24 | return &animTable[spellInfo->animationIndex]; 25 | } 26 | } /* namespace h3 */ 27 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3Obstacle.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3Obstacle.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3ObstacleInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3ObstacleInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3ValidCatapultTargets.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3ValidCatapultTargets.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3ValidCatapultTargets.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstCombat.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(ValidCatapultTargets); 19 | 20 | #pragma pack(push, 4) 21 | 22 | // * town wall elements 23 | struct H3ValidCatapultTargets 24 | { 25 | _H3API_SIZE_(0xC); 26 | _H3API_GET_INFO_(0x4929DD + 3, H3ValidCatapultTargets); 27 | 28 | INT32 fortElementId; 29 | INT16 hex; 30 | h3unk16 _f_06; 31 | INT16 x; 32 | INT16 y; 33 | public: 34 | }; 35 | _H3API_ASSERT_SIZE_(H3ValidCatapultTargets); 36 | 37 | #pragma pack(pop) /* align-4 */ 38 | 39 | } /* namespace h3 */ 40 | -------------------------------------------------------------------------------- /include/h3api/H3Combat/H3WallSection.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Combat/H3WallSection.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Containers.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Containers/H3Bitset.hpp" 14 | #include "h3api/H3Containers/H3Set.hpp" 15 | #include "h3api/H3Containers/H3String.hpp" 16 | #include "h3api/H3Containers/H3Vector.hpp" 17 | -------------------------------------------------------------------------------- /include/h3api/H3Containers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3String.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Vector.cpp" 4 | ) 5 | 6 | target_sources(H3API PUBLIC 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Bitset.hpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Set.hpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3String.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Vector.hpp" 11 | ) -------------------------------------------------------------------------------- /include/h3api/H3Containers/H3Vector.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-24 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Containers/H3Vector.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3IndexVector::H3IndexVector(INT min_num, INT max_num) 16 | { 17 | THISCALL_3(H3IndexVector*, 0x50C8D0, this, min_num, max_num); 18 | } 19 | _H3API_ H3IndexVector::~H3IndexVector() 20 | { 21 | H3ObjectAllocator().deallocate(m_begin); 22 | } 23 | _H3API_ INT H3IndexVector::ChooseRandom() 24 | { 25 | return THISCALL_1(INT, 0x50C930, this); 26 | } 27 | _H3API_ INT H3IndexVector::InvalidIndex() 28 | { 29 | return m_minimum - 1; 30 | } 31 | } /* namespace h3 */ -------------------------------------------------------------------------------- /include/h3api/H3Creatures.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Creatures/H3Army.hpp" 14 | #include "h3api/H3Creatures/H3Creature.hpp" 15 | #include "h3api/H3Creatures/H3CreatureAnimation.hpp" 16 | #include "h3api/H3Creatures/H3CreatureInformation.hpp" 17 | -------------------------------------------------------------------------------- /include/h3api/H3Creatures/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Army.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Creature.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CreatureAnimation.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CreatureInformation.cpp" 6 | ) 7 | 8 | target_sources(H3API PUBLIC 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Army.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Creature.hpp" 11 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CreatureAnimation.hpp" 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CreatureInformation.hpp" 13 | ) -------------------------------------------------------------------------------- /include/h3api/H3Creatures/H3CreatureAnimation.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Creatures/H3CreatureAnimation.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Creatures/H3CreatureInformation.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Creatures/H3CreatureInformation.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ LPCSTR H3CreatureInformation::GetCreatureName(INT32 count) const 16 | { 17 | return count > 1 ? namePlural : nameSingular; 18 | } 19 | _H3API_ H3Resources H3CreatureInformation::UpgradeCost(H3CreatureInformation* upg, INT32 count) const 20 | { 21 | H3Resources res = upg->cost; 22 | res.RemoveResources(cost); 23 | for (INT32* it = res.begin(); it != res.end(); ++it) 24 | *it *= count; 25 | return res; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3Defines.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Defines/H3DataArrayPointers.hpp" 14 | #include "h3api/H3Defines/H3DataPointers.hpp" 15 | #include "h3api/H3Defines/H3PrimitiveArrayPointers.hpp" 16 | #include "h3api/H3Defines/H3PrimitivePointers.hpp" 17 | -------------------------------------------------------------------------------- /include/h3api/H3Defines/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | ) 3 | 4 | target_sources(H3API PUBLIC 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3DataArrayPointers.hpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3DataPointers.hpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PrimitiveArrayPointers.hpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PrimitivePointers.hpp" 9 | ) -------------------------------------------------------------------------------- /include/h3api/H3DialogControls/H3DlgScrollableText.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3DialogControls/H3DlgScrollableText.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3DlgScrollableText* H3DlgScrollableText::Create(LPCSTR text, INT32 x, INT32 y, 16 | INT32 width, INT32 height, LPCSTR font, INT32 color, INT32 isBlue) 17 | { 18 | H3DlgScrollableText* s = H3ObjectAllocator().allocate(1); 19 | if (s) 20 | THISCALL_9(H3DlgScrollableText*, 0x5BA360, s, text, x, y, width, height, font, color, isBlue); 21 | return s; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3DialogControls/H3DlgTextScrollbar.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3DialogControls/H3DlgTextScrollbar.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3DialogControls/H3DlgTextScrollbar.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3DialogControls/H3DlgScrollbar.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(DlgTextScrollbar); 19 | struct H3DlgScrollableText; 20 | 21 | #pragma pack(push, 4) 22 | /** @brief automatically created for scrollable text*/ 23 | struct H3DlgTextScrollbar : public H3DlgScrollbar 24 | { 25 | _H3API_SIZE_(0x6C); 26 | _H3API_VTABLE_(0x642CD8); 27 | protected: 28 | /** @brief [68]*/ 29 | H3DlgScrollableText* owner; 30 | public: 31 | 32 | }; 33 | _H3API_ASSERT_SIZE_(H3DlgTextScrollbar); 34 | 35 | #pragma pack(pop) /* align-4 */ 36 | 37 | } /* namespace h3 */ 38 | -------------------------------------------------------------------------------- /include/h3api/H3DialogControls/H3DlgTransparentItem.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3DialogControls/H3DlgTransparentItem.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3DlgTransparentItem* H3DlgTransparentItem::Create(INT32 x, INT32 y, INT32 width, INT32 height, INT32 id) 16 | { 17 | H3DlgTransparentItem* d = H3ObjectAllocator().allocate(1); 18 | if (d) 19 | THISCALL_7(H3DlgTransparentItem*, 0x44FBE0, d, x, y, width, height, id, 1); 20 | return d; 21 | } 22 | } /* namespace h3 */ 23 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3AdventureMgrDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3AdventureMgrDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3CombatDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3CombatDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3CombatDlg::ShowHint(LPCSTR hint, BOOL8 add_to_log) 16 | { 17 | THISCALL_4(VOID, 0x4729D0, this, hint, add_to_log, 0); 18 | } 19 | _H3API_ H3Vector& H3CombatDlg::GetCombatText() 20 | { 21 | return combatText; 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3CreatureInfoDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3CreatureInfoDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3HiScoreDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-06 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3HiScoreDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3HiScoreDlg::Show() 16 | { 17 | STDCALL_0(VOID, 0x4E91D0); 18 | } 19 | 20 | } /* namespace h3 */ 21 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3NetworkDialog.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3NetworkDialog.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3NetworkDlg::H3NetworkDlg(INT x, INT y, INT w, INT h) : 16 | H3ExtendedDlg(x, y, w, h), lastHintShowed(-1), 17 | exitCommand(512), exitSubtype(10), resultItemId(30721), networkGame(FALSE) 18 | { 19 | struct unkNetwork 20 | { 21 | h3unk _f_00[0xF0]; 22 | BYTE* data; 23 | }; 24 | if (IntAt(0x69959C)) 25 | { 26 | unkNetwork* net = *(unkNetwork**)0x69D858; 27 | if (net->data) 28 | { 29 | if (net->data[4]) 30 | networkGame = TRUE; 31 | net->data[4] = 1; 32 | } 33 | } 34 | } 35 | } /* namespace h3 */ 36 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3OracleDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3OracleDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3ResourceBarPanel.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3ResourceBarPanel.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3SelectScenarioDialog.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3SelectScenarioDialog.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3ScenarioMapInformation& H3SelectScenarioDialog::CurrentMap() 16 | { 17 | return mapsInformation[selectedMapIndex]; 18 | } 19 | _H3API_ VOID H3SelectScenarioDialog::UpdateForSelectedScenario(INT32 index, BOOL8 redraw) 20 | { 21 | THISCALL_3(VOID, 0x5857D0, this, index, redraw); 22 | } 23 | _H3API_ VOID H3SelectScenarioDialog::Redraw() 24 | { 25 | THISCALL_1(VOID, 0x584820, this); 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/H3TownDlg.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/H3TownDlg.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Dialogs/HDDialog.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-25 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Dialogs/HDDialog.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ INT HDDlg::CallHDProc(const H3Msg& msg) 16 | { 17 | return hdProc(this, msg); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3GameData.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3GameData/H3GarrisonInterface.hpp" 14 | #include "h3api/H3GameData/H3GlobalEvent.hpp" 15 | #include "h3api/H3GameData/H3LossCondition.hpp" 16 | #include "h3api/H3GameData/H3Main.hpp" 17 | #include "h3api/H3GameData/H3MainSetup.hpp" 18 | #include "h3api/H3GameData/H3MapInfo.hpp" 19 | #include "h3api/H3GameData/H3Network.hpp" 20 | #include "h3api/H3GameData/H3RandomDwelling.hpp" 21 | #include "h3api/H3GameData/H3Resources.hpp" 22 | #include "h3api/H3GameData/H3ScenarioMapInformation.hpp" 23 | #include "h3api/H3GameData/H3Spell.hpp" 24 | #include "h3api/H3GameData/H3TurnTimer.hpp" 25 | #include "h3api/H3GameData/H3VictoryCondition.hpp" 26 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3GarrisonInterface.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3GarrisonInterface.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3GarrisonInterface::DrawHero(INT32 hero_picture) 16 | { 17 | THISCALL_2(VOID, 0x5AA370, this, hero_picture); 18 | } 19 | _H3API_ VOID H3GarrisonInterface::DrawCreature(INT32 index, INT32 creature_portrait_index) 20 | { 21 | THISCALL_3(VOID, 0x5AA540, this, index, creature_portrait_index); 22 | } 23 | _H3API_ VOID H3GarrisonInterface::Redraw(INT32 selected_slot) 24 | { 25 | THISCALL_2(VOID, 0x5AA090, this, selected_slot); 26 | } 27 | 28 | 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3GlobalEvent.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3GlobalEvent.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3LossCondition.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3LossCondition.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3MapInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3MapInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3Network.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-24 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3Network.hpp" 12 | #include "h3api/H3Containers/H3String.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ BOOL8 H3Network::Multiplayer() 17 | { 18 | return STDCALL_0(BOOL8, 0x4CE950); 19 | } 20 | 21 | _H3API_ VOID H3Network::SendMessageToPlayer(LPCSTR text, INT32 player_id) 22 | { 23 | FASTCALL_2(VOID, 0x554BB0, text, player_id); 24 | } 25 | 26 | _H3API_ VOID H3Network::SendMessageToPlayer(const H3String& text, INT32 player_id) 27 | { 28 | SendMessageToPlayer(text.String(), player_id); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3RandomDwelling.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3RandomDwelling.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3ScenarioMapInformation.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3ScenarioMapInformation.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3Spell.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3Spell.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ INT32 H3Spell::GetBaseEffect(INT32 level, INT32 spellPower) 16 | { 17 | return baseValue[level] + spellPower * spEffect; 18 | } 19 | _H3API_ BOOL8 H3Spell::SingleTarget(INT32 id, INT32 expertise) 20 | { 21 | return FASTCALL_2(BOOL8, 0x59E360, id, expertise); 22 | } 23 | } /* namespace h3 */ 24 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3TurnTimer.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-04 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3TurnTimer.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GameData/H3VictoryCondition.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GameData/H3VictoryCondition.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GzWrapper.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3GzWrapper/H3GzFile.hpp" 14 | #include "h3api/H3GzWrapper/H3GzInflateBuf.hpp" 15 | #include "h3api/H3GzWrapper/H3GzStream.hpp" 16 | #include "h3api/H3GzWrapper/H3ZStream.hpp" 17 | -------------------------------------------------------------------------------- /include/h3api/H3GzWrapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzFile.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzInflateBuf.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzStream.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ZStream.cpp" 6 | ) 7 | 8 | target_sources(H3API PUBLIC 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzFile.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzInflateBuf.hpp" 11 | "${CMAKE_CURRENT_SOURCE_DIR}/H3GzStream.hpp" 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ZStream.hpp" 13 | ) -------------------------------------------------------------------------------- /include/h3api/H3GzWrapper/H3GzStream.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GzWrapper/H3GzStream.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3GzWrapper/H3ZStream.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-03 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3GzWrapper/H3ZStream.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Heroes/H3CustomHeroData.hpp" 14 | #include "h3api/H3Heroes/H3Hero.hpp" 15 | #include "h3api/H3Heroes/H3HeroInfo.hpp" 16 | #include "h3api/H3Heroes/H3HeroPlaceholder.hpp" 17 | #include "h3api/H3Heroes/H3HeroSpecialty.hpp" 18 | #include "h3api/H3Heroes/H3ScenarioHeroInfo.hpp" 19 | #include "h3api/H3Heroes/H3SetupHero.hpp" 20 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CustomHeroData.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Hero.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroInfo.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroPlaceholder.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroSpecialty.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ScenarioHeroInfo.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SetupHero.cpp" 9 | ) 10 | 11 | target_sources(H3API PUBLIC 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CustomHeroData.hpp" 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Hero.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroInfo.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroPlaceholder.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3HeroSpecialty.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ScenarioHeroInfo.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SetupHero.hpp" 19 | ) -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3CustomHeroData.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3CustomHeroData.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3CustomHeroData.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Containers/H3String.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(CustomHeroData); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3CustomHeroData 23 | { 24 | _H3API_SIZE_(0x14); 25 | INT32 heroId; 26 | H3String name; 27 | }; 28 | _H3API_ASSERT_SIZE_(H3CustomHeroData); 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3HeroInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3HeroInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3HeroPlaceholder.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3HeroPlaceholder.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3HeroSpecialty.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3HeroSpecialty.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ BOOL H3HeroSpecialty::HasSpellSpec() const 16 | { 17 | return type == eHeroSpecialty::SPEED; 18 | } 19 | _H3API_ eSpell H3HeroSpecialty::GetSpell() const 20 | { 21 | return eSpell(bonusId); 22 | } 23 | 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3ScenarioHeroInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3ScenarioHeroInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3ScenarioHeroInfo.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Containers/H3String.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(ScenarioHeroInfo); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3ScenarioHeroInfo 23 | { 24 | _H3API_SIZE_(0x1C); 25 | /** @brief [00]*/ 26 | INT32 heroId; 27 | /** @brief [04]*/ 28 | INT32 portraitId; 29 | /** @brief [08]*/ 30 | H3String name; 31 | /** @brief [18]*/ 32 | H3PlayersBitfield32 availableToPlayers; 33 | }; 34 | _H3API_ASSERT_SIZE_(H3ScenarioHeroInfo); 35 | 36 | #pragma pack(pop) /* align-4 */ 37 | 38 | } /* namespace h3 */ 39 | -------------------------------------------------------------------------------- /include/h3api/H3Heroes/H3SetupHero.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Heroes/H3SetupHero.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Managers.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Managers/H3AdventureManager.hpp" 14 | #include "h3api/H3Managers/H3BaseManager.hpp" 15 | #include "h3api/H3Managers/H3CombatManager.hpp" 16 | #include "h3api/H3Managers/H3ExecutiveMgr.hpp" 17 | #include "h3api/H3Managers/H3HiScoreManager.hpp" 18 | #include "h3api/H3Managers/H3InputManager.hpp" 19 | #include "h3api/H3Managers/H3MouseManager.hpp" 20 | #include "h3api/H3Managers/H3RecruitManager.hpp" 21 | #include "h3api/H3Managers/H3SoundManager.hpp" 22 | #include "h3api/H3Managers/H3SwapManager.hpp" 23 | #include "h3api/H3Managers/H3TownManager.hpp" 24 | #include "h3api/H3Managers/H3WindowManager.hpp" 25 | -------------------------------------------------------------------------------- /include/h3api/H3Managers/H3ExecutiveMgr.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-31 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Managers/H3ExecutiveMgr.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3ExecutiveMgr::RemoveManager(H3Manager* mgr) 16 | { 17 | THISCALL_2(VOID, 0x4B0950, this, mgr); 18 | } 19 | _H3API_ INT H3ExecutiveMgr::AddManager(H3Manager* mgr, INT32 order) 20 | { 21 | return THISCALL_3(INT, 0x4B0880, this, mgr, order); 22 | } 23 | _H3API_ VOID H3ExecutiveMgr::StartManager(H3Manager* mgr) 24 | { 25 | THISCALL_2(VOID, 0x4B0770, this, mgr); 26 | } 27 | 28 | } /* namespace h3 */ 29 | -------------------------------------------------------------------------------- /include/h3api/H3Managers/H3HiScoreManager.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-31 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Managers/H3HiScoreManager.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3HiScoreManager::ResetScores() 16 | { 17 | THISCALL_1(VOID, 0x4E9070, this); 18 | } 19 | 20 | } /* namespace h3 */ 21 | -------------------------------------------------------------------------------- /include/h3api/H3Managers/H3InputManager.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-31 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Managers/H3InputManager.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ H3InputManager::InputMessages& H3InputManager::GetCurrentMessage() 16 | { 17 | return messages[currentMessage]; 18 | } 19 | _H3API_ VOID H3InputManager::AddMouseOverMessage() 20 | { 21 | return THISCALL_1(VOID, 0x4ECD00, this); 22 | } 23 | 24 | } /* namespace h3 */ 25 | -------------------------------------------------------------------------------- /include/h3api/H3Managers/H3SwapManager.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-31 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Managers/H3SwapManager.hpp" 12 | #include "h3api/H3Dialogs/H3Message.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ INT32 H3SwapManager::Close(H3Msg& msg) 17 | { 18 | msg.command = eMsgCommand(0x4000); 19 | msg.subtype = eMsgSubtype(4); 20 | return 2; 21 | } 22 | _H3API_ VOID H3SwapManager::UpdateLuckMorale() 23 | { 24 | THISCALL_1(VOID, 0x5AE900, this); 25 | } 26 | _H3API_ VOID H3SwapManager::RefreshDialog() 27 | { 28 | THISCALL_1(VOID, 0x5B1200, this); 29 | } 30 | 31 | } /* namespace h3 */ 32 | -------------------------------------------------------------------------------- /include/h3api/H3Managers/H3TownManager.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-31 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Managers/H3TownManager.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3TownManager::Draw() 16 | { 17 | THISCALL_1(VOID, 0x5D5930, this); 18 | } 19 | _H3API_ VOID H3TownManager::RefreshScreen() 20 | { 21 | THISCALL_1(VOID, 0x5D5810, this); 22 | } 23 | _H3API_ BOOL8 H3TownManager::ViewTavern() 24 | { 25 | return THISCALL_1(BOOL8, 0x5D82C0, this); 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3Players.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Players/H3Player.hpp" 14 | #include "h3api/H3Players/H3PlayerAttributes.hpp" 15 | #include "h3api/H3Players/H3PlayersInfo.hpp" 16 | #include "h3api/H3Players/H3ScenarioPlayer.hpp" 17 | -------------------------------------------------------------------------------- /include/h3api/H3Players/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Player.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PlayerAttributes.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PlayersInfo.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ScenarioPlayer.cpp" 6 | ) 7 | 8 | target_sources(H3API PUBLIC 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Player.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PlayerAttributes.hpp" 11 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PlayersInfo.hpp" 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3ScenarioPlayer.hpp" 13 | ) -------------------------------------------------------------------------------- /include/h3api/H3Players/H3Player.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Players/H3Player.hpp" 12 | #include "h3api/H3GameData/H3Main.hpp" 13 | 14 | namespace h3 15 | { 16 | _H3API_ H3Hero* H3Player::GetActiveHero() 17 | { 18 | return H3Main::Get()->GetHero(currentHero); 19 | } 20 | } /* namespace h3 */ 21 | -------------------------------------------------------------------------------- /include/h3api/H3Players/H3PlayerAttributes.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Players/H3PlayerAttributes.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Players/H3PlayersInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Players/H3PlayersInfo.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Players/H3ScenarioPlayer.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Players/H3ScenarioPlayer.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgGroundTile.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgGroundTile.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgGroundTileData.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgGroundTileData.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgLocalMap.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgLocalMap.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgLocalMap.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3RMG/H3RmgMap.hpp" 15 | #include "h3api/H3Containers/H3Vector.hpp" 16 | namespace h3 17 | { 18 | struct H3RmgObject; 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3RmgLocalMap : public H3RmgMap 23 | { 24 | _H3API_SIZE_(0x38); 25 | h3unk _f_18[16]; 26 | H3Vector localObjects; /**< @brief [28]*/ 27 | }; 28 | _H3API_ASSERT_SIZE_(H3RmgLocalMap); 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgMapInfo.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgMapInfo.hpp" 12 | #include "h3api/H3RMG/H3RmgMapItem.hpp" 13 | #include "h3api/H3RMG/H3RmgRandomMapGenerator.hpp" 14 | 15 | namespace h3 16 | { 17 | _H3API_ H3RmgMapInfo::H3RmgMapInfo(H3RmgRandomMapGenerator* main, BOOL underground) : 18 | vTable((h3func*)0x6409DC), 19 | hasMap(0), 20 | undergroundMap(nullptr), 21 | width(main->map.mapWidth), 22 | height(main->map.mapHeight), 23 | underground(underground) 24 | { 25 | undergroundMap = &main->map.mapItems[width * height]; 26 | } 27 | _H3API_ H3RmgMapInfo::~H3RmgMapInfo() 28 | { 29 | } 30 | } /* namespace h3 */ 31 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgMovementCost.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgMovementCost.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgMovementCost.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | 18 | #pragma pack(push, 4) 19 | 20 | struct H3RmgMovementCost 21 | { 22 | _H3API_SIZE_(4); 23 | unsigned cost : 16; 24 | unsigned _b17 : 16; 25 | }; 26 | _H3API_ASSERT_SIZE_(H3RmgMovementCost); 27 | 28 | #pragma pack(pop) /* align-4 */ 29 | 30 | } /* namespace h3 */ 31 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObject.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgObject.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ h3func H3RmgObject::GetVTable() const 16 | { 17 | return h3func(vTable); 18 | } 19 | } /* namespace h3 */ 20 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectMonster.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgObjectMonster.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectMonster.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3RMG/H3RmgObject.hpp" 15 | 16 | namespace h3 17 | { 18 | 19 | #pragma pack(push, 4) 20 | 21 | struct H3RmgObjectMonster : public H3RmgObject 22 | { 23 | _H3API_SIZE_(0x2C); 24 | INT32 indexOnMap; /**< @brief [1C]*/ 25 | INT32 count; /**< @brief [20]*/ 26 | h3unk _f_24[8]; /**< @brief [24]*/ 27 | }; 28 | _H3API_ASSERT_SIZE_(H3RmgObjectMonster); 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectProperties.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgObjectProperties.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectSeer.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgObjectSeer.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectTown.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgObjectTown.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgObjectTown.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3RMG/H3RmgObject.hpp" 15 | 16 | namespace h3 17 | { 18 | 19 | #pragma pack(push, 4) 20 | 21 | struct H3RmgObjectTown : public H3RmgObject 22 | { 23 | _H3API_SIZE_(0x28); 24 | INT32 indexOnMap; /**< @brief [1C]*/ 25 | INT32 owner; /**< @brief [20]*/ 26 | BOOL8 hasFort; /**< @brief [24]*/ 27 | }; 28 | _H3API_ASSERT_SIZE_(H3RmgObjectTown); 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgParameters.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgParameters.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ VOID H3RmgParameters::Validate() 16 | { 17 | monsterStrength += 3; 18 | if (monsterStrength < 1) 19 | monsterStrength = 1; 20 | else if (monsterStrength > 5) 21 | monsterStrength = 5; 22 | 23 | if (computerCount + humanCount < 2) 24 | { 25 | computerCount = 1; 26 | humanCount = 1; 27 | } 28 | } 29 | } /* namespace h3 */ 30 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgTemplate.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgTemplate.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgZone.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgZone.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgZoneConnection.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgZoneConnection.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgZoneData.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgZoneData.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgZoneData.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | 18 | #pragma pack(push, 4) 19 | 20 | struct H3RmgZoneData 21 | { 22 | _H3API_SIZE_(4); 23 | unsigned _b1 : 16; 24 | unsigned zone1 : 8; 25 | unsigned zone2 : 8; 26 | }; 27 | _H3API_ASSERT_SIZE_(H3RmgZoneData); 28 | 29 | #pragma pack(pop) /* align-4 */ 30 | 31 | } /* namespace h3 */ 32 | -------------------------------------------------------------------------------- /include/h3api/H3RMG/H3RmgZoneGenerator.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-08 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3RMG/H3RmgZoneGenerator.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Skills.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Skills/H3Diplomacy.hpp" 14 | #include "h3api/H3Skills/H3PrimarySkills.hpp" 15 | #include "h3api/H3Skills/H3SecondarySkill.hpp" 16 | -------------------------------------------------------------------------------- /include/h3api/H3Skills/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Diplomacy.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PrimarySkills.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SecondarySkill.cpp" 5 | ) 6 | 7 | target_sources(H3API PUBLIC 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Diplomacy.hpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3PrimarySkills.hpp" 10 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SecondarySkill.hpp" 11 | ) -------------------------------------------------------------------------------- /include/h3api/H3Skills/H3PrimarySkills.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Skills/H3PrimarySkills.hpp" 12 | 13 | namespace h3 14 | { 15 | _H3API_ INT8& H3PrimarySkills::Get(ePrimary skill) 16 | { 17 | return priSkills[static_cast(skill)]; 18 | } 19 | _H3API_ PINT8 H3PrimarySkills::begin() 20 | { 21 | return &priSkills[0]; 22 | } 23 | _H3API_ PINT8 H3PrimarySkills::end() 24 | { 25 | return &priSkills[4]; 26 | } 27 | } /* namespace h3 */ 28 | -------------------------------------------------------------------------------- /include/h3api/H3Skills/H3PrimarySkills.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstSkills.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(PrimarySkills); 19 | 20 | #pragma pack(push, 4) 21 | 22 | struct H3PrimarySkills 23 | { 24 | union 25 | { 26 | struct 27 | { 28 | INT8 attack; 29 | INT8 defense; 30 | INT8 spellPower; 31 | INT8 knowledge; 32 | }; 33 | INT8 priSkills[4]; 34 | }; 35 | 36 | _H3API_ PINT8 begin(); 37 | _H3API_ PINT8 end(); 38 | _H3API_ INT8& Get(ePrimary skill); 39 | }; 40 | 41 | #pragma pack(pop) /* align-4 */ 42 | 43 | } /* namespace h3 */ 44 | -------------------------------------------------------------------------------- /include/h3api/H3Skills/H3SecondarySkill.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Skills/H3SecondarySkill.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Skills/H3SecondarySkill.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3CstSkills.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(SecondarySkill); 19 | 20 | #pragma pack(push, 4) 21 | 22 | // * secondary skills of a hero 23 | struct H3SecondarySkill 24 | { 25 | 26 | /** @brief [00] 0..27 eSecSkills*/ 27 | eSecondary type; 28 | /** @brief [04] 0..3 eSecSkillLevel*/ 29 | eSecSkillLevel level; 30 | }; 31 | 32 | #pragma pack(pop) /* align-4 */ 33 | 34 | } /* namespace h3 */ 35 | -------------------------------------------------------------------------------- /include/h3api/H3Towns.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Towns/H3BuildingCosts.hpp" 14 | #include "h3api/H3Towns/H3CastleEvent.hpp" 15 | #include "h3api/H3Towns/H3OraclePuzzle.hpp" 16 | #include "h3api/H3Towns/H3SetupTown.hpp" 17 | #include "h3api/H3Towns/H3Town.hpp" 18 | #include "h3api/H3Towns/H3TownCreatureTypes.hpp" 19 | #include "h3api/H3Towns/H3TownDependencies.hpp" 20 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3BuildingCosts.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CastleEvent.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3OraclePuzzle.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SetupTown.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Town.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3TownCreatureTypes.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3TownDependencies.cpp" 9 | ) 10 | 11 | target_sources(H3API PUBLIC 12 | "${CMAKE_CURRENT_SOURCE_DIR}/H3BuildingCosts.hpp" 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3CastleEvent.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3OraclePuzzle.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3SetupTown.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Town.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3TownCreatureTypes.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3TownDependencies.hpp" 19 | ) -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3BuildingCosts.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Towns/H3BuildingCosts.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3CastleEvent.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Towns/H3CastleEvent.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3CastleEvent.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3GameData/H3GlobalEvent.hpp" 15 | 16 | namespace h3 17 | { 18 | _H3API_DECLARE_(CastleEvent); 19 | 20 | #pragma pack(push, 4) 21 | 22 | /** @brief format of events in towns*/ 23 | struct H3CastleEvent : public H3GlobalEvent 24 | { 25 | _H3API_SIZE_(0x50); 26 | /** @brief [34] */ 27 | INT32 castleNumber; 28 | /** @brief [38] */ 29 | H3BuildingsBitfield buildings; 30 | /** @brief [40] */ 31 | INT16 creatures[7]; 32 | }; 33 | _H3API_ASSERT_SIZE_(H3CastleEvent); 34 | 35 | #pragma pack(pop) /* align-4 */ 36 | 37 | } /* namespace h3 */ 38 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3OraclePuzzle.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Towns/H3OraclePuzzle.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3OraclePuzzle.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | 15 | namespace h3 16 | { 17 | 18 | #pragma pack(push, 4) 19 | 20 | struct H3PuzzleCoordinates 21 | { 22 | _H3API_GET_INFO_(0x52CC09 + 3, H3PuzzleCoordinates); 23 | INT16 x[48]; 24 | INT16 y[48]; 25 | }; 26 | 27 | struct H3PuzzlePiecesOrder 28 | { 29 | _H3API_GET_INFO_(0x52CBF2 + 4, H3PuzzlePiecesOrder); 30 | INT16 order[48]; 31 | }; 32 | 33 | #pragma pack(pop) /* align-4 */ 34 | 35 | } /* namespace h3 */ 36 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3SetupTown.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Towns/H3SetupTown.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3TownDependencies.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Towns/H3TownDependencies.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Towns/H3TownDependencies.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-02 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base.hpp" 14 | #include "h3api/H3Constants/H3Limits.hpp" 15 | #include "h3api/H3Constants/H3CstTowns.hpp" 16 | 17 | namespace h3 18 | { 19 | _H3API_DECLARE_(TownDependencies); 20 | 21 | #pragma pack(push, 4) 22 | 23 | struct H3TownDependencies 24 | { 25 | _H3API_GET_INFO_(0x5D6015 + 3, H3TownDependencies); 26 | 27 | H3BuildingsBitfield m_dependency[h3::limits::BUILDINGS]; 28 | }; 29 | 30 | #pragma pack(pop) /* align-4 */ 31 | 32 | } /* namespace h3 */ 33 | -------------------------------------------------------------------------------- /include/h3api/H3Utilities.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-20 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Utilities/H3Bitmap.hpp" 14 | #include "h3api/H3Utilities/H3Exception.hpp" 15 | #include "h3api/H3Utilities/H3Ini.hpp" 16 | #include "h3api/H3Utilities/H3Memory.hpp" 17 | #include "h3api/H3Utilities/H3Path.hpp" 18 | #include "h3api/H3Utilities/H3Plugins.hpp" 19 | #include "h3api/H3Utilities/H3Random.hpp" 20 | #include "h3api/H3Utilities/H3Range.hpp" 21 | #include "h3api/H3Utilities/H3Stream.hpp" 22 | #include "h3api/H3Utilities/H3Tree.hpp" 23 | -------------------------------------------------------------------------------- /include/h3api/H3Utilities/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(H3API PRIVATE 2 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Bitmap.cpp" 3 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Exception.cpp" 4 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Ini.cpp" 5 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Memory.cpp" 6 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Path.cpp" 7 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Plugins.cpp" 8 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Random.cpp" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Stream.cpp" 10 | ) 11 | 12 | target_sources(H3API PUBLIC 13 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Bitmap.hpp" 14 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Exception.hpp" 15 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Ini.hpp" 16 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Memory.hpp" 17 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Path.hpp" 18 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Plugins.hpp" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Random.hpp" 20 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Range.hpp" 21 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Stream.hpp" 22 | "${CMAKE_CURRENT_SOURCE_DIR}/H3Tree.hpp" 23 | ) -------------------------------------------------------------------------------- /include/h3api/H3Utilities/H3Plugins.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-02-07 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #include "h3api/H3Utilities/H3Plugins.hpp" 12 | 13 | namespace h3 14 | { 15 | 16 | } /* namespace h3 */ 17 | -------------------------------------------------------------------------------- /include/h3api/H3Version.hpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////// 2 | // // 3 | // Created by RoseKavalier: // 4 | // rosekavalierhc@gmail.com // 5 | // Created or last updated on: 2021-01-24 // 6 | // ***You may use or distribute these files freely // 7 | // so long as this notice remains present.*** // 8 | // // 9 | ////////////////////////////////////////////////////////////////////// 10 | 11 | #pragma once 12 | 13 | #include "h3api/H3Base/H3Config.hpp" /* _H3API_STR_ */ 14 | 15 | #define _H3API_VERSION_MAJOR_ 1 16 | #define _H3API_VERSION_MINOR_ 6 17 | #define _H3API_VERSION_BUILD_ 1 18 | 19 | #define _H3API_VERSION_ (_H3API_VERSION_MAJOR_ * 10000 | _H3API_VERSION_MINOR_ * 100 | _H3API_VERSION_BUILD_) 20 | #define _H3API_VERSION_TEXT_ "H3API version " _H3API_STR_(_H3API_VERSION_MAJOR_) "." _H3API_STR_(_H3API_VERSION_MINOR_) "." _H3API_STR_(_H3API_VERSION_BUILD_) 21 | --------------------------------------------------------------------------------