EvilEngine/SGRP: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
No edit summary
No edit summary
Line 12: Line 12:
==Format==
==Format==
SGRP are [[Base|base assets]], so they start with their 0x8 byte header, then are followed by:
SGRP are [[Base|base assets]], so they start with their 0x8 byte header, then are followed by:

<source lang=cpp>
struct xSndGroupHeader : xBaseAsset
{
uint32 uPlayedMask;
uint8 uInfoCount;
uint8 uSetBits;
int8 nMaxPlays;
uint8 uPriority;
uint8 uFlags;
uint8 eSoundCategory;
uint8 ePlayRule;
uint8 uInfoPad0;
float32 fInnerRadius;
float32 fOuterRadius;
int8* pszGroupName;
};
</source>


{| class="wikitable"
{| class="wikitable"
! Offset !! Type !! Variable !! Description
! Offset !! Type !! Variable !! Description
|-
|-
| 0x8 || int || '''uPlayedMask''' || Always 0
| 0x8 || uint32 || '''uPlayedMask''' || Always 0
|-
|-
| 0xC || byte || '''uInfoCount''' || usually 0x00
| 0xC || uint8 || '''uInfoCount''' || usually 0x00
|-
|-
| 0xD || byte || '''uSetBits''' || usually 0x30
| 0xD || uint8 || '''uSetBits''' || usually 0x30
|-
|-
| 0xE || byte || '''uMaxPlays''' || usually 0x80
| 0xE || int8 || '''uMaxPlays''' || usually 0x80
|-
|-
| 0xF || byte || '''uPriority''' || usually 0x00
| 0xF || uint8 || '''uPriority''' || usually 0x00
|-
|-
| 0x10 || byte || '''uFlags''' || usually 0x00. 01 - PlayGlobally
| 0x10 || uint8 || '''uFlags''' || usually 0x00. 01 - PlayGlobally
|-
|-
| 0x11 || byte || '''eSoundCategory''' || usually 0x00. 01 - Choose Random Entry
| 0x11 || uint8 || '''eSoundCategory''' || usually 0x00. 01 - Choose Random Entry
|-
|-
| 0x12 || byte || '''ePlayRule''' || usually 0x42
| 0x12 || uint8 || '''ePlayRule''' || usually 0x42
|-
|-
| 0x13 || byte || '''uInfoPad0''' || usually 0x00
| 0x13 || uint8 || '''uInfoPad0''' || usually 0x00
|-
|-
| 0x14 || float || '''InnerRadius''' || usually 8.0
| 0x14 || float32 || '''InnerRadius''' || usually 8.0
|-
|-
| 0x18 || float || '''OuterRadius''' || usually 25.0
| 0x18 || float32 || '''OuterRadius''' || usually 25.0
|-
|-
| 0x1C || char || '''pszGroupName''' || usually 0
| 0x1C || int8* || '''pszGroupName''' || usually 0
|-
|-
| 0x20 || SoundEntry[amountOfSounds] || || Sound reference entries
| 0x20 || SoundEntry[amountOfSounds] || || Sound reference entries

Revision as of 05:21, 25 July 2021

SGRP
Sound Group
TypeBase
Base Type0x4A
Games usedThe SpongeBob SquarePants Movie

The Incredibles

Rise of the Underminer

Format

SGRP are base assets, so they start with their 0x8 byte header, then are followed by:

struct xSndGroupHeader : xBaseAsset
{
	uint32 uPlayedMask;
	uint8 uInfoCount;
	uint8 uSetBits;
	int8 nMaxPlays;
	uint8 uPriority;
	uint8 uFlags;
	uint8 eSoundCategory;
	uint8 ePlayRule;
	uint8 uInfoPad0;
	float32 fInnerRadius;
	float32 fOuterRadius;
	int8* pszGroupName;
};
Offset Type Variable Description
0x8 uint32 uPlayedMask Always 0
0xC uint8 uInfoCount usually 0x00
0xD uint8 uSetBits usually 0x30
0xE int8 uMaxPlays usually 0x80
0xF uint8 uPriority usually 0x00
0x10 uint8 uFlags usually 0x00. 01 - PlayGlobally
0x11 uint8 eSoundCategory usually 0x00. 01 - Choose Random Entry
0x12 uint8 ePlayRule usually 0x42
0x13 uint8 uInfoPad0 usually 0x00
0x14 float32 InnerRadius usually 8.0
0x18 float32 OuterRadius usually 25.0
0x1C int8* pszGroupName usually 0
0x20 SoundEntry[amountOfSounds] Sound reference entries
Events
- Event[numberOfEvents] Events

Sound Entry

Offset Type Variable Description
0x0 Asset ID soundAssetID SND/SNDS
0x4 float Volume usually between 0-1
0x8 float minPitchMult usually 0
0xC float maxPitchMult usually 0