|
2 | 2 |
|
3 | 3 | #include "prism/collections/array_dyn.h" |
4 | 4 | #include "prism/collections/list_dyn.h" |
| 5 | +#include "prism/collections/array_local.h" |
5 | 6 | #include "prism/string.h" |
6 | 7 |
|
7 | 8 | using namespace ts_fmod_plugin::prism; |
@@ -194,99 +195,105 @@ class game_actor_u : public unit_t // Size: 0x21E8 |
194 | 195 | }; |
195 | 196 | static_assert( sizeof( game_actor_u ) == 0x21E8 ); |
196 | 197 |
|
197 | | -class sound_t |
| 198 | +// Size: 0x0010 |
| 199 | +class sound_event_t |
198 | 200 | { |
199 | | - class sound_player* sound_instance; // 0x0000 (0x08) |
200 | | - char pad_0008[0x28]; // 0x0008 (0x28) |
201 | | - uint32_t is_playing; // 0x0030 (0x04) 1:playing, 4:stop? maybe? |
202 | | - uint32_t something; // 0x0034 (0x04) |
203 | | - class gl* glsl; // 0x0038 (0x08) |
204 | | - char pad_003c[0x18]; // 0x0040 (0x18) |
205 | | - class gl* glsl2; // 0x0058 (0x08) |
206 | | - char* sound_event_name_with_filename; // 0x0060 (0x08) |
207 | | - char pad_0068[0x50]; // 0x0068 (0x50) |
208 | | - |
209 | 201 | public: |
210 | | - uint32_t get_is_playing() const |
211 | | - { |
212 | | - return is_playing; |
213 | | - } |
| 202 | + class fmod_event_t* fmod_sound_event; // 0x0008 (0x08) |
214 | 203 |
|
215 | | - const char* get_sound_event_name_with_file_name() const |
216 | | - { |
217 | | - return sound_event_name_with_filename; |
218 | | - } |
| 204 | + virtual void destructor(); |
219 | 205 | }; |
| 206 | +static_assert(sizeof(sound_event_t) == 0x10); |
220 | 207 |
|
221 | | -class navigation_voice_event |
| 208 | +class voice_navigation_sound_t |
222 | 209 | { |
223 | | - uint32_t pad_0000; // 0x0000 (0x04) |
224 | | - uint32_t pad_0004; // 0x0004 (0x04) |
225 | | - char* event_name; // 0x0008 (0x08) |
226 | | - uint32_t pad_0010; // 0x0010 (0x04) |
227 | | - uint32_t pad_0014; // 0x0014 (0x04) |
228 | | - class navigation* navi_instance; // 0x0018 (0x08) |
229 | | - sound_t* sound_instance; // 0x0020 (0x08) |
| 210 | + uint32_t pad_0000; // 0x0000 (0x04) |
| 211 | + uint32_t pad_0004; // 0x0004 (0x04) |
| 212 | + char* event_name; // 0x0008 (0x08) |
| 213 | + uint32_t pad_0010; // 0x0010 (0x04) |
| 214 | + uint32_t pad_0014; // 0x0014 (0x04) |
| 215 | + sound_event_t event; // 0x0018 (0x10) |
230 | 216 |
|
231 | 217 | public: |
232 | | - sound_t* get_sound_instance() const |
233 | | - { |
234 | | - return sound_instance; |
235 | | - } |
236 | 218 |
|
237 | 219 | const char* get_event_name() const |
238 | 220 | { |
239 | 221 | return event_name; |
240 | 222 | } |
241 | 223 | }; |
242 | 224 |
|
243 | | -class sound_library_t // Size: 0x1F58 |
| 225 | +namespace sound |
| 226 | +{ |
| 227 | + // Size: 0x0008 |
| 228 | + class sound_owner_t |
| 229 | + { |
| 230 | + public: |
| 231 | + virtual void destructor(); |
| 232 | + }; |
| 233 | + static_assert( sizeof( sound_owner_t ) == 0x8 ); |
| 234 | + |
| 235 | + // Size: 0x0008 |
| 236 | + class sound_base_t : public /* [0x08] @ 0x00 */ sound_owner_t |
| 237 | + { |
| 238 | + public: |
| 239 | + }; |
| 240 | + static_assert( sizeof( sound_base_t ) == 0x8 ); |
| 241 | + |
| 242 | + // Size: 0x0010 |
| 243 | + class sound_stream_t : public /* [0x08] @ 0x00 */ sound_base_t |
| 244 | + { |
| 245 | + public: |
| 246 | + class fmod_stream_t* stream; // 0x0008 (0x08) |
| 247 | + }; |
| 248 | + static_assert( sizeof( sound_stream_t ) == 0x10 ); |
| 249 | +} |
| 250 | + |
| 251 | +// Size: 0x1F60 |
| 252 | +class sound_library_t |
244 | 253 | { |
245 | 254 | public: |
246 | 255 | char pad_0008[ 8 ]; // 0x0008 (0x08) |
247 | | - class array_dyn_t< class sound_event_t* > ui_sound_events; // 0x0010 (0x20) local 27 |
248 | | - char pad_0030[ 228 ]; // 0x0030 (0xe4) |
249 | | - uint32_t state; // 0x0114 (0x04) 1 = on; 2 = off |
250 | | - bool interior_camera; // 0x0118 (0x01) 1 when camera is set to interior even when head out the window |
251 | | - bool is_camera_inside; // 0x0119 (0x01) 1 if camera is inside, 0 when head through window |
252 | | - char pad_011A[ 2 ]; // 0x011A (0x02) |
253 | | - float camera_rotation_in_cabin; // 0x011C (0x04) 0 = head straight, left is -, right is +, maybe different for UK?? |
254 | | - float cabin_out; // 0x0120 (0x04) |
255 | | - char pad_0124[ 4 ]; // 0x0124 (0x04) |
256 | | - class fmod_parameter_t* cabin_type_param; // 0x0128 (0x08) |
257 | | - class fmod_parameter_t* cabin_rot_param; // 0x0130 (0x08) |
258 | | - class fmod_parameter_t* cabin_out_param; // 0x0138 (0x08) |
259 | | - vec2s_t window_state; // 0x0140 (0x08) 0 = closed, 1 = open |
260 | | - class fmod_parameter_t* wnd_left_param; // 0x0148 (0x08) |
261 | | - class fmod_parameter_t* wnd_right_param; // 0x0150 (0x08) |
262 | | - float daytime; // 0x0158 (0x04) |
263 | | - char pad_015C[ 4 ]; // 0x015C (0x04) |
264 | | - class fmod_parameter_t* daytime_param; // 0x0160 (0x08) |
265 | | - char pad_0168[ 48 ]; // 0x0168 (0x30) |
266 | | - class array_dyn_t< class voice_navigation_sound_t > navigation_sounds; // 0x0198 (0x20) local 38 |
267 | | - char pad_01B8[ 1520 ]; // 0x01B8 (0x5f0) |
268 | | - class string_dyn_t current_navigation_bank_path; // 0x07A8 (0x18) |
269 | | - navigation_voice_event* now_playing_navigation_sound; // 0x07C0 (0x08) |
270 | | - class list_dyn_t< class voice_navigation_sound_t* > N0000433C; // 0x07C8 (0x38) |
271 | | - class array_dyn_t< class allocator_node_t* > N00004654; // 0x0800 (0x20) |
272 | | - class array_dyn_t< class voice_navigation_sound_t* > navigation_sound_events; // 0x0820 (0x20) |
273 | | - char pad_0840[ 5144 ]; // 0x0840 (0x1418) |
274 | | - bool should_have_echo; // 0x1C58 (0x01) |
275 | | - char pad_1C59[ 223 ]; // 0x1C59 (0xdf) |
276 | | - class array_dyn_t< class sound_event_t* > N000045E9; // 0x1D38 (0x20) local 20 |
277 | | - char pad_1D58[ 168 ]; // 0x1D58 (0xa8) |
278 | | - class array_dyn_t< class sound_stream_t > N00004602; // 0x1E00 (0x20) local 1 |
279 | | - char pad_1E20[ 16 ]; // 0x1E20 (0x10) |
280 | | - class array_dyn_t<bool> N00004605; // 0x1E30 (0x20) local 1 |
281 | | - char pad_1E50[ 56 ]; // 0x1E50 (0x38) |
282 | | - class array_dyn_t< class cbradio_beep_item_t* > N00004610; // 0x1E88 (0x20) |
283 | | - token_t gps_voice; // 0x1EA8 (0x08) |
284 | | - char pad_1EB0[ 8 ]; // 0x1EB0 (0x08) |
285 | | - class array_dyn_t< string_dyn_t > ambient_sounds; // 0x1EB8 (0x20) local 3 |
286 | | - char pad_1ED8[ 72 ]; // 0x1ED8 (0x48) |
287 | | - class string_dyn_t current_reverb; // 0x1F20 (0x18) |
288 | | - class string_dyn_t N00004627; // 0x1F38 (0x18) |
289 | | - char pad_1F50[ 8 ]; // 0x1F50 (0x08) |
| 256 | + array_local_t< class sound_event_t*, 28ul > ui_sound_events; // 0x0010 (0x100) |
| 257 | + char pad_0110[ 12 ]; // 0x0110 (0x0c) |
| 258 | + uint32_t state; // 0x011C (0x04) 1 = on; 2 = off |
| 259 | + bool interior_camera; // 0x0120 (0x01) |
| 260 | + bool is_camera_inside; // 0x0121 (0x01) |
| 261 | + char pad_0122[ 2 ]; // 0x0122 (0x02) |
| 262 | + float camera_rotation_in_cabin; // 0x0124 (0x04) |
| 263 | + float cabin_out; // 0x0128 (0x04) |
| 264 | + char pad_012C[ 4 ]; // 0x012C (0x04) |
| 265 | + class fmod_parameter_t* cabin_type_param; // 0x0130 (0x08) |
| 266 | + class fmod_parameter_t* cabin_rot_param; // 0x0138 (0x08) |
| 267 | + class fmod_parameter_t* cabin_out_param; // 0x0140 (0x08) |
| 268 | + vec2s_t window_state; // 0x0148 (0x08) |
| 269 | + class fmod_parameter_t* wnd_left_param; // 0x0150 (0x08) |
| 270 | + class fmod_parameter_t* wnd_right_param; // 0x0158 (0x08) |
| 271 | + float daytime; // 0x0160 (0x04) |
| 272 | + char pad_0164[ 4 ]; // 0x0164 (0x04) |
| 273 | + class fmod_parameter_t* daytime_param; // 0x0168 (0x08) |
| 274 | + char pad_0170[ 48 ]; // 0x0170 (0x30) |
| 275 | + array_local_t< voice_navigation_sound_t, 38ul > navigation_sounds; // 0x01A0 (0x610) |
| 276 | + string_dyn_t current_navigation_bank_path; // 0x07B0 (0x18) |
| 277 | + voice_navigation_sound_t* now_playing_navigation_sound; // 0x07C8 (0x08) |
| 278 | + list_dyn_t< class voice_navigation_sound_t* > N0000433C; // 0x07D0 (0x58) |
| 279 | + array_dyn_t< class voice_navigation_sound_t* > navigation_sound_events; // 0x0828 (0x20) |
| 280 | + char pad_0848[ 5144 ]; // 0x0848 (0x1418) |
| 281 | + bool should_have_echo; // 0x1C60 (0x01) |
| 282 | + char pad_1C61[ 223 ]; // 0x1C61 (0xdf) |
| 283 | + array_local_t< class sound_event_t*, 20ul > N0000D549; // 0x1D40 (0xc0) |
| 284 | + char pad_1E00[ 8 ]; // 0x1E00 (0x08) |
| 285 | + array_local_t< sound::sound_stream_t, 1ul > N0000D565; // 0x1E08 (0x30) |
| 286 | + array_local_t< bool, 1ul > N0001ADE2; // 0x1E38 (0x21) |
| 287 | + char pad_1E59[ 7 ]; // 0x1E59 (0x07) |
| 288 | + sound_event_t cb_radio_start; // 0x1E60 (0x10) |
| 289 | + sound_event_t cb_radio_stop; // 0x1E70 (0x10) |
| 290 | + sound_event_t cb_radio_noise; // 0x1E80 (0x10) |
| 291 | + array_dyn_t< class cbradio_beep_item_t* > N0000D574; // 0x1E90 (0x20) |
| 292 | + char pad_1EB0[ 16 ]; // 0x1EB0 (0x10) |
| 293 | + array_local_t< string_dyn_t, 3ul > ambient_sounds; // 0x1EC0 (0x68) |
| 294 | + string_dyn_t current_reverb; // 0x1F28 (0x18) |
| 295 | + string_dyn_t current_ambient_sfx; // 0x1F40 (0x18) |
| 296 | + char pad_1F58[ 8 ]; // 0x1F58 (0x08) |
290 | 297 |
|
291 | 298 | virtual void destructor(); |
292 | 299 |
|
@@ -321,10 +328,11 @@ class sound_library_t // Size: 0x1F58 |
321 | 328 | return cabin_out; |
322 | 329 | } |
323 | 330 |
|
324 | | - navigation_voice_event* get_now_playing_navigation_sound() const |
| 331 | + voice_navigation_sound_t* get_now_playing_navigation_sound() const |
325 | 332 | { |
326 | 333 | return now_playing_navigation_sound; |
327 | 334 | } |
328 | 335 | }; |
329 | | -static_assert(sizeof(sound_library_t) == 0x1F58); |
| 336 | +static_assert( sizeof( sound_library_t ) == 0x1F60 ); |
| 337 | + |
330 | 338 | #pragma pack( pop ) |
0 commit comments