OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Enumerations | Functions
SoundEnums.h File Reference
#include <cassert>
#include <cstdint>
#include <utility>
#include "Utility/Flags.h"

Enumerations

enum class  SoundId : int16_t {
  SOUND_Invalid = 0 , SOUND_enter = 6 , SOUND_WoodDoorClosing = 7 , SOUND_fireBall = 8 ,
  SOUND_BoatCreaking = 18 , SOUND_ClickMinus = 20 , SOUND_ClickMovingSelector = 21 , SOUND_ClickPlus = 23 ,
  SOUND_ClickSkill = 24 , SOUND_error = 27 , SOUND_dull_strike = 44 , SOUND_metal_vs_metal01h = 45 ,
  SOUND_metal_vs_metal03h = 47 , SOUND_48 = 48 , SOUND_RunBadlands = 49 , SOUND_RunCarpet = 50 ,
  SOUND_RunCooledLava = 51 , SOUND_RunDesert = 52 , SOUND_RunDirt = 53 , SOUND_RunGrass = 54 ,
  SOUND_Run55_94 = 55 , SOUND_RunGround = 56 , SOUND_RunRoad = 57 , SOUND_RunSnow = 58 ,
  SOUND_Run59_98 = 59 , SOUND_Run60_99 = 60 , SOUND_RunSwamp = 61 , SOUND_RunWater = 62 ,
  SOUND_RunWaterIndoor = 63 , SOUND_RunWood = 64 , SOUND_Run65_104 = 65 , SOUND_SelectingANewCharacter = 66 ,
  SOUND_shoot_blaster01 = 67 , SOUND_shoot_bow01 = 71 , SOUND_StartMainChoice02 = 75 , SOUND_swing_with_axe01 = 78 ,
  SOUND_swing_with_axe03 = 80 , SOUND_swing_with_blunt_weapon01 = 81 , SOUND_swing_with_blunt_weapon03 = 83 , SOUND_swing_with_sword01 = 84 ,
  SOUND_swing_with_sword02 = 85 , SOUND_WalkBadlands = 88 , SOUND_WalkCarpet = 89 , SOUND_WalkCooledLava = 90 ,
  SOUND_WalkDesert = 91 , SOUND_WalkDirt = 92 , SOUND_WalkGrass = 93 , SOUND_Walk55_94 = 94 ,
  SOUND_WalkGround = 95 , SOUND_WalkRoad = 96 , SOUND_WalkSnow = 97 , SOUND_Walk59_98 = 98 ,
  SOUND_Walk60_99 = 99 , SOUND_WalkSwamp = 100 , SOUND_WalkWater = 101 , SOUND_WalkWaterIndoor = 102 ,
  SOUND_WalkWood = 103 , SOUND_Walk65_104 = 104 , SOUND_metal_armor_strike1 = 105 , SOUND_metal_armor_strike2 = 106 ,
  SOUND_metal_armor_strike3 = 107 , SOUND_dull_armor_strike1 = 108 , SOUND_dull_armor_strike2 = 109 , SOUND_dull_armor_strike3 = 110 ,
  SOUND_bricks_down = 120 , SOUND_bricks_up = 121 , SOUND_damage = 122 , SOUND_deal = 123 ,
  SOUND_defeat = 124 , SOUND_querry_up = 125 , SOUND_querry_down = 126 , SOUND_shuffle = 127 ,
  SOUND_title = 128 , SOUND_tower_up = 129 , SOUND_typing = 130 , SOUND_victory = 131 ,
  SOUND_wall_up = 132 , SOUND_luteguitar = 133 , SOUND_panflute = 134 , SOUND_trumpet = 135 ,
  SOUND_gold01 = 200 , SOUND_heal = 202 , SOUND_fizzle = 203 , SOUND_TurnPage1 = 204 ,
  SOUND_TurnPage2 = 205 , SOUND_EndTurnBasedMode = 206 , SOUND_StartTurnBasedMode = 207 , SOUND_openchest0101 = 208 ,
  SOUND_spellfail0201 = 209 , SOUND_drink = 210 , SOUND_eat = 211 , SOUND_gong = 215 ,
  SOUND_hurp = 217 , SOUND_church = 218 , SOUND_chimes = 219 , SOUND_splash = 220 ,
  SOUND_star1 = 221 , SOUND_star2 = 222 , SOUND_star4 = 224 , SOUND_eradicate = 225 ,
  SOUND_eleccircle = 226 , SOUND_encounter = 227 , SOUND_openbook = 230 , SOUND_closebook = 231 ,
  SOUND_teleport = 232 , SOUND_wood_door0101 = 300 , SOUND_wood_door0201 = 302 , SOUND_wood_door0301 = 304 ,
  SOUND_wood_door0401 = 306 , SOUND_wood_door0501 = 308 , SOUND_stone_door0101 = 400 , SOUND_stone_door0201 = 402 ,
  SOUND_stone_door0301 = 404 , SOUND_stone_door0401 = 406 , SOUND_stone_door0501 = 408 , SOUND_hf445a = 5788 ,
  SOUND_Haste = 10040 , SOUND_21fly03 = 11090 , SOUND_WaterWalk = 12040 , SOUND_Stoneskin = 13040 ,
  SOUND_Bless = 14010 , SOUND_Fate = 14020 , SOUND_51heroism03 = 14060 , SOUND_RechargeItem = 17020 ,
  SOUND_94dayofprotection03 = 17070 , SOUND_9armageddon01 = 17080 , SOUND_Sacrifice2 = 18060 , SOUND_quest = 20001
}
 
enum class  MusicId {
  MUSIC_INVALID = 0 , MUSIC_DEYJA_BRACADA_DESERT = 2 , MUSIC_DUNGEON = 3 , MUSIC_HARMONDALE_TATALIA_AVLEE = 4 ,
  MUSIC_BARROWS = 5 , MUSIC_EVENMORN_ISLAND = 6 , MUSIC_PIT_CASTLE_GLOAMING = 7 , MUSIC_LINCOLN_ARENA = 8 ,
  MUSIC_SHOALS = 9 , MUSIC_CELESTE = 10 , MUSIC_MOUNT_NIGHON = 11 , MUSIC_BARROW_DOWNS_LAND_OF_THE_GIANTS = 12 ,
  MUSIC_TEMPLES = 13 , MUSIC_CASTLE_GRYPHONHEART_CASTLE_NAVAN = 14 , MUSIC_CASTLE_LAMBENT = 15 , MUSIC_ENDGAME_DUNGEON = 16 ,
  MUSIC_ERATHIA = 17 , MUSIC_TULAREAN_FOREST = 18 , MUSIC_CASTLE_HARMONDALE = 19 , MUSIC_EMERALD_ISLAND = 20 ,
  MUSIC_MAIN_MENU = MUSIC_CASTLE_GRYPHONHEART_CASTLE_NAVAN , MUSIC_CREDITS = MUSIC_CASTLE_LAMBENT
}
 
enum class  SoundType {
  SOUND_TYPE_LEVEL = 0 , SOUND_TYPE_SYSTEM = 1 , SOUND_TYPE_SWAP = 2 , SOUND_TYPE_UNKNOWN = 3 ,
  SOUND_TYPE_LOCK = 4
}
 
enum class  SoundFlag { SOUND_FLAG_LOCKED = 0x1 , SOUND_FLAG_3D = 0x2 }
 
enum class  SoundPlaybackMode {
  SOUND_MODE_PID , SOUND_MODE_UI , SOUND_MODE_EXCLUSIVE , SOUND_MODE_NON_RESETTABLE ,
  SOUND_MODE_WALKING , SOUND_MODE_MUSIC , SOUND_MODE_SPEECH , SOUND_MODE_HOUSE_DOOR ,
  SOUND_MODE_HOUSE_SPEECH
}
 
enum class  SoundPlaybackResult { SOUND_PLAYBACK_INVALID , SOUND_PLAYBACK_FAILED , SOUND_PLAYBACK_SKIPPED , SOUND_PLAYBACK_SUCCEEDED }
 

Functions

SoundId doorClosedSound (SoundId doorSound)
 

Enumeration Type Documentation

◆ MusicId

enum class MusicId
strong

Enum value is used to load mp3 files, which are named 2.mp3-20.mp3.

Enumerator
MUSIC_INVALID 
MUSIC_DEYJA_BRACADA_DESERT 
MUSIC_DUNGEON 
MUSIC_HARMONDALE_TATALIA_AVLEE 
MUSIC_BARROWS 
MUSIC_EVENMORN_ISLAND 
MUSIC_PIT_CASTLE_GLOAMING 
MUSIC_LINCOLN_ARENA 
MUSIC_SHOALS 
MUSIC_CELESTE 
MUSIC_MOUNT_NIGHON 
MUSIC_BARROW_DOWNS_LAND_OF_THE_GIANTS 
MUSIC_TEMPLES 
MUSIC_CASTLE_GRYPHONHEART_CASTLE_NAVAN 
MUSIC_CASTLE_LAMBENT 
MUSIC_ENDGAME_DUNGEON 
MUSIC_ERATHIA 
MUSIC_TULAREAN_FOREST 
MUSIC_CASTLE_HARMONDALE 
MUSIC_EMERALD_ISLAND 
MUSIC_MAIN_MENU 
MUSIC_CREDITS 

◆ SoundFlag

enum class SoundFlag
strong
Enumerator
SOUND_FLAG_LOCKED 
SOUND_FLAG_3D 

◆ SoundId

enum class SoundId : int16_t
strong

There's 2000+ sounds in MM7, and there is little point in adding all of them here via codegen. Only the ids that are actually used in the codebase should be kept in this enum.

Enumerator
SOUND_Invalid 
SOUND_enter 
SOUND_WoodDoorClosing 
SOUND_fireBall 
SOUND_BoatCreaking 
SOUND_ClickMinus 
SOUND_ClickMovingSelector 
SOUND_ClickPlus 
SOUND_ClickSkill 
SOUND_error 
SOUND_dull_strike 
SOUND_metal_vs_metal01h 
SOUND_metal_vs_metal03h 
SOUND_48 
SOUND_RunBadlands 
SOUND_RunCarpet 
SOUND_RunCooledLava 
SOUND_RunDesert 
SOUND_RunDirt 
SOUND_RunGrass 
SOUND_Run55_94 
SOUND_RunGround 
SOUND_RunRoad 
SOUND_RunSnow 
SOUND_Run59_98 
SOUND_Run60_99 
SOUND_RunSwamp 
SOUND_RunWater 
SOUND_RunWaterIndoor 
SOUND_RunWood 
SOUND_Run65_104 
SOUND_SelectingANewCharacter 
SOUND_shoot_blaster01 
SOUND_shoot_bow01 
SOUND_StartMainChoice02 
SOUND_swing_with_axe01 
SOUND_swing_with_axe03 
SOUND_swing_with_blunt_weapon01 
SOUND_swing_with_blunt_weapon03 
SOUND_swing_with_sword01 
SOUND_swing_with_sword02 
SOUND_WalkBadlands 
SOUND_WalkCarpet 
SOUND_WalkCooledLava 
SOUND_WalkDesert 
SOUND_WalkDirt 
SOUND_WalkGrass 
SOUND_Walk55_94 
SOUND_WalkGround 
SOUND_WalkRoad 
SOUND_WalkSnow 
SOUND_Walk59_98 
SOUND_Walk60_99 
SOUND_WalkSwamp 
SOUND_WalkWater 
SOUND_WalkWaterIndoor 
SOUND_WalkWood 
SOUND_Walk65_104 
SOUND_metal_armor_strike1 
SOUND_metal_armor_strike2 
SOUND_metal_armor_strike3 
SOUND_dull_armor_strike1 
SOUND_dull_armor_strike2 
SOUND_dull_armor_strike3 
SOUND_bricks_down 
SOUND_bricks_up 
SOUND_damage 
SOUND_deal 
SOUND_defeat 
SOUND_querry_up 
SOUND_querry_down 
SOUND_shuffle 
SOUND_title 
SOUND_tower_up 
SOUND_typing 
SOUND_victory 
SOUND_wall_up 
SOUND_luteguitar 
SOUND_panflute 
SOUND_trumpet 
SOUND_gold01 
SOUND_heal 
SOUND_fizzle 
SOUND_TurnPage1 
SOUND_TurnPage2 
SOUND_EndTurnBasedMode 
SOUND_StartTurnBasedMode 
SOUND_openchest0101 
SOUND_spellfail0201 
SOUND_drink 
SOUND_eat 
SOUND_gong 
SOUND_hurp 
SOUND_church 
SOUND_chimes 
SOUND_splash 
SOUND_star1 
SOUND_star2 
SOUND_star4 
SOUND_eradicate 
SOUND_eleccircle 
SOUND_encounter 
SOUND_openbook 
SOUND_closebook 
SOUND_teleport 
SOUND_wood_door0101 
SOUND_wood_door0201 
SOUND_wood_door0301 
SOUND_wood_door0401 
SOUND_wood_door0501 
SOUND_stone_door0101 
SOUND_stone_door0201 
SOUND_stone_door0301 
SOUND_stone_door0401 
SOUND_stone_door0501 
SOUND_hf445a 
SOUND_Haste 
SOUND_21fly03 
SOUND_WaterWalk 
SOUND_Stoneskin 
SOUND_Bless 
SOUND_Fate 
SOUND_51heroism03 
SOUND_RechargeItem 
SOUND_94dayofprotection03 
SOUND_9armageddon01 
SOUND_Sacrifice2 
SOUND_quest 

◆ SoundPlaybackMode

enum class SoundPlaybackMode
strong
Enumerator
SOUND_MODE_PID 

Normal sound, requires a pid.

SOUND_MODE_UI 

For generic UI sounds, plays independently of other sounds.

SOUND_MODE_EXCLUSIVE 

Playing the same sound id in this mode stops the already running one.

SOUND_MODE_NON_RESETTABLE 

Playing the same sound id in this mode just ignores the playback request.

SOUND_MODE_WALKING 

Only one walk sound can be playing at a time. Playing a new one stops the previous one.

SOUND_MODE_MUSIC 

Same as SOUND_MODE_EXCLUSIVE, but played back at music volume.

SOUND_MODE_SPEECH 

Same as SOUND_MODE_EXCLUSIVE, but played back at speech volume.

SOUND_MODE_HOUSE_DOOR 

House door sounds, only one sound can be active at a time.

SOUND_MODE_HOUSE_SPEECH 

House speech, only one sound can be active at a time.

◆ SoundPlaybackResult

enum class SoundPlaybackResult
strong
Enumerator
SOUND_PLAYBACK_INVALID 
SOUND_PLAYBACK_FAILED 
SOUND_PLAYBACK_SKIPPED 
SOUND_PLAYBACK_SUCCEEDED 

◆ SoundType

enum class SoundType
strong
Enumerator
SOUND_TYPE_LEVEL 
SOUND_TYPE_SYSTEM 
SOUND_TYPE_SWAP 
SOUND_TYPE_UNKNOWN 
SOUND_TYPE_LOCK 

Function Documentation

◆ doorClosedSound()

SoundId doorClosedSound ( SoundId  doorSound)
inline