Rename all sound groups' group IDs, and fix header importing for SFX and Macro names

This commit is contained in:
Phillip Stephens 2021-11-24 23:01:47 -08:00
parent 5cc2e6bce7
commit 162e85aa2c
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
72 changed files with 80 additions and 75 deletions

View File

@ -181,10 +181,9 @@ bool AGSC::Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& dir) {
group.getSdir().extractAllCompressed(dir.getAbsolutePath(), data.getSamp());
/* Import C headers */
auto lastComp = dir.getLastComponent();
auto search = std::lower_bound(std::cbegin(Headers), std::cend(Headers), lastComp,
auto search = std::lower_bound(std::cbegin(Headers), std::cend(Headers), head.groupName,
[](const auto& a, const auto& b) { return a.first < b; });
if (search != std::cend(Headers) && search->first == lastComp)
if (search != std::cend(Headers) && search->first == head.groupName)
group.importCHeader((char*)search->second);
/* Write out project/pool */
@ -232,7 +231,13 @@ bool AGSC::Cook(const hecl::ProjectPath& dir, const hecl::ProjectPath& refOutPat
Header head;
head.audioDir = "Audio/"sv;
head.groupName = path.getLastComponent();
auto lastComp = path.getLastComponent();
auto str = fmt::format("_{:8X}", path.parsedHash32());
auto it = lastComp.rfind(str);
if (it != std::string_view::npos) {
lastComp = lastComp.substr(0, it);
}
head.groupName = lastComp;
head.write(w);
amuse::AudioGroupDatabase group(path.getAbsolutePath());

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0001 1
#define GRPAtomic 1
#define SFXelu_a_elec_lp_00 42
#define SFXat2_b_fly_lp_00 43

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0002 2
#define GRPBetaBeetle 2
#define SFXsfx003C 60
#define SFXsfx003D 61

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0003 3
#define GRPBird 3
#define SFXsfx005C 92
#define SFXsfx005D 93

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0004 4
#define GRPBloodFlower 4
#define SFXblf_a_btmspit_00 99
#define SFXblf_a_bulb_00 100

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0005 5
#define GRPBurrower 5
#define SFXbur_a_attack_00 120
#define SFXbur_b_burrow_lp_00 121

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0006 6
#define GRPChozoGhost 6
#define SFXchg_a_dball_00 140
#define SFXchg_a_dcharge_00 141

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0007 7
#define GRPChubbWeed 7
#define SFXchb_r_scream_00 192
#define SFXchb_r_alert_00_lp 193

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003B 59
#define GRPCineBoots 59
#define SFXci7_x_jump_00 2972
#define SFXsja_c_electric_lp_00 2973

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003C 60
#define GRPCineGeneral 60
#define SFXsfx0BB0 2992
#define SFXsfx0BB1 2993

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003E 62
#define GRPCineGun 62
#define SFXsfx0BE5 3045
#define SFXci3_x_clank_00 3046

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003F 63
#define GRPCineMorphball 63
#define SFXsfx0BF3 3059
#define SFXsfx0BF4 3060

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0040 64
#define GRPCineSuit 64
#define SFXci2_x_energy_lp_00 3069
#define SFXci2_x_energy_lp_01 3070

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003D 61
#define GRPCineVisor 61
#define SFXcin_x_visor_00 3033
#define SFXsfx0BDA 3034

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup002C 44
#define GRPCrater 44
#define SFXsfx0764 1892
#define SFXsfx0765 1893

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0008 8
#define GRPCrystallite 8
#define SFXcry_b_idle_00 199
#define SFXsfx00C8 200

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0009 9
#define GRPDrones 9
#define SFXepr_a_shockhit_00 209
#define SFXsfx00D2 210

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000A 10
#define GRPEliteSpacePirate 10
#define SFXepr_a_grenade_00 269
#define SFXsfx010E 270

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000B 11
#define GRPFireFlea 11
#define SFXfif_b_idle_lp_00 323
#define SFXsfx0144 324

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0034 52
#define GRPFlaaghra 52
#define SFXfla_a_hitgrnd_00 2600
#define SFXfla_a_swoosh_00 2601

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000C 12
#define GRPFlickerBat 12
#define SFXflk_b_flicker_00 336
#define SFXflk_b_talk_00 337

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000D 13
#define GRPFlyingPirate 13
#define SFXsfx015C 348
#define SFXfpr_a_chaff_00 349

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0026 38
#define GRPFrontEnd 38
#define SFXfnt_transfore_00L 1090
#define SFXfnt_advance_R 1091

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000E 14
#define GRPGagantuanBeatle 14
#define SFXgab_r_hitlight_01 407
#define SFXga2_b_digexplod_00 408

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup000F 15
#define GRPGnats 15
#define SFXsfx01CB 459
#define SFXsfx01CC 460

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0010 16
#define GRPGryzbee 16
#define SFXgrz_b_idle_00 466
#define SFXsfx01D3 467

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0043 67
#define GRPIceCrack 67
#define SFXsfx0C31 3121
#define SFXsfx0C32 3122

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup002D 45
#define GRPIceWorld 45
#define SFXice_x_gateopen_lp_00 1922
#define SFXice_x_gatestop_00 1923

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0011 17
#define GRPInjuredPirates 17
#define SFXsfx01DE 478
#define SFXsfx01DF 479

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0000 0
#define GRPIntroBoss 0
#define SFXsfx0000 0
#define SFXsfx0001 1

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup002E 46
#define GRPIntroWorld 46
#define SFXsfx07FA 2042
#define SFXsfx07FB 2043

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0012 18
#define GRPJellyZap 18
#define SFXjzp_a_shock_00 508
#define SFXjzp_a_suck_lp_00 509

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup002F 47
#define GRPLavaWorld 47
#define SFXsfx0885 2181
#define SFXsfx0886 2182

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0013 19
#define GRPMagdolite 19
#define SFXmag_b_alert_00 518
#define SFXmag_b_idle_00 519

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0014 20
#define GRPMetaree 20
#define SFXmtr_a_scream_00 548
#define SFXsfx0225 549

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0015 21
#define GRPMetroid 21
#define SFXsfx022F 559
#define SFXsfx0230 560

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup003A 58
#define GRPMetroidPrime 58
#define SFXmtb_b_voxtaunt_00 2891
#define SFXsfx0B4C 2892

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0030 48
#define GRPMinesWorld 48
#define SFXsfx08EC 2284
#define SFXsfx08ED 2285

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPmisc 39
#define GRPMisc 39
#define SFXdor_x_close_00 1128
#define SFXdor_x_open_00 1129

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPmiscSamus 41
#define GRPMiscSamus 41
#define SFXsam_wlkstone_00 1465
#define SFXsam_wlkstone_01 1466

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0039 57
#define GRPOmegaPirate 57
#define SFXsfx0B0F 2831
#define SFXsfx0B10 2832

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0033 51
#define GRPOverWorld 51
#define SFXsfx09E0 2528
#define SFXsfx09E1 2529

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0016 22
#define GRPParasite 22
#define SFXpar_a_voxangry_00 624
#define SFXsfx0271 625

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0042 66
#define GRPPhazon 66
#define SFXphz_damage_lp 3114
#define SFXsfx0C2B 3115

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0044 68
#define GRPPhazonGun 68
#define SFXphg_charge_lp 3141
#define SFXsfx0C46 3142

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0017 23
#define GRPPuddleSpore 23
#define SFXsfx0288 648
#define SFXpds_a_voxactive_00 649

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0018 24
#define GRPPuddleToad 24
#define SFXpud_a_suckin_00 675
#define SFXpud_a_spitout_00 676

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0019 25
#define GRPPuffer 25
#define SFXpuf_b_fly_lp_00 704
#define SFXsfx02C1 705

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0031 49
#define GRPReactorDoor 49
#define SFXdor_x_close_01 2365
#define SFXdor_x_open_01 2366

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0038 56
#define GRPRidley 56
#define SFXrid_a_flamerake_00 2771
#define SFXrid_a_flame_lp_00 2772

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001A 26
#define GRPRipper 26
#define SFXrip_b_float_lp_00 711
#define SFXrip_b_scream_00 712

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0032 50
#define GRPRuinsWorld 50
#define SFXsfx094A 2378
#define SFXsfx094B 2379

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup002A 42
#define GRPSamusShip 42
#define SFXsas_x_dooropen_00 1724
#define SFXsas_x_dooropen_01 1725

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001B 27
#define GRPScarab 27
#define SFXsfx02D1 721
#define SFXsfx02D2 722

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001C 28
#define GRPSeedling 28
#define SFXsed_a_spine_00 729
#define SFXsed_b_idle_lp_00 730

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001D 29
#define GRPSheeGoth 29
#define SFXshe_a_fireball_00 749
#define SFXshe_b_shake_lp_00 750

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001E 30
#define GRPSnakeWeed 30
#define SFXsfx0326 806
#define SFXsnk_b_in_00 807

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup001F 31
#define GRPSova 31
#define SFXfpr_b_walk_00 812
#define SFXfpr_b_walk_01 813

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0020 32
#define GRPSpacePirate 32
#define SFXsfx033F 831
#define SFXepr_b_swordin_00 832

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0021 33
#define GRPSpankWeed 33
#define SFXspw_a_spank_00 915
#define SFXsfx0394 916

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0037 55
#define GRPThardus 55
#define SFXtha_b_voxangry_02 2703
#define SFXtha_b_move_00 2704

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0046 70
#define GRPTheEnd 70
#define SFXsfx0C4D 3149
#define SFXsh2_a_fireball_lp_00 3150

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0023 35
#define GRPToroByte 35
#define SFXocu_b_idle_00 981
#define SFXsfx03D6 982

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0022 34
#define GRPTriclops 34
#define SFXtri_a_attack_00 960
#define SFXtri_a_attract_00 961

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0024 36
#define GRPTurret 36
#define SFXsfx03E8 1000
#define SFXtur_a_laser_00 1001

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPui 40
#define GRPUI 40
#define SFXui_map_rotate 1375
#define SFXui_map_zoom 1376

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0025 37
#define GRPWarWasp 37
#define SFXwar_b_idle_lp_00 1027
#define SFXwa2_a_stinger_00 1028

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPweapons 43
#define GRPWeapons 43
#define SFXwpn_bomb_drop 1756
#define SFXsfx06DD 1757

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPzzz 65
#define GRPZZZ 65
#define SFXsfx0C16 3094
#define SFXsfx0C17 3095

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0036 54
#define GRPZoomer 54
#define SFXzom_b_idle_00 2681
#define SFXsfx0A7A 2682

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0045 69
#define GRPLumigek 69
#define SFXlum_b_idle_00 3143
#define SFXsfx0C48 3144

View File

@ -5,7 +5,7 @@
* Date: Sat Sep 1 12:32:04 2018
*/
#define GRPgroup0035 53
#define GRPtest 53
#define SNGIntro_Cinema 0
#define SNGMain_Plaza 1