Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
05ddc80ea2
363
gamefiles/data/PARTICLE.CFG
Normal file
363
gamefiles/data/PARTICLE.CFG
Normal file
@ -0,0 +1,363 @@
|
||||
; Author: Alexander Roger
|
||||
; Date: 21/12/2000
|
||||
;
|
||||
; Author: Andrzej Madajczyk
|
||||
; Date: 26/02/2001
|
||||
; 14/03/2001 - Alpha (opacity) support added;
|
||||
; 10/05/2001 - Drag/Friction Decceleration changed to constants;
|
||||
; 28/08/2001 - Initial Color Variation added;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
; Note! Last line of the file MUST BE ";the end\n", otherwise you'll get parsing error(s) of the file;
|
||||
;
|
||||
;
|
||||
;
|
||||
;Particle Systems Configuration Data:: Format
|
||||
;
|
||||
;
|
||||
;A: Particle Type Name (max 20 chars)
|
||||
;
|
||||
;B/C/D: Render Colouring (r,g,b) (0-255)
|
||||
;
|
||||
;CV: Initial Color Variation (for r,g,b only, in %) (0-100);
|
||||
; (i.e. Color=(100,100,100) and CV=20, then v=random(-20,20), real_color=(100+v, 100+v, 100+v));
|
||||
;
|
||||
;
|
||||
;
|
||||
;B2/C2/D2: Fade Destination Color (r,g,b) (0-255)
|
||||
;
|
||||
;FT: Color Fade Time for (B,C,D)->(B2,C2,D2), (0 for none);
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;E: Default Initial Radius (float)
|
||||
;F: Expansion Rate (float)
|
||||
;
|
||||
;
|
||||
; Color "Fade-to-Black" options:
|
||||
;G: Initial Intensity (0-255)
|
||||
;H: Fade Time (time between fade steps in frames)
|
||||
;I: Fade Amount (-255 to 255) can get brighter or dimmer
|
||||
;
|
||||
; "Fade Alpha" options:
|
||||
;GA: Initial Intensity (0-255)
|
||||
;HA: Fade Time (time between fade steps in frames)
|
||||
;IA: Fade Amount
|
||||
;
|
||||
; "Z Rotation" options:
|
||||
;GZA: Initial Angle (0-1023)
|
||||
;HZA: Change Time (time between steps in frames)
|
||||
;IZA: Angle Change Amount
|
||||
;
|
||||
;GZR: Initial Z Radius
|
||||
;HZR: Change Time (time between steps in frames)
|
||||
;IZR: Z Radius Change Amount
|
||||
;
|
||||
;
|
||||
;J: Animation Speed (0=no animation)(time between steps msec)
|
||||
;K: Start Animation Frame ( 0 -> )
|
||||
;L: Final Animation Frame ( H -> )
|
||||
;
|
||||
;
|
||||
;M: Rotation Speed (0=None,i-deg/frame)
|
||||
;N: Gravitational Acceleration (0=none, float)
|
||||
;O: Drag/Friction Decceleration (int: 0=none, 50=0.50, 80=0.80, 90=0.90, 95=0.95, 96=0.96, 99=0.99)
|
||||
;
|
||||
;P: Default Life-Span of Particle (msec)
|
||||
;
|
||||
;Q: Position Random Error [position += (+/-)rand(a)]
|
||||
;R: Velocity Random Error [velocity += (+/-)rand(b)]
|
||||
;S: Expansion Rate Error [exp_rate += (+)rand(c)]
|
||||
;T: Rotation Rate Error [rot_speed = (+/-)rand(d)]
|
||||
;U: Life-Span Error Shape [shape distribution, e=0->all at default, e->Inf then shape->0] (max=255!!)
|
||||
;V: Trail Length Multiplier [length *= (float) multiplier] (only used if trail flag active)
|
||||
;
|
||||
;CR:Particle Create Range (in meters: 0=no check); if particles are created enough far away from camera, they are deleted (not added to particle system);
|
||||
;
|
||||
;
|
||||
;Z: Flags! Guide: 1=ZCHECK_FIRST, 2=ZCHECK_STEP, 4=DRAW_OPAQUE, 8=SCREEN_TRAIL,
|
||||
; 16=SPEED_TRAIL, 32=RAND_VERT_V, 64=CYCLE_ANIM, 128=DRAW_DARK, 256=VERT_TRAIL
|
||||
; 1024=DRAWTOP2D, 2048=CLIPOUT2D
|
||||
; 4096=ZCHECK_BUMP, 8192=ZCHECK_BUMP_FIRST
|
||||
;
|
||||
;
|
||||
;
|
||||
;default:
|
||||
;GUNFLASH 255 255 255 0 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
||||
;
|
||||
;good idea for fire-smudge?
|
||||
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
||||
;
|
||||
;current:
|
||||
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
||||
;
|
||||
;
|
||||
;SPARK_SMALL 255 255 128 0 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.5 40
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||
;
|
||||
SPARK 255 128 64 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 300 0.0 0.07 0.0 0 0 1.0 20.0 48
|
||||
SPARK_SMALL 255 255 128 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 500 0.0 0.05 0.0 0 0 0.6 20.0 40
|
||||
;
|
||||
WHEEL_DIRT 8 24 8 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 30.0 4
|
||||
;
|
||||
;
|
||||
;WHEEL_WATER 24 24 24 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 0
|
||||
WHEEL_WATER 24 24 32 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.004 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 1
|
||||
;
|
||||
;
|
||||
BLOOD 128 128 128 0 0 0 0 0 0.02 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.03 1 2000 0.3 0.05 0.0 0 0 1.0 50.0 5
|
||||
BLOOD_SMALL 255 32 32 0 0 0 0 0 0.007 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.05 0.05 0.0 0 0 1.0 50.0 53
|
||||
;BLOOD_SPLAT 128 128 128 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 200 0.3 0.0 0.0 0 0 1.0 400.0 36
|
||||
BLOOD_SPURT 255 32 32 0 0 0 0 0 0.008 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.0 0.01 0.0 0 0 2.0 50.0 52
|
||||
DEBRIS 64 64 64 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 95 1000 0.2 0.0 0.0 0 0 1.0 50.0 4
|
||||
DEBRIS2 64 64 64 0 0 0 0 0 0.04 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 5 0.01 99 1000 0.03 0.04 0.0 0 0 1.0 50.0 38
|
||||
WATER 64 64 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 2000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||
;
|
||||
;
|
||||
;FLAME 255 74 30 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 100 0.05 0.0 0.0 0 0 1.0 400.0 0
|
||||
;FLAME 255 74 30 0 0 255 0 400 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
||||
FLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.04 255 1 8 255 0 0 0 0 0 0.0 0 0.0 32 0 7 0 0.0 96 1000 0.1 0.0 0.0 0 0 1.0 400.0 0
|
||||
;
|
||||
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.05 255 0 6 255 0 0 0 0 0 0.0 0 0.0 1 0 7 0 -0.002 96 2000 0.1 0.02 0.02 3 0 1.0 200.0 0
|
||||
FIREBALL 255 74 30 0 0 0 0 0 0.1 0.02 255 0 6 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.003 96 2000 0.1 0.03 0.014 2.5 0 1.0 200.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
GUNFLASH 170 170 170 0 0 0 0 0 0.1 0.0 255 1 50 255 0 0 0 0 0 0.0 0 0.0 51 0 3 0 0.0 1 250 0.0 0.0 0.0 0 0 1.0 35.0 0
|
||||
GUNFLASH_NOANIM 128 128 128 0 0 0 0 0 0.1 0.0 255 1 128 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 25 0.0 0.0 0.0 0 0 1.0 35.0 0
|
||||
;
|
||||
GUNSMOKE 64 64 64 0 0 0 0 0 0.15 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 2 0 7 0 -0.002 95 1000 0.0 0.0 0.0 0 0 1.0 60.0 0
|
||||
GUNSMOKE2 255 255 255 0 0 0 0 0 0.05 0.02 255 0 0 255 0 8 0 0 0 0.0 0 0.0 0 0 3 4 -0.001 80 1400 0.05 0.05 0.01 3 0 1.0 60.0 4
|
||||
;
|
||||
;
|
||||
SMOKE 32 32 32 0 0 0 0 0 0.15 0.015 255 5 25 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.01 95 1000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
||||
;SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 255 5 15 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 1000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
||||
SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 128 5 11 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 3000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
;GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.001 95 2000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
||||
GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.0005 95 4000 0.05 0.05 0.01 3 0 1.0 100.0 0
|
||||
SHARD 255 255 255 0 0 0 0 0 0.03 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||
SPLASH 64 64 128 0 0 0 0 0 0.1 0.007 255 1 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||
;BLOOD_SPLASH 24 64 0 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||
;
|
||||
;
|
||||
;CARFLAME 255 74 30 0 0 0 0 0 0.5 0.04 255 2 20 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 1000 0.4 0.0 0.0 0 0 1.0 400.0 64
|
||||
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
||||
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
||||
;
|
||||
CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 100.0 0
|
||||
;
|
||||
;
|
||||
STEAM 64 64 64 0 0 0 0 0 0.5 0.05 255 1 16 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 85.0 0
|
||||
;
|
||||
;default:
|
||||
;STEAM2 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
||||
STEAM2 255 255 255 0 0 0 0 0 0.5 0.015 255 0 0 192 0 1 0 0 10 0.5 1 0.02 32 0 4 0 -0.002 95 8000 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||
;
|
||||
;
|
||||
;STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
||||
STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||
STEAM_NY_SLOWMOTION 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.0015 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||
;
|
||||
;
|
||||
;ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 2 16 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 250.0 4
|
||||
ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 0 10 0 0 0 0.0 0 0.0 32 0 4 1 -0.005 95 4000 0.03 0.03 0.02 0 0 1.0 85.0 4
|
||||
;
|
||||
;
|
||||
;RAINDROP 32 32 32 0 0 0 0 0 0.6 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.025 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||
RAINDROP 64 64 64 0 0 0 0 0 0.4 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||
RAINDROP_SMALL 16 16 16 0 0 0 0 0 0.3 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||
RAIN_SPLASH 32 32 32 0 0 0 0 0 0.08 0.0 255 0 5 255 0 0 0 0 0 0.0 0 0.0 1 0 4 0 0.0 1 500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||
RAIN_SPLASH_BIGGROW 128 128 128 0 0 0 0 0 0.5 0.06 255 0 2 255 0 0 0 0 0 0.0 0 0.0 2 1 4 0 0.0 1 5500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||
RAIN_SPLASHUP 48 48 48 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 1 0 0.0 1 50 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||
;
|
||||
WATERSPRAY 64 64 64 0 0 0 0 0 0.2 0.0 255 0 25 255 0 0 0 0 0 0.0 0 0.0 3 0 2 0 0.002 1 800 0.05 0.0 0.01 0 0 1.0 20.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.2 0.0 0.0 3 0 1.0 400.0 0
|
||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.8 0.0 0.0 3 0 1.0 400.0 0
|
||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
||||
;
|
||||
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
||||
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
||||
EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 200.0 0
|
||||
EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 200.0 0
|
||||
EXPLOSION_MFAST 80 80 80 0 0 0 0 0 0.6 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.2 0.0 0.0 0 0 1.0 200.0 0
|
||||
EXPLOSION_LFAST 80 80 80 0 0 0 0 0 1.1 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.8 0.0 0.0 0 0 1.0 200.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;BOAT_SPLASH 32 64 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
||||
;BOAT_THRUSTJET 24 32 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
||||
;BOAT_SPLASH 16 32 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
||||
;BOAT_THRUSTJET 8 24 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 250.0 0
|
||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.04 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.35 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.25 255 0 0 180 0 5 0 0 0 0.0 0 0.0 2 1 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
||||
;
|
||||
;
|
||||
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.15 255 0 0 180 0 2 0 0 0 0.0 0 0.0 2 0 3 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
||||
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.15 96 0 0 255 0 0 0 0 0 0.0 0 0.0 6 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
||||
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.05 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||
CAR_SPLASH 48 48 60 0 0 0 0 0 1.0 0.00 128 1 4 128 0 0 0 0 0 0.0 0 0.0 0 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 150.0 272
|
||||
;
|
||||
;
|
||||
;
|
||||
;BOAT_SPLASH 70 70 70 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
||||
BOAT_SPLASH 64 64 64 0 0 0 0 0 0.2 0.2 255 0 2 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
||||
;
|
||||
;
|
||||
;BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.8 0.1 255 0 0 120 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||
BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.4 0.06 255 0 0 96 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||
;
|
||||
;
|
||||
;BOAT_WAKE 255 255 255 0 0 0 0 0 2.0 0.2 255 0 0 128 0 1 0 0 0 0.0 0 0.0 0 0 0 0 0.03 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||
BOAT_WAKE 255 255 255 0 0 0 0 0 1.5 0.45 255 0 0 192 0 2 0 0 0 0.0 0 0.0 0 0 0 0 0.0 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||
WATER_HYDRANT 64 64 64 0 0 0 0 0 0.8 0.01 255 1 16 255 1 16 0 0 0 0.0 0 0.0 0 0 2 0 0.007 99 500 0.02 0.08 0.0 0 4 1.0 85.0 16
|
||||
WATER_CANNON 64 64 128 0 0 0 0 0 0.03 0.03 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||
EXTINGUISH_STEAM 32 32 32 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||
;
|
||||
;
|
||||
;
|
||||
;PED_SPLASH 32 32 64 0 0 0 0 0 0.1 0.05 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||
PED_SPLASH 48 48 60 0 0 0 0 0 0.1 0.06 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 50.0 256
|
||||
;
|
||||
;
|
||||
PEDFOOT_DUST 170 166 150 0 0 0 0 0 0.01 0.015 255 0 0 63 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0005 1 1000 0.0 0.0 0.0 0 0 1.0 6.0 4
|
||||
;
|
||||
HELI_DUST 17 15 9 0 0 0 0 0 0.2 0.1 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 1 1000 0.2 0.05 0.0 0 0 1.0 85.0 0
|
||||
HELI_ATTACK 255 255 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 500 0.0 0.0 0.0 0 0 0.5 85.0 10
|
||||
;
|
||||
;
|
||||
;ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 150.0 4
|
||||
;ENGINE_SMOKE2 8 8 8 0 0 0 0 0 1.0 0.2 128 2 4 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 1000 0.0 0.0 0.0 0 3 1.0 150.0 4
|
||||
ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 52 0 2 10 0 80 0.0 0 0.0 0 0 5 2 -0.009 95 2000 0.11 0.03 0.01 1 0 1.0 85.0 4
|
||||
ENGINE_SMOKE2 9 9 9 80 0 0 0 0 1.0 0.06 128 0 1 140 0 5 10 0 80 0.0 0 0.0 0 0 0 2 0.002 1 1300 0.0 0.01 0.0 3 3 1.0 85.0 4
|
||||
;
|
||||
;
|
||||
CARFLAME_SMOKE 32 32 32 0 0 0 0 0 0.05 0.01 255 0 0 64 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.008 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
||||
FIREBALL_SMOKE 32 32 32 0 0 0 0 0 0.05 0.03 255 0 0 128 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.004 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
||||
;
|
||||
PAINT_SMOKE 255 0 0 0 0 0 0 0 0.1 0.01 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 95 3000 0.0 0.005 0.0 0 0 1.0 85.0 0
|
||||
TREE_LEAVES 64 64 64 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||
;
|
||||
;
|
||||
;CARCOLLISION_DUST 224 224 224 0 0 0 0 0 0.15 0.04 255 0 0 127 1 8 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 80.0 4
|
||||
CARCOLLISION_DUST 76 76 76 0 0 0 0 0 0.10 0.02 255 0 0 160 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0015 90 2000 0.02 0.02 0.0 0 0 1.0 30.0 4
|
||||
;
|
||||
;
|
||||
CAR_DEBRIS 32 32 32 0 0 0 0 0 0.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
||||
HELI_DEBRIS 32 32 32 0 0 0 0 0 1.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.065 90 1500 0.02 0.02 0.0 0 0 1.0 150.0 4
|
||||
;
|
||||
;
|
||||
;
|
||||
;EXHAUST_FUMES 80 80 80 0 0 0 0 0 0.03 0.03 255 0 0 122 0 4 0 0 0 0.0 0 0.0 2 0 4 0 -0.001 95 1500 0.01 0.03 0.0 0 0 1.0 50.0 4
|
||||
EXHAUST_FUMES 98 98 108 0 0 0 0 0 0.03 0.06 255 0 0 152 0 12 0 0 0 0.0 0 0.0 2 0 4 0 -0.002 96 1000 0.01 0.03 0.0 0 0 1.0 25.0 4
|
||||
;
|
||||
;
|
||||
;RUBBER 40 40 40 0 0 0 0 0 0.4 0.005 255 21 20 255 0 0 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 400.0 4
|
||||
RUBBER_SMOKE 255 255 255 0 0 0 0 0 0.4 0.005 255 0 0 127 1 8 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 50.0 4
|
||||
;BURNINGRUBBER_SMOKE128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 192 1 6 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 4000 0.02 0.02 0.0 0 0 1.0 400.0 4
|
||||
BURNINGRUBBER_SMOKE 128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 128 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
||||
;
|
||||
;
|
||||
BULLETHIT_SMOKE 192 192 192 0 0 0 0 0 0.15 0.03 70 0 2 255 1 10 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 90 2000 0.04 0.02 0.0 0 0 1.0 150.0 0
|
||||
;
|
||||
;
|
||||
GUNSHELL_FIRST 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 0.0 12292
|
||||
GUNSHELL 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 12.0 4100
|
||||
GUNSHELL_BUMP1 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
||||
GUNSHELL_BUMP2 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 400 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
||||
;
|
||||
;
|
||||
TEST 255 64 64 0 0 0 0 0 0.2 0.025 255 1 20 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 3000 0.0 0.0 0.0 0 0 1.0 400.0 128
|
||||
;
|
||||
;
|
||||
;Particles with flag DRAWTOP2D should be placed last and VR (Visibility Range) set to 0!
|
||||
;
|
||||
;BIRD_FRONT 8 8 8 0 0 0 0 0 0.05 0.0 255 0 0 255 2 1 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 10000 0.0 0.0 0.0 0 0 1.0 0.0 3140
|
||||
BIRD_FRONT 8 8 8 0 0 0 0 0 1.05 0.0 255 0 0 255 2 2 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 8000 0.0 0.0 0.0 0 0 1.0 0.0 68
|
||||
;
|
||||
RAINDROP_2D 32 32 32 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 0.0 3072
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
; below is just backup of above values:
|
||||
;
|
||||
;SPARK 255 128 64 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 300 0.0 0.07 0.0 0 0 1.0 48
|
||||
;SPARK_SMALL 255 255 128 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.6 40
|
||||
;BLOOD 128 128 128 0.02 0.0 255 0 0 0 0 0 0 0.03 1.0 2000 0.3 0.05 0.0 0 0 1.0 6
|
||||
;BLOOD_SMALL 255 32 32 0.007 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.05 0.05 0.0 0 0 1.0 54
|
||||
;BLOOD_SPLAT 128 128 128 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 200 0.3 0.0 0.0 0 0 1.0 36
|
||||
;BLOOD_SPURT 255 32 32 0.008 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.0 0.01 0.0 0 0 2.0 52
|
||||
;DEBRIS 64 64 64 0.5 0.0 255 0 0 0 0 0 0 0.01 0.95 1000 0.2 0.0 0.0 0 0 1.0 4
|
||||
;DEBRIS2 64 64 64 0.04 0.0 255 0 0 0 0 0 5 0.01 0.99 1000 0.03 0.04 0.0 0 0 1.0 38
|
||||
;WATER 64 64 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;FLAME 255 74 30 0.2 0.0 255 0 0 31 0 5 0 0.0 1.0 100 0.05 0.0 0.0 0 0 1.0 0
|
||||
;FIREBALL 255 74 30 0.1 0.04 255 0 8 31 0 8 0 0.0 0.96 1000 0.1 0.0 0.0 0 0 1.0 0
|
||||
;GUNFLASH 255 255 255 0.1 0.0 255 0 50 50 0 3 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
||||
;GUNFLASHSTATIC 255 255 255 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 25 0.0 0.0 0.0 0 0 1.0 0
|
||||
;SMOKE 32 32 32 0.15 0.015 255 4 25 31 0 5 0 -0.01 0.95 1000 0.05 0.05 0.01 3 0 1.0 0
|
||||
;SHARD 255 255 255 0.03 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
||||
;SPLASH 64 64 128 0.1 0.007 255 0 10 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;BLOOD_SPLASH 24 64 0 0.1 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
||||
;RUBBER 40 40 40 0.4 0.005 255 1 25 31 0 5 0 0.0 1.0 1000 0.02 0.0 0.0 0 0 1.0 0
|
||||
;CARFLAME 255 74 30 0.5 0.04 255 1 20 31 0 5 0 0.0 1.0 1000 0.4 0.0 0.0 0 0 1.0 64
|
||||
;STEAM 64 64 64 0.5 0.05 255 0 16 31 0 5 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 0
|
||||
;RAINDROP 32 32 32 0.6 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
||||
;RAIN_SPLASH 32 32 32 0.08 0.0 255 0 0 1 0 4 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;RAINDROP_SMALL 32 32 32 0.3 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
||||
;EXPLOSION_MEDIUM 80 80 80 0.6 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.2 0.0 0.0 3 0 1.0 0
|
||||
;EXPLOSION_LARGE 80 80 80 1.1 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.8 0.0 0.0 3 0 1.0 0
|
||||
;BOAT_SPLASH 32 64 32 0.2 0.2 255 0 0 0 0 0 0 0.01 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;BOAT_THRUSTJET 24 32 24 0.5 0.1 255 0 0 250 0 5 0 0.01 0.5 1000 0.0 0.0 0.0 0 4 1.0 8
|
||||
;WATER_HYDRANT 64 64 128 0.4 0.01 255 1 2 20 0 5 0 0.007 0.99 500 0.02 0.05 0.0 0 4 1.0 256
|
||||
;WATER_CANNON 64 64 128 0.03 0.03 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;EXTINGUISH_STEAM 32 32 32 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;PED_SPLASH 32 32 64 0.1 0.05 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;HELI_DUST 17 15 9 0.2 0.1 255 0 8 0 0 0 0 -0.001 1.0 1000 0.2 0.05 0.0 0 0 1.0 0
|
||||
;HELI_ATTACK 255 255 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.0 0.0 0 0 0.5 10
|
||||
;ENGINE_SMOKE 16 16 16 0.5 0.04 255 0 0 0 0 0 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 4
|
||||
;ENGINE_SMOKE2 4 4 4 1.0 0.2 255 1 4 0 0 0 0 0.001 1.0 1000 0.0 0.0 0.0 0 3 1.0 4
|
||||
;PAINT_SMOKE 255 0 0 0.1 0.01 255 0 8 0 0 0 0 0.0 0.95 3000 0.0 0.005 0.0 0 0 1.0 0
|
||||
;TREE_LEAVES 64 64 64 0.2 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||
;TEST 255 64 64 0.2 0.05 255 0 16 0 0 0 0 0.0 1.0 3000 0.0 0.0 0.0 0 0 1.0 128
|
||||
;
|
||||
;
|
||||
;the end
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
#define WITHWINDOWS // just for VK_SPACE
|
||||
#include "common.h"
|
||||
|
||||
#include "General.h"
|
||||
@ -416,7 +415,7 @@ CCutsceneMgr::Update(void)
|
||||
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
|
||||
|| CPad::GetPad(0)->GetLeftMouseJustDown()
|
||||
|| CPad::GetPad(0)->GetEnterJustDown()
|
||||
|| CPad::GetPad(0)->GetCharJustDown(VK_SPACE))
|
||||
|| CPad::GetPad(0)->GetCharJustDown(' '))
|
||||
FinishCutscene();
|
||||
}
|
||||
}
|
||||
|
@ -9548,6 +9548,9 @@ cAudioManager::ResetTimers(uint32 time)
|
||||
SampleManager.SetEffectsFadeVolume(0);
|
||||
SampleManager.SetMusicFadeVolume(0);
|
||||
MusicManager.ResetMusicAfterReload();
|
||||
#ifdef OPENAL
|
||||
SampleManager.Service();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -9603,6 +9606,9 @@ cAudioManager::ServiceSoundEffects()
|
||||
ProcessMissionAudio();
|
||||
AdjustSamplesVolume();
|
||||
ProcessActiveQueues();
|
||||
#ifdef OPENAL
|
||||
SampleManager.Service();
|
||||
#endif
|
||||
for(int32 i = 0; i < m_sAudioScriptObjectManager.m_nScriptObjectEntityTotal; ++i) {
|
||||
cAudioScriptObject *object =
|
||||
(cAudioScriptObject *)m_asAudioEntities[m_sAudioScriptObjectManager.m_anScriptObjectEntityIndices[i]]
|
||||
@ -9983,7 +9989,7 @@ cAudioManager::Terminate()
|
||||
m_sAudioScriptObjectManager.m_nScriptObjectEntityTotal = 0;
|
||||
PreTerminateGameSpecificShutdown();
|
||||
|
||||
for(uint32 i = 0; i < DIGITALCHANNELS; i++) {
|
||||
for(uint32 i = 0; i < MAX_SAMPLEBANKS; i++) {
|
||||
if(SampleManager.IsSampleBankLoaded(i)) SampleManager.UnloadSampleBank(i);
|
||||
}
|
||||
|
||||
|
@ -581,6 +581,6 @@ public:
|
||||
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist);
|
||||
};
|
||||
|
||||
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
||||
//dstatic_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
||||
|
||||
extern cAudioManager AudioManager;
|
||||
|
2257
src/audio/miles/sampman_mss.cpp
Normal file
2257
src/audio/miles/sampman_mss.cpp
Normal file
File diff suppressed because it is too large
Load Diff
339
src/audio/miles/sampman_mss.h
Normal file
339
src/audio/miles/sampman_mss.h
Normal file
@ -0,0 +1,339 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "AudioSamples.h"
|
||||
|
||||
#define MAX_VOLUME 127
|
||||
|
||||
struct tSample {
|
||||
int32 nOffset;
|
||||
uint32 nSize;
|
||||
int32 nFrequency;
|
||||
int32 nLoopStart;
|
||||
int32 nLoopEnd;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SAMPLEBANK_MAIN,
|
||||
SAMPLEBANK_PED,
|
||||
MAX_SAMPLEBANKS,
|
||||
SAMPLEBANK_INVALID
|
||||
};
|
||||
|
||||
#define MAX_PEDSFX 7
|
||||
#define PED_BLOCKSIZE 79000
|
||||
|
||||
#define MAXPROVIDERS 64
|
||||
|
||||
#define MAXCHANNELS 28
|
||||
#define MAXCHANNELS_SURROUND 24
|
||||
#define MAX2DCHANNELS 1
|
||||
#define CHANNEL2D MAXCHANNELS
|
||||
|
||||
#define MAX_MP3STREAMS 2
|
||||
|
||||
#define DIGITALRATE 32000
|
||||
#define DIGITALBITS 16
|
||||
#define DIGITALCHANNELS 2
|
||||
|
||||
#define MAX_DIGITAL_MIXER_CHANNELS 32
|
||||
|
||||
class cSampleManager
|
||||
{
|
||||
uint8 m_nEffectsVolume;
|
||||
uint8 m_nMusicVolume;
|
||||
uint8 m_nEffectsFadeVolume;
|
||||
uint8 m_nMusicFadeVolume;
|
||||
uint8 m_nMonoMode;
|
||||
char unk;
|
||||
char m_szCDRomRootPath[80];
|
||||
bool m_bInitialised;
|
||||
uint8 m_nNumberOfProviders;
|
||||
char *m_aAudioProviders[MAXPROVIDERS];
|
||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
cSampleManager(void) :
|
||||
m_nNumberOfProviders(0)
|
||||
{ }
|
||||
|
||||
~cSampleManager(void)
|
||||
{ }
|
||||
|
||||
void SetSpeakerConfig(int32 nConfig);
|
||||
uint32 GetMaximumSupportedChannels(void);
|
||||
|
||||
uint32 GetNum3DProvidersAvailable() { return m_nNumberOfProviders; }
|
||||
void SetNum3DProvidersAvailable(uint32 num) { m_nNumberOfProviders = num; }
|
||||
|
||||
char *Get3DProviderName(uint8 id) { return m_aAudioProviders[id]; }
|
||||
void Set3DProviderName(uint8 id, char *name) { m_aAudioProviders[id] = name; }
|
||||
|
||||
int8 GetCurrent3DProviderIndex(void);
|
||||
int8 SetCurrent3DProvider(uint8 which);
|
||||
|
||||
bool IsMP3RadioChannelAvailable(void);
|
||||
|
||||
void ReleaseDigitalHandle (void);
|
||||
void ReacquireDigitalHandle(void);
|
||||
|
||||
bool Initialise(void);
|
||||
void Terminate (void);
|
||||
|
||||
bool CheckForAnAudioFileOnCD(void);
|
||||
char GetCDAudioDriveLetter (void);
|
||||
|
||||
void UpdateEffectsVolume(void);
|
||||
|
||||
void SetEffectsMasterVolume(uint8 nVolume);
|
||||
void SetMusicMasterVolume (uint8 nVolume);
|
||||
void SetEffectsFadeVolume (uint8 nVolume);
|
||||
void SetMusicFadeVolume (uint8 nVolume);
|
||||
|
||||
bool LoadSampleBank (uint8 nBank);
|
||||
void UnloadSampleBank (uint8 nBank);
|
||||
bool IsSampleBankLoaded(uint8 nBank);
|
||||
|
||||
bool IsPedCommentLoaded(uint32 nComment);
|
||||
bool LoadPedComment (uint32 nComment);
|
||||
|
||||
int32 _GetPedCommentSlot(uint32 nComment);
|
||||
|
||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
||||
uint32 GetSampleLength (uint32 nSample);
|
||||
|
||||
bool UpdateReverb(void);
|
||||
|
||||
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
||||
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
||||
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
||||
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
||||
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
||||
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
||||
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
||||
bool GetChannelUsedFlag (uint32 nChannel);
|
||||
void StartChannel (uint32 nChannel);
|
||||
void StopChannel (uint32 nChannel);
|
||||
|
||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||
void StartPreloadedStreamedFile (uint8 nStream);
|
||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
||||
void StopStreamedFile (uint8 nStream);
|
||||
int32 GetStreamedFilePosition (uint8 nStream);
|
||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
||||
int32 GetStreamedFileLength (uint8 nStream);
|
||||
bool IsStreamPlaying (uint8 nStream);
|
||||
bool InitialiseSampleBanks(void);
|
||||
};
|
||||
|
||||
extern cSampleManager SampleManager;
|
||||
extern int32 BankStartOffset[MAX_SAMPLEBANKS];
|
||||
|
||||
static char StreamedNameTable[][25]=
|
||||
{
|
||||
"AUDIO\\HEAD.WAV",
|
||||
"AUDIO\\CLASS.WAV",
|
||||
"AUDIO\\KJAH.WAV",
|
||||
"AUDIO\\RISE.WAV",
|
||||
"AUDIO\\LIPS.WAV",
|
||||
"AUDIO\\GAME.WAV",
|
||||
"AUDIO\\MSX.WAV",
|
||||
"AUDIO\\FLASH.WAV",
|
||||
"AUDIO\\CHAT.WAV",
|
||||
"AUDIO\\HEAD.WAV",
|
||||
"AUDIO\\POLICE.WAV",
|
||||
"AUDIO\\CITY.WAV",
|
||||
"AUDIO\\WATER.WAV",
|
||||
"AUDIO\\COMOPEN.WAV",
|
||||
"AUDIO\\SUBOPEN.WAV",
|
||||
"AUDIO\\JB.MP3",
|
||||
"AUDIO\\BET.MP3",
|
||||
"AUDIO\\L1_LG.MP3",
|
||||
"AUDIO\\L2_DSB.MP3",
|
||||
"AUDIO\\L3_DM.MP3",
|
||||
"AUDIO\\L4_PAP.MP3",
|
||||
"AUDIO\\L5_TFB.MP3",
|
||||
"AUDIO\\J0_DM2.MP3",
|
||||
"AUDIO\\J1_LFL.MP3",
|
||||
"AUDIO\\J2_KCL.MP3",
|
||||
"AUDIO\\J3_VH.MP3",
|
||||
"AUDIO\\J4_ETH.MP3",
|
||||
"AUDIO\\J5_DST.MP3",
|
||||
"AUDIO\\J6_TBJ.MP3",
|
||||
"AUDIO\\T1_TOL.MP3",
|
||||
"AUDIO\\T2_TPU.MP3",
|
||||
"AUDIO\\T3_MAS.MP3",
|
||||
"AUDIO\\T4_TAT.MP3",
|
||||
"AUDIO\\T5_BF.MP3",
|
||||
"AUDIO\\S0_MAS.MP3",
|
||||
"AUDIO\\S1_PF.MP3",
|
||||
"AUDIO\\S2_CTG.MP3",
|
||||
"AUDIO\\S3_RTC.MP3",
|
||||
"AUDIO\\S5_LRQ.MP3",
|
||||
"AUDIO\\S4_BDBA.MP3",
|
||||
"AUDIO\\S4_BDBB.MP3",
|
||||
"AUDIO\\S2_CTG2.MP3",
|
||||
"AUDIO\\S4_BDBD.MP3",
|
||||
"AUDIO\\S5_LRQB.MP3",
|
||||
"AUDIO\\S5_LRQC.MP3",
|
||||
"AUDIO\\A1_SSO.WAV",
|
||||
"AUDIO\\A2_PP.WAV",
|
||||
"AUDIO\\A3_SS.WAV",
|
||||
"AUDIO\\A4_PDR.WAV",
|
||||
"AUDIO\\A5_K2FT.WAV",
|
||||
"AUDIO\\K1_KBO.MP3",
|
||||
"AUDIO\\K2_GIS.MP3",
|
||||
"AUDIO\\K3_DS.MP3",
|
||||
"AUDIO\\K4_SHI.MP3",
|
||||
"AUDIO\\K5_SD.MP3",
|
||||
"AUDIO\\R0_PDR2.MP3",
|
||||
"AUDIO\\R1_SW.MP3",
|
||||
"AUDIO\\R2_AP.MP3",
|
||||
"AUDIO\\R3_ED.MP3",
|
||||
"AUDIO\\R4_GF.MP3",
|
||||
"AUDIO\\R5_PB.MP3",
|
||||
"AUDIO\\R6_MM.MP3",
|
||||
"AUDIO\\D1_STOG.MP3",
|
||||
"AUDIO\\D2_KK.MP3",
|
||||
"AUDIO\\D3_ADO.MP3",
|
||||
"AUDIO\\D5_ES.MP3",
|
||||
"AUDIO\\D7_MLD.MP3",
|
||||
"AUDIO\\D4_GTA.MP3",
|
||||
"AUDIO\\D4_GTA2.MP3",
|
||||
"AUDIO\\D6_STS.MP3",
|
||||
"AUDIO\\A6_BAIT.WAV",
|
||||
"AUDIO\\A7_ETG.WAV",
|
||||
"AUDIO\\A8_PS.WAV",
|
||||
"AUDIO\\A9_ASD.WAV",
|
||||
"AUDIO\\K4_SHI2.MP3",
|
||||
"AUDIO\\C1_TEX.MP3",
|
||||
"AUDIO\\EL_PH1.MP3",
|
||||
"AUDIO\\EL_PH2.MP3",
|
||||
"AUDIO\\EL_PH3.MP3",
|
||||
"AUDIO\\EL_PH4.MP3",
|
||||
"AUDIO\\YD_PH1.MP3",
|
||||
"AUDIO\\YD_PH2.MP3",
|
||||
"AUDIO\\YD_PH3.MP3",
|
||||
"AUDIO\\YD_PH4.MP3",
|
||||
"AUDIO\\HD_PH1.MP3",
|
||||
"AUDIO\\HD_PH2.MP3",
|
||||
"AUDIO\\HD_PH3.MP3",
|
||||
"AUDIO\\HD_PH4.MP3",
|
||||
"AUDIO\\HD_PH5.MP3",
|
||||
"AUDIO\\MT_PH1.MP3",
|
||||
"AUDIO\\MT_PH2.MP3",
|
||||
"AUDIO\\MT_PH3.MP3",
|
||||
"AUDIO\\MT_PH4.MP3",
|
||||
"AUDIO\\MISCOM.WAV",
|
||||
"AUDIO\\END.MP3",
|
||||
"AUDIO\\lib_a1.WAV",
|
||||
"AUDIO\\lib_a2.WAV",
|
||||
"AUDIO\\lib_a.WAV",
|
||||
"AUDIO\\lib_b.WAV",
|
||||
"AUDIO\\lib_c.WAV",
|
||||
"AUDIO\\lib_d.WAV",
|
||||
"AUDIO\\l2_a.WAV",
|
||||
"AUDIO\\j4t_1.WAV",
|
||||
"AUDIO\\j4t_2.WAV",
|
||||
"AUDIO\\j4t_3.WAV",
|
||||
"AUDIO\\j4t_4.WAV",
|
||||
"AUDIO\\j4_a.WAV",
|
||||
"AUDIO\\j4_b.WAV",
|
||||
"AUDIO\\j4_c.WAV",
|
||||
"AUDIO\\j4_d.WAV",
|
||||
"AUDIO\\j4_e.WAV",
|
||||
"AUDIO\\j4_f.WAV",
|
||||
"AUDIO\\j6_1.WAV",
|
||||
"AUDIO\\j6_a.WAV",
|
||||
"AUDIO\\j6_b.WAV",
|
||||
"AUDIO\\j6_c.WAV",
|
||||
"AUDIO\\j6_d.WAV",
|
||||
"AUDIO\\t4_a.WAV",
|
||||
"AUDIO\\s1_a.WAV",
|
||||
"AUDIO\\s1_a1.WAV",
|
||||
"AUDIO\\s1_b.WAV",
|
||||
"AUDIO\\s1_c.WAV",
|
||||
"AUDIO\\s1_c1.WAV",
|
||||
"AUDIO\\s1_d.WAV",
|
||||
"AUDIO\\s1_e.WAV",
|
||||
"AUDIO\\s1_f.WAV",
|
||||
"AUDIO\\s1_g.WAV",
|
||||
"AUDIO\\s1_h.WAV",
|
||||
"AUDIO\\s1_i.WAV",
|
||||
"AUDIO\\s1_j.WAV",
|
||||
"AUDIO\\s1_k.WAV",
|
||||
"AUDIO\\s1_l.WAV",
|
||||
"AUDIO\\s3_a.WAV",
|
||||
"AUDIO\\s3_b.WAV",
|
||||
"AUDIO\\el3_a.WAV",
|
||||
"AUDIO\\mf1_a.WAV",
|
||||
"AUDIO\\mf2_a.WAV",
|
||||
"AUDIO\\mf3_a.WAV",
|
||||
"AUDIO\\mf3_b.WAV",
|
||||
"AUDIO\\mf3_b1.WAV",
|
||||
"AUDIO\\mf3_c.WAV",
|
||||
"AUDIO\\mf4_a.WAV",
|
||||
"AUDIO\\mf4_b.WAV",
|
||||
"AUDIO\\mf4_c.WAV",
|
||||
"AUDIO\\a1_a.WAV",
|
||||
"AUDIO\\a3_a.WAV",
|
||||
"AUDIO\\a5_a.WAV",
|
||||
"AUDIO\\a4_a.WAV",
|
||||
"AUDIO\\a4_b.WAV",
|
||||
"AUDIO\\a4_c.WAV",
|
||||
"AUDIO\\a4_d.WAV",
|
||||
"AUDIO\\k1_a.WAV",
|
||||
"AUDIO\\k3_a.WAV",
|
||||
"AUDIO\\r1_a.WAV",
|
||||
"AUDIO\\r2_a.WAV",
|
||||
"AUDIO\\r2_b.WAV",
|
||||
"AUDIO\\r2_c.WAV",
|
||||
"AUDIO\\r2_d.WAV",
|
||||
"AUDIO\\r2_e.WAV",
|
||||
"AUDIO\\r2_f.WAV",
|
||||
"AUDIO\\r2_g.WAV",
|
||||
"AUDIO\\r2_h.WAV",
|
||||
"AUDIO\\r5_a.WAV",
|
||||
"AUDIO\\r6_a.WAV",
|
||||
"AUDIO\\r6_a1.WAV",
|
||||
"AUDIO\\r6_b.WAV",
|
||||
"AUDIO\\lo2_a.WAV",
|
||||
"AUDIO\\lo6_a.WAV",
|
||||
"AUDIO\\yd2_a.WAV",
|
||||
"AUDIO\\yd2_b.WAV",
|
||||
"AUDIO\\yd2_c.WAV",
|
||||
"AUDIO\\yd2_c1.WAV",
|
||||
"AUDIO\\yd2_d.WAV",
|
||||
"AUDIO\\yd2_e.WAV",
|
||||
"AUDIO\\yd2_f.WAV",
|
||||
"AUDIO\\yd2_g.WAV",
|
||||
"AUDIO\\yd2_h.WAV",
|
||||
"AUDIO\\yd2_ass.WAV",
|
||||
"AUDIO\\yd2_ok.WAV",
|
||||
"AUDIO\\h5_a.WAV",
|
||||
"AUDIO\\h5_b.WAV",
|
||||
"AUDIO\\h5_c.WAV",
|
||||
"AUDIO\\ammu_a.WAV",
|
||||
"AUDIO\\ammu_b.WAV",
|
||||
"AUDIO\\ammu_c.WAV",
|
||||
"AUDIO\\door_1.WAV",
|
||||
"AUDIO\\door_2.WAV",
|
||||
"AUDIO\\door_3.WAV",
|
||||
"AUDIO\\door_4.WAV",
|
||||
"AUDIO\\door_5.WAV",
|
||||
"AUDIO\\door_6.WAV",
|
||||
"AUDIO\\t3_a.WAV",
|
||||
"AUDIO\\t3_b.WAV",
|
||||
"AUDIO\\t3_c.WAV",
|
||||
"AUDIO\\k1_b.WAV",
|
||||
"AUDIO\\cat1.WAV"
|
||||
};
|
1404
src/audio/openal/samp_oal.cpp
Normal file
1404
src/audio/openal/samp_oal.cpp
Normal file
File diff suppressed because it is too large
Load Diff
340
src/audio/openal/samp_oal.h
Normal file
340
src/audio/openal/samp_oal.h
Normal file
@ -0,0 +1,340 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "AudioSamples.h"
|
||||
|
||||
#define MAX_VOLUME 127
|
||||
//#define MAX_FREQ 22050
|
||||
#define MAX_FREQ 32000
|
||||
|
||||
struct tSample {
|
||||
int32 nOffset;
|
||||
uint32 nSize;
|
||||
int32 nFrequency;
|
||||
int32 nLoopStart;
|
||||
int32 nLoopEnd;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SAMPLEBANK_MAIN,
|
||||
SAMPLEBANK_PED,
|
||||
MAX_SAMPLEBANKS,
|
||||
SAMPLEBANK_INVALID
|
||||
};
|
||||
|
||||
#define MAX_PEDSFX 7
|
||||
#define PED_BLOCKSIZE 79000
|
||||
|
||||
|
||||
//#define MAXCHANNELS 21 android
|
||||
#define MAXCHANNELS 28
|
||||
#define MAX2DCHANNELS 1
|
||||
#define CHANNEL2D MAXCHANNELS
|
||||
|
||||
#define MAX_STREAMS 2
|
||||
|
||||
struct ALCdevice_struct;
|
||||
struct ALCcontext_struct;
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
class cSampleManager
|
||||
{
|
||||
int field_0;
|
||||
ALCdevice *m_pDevice;
|
||||
ALCcontext *m_pContext;
|
||||
|
||||
uint8 m_nEffectsVolume;
|
||||
uint8 m_nMusicVolume;
|
||||
uint8 m_nEffectsFadeVolume;
|
||||
uint8 m_nMusicFadeVolume;
|
||||
uint8 m_nMonoMode;
|
||||
char _pad0[3];
|
||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
cSampleManager(void);
|
||||
~cSampleManager(void);
|
||||
|
||||
void SetSpeakerConfig(int32 nConfig);
|
||||
uint32 GetMaximumSupportedChannels(void);
|
||||
|
||||
uint32 GetNum3DProvidersAvailable();
|
||||
void SetNum3DProvidersAvailable(uint32 num);
|
||||
|
||||
char *Get3DProviderName(uint8 id);
|
||||
void Set3DProviderName(uint8 id, char *name);
|
||||
|
||||
int8 GetCurrent3DProviderIndex(void);
|
||||
int8 SetCurrent3DProvider(uint8 which);
|
||||
|
||||
bool IsMP3RadioChannelAvailable(void);
|
||||
|
||||
void ReleaseDigitalHandle (void);
|
||||
void ReacquireDigitalHandle(void);
|
||||
|
||||
bool Initialise(void);
|
||||
void Terminate (void);
|
||||
|
||||
void UpdateSoundBuffers(void);
|
||||
|
||||
bool CheckForAnAudioFileOnCD(void);
|
||||
char GetCDAudioDriveLetter (void);
|
||||
|
||||
void UpdateEffectsVolume(void);
|
||||
|
||||
void SetEffectsMasterVolume(uint8 nVolume);
|
||||
void SetMusicMasterVolume (uint8 nVolume);
|
||||
void SetEffectsFadeVolume (uint8 nVolume);
|
||||
void SetMusicFadeVolume (uint8 nVolume);
|
||||
void SetMonoMode (uint8 nMode);
|
||||
|
||||
bool LoadSampleBank (uint8 nBank);
|
||||
void UnloadSampleBank (uint8 nBank);
|
||||
bool IsSampleBankLoaded(uint8 nBank);
|
||||
|
||||
bool IsPedCommentLoaded(uint32 nComment);
|
||||
bool LoadPedComment (uint32 nComment);
|
||||
int32 GetBankContainingSound(uint32 offset);
|
||||
|
||||
int32 _GetPedCommentSlot(uint32 nComment);
|
||||
|
||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
||||
uint32 GetSampleLength (uint32 nSample);
|
||||
|
||||
bool UpdateReverb(void);
|
||||
|
||||
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
||||
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
||||
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
||||
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
||||
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
||||
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
||||
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
||||
bool GetChannelUsedFlag (uint32 nChannel);
|
||||
void StartChannel (uint32 nChannel);
|
||||
void StopChannel (uint32 nChannel);
|
||||
|
||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||
void StartPreloadedStreamedFile (uint8 nStream);
|
||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
||||
void StopStreamedFile (uint8 nStream);
|
||||
int32 GetStreamedFilePosition (uint8 nStream);
|
||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
||||
int32 GetStreamedFileLength (uint8 nStream);
|
||||
bool IsStreamPlaying (uint8 nStream);
|
||||
void Service(void);
|
||||
bool InitialiseSampleBanks(void);
|
||||
};
|
||||
|
||||
extern cSampleManager SampleManager;
|
||||
extern int32 BankStartOffset[MAX_SAMPLEBANKS];
|
||||
|
||||
static char StreamedNameTable[][25]=
|
||||
{
|
||||
"AUDIO\\HEAD.MP3",
|
||||
"AUDIO\\CLASS.MP3",
|
||||
"AUDIO\\KJAH.MP3",
|
||||
"AUDIO\\RISE.MP3",
|
||||
"AUDIO\\LIPS.MP3",
|
||||
"AUDIO\\GAME.MP3",
|
||||
"AUDIO\\MSX.MP3",
|
||||
"AUDIO\\FLASH.MP3",
|
||||
"AUDIO\\CHAT.MP3",
|
||||
"AUDIO\\HEAD.MP3",
|
||||
"AUDIO\\POLICE.MP3",
|
||||
"AUDIO\\CITY.MP3",
|
||||
"AUDIO\\WATER.MP3",
|
||||
"AUDIO\\COMOPEN.MP3",
|
||||
"AUDIO\\SUBOPEN.MP3",
|
||||
"AUDIO\\JB.MP3",
|
||||
"AUDIO\\BET.MP3",
|
||||
"AUDIO\\L1_LG.MP3",
|
||||
"AUDIO\\L2_DSB.MP3",
|
||||
"AUDIO\\L3_DM.MP3",
|
||||
"AUDIO\\L4_PAP.MP3",
|
||||
"AUDIO\\L5_TFB.MP3",
|
||||
"AUDIO\\J0_DM2.MP3",
|
||||
"AUDIO\\J1_LFL.MP3",
|
||||
"AUDIO\\J2_KCL.MP3",
|
||||
"AUDIO\\J3_VH.MP3",
|
||||
"AUDIO\\J4_ETH.MP3",
|
||||
"AUDIO\\J5_DST.MP3",
|
||||
"AUDIO\\J6_TBJ.MP3",
|
||||
"AUDIO\\T1_TOL.MP3",
|
||||
"AUDIO\\T2_TPU.MP3",
|
||||
"AUDIO\\T3_MAS.MP3",
|
||||
"AUDIO\\T4_TAT.MP3",
|
||||
"AUDIO\\T5_BF.MP3",
|
||||
"AUDIO\\S0_MAS.MP3",
|
||||
"AUDIO\\S1_PF.MP3",
|
||||
"AUDIO\\S2_CTG.MP3",
|
||||
"AUDIO\\S3_RTC.MP3",
|
||||
"AUDIO\\S5_LRQ.MP3",
|
||||
"AUDIO\\S4_BDBA.MP3",
|
||||
"AUDIO\\S4_BDBB.MP3",
|
||||
"AUDIO\\S2_CTG2.MP3",
|
||||
"AUDIO\\S4_BDBD.MP3",
|
||||
"AUDIO\\S5_LRQB.MP3",
|
||||
"AUDIO\\S5_LRQC.MP3",
|
||||
"AUDIO\\A1_SSO.MP3",
|
||||
"AUDIO\\A2_PP.MP3",
|
||||
"AUDIO\\A3_SS.MP3",
|
||||
"AUDIO\\A4_PDR.MP3",
|
||||
"AUDIO\\A5_K2FT.MP3",
|
||||
"AUDIO\\K1_KBO.MP3",
|
||||
"AUDIO\\K2_GIS.MP3",
|
||||
"AUDIO\\K3_DS.MP3",
|
||||
"AUDIO\\K4_SHI.MP3",
|
||||
"AUDIO\\K5_SD.MP3",
|
||||
"AUDIO\\R0_PDR2.MP3",
|
||||
"AUDIO\\R1_SW.MP3",
|
||||
"AUDIO\\R2_AP.MP3",
|
||||
"AUDIO\\R3_ED.MP3",
|
||||
"AUDIO\\R4_GF.MP3",
|
||||
"AUDIO\\R5_PB.MP3",
|
||||
"AUDIO\\R6_MM.MP3",
|
||||
"AUDIO\\D1_STOG.MP3",
|
||||
"AUDIO\\D2_KK.MP3",
|
||||
"AUDIO\\D3_ADO.MP3",
|
||||
"AUDIO\\D5_ES.MP3",
|
||||
"AUDIO\\D7_MLD.MP3",
|
||||
"AUDIO\\D4_GTA.MP3",
|
||||
"AUDIO\\D4_GTA2.MP3",
|
||||
"AUDIO\\D6_STS.MP3",
|
||||
"AUDIO\\A6_BAIT.MP3",
|
||||
"AUDIO\\A7_ETG.MP3",
|
||||
"AUDIO\\A8_PS.MP3",
|
||||
"AUDIO\\A9_ASD.MP3",
|
||||
"AUDIO\\K4_SHI2.MP3",
|
||||
"AUDIO\\C1_TEX.MP3",
|
||||
"AUDIO\\EL_PH1.MP3",
|
||||
"AUDIO\\EL_PH2.MP3",
|
||||
"AUDIO\\EL_PH3.MP3",
|
||||
"AUDIO\\EL_PH4.MP3",
|
||||
"AUDIO\\YD_PH1.MP3",
|
||||
"AUDIO\\YD_PH2.MP3",
|
||||
"AUDIO\\YD_PH3.MP3",
|
||||
"AUDIO\\YD_PH4.MP3",
|
||||
"AUDIO\\HD_PH1.MP3",
|
||||
"AUDIO\\HD_PH2.MP3",
|
||||
"AUDIO\\HD_PH3.MP3",
|
||||
"AUDIO\\HD_PH4.MP3",
|
||||
"AUDIO\\HD_PH5.MP3",
|
||||
"AUDIO\\MT_PH1.MP3",
|
||||
"AUDIO\\MT_PH2.MP3",
|
||||
"AUDIO\\MT_PH3.MP3",
|
||||
"AUDIO\\MT_PH4.MP3",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
"AUDIO\\END.MP3",
|
||||
"AUDIO\\lib_a1.MP3",
|
||||
"AUDIO\\lib_a2.MP3",
|
||||
"AUDIO\\lib_a.MP3",
|
||||
"AUDIO\\lib_b.MP3",
|
||||
"AUDIO\\lib_c.MP3",
|
||||
"AUDIO\\lib_d.MP3",
|
||||
"AUDIO\\l2_a.MP3",
|
||||
"AUDIO\\j4t_1.MP3",
|
||||
"AUDIO\\j4t_2.MP3",
|
||||
"AUDIO\\j4t_3.MP3",
|
||||
"AUDIO\\j4t_4.MP3",
|
||||
"AUDIO\\j4_a.MP3",
|
||||
"AUDIO\\j4_b.MP3",
|
||||
"AUDIO\\j4_c.MP3",
|
||||
"AUDIO\\j4_d.MP3",
|
||||
"AUDIO\\j4_e.MP3",
|
||||
"AUDIO\\j4_f.MP3",
|
||||
"AUDIO\\j6_1.MP3",
|
||||
"AUDIO\\j6_a.MP3",
|
||||
"AUDIO\\j6_b.MP3",
|
||||
"AUDIO\\j6_c.MP3",
|
||||
"AUDIO\\j6_d.MP3",
|
||||
"AUDIO\\t4_a.MP3",
|
||||
"AUDIO\\s1_a.MP3",
|
||||
"AUDIO\\s1_a1.MP3",
|
||||
"AUDIO\\s1_b.MP3",
|
||||
"AUDIO\\s1_c.MP3",
|
||||
"AUDIO\\s1_c1.MP3",
|
||||
"AUDIO\\s1_d.MP3",
|
||||
"AUDIO\\s1_e.MP3",
|
||||
"AUDIO\\s1_f.MP3",
|
||||
"AUDIO\\s1_g.MP3",
|
||||
"AUDIO\\s1_h.MP3",
|
||||
"AUDIO\\s1_i.MP3",
|
||||
"AUDIO\\s1_j.MP3",
|
||||
"AUDIO\\s1_k.MP3",
|
||||
"AUDIO\\s1_l.MP3",
|
||||
"AUDIO\\s3_a.MP3",
|
||||
"AUDIO\\s3_b.MP3",
|
||||
"AUDIO\\el3_a.MP3",
|
||||
"AUDIO\\mf1_a.MP3",
|
||||
"AUDIO\\mf2_a.MP3",
|
||||
"AUDIO\\mf3_a.MP3",
|
||||
"AUDIO\\mf3_b.MP3",
|
||||
"AUDIO\\mf3_b1.MP3",
|
||||
"AUDIO\\mf3_c.MP3",
|
||||
"AUDIO\\mf4_a.MP3",
|
||||
"AUDIO\\mf4_b.MP3",
|
||||
"AUDIO\\mf4_c.MP3",
|
||||
"AUDIO\\a1_a.MP3",
|
||||
"AUDIO\\a3_a.MP3",
|
||||
"AUDIO\\a5_a.MP3",
|
||||
"AUDIO\\a4_a.MP3",
|
||||
"AUDIO\\a4_b.MP3",
|
||||
"AUDIO\\a4_c.MP3",
|
||||
"AUDIO\\a4_d.MP3",
|
||||
"AUDIO\\k1_a.MP3",
|
||||
"AUDIO\\k3_a.MP3",
|
||||
"AUDIO\\r1_a.MP3",
|
||||
"AUDIO\\r2_a.MP3",
|
||||
"AUDIO\\r2_b.MP3",
|
||||
"AUDIO\\r2_c.MP3",
|
||||
"AUDIO\\r2_d.MP3",
|
||||
"AUDIO\\r2_e.MP3",
|
||||
"AUDIO\\r2_f.MP3",
|
||||
"AUDIO\\r2_g.MP3",
|
||||
"AUDIO\\r2_h.MP3",
|
||||
"AUDIO\\r5_a.MP3",
|
||||
"AUDIO\\r6_a.MP3",
|
||||
"AUDIO\\r6_a1.MP3",
|
||||
"AUDIO\\r6_b.MP3",
|
||||
"AUDIO\\lo2_a.MP3",
|
||||
"AUDIO\\lo6_a.MP3",
|
||||
"AUDIO\\yd2_a.MP3",
|
||||
"AUDIO\\yd2_b.MP3",
|
||||
"AUDIO\\yd2_c.MP3",
|
||||
"AUDIO\\yd2_c1.MP3",
|
||||
"AUDIO\\yd2_d.MP3",
|
||||
"AUDIO\\yd2_e.MP3",
|
||||
"AUDIO\\yd2_f.MP3",
|
||||
"AUDIO\\yd2_g.MP3",
|
||||
"AUDIO\\yd2_h.MP3",
|
||||
"AUDIO\\yd2_ass.MP3",
|
||||
"AUDIO\\yd2_ok.MP3",
|
||||
"AUDIO\\h5_a.MP3",
|
||||
"AUDIO\\h5_b.MP3",
|
||||
"AUDIO\\h5_c.MP3",
|
||||
"AUDIO\\ammu_a.MP3",
|
||||
"AUDIO\\ammu_b.MP3",
|
||||
"AUDIO\\ammu_c.MP3",
|
||||
"AUDIO\\door_1.MP3",
|
||||
"AUDIO\\door_2.MP3",
|
||||
"AUDIO\\door_3.MP3",
|
||||
"AUDIO\\door_4.MP3",
|
||||
"AUDIO\\door_5.MP3",
|
||||
"AUDIO\\door_6.MP3",
|
||||
"AUDIO\\t3_a.MP3",
|
||||
"AUDIO\\t3_b.MP3",
|
||||
"AUDIO\\t3_c.MP3",
|
||||
"AUDIO\\k1_b.MP3",
|
||||
"AUDIO\\cat1.MP3"
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -1,339 +1,7 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "AudioSamples.h"
|
||||
|
||||
#define MAX_VOLUME 127
|
||||
|
||||
struct tSample {
|
||||
int32 nOffset;
|
||||
uint32 nSize;
|
||||
int32 nFrequency;
|
||||
int32 nLoopStart;
|
||||
int32 nLoopEnd;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SAMPLEBANK_MAIN,
|
||||
SAMPLEBANK_PED,
|
||||
MAX_SAMPLEBANKS,
|
||||
SAMPLEBANK_INVALID
|
||||
};
|
||||
|
||||
#define MAX_PEDSFX 7
|
||||
#define PED_BLOCKSIZE 79000
|
||||
|
||||
#define MAXPROVIDERS 64
|
||||
|
||||
#define MAXCHANNELS 28
|
||||
#define MAXCHANNELS_SURROUND 24
|
||||
#define MAX2DCHANNELS 1
|
||||
#define CHANNEL2D MAXCHANNELS
|
||||
|
||||
#define MAX_MP3STREAMS 2
|
||||
|
||||
#define DIGITALRATE 32000
|
||||
#define DIGITALBITS 16
|
||||
#define DIGITALCHANNELS 2
|
||||
|
||||
#define MAX_DIGITAL_MIXER_CHANNELS 32
|
||||
|
||||
class cSampleManager
|
||||
{
|
||||
uint8 m_nEffectsVolume;
|
||||
uint8 m_nMusicVolume;
|
||||
uint8 m_nEffectsFadeVolume;
|
||||
uint8 m_nMusicFadeVolume;
|
||||
uint8 m_nMonoMode;
|
||||
char unk;
|
||||
char m_szCDRomRootPath[80];
|
||||
bool m_bInitialised;
|
||||
uint8 m_nNumberOfProviders;
|
||||
char *m_aAudioProviders[MAXPROVIDERS];
|
||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
cSampleManager(void) :
|
||||
m_nNumberOfProviders(0)
|
||||
{ }
|
||||
|
||||
~cSampleManager(void)
|
||||
{ }
|
||||
|
||||
void SetSpeakerConfig(int32 nConfig);
|
||||
uint32 GetMaximumSupportedChannels(void);
|
||||
|
||||
uint32 GetNum3DProvidersAvailable() { return m_nNumberOfProviders; }
|
||||
void SetNum3DProvidersAvailable(uint32 num) { m_nNumberOfProviders = num; }
|
||||
|
||||
char *Get3DProviderName(uint8 id) { return m_aAudioProviders[id]; }
|
||||
void Set3DProviderName(uint8 id, char *name) { m_aAudioProviders[id] = name; }
|
||||
|
||||
int8 GetCurrent3DProviderIndex(void);
|
||||
int8 SetCurrent3DProvider(uint8 which);
|
||||
|
||||
bool IsMP3RadioChannelAvailable(void);
|
||||
|
||||
void ReleaseDigitalHandle (void);
|
||||
void ReacquireDigitalHandle(void);
|
||||
|
||||
bool Initialise(void);
|
||||
void Terminate (void);
|
||||
|
||||
bool CheckForAnAudioFileOnCD(void);
|
||||
char GetCDAudioDriveLetter (void);
|
||||
|
||||
void UpdateEffectsVolume(void);
|
||||
|
||||
void SetEffectsMasterVolume(uint8 nVolume);
|
||||
void SetMusicMasterVolume (uint8 nVolume);
|
||||
void SetEffectsFadeVolume (uint8 nVolume);
|
||||
void SetMusicFadeVolume (uint8 nVolume);
|
||||
|
||||
bool LoadSampleBank (uint8 nBank);
|
||||
void UnloadSampleBank (uint8 nBank);
|
||||
bool IsSampleBankLoaded(uint8 nBank);
|
||||
|
||||
bool IsPedCommentLoaded(uint32 nComment);
|
||||
bool LoadPedComment (uint32 nComment);
|
||||
|
||||
int32 _GetPedCommentSlot(uint32 nComment);
|
||||
|
||||
int32 GetSampleBaseFrequency (uint32 nSample);
|
||||
int32 GetSampleLoopStartOffset(uint32 nSample);
|
||||
int32 GetSampleLoopEndOffset (uint32 nSample);
|
||||
uint32 GetSampleLength (uint32 nSample);
|
||||
|
||||
bool UpdateReverb(void);
|
||||
|
||||
void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
|
||||
bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
|
||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
||||
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
|
||||
void SetChannelPan (uint32 nChannel, uint32 nPan);
|
||||
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
|
||||
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
|
||||
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
|
||||
bool GetChannelUsedFlag (uint32 nChannel);
|
||||
void StartChannel (uint32 nChannel);
|
||||
void StopChannel (uint32 nChannel);
|
||||
|
||||
void PreloadStreamedFile (uint8 nFile, uint8 nStream);
|
||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||
void StartPreloadedStreamedFile (uint8 nStream);
|
||||
bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
|
||||
void StopStreamedFile (uint8 nStream);
|
||||
int32 GetStreamedFilePosition (uint8 nStream);
|
||||
void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
|
||||
int32 GetStreamedFileLength (uint8 nStream);
|
||||
bool IsStreamPlaying (uint8 nStream);
|
||||
bool InitialiseSampleBanks(void);
|
||||
};
|
||||
|
||||
extern cSampleManager SampleManager;
|
||||
extern int32 BankStartOffset[MAX_SAMPLEBANKS];
|
||||
|
||||
static char StreamedNameTable[][25]=
|
||||
{
|
||||
"AUDIO\\HEAD.WAV",
|
||||
"AUDIO\\CLASS.WAV",
|
||||
"AUDIO\\KJAH.WAV",
|
||||
"AUDIO\\RISE.WAV",
|
||||
"AUDIO\\LIPS.WAV",
|
||||
"AUDIO\\GAME.WAV",
|
||||
"AUDIO\\MSX.WAV",
|
||||
"AUDIO\\FLASH.WAV",
|
||||
"AUDIO\\CHAT.WAV",
|
||||
"AUDIO\\HEAD.WAV",
|
||||
"AUDIO\\POLICE.WAV",
|
||||
"AUDIO\\CITY.WAV",
|
||||
"AUDIO\\WATER.WAV",
|
||||
"AUDIO\\COMOPEN.WAV",
|
||||
"AUDIO\\SUBOPEN.WAV",
|
||||
"AUDIO\\JB.MP3",
|
||||
"AUDIO\\BET.MP3",
|
||||
"AUDIO\\L1_LG.MP3",
|
||||
"AUDIO\\L2_DSB.MP3",
|
||||
"AUDIO\\L3_DM.MP3",
|
||||
"AUDIO\\L4_PAP.MP3",
|
||||
"AUDIO\\L5_TFB.MP3",
|
||||
"AUDIO\\J0_DM2.MP3",
|
||||
"AUDIO\\J1_LFL.MP3",
|
||||
"AUDIO\\J2_KCL.MP3",
|
||||
"AUDIO\\J3_VH.MP3",
|
||||
"AUDIO\\J4_ETH.MP3",
|
||||
"AUDIO\\J5_DST.MP3",
|
||||
"AUDIO\\J6_TBJ.MP3",
|
||||
"AUDIO\\T1_TOL.MP3",
|
||||
"AUDIO\\T2_TPU.MP3",
|
||||
"AUDIO\\T3_MAS.MP3",
|
||||
"AUDIO\\T4_TAT.MP3",
|
||||
"AUDIO\\T5_BF.MP3",
|
||||
"AUDIO\\S0_MAS.MP3",
|
||||
"AUDIO\\S1_PF.MP3",
|
||||
"AUDIO\\S2_CTG.MP3",
|
||||
"AUDIO\\S3_RTC.MP3",
|
||||
"AUDIO\\S5_LRQ.MP3",
|
||||
"AUDIO\\S4_BDBA.MP3",
|
||||
"AUDIO\\S4_BDBB.MP3",
|
||||
"AUDIO\\S2_CTG2.MP3",
|
||||
"AUDIO\\S4_BDBD.MP3",
|
||||
"AUDIO\\S5_LRQB.MP3",
|
||||
"AUDIO\\S5_LRQC.MP3",
|
||||
"AUDIO\\A1_SSO.WAV",
|
||||
"AUDIO\\A2_PP.WAV",
|
||||
"AUDIO\\A3_SS.WAV",
|
||||
"AUDIO\\A4_PDR.WAV",
|
||||
"AUDIO\\A5_K2FT.WAV",
|
||||
"AUDIO\\K1_KBO.MP3",
|
||||
"AUDIO\\K2_GIS.MP3",
|
||||
"AUDIO\\K3_DS.MP3",
|
||||
"AUDIO\\K4_SHI.MP3",
|
||||
"AUDIO\\K5_SD.MP3",
|
||||
"AUDIO\\R0_PDR2.MP3",
|
||||
"AUDIO\\R1_SW.MP3",
|
||||
"AUDIO\\R2_AP.MP3",
|
||||
"AUDIO\\R3_ED.MP3",
|
||||
"AUDIO\\R4_GF.MP3",
|
||||
"AUDIO\\R5_PB.MP3",
|
||||
"AUDIO\\R6_MM.MP3",
|
||||
"AUDIO\\D1_STOG.MP3",
|
||||
"AUDIO\\D2_KK.MP3",
|
||||
"AUDIO\\D3_ADO.MP3",
|
||||
"AUDIO\\D5_ES.MP3",
|
||||
"AUDIO\\D7_MLD.MP3",
|
||||
"AUDIO\\D4_GTA.MP3",
|
||||
"AUDIO\\D4_GTA2.MP3",
|
||||
"AUDIO\\D6_STS.MP3",
|
||||
"AUDIO\\A6_BAIT.WAV",
|
||||
"AUDIO\\A7_ETG.WAV",
|
||||
"AUDIO\\A8_PS.WAV",
|
||||
"AUDIO\\A9_ASD.WAV",
|
||||
"AUDIO\\K4_SHI2.MP3",
|
||||
"AUDIO\\C1_TEX.MP3",
|
||||
"AUDIO\\EL_PH1.MP3",
|
||||
"AUDIO\\EL_PH2.MP3",
|
||||
"AUDIO\\EL_PH3.MP3",
|
||||
"AUDIO\\EL_PH4.MP3",
|
||||
"AUDIO\\YD_PH1.MP3",
|
||||
"AUDIO\\YD_PH2.MP3",
|
||||
"AUDIO\\YD_PH3.MP3",
|
||||
"AUDIO\\YD_PH4.MP3",
|
||||
"AUDIO\\HD_PH1.MP3",
|
||||
"AUDIO\\HD_PH2.MP3",
|
||||
"AUDIO\\HD_PH3.MP3",
|
||||
"AUDIO\\HD_PH4.MP3",
|
||||
"AUDIO\\HD_PH5.MP3",
|
||||
"AUDIO\\MT_PH1.MP3",
|
||||
"AUDIO\\MT_PH2.MP3",
|
||||
"AUDIO\\MT_PH3.MP3",
|
||||
"AUDIO\\MT_PH4.MP3",
|
||||
"AUDIO\\MISCOM.WAV",
|
||||
"AUDIO\\END.MP3",
|
||||
"AUDIO\\lib_a1.WAV",
|
||||
"AUDIO\\lib_a2.WAV",
|
||||
"AUDIO\\lib_a.WAV",
|
||||
"AUDIO\\lib_b.WAV",
|
||||
"AUDIO\\lib_c.WAV",
|
||||
"AUDIO\\lib_d.WAV",
|
||||
"AUDIO\\l2_a.WAV",
|
||||
"AUDIO\\j4t_1.WAV",
|
||||
"AUDIO\\j4t_2.WAV",
|
||||
"AUDIO\\j4t_3.WAV",
|
||||
"AUDIO\\j4t_4.WAV",
|
||||
"AUDIO\\j4_a.WAV",
|
||||
"AUDIO\\j4_b.WAV",
|
||||
"AUDIO\\j4_c.WAV",
|
||||
"AUDIO\\j4_d.WAV",
|
||||
"AUDIO\\j4_e.WAV",
|
||||
"AUDIO\\j4_f.WAV",
|
||||
"AUDIO\\j6_1.WAV",
|
||||
"AUDIO\\j6_a.WAV",
|
||||
"AUDIO\\j6_b.WAV",
|
||||
"AUDIO\\j6_c.WAV",
|
||||
"AUDIO\\j6_d.WAV",
|
||||
"AUDIO\\t4_a.WAV",
|
||||
"AUDIO\\s1_a.WAV",
|
||||
"AUDIO\\s1_a1.WAV",
|
||||
"AUDIO\\s1_b.WAV",
|
||||
"AUDIO\\s1_c.WAV",
|
||||
"AUDIO\\s1_c1.WAV",
|
||||
"AUDIO\\s1_d.WAV",
|
||||
"AUDIO\\s1_e.WAV",
|
||||
"AUDIO\\s1_f.WAV",
|
||||
"AUDIO\\s1_g.WAV",
|
||||
"AUDIO\\s1_h.WAV",
|
||||
"AUDIO\\s1_i.WAV",
|
||||
"AUDIO\\s1_j.WAV",
|
||||
"AUDIO\\s1_k.WAV",
|
||||
"AUDIO\\s1_l.WAV",
|
||||
"AUDIO\\s3_a.WAV",
|
||||
"AUDIO\\s3_b.WAV",
|
||||
"AUDIO\\el3_a.WAV",
|
||||
"AUDIO\\mf1_a.WAV",
|
||||
"AUDIO\\mf2_a.WAV",
|
||||
"AUDIO\\mf3_a.WAV",
|
||||
"AUDIO\\mf3_b.WAV",
|
||||
"AUDIO\\mf3_b1.WAV",
|
||||
"AUDIO\\mf3_c.WAV",
|
||||
"AUDIO\\mf4_a.WAV",
|
||||
"AUDIO\\mf4_b.WAV",
|
||||
"AUDIO\\mf4_c.WAV",
|
||||
"AUDIO\\a1_a.WAV",
|
||||
"AUDIO\\a3_a.WAV",
|
||||
"AUDIO\\a5_a.WAV",
|
||||
"AUDIO\\a4_a.WAV",
|
||||
"AUDIO\\a4_b.WAV",
|
||||
"AUDIO\\a4_c.WAV",
|
||||
"AUDIO\\a4_d.WAV",
|
||||
"AUDIO\\k1_a.WAV",
|
||||
"AUDIO\\k3_a.WAV",
|
||||
"AUDIO\\r1_a.WAV",
|
||||
"AUDIO\\r2_a.WAV",
|
||||
"AUDIO\\r2_b.WAV",
|
||||
"AUDIO\\r2_c.WAV",
|
||||
"AUDIO\\r2_d.WAV",
|
||||
"AUDIO\\r2_e.WAV",
|
||||
"AUDIO\\r2_f.WAV",
|
||||
"AUDIO\\r2_g.WAV",
|
||||
"AUDIO\\r2_h.WAV",
|
||||
"AUDIO\\r5_a.WAV",
|
||||
"AUDIO\\r6_a.WAV",
|
||||
"AUDIO\\r6_a1.WAV",
|
||||
"AUDIO\\r6_b.WAV",
|
||||
"AUDIO\\lo2_a.WAV",
|
||||
"AUDIO\\lo6_a.WAV",
|
||||
"AUDIO\\yd2_a.WAV",
|
||||
"AUDIO\\yd2_b.WAV",
|
||||
"AUDIO\\yd2_c.WAV",
|
||||
"AUDIO\\yd2_c1.WAV",
|
||||
"AUDIO\\yd2_d.WAV",
|
||||
"AUDIO\\yd2_e.WAV",
|
||||
"AUDIO\\yd2_f.WAV",
|
||||
"AUDIO\\yd2_g.WAV",
|
||||
"AUDIO\\yd2_h.WAV",
|
||||
"AUDIO\\yd2_ass.WAV",
|
||||
"AUDIO\\yd2_ok.WAV",
|
||||
"AUDIO\\h5_a.WAV",
|
||||
"AUDIO\\h5_b.WAV",
|
||||
"AUDIO\\h5_c.WAV",
|
||||
"AUDIO\\ammu_a.WAV",
|
||||
"AUDIO\\ammu_b.WAV",
|
||||
"AUDIO\\ammu_c.WAV",
|
||||
"AUDIO\\door_1.WAV",
|
||||
"AUDIO\\door_2.WAV",
|
||||
"AUDIO\\door_3.WAV",
|
||||
"AUDIO\\door_4.WAV",
|
||||
"AUDIO\\door_5.WAV",
|
||||
"AUDIO\\door_6.WAV",
|
||||
"AUDIO\\t3_a.WAV",
|
||||
"AUDIO\\t3_b.WAV",
|
||||
"AUDIO\\t3_c.WAV",
|
||||
"AUDIO\\k1_b.WAV",
|
||||
"AUDIO\\cat1.WAV"
|
||||
};
|
||||
#ifndef OPENAL
|
||||
#include "miles\sampman_mss.h"
|
||||
#else
|
||||
#include "openal\samp_oal.h"
|
||||
#endif
|
@ -1,7 +1,6 @@
|
||||
#define WITHWINDOWS // for our script loading hack
|
||||
#include "common.h"
|
||||
|
||||
|
||||
#include "Script.h"
|
||||
#include "ScriptCommands.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <windows.h>
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
|
||||
#include "CdStream.h"
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4005)
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#pragma warning( pop )
|
||||
#include "common.h"
|
||||
#include "win.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <windows.h>
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
|
||||
#include "DMAudio.h"
|
||||
|
@ -193,6 +193,11 @@ enum Config {
|
||||
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
|
||||
//#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
//#define USE_TEXTURE_POOL
|
||||
//#define OPENAL
|
||||
|
||||
// Particle
|
||||
//#define PC_PARTICLE
|
||||
//#define PS2_ALTERNATIVE_CARSPLASH // unused on PS2
|
||||
|
||||
// Pad
|
||||
#define XINPUT
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <direct.h>
|
||||
#include <csignal>
|
||||
#include <windows.h>
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#include "patcher.h"
|
||||
#include "Renderer.h"
|
||||
@ -372,7 +372,6 @@ DebugMenuPopulate(void)
|
||||
DebugMenuAddVarBool8("Debug", "Don't render Vehicles", (int8*)&gbDontRenderVehicles, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Don't render Objects", (int8*)&gbDontRenderObjects, nil);
|
||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||
DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Toggle peds running to phones to report crimes", (int8*)&CPed::bMakePedsRunToPhonesToReportCrimes, nil);
|
||||
#endif
|
||||
|
@ -169,7 +169,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_STEAM_NY;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 3;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 8;
|
||||
break;
|
||||
}
|
||||
@ -187,7 +191,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_STEAM_NY;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 3;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 8;
|
||||
break;
|
||||
}
|
||||
@ -205,7 +213,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_STEAM_NY;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 3;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 8;
|
||||
pobj->m_Color = CRGBA(16, 16, 16, 255);
|
||||
break;
|
||||
@ -228,7 +240,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_CAR_SPLASH;
|
||||
pobj->m_nNumEffectCycles = 0;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 3;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 0;
|
||||
break;
|
||||
}
|
||||
@ -236,7 +252,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
case POBJECT_SPLASHES_AROUND:
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_SPLASH;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nNumEffectCycles = 15;
|
||||
#else
|
||||
pobj->m_nNumEffectCycles = 30;
|
||||
#endif
|
||||
pobj->m_nSkipFrames = 2;
|
||||
pobj->m_nCreationChance = 0;
|
||||
break;
|
||||
@ -246,7 +266,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_FLAME;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 2;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 2;
|
||||
pobj->m_vecTarget = CVector(0.0f, 0.0f, 0.0f);
|
||||
break;
|
||||
@ -256,7 +280,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_FLAME;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 2;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 4;
|
||||
pobj->m_vecTarget = CVector(0.0f, 0.0f, 0.0f);
|
||||
break;
|
||||
@ -286,7 +314,11 @@ CParticleObject::AddObject(uint16 type, CVector const &pos, CVector const &targe
|
||||
{
|
||||
pobj->m_ParticleType = PARTICLE_EXPLOSION_MEDIUM;
|
||||
pobj->m_nNumEffectCycles = 1;
|
||||
#ifdef PC_PARTICLE
|
||||
pobj->m_nSkipFrames = 3;
|
||||
#else
|
||||
pobj->m_nSkipFrames = 1;
|
||||
#endif
|
||||
pobj->m_nCreationChance = 2;
|
||||
pobj->m_fRandVal = 0.01f;
|
||||
break;
|
||||
@ -598,6 +630,7 @@ void CParticleObject::UpdateClose(void)
|
||||
|
||||
case POBJECT_PED_WATER_SPLASH:
|
||||
{
|
||||
#ifdef PC_PARTICLE
|
||||
CRGBA colorsmoke(255, 255, 255, 196);
|
||||
|
||||
CVector pos = this->GetPosition();
|
||||
@ -699,12 +732,69 @@ void CParticleObject::UpdateClose(void)
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, splashpos, splashvel, NULL,
|
||||
CGeneral::GetRandomNumberInRange(0.4f, 1.0f), this->m_Color);
|
||||
}
|
||||
#else
|
||||
CVector pos;
|
||||
CVector vel;
|
||||
|
||||
for ( int32 i = -2; i < 2; i++ )
|
||||
{
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(-0.75f, 0.5f * float(i), 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += -1.5 * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, pos, vel, NULL, 0.8f, this->m_Color);
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(0.75f, 0.5f * float(i), 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += 1.5f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, pos, vel, NULL, 0.8f, this->m_Color);
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(0.5f * float(i), -0.75, 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += -1.5f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, pos, vel, NULL, 0.8f, this->m_Color);
|
||||
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(0.5f * float(i), 0.75, 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += 1.5f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, pos, vel, NULL, 0.8f, this->m_Color);
|
||||
}
|
||||
|
||||
|
||||
for ( int32 i = 0; i < 4; i++ )
|
||||
{
|
||||
pos = this->GetPosition();
|
||||
|
||||
pos.x += CGeneral::GetRandomNumberInRange(-1.5f, 1.5f);
|
||||
pos.y += CGeneral::GetRandomNumberInRange(-1.5f, 1.5f);
|
||||
pos.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, pos, vel, NULL, 0.8f, this->m_Color);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case POBJECT_CAR_WATER_SPLASH:
|
||||
{
|
||||
#ifdef PC_PARTICLE
|
||||
CRGBA colorsmoke(255, 255, 255, 196);
|
||||
|
||||
CVector pos = this->GetPosition();
|
||||
@ -799,7 +889,65 @@ void CParticleObject::UpdateClose(void)
|
||||
splashvel.z += CGeneral::GetRandomNumberInRange(0.26f, 0.53f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, splashpos, splashvel, NULL, 0.0f, this->m_Color);
|
||||
}
|
||||
#else
|
||||
CVector pos;
|
||||
CVector vel;
|
||||
|
||||
for ( int32 i = -3; i < 4; i++ )
|
||||
{
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(-1.5f, 0.5f * float(i), 0.0f);
|
||||
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += -3.0f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, vel, NULL, 0.0f, this->m_Color);
|
||||
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(1.5f, 0.5f * float(i), 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += 3.0f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, vel, NULL, 0.0f, this->m_Color);
|
||||
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(0.5f * float(i), -1.5f, 0.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += -3.0f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, vel, NULL, 0.0f, this->m_Color);
|
||||
|
||||
|
||||
pos = this->GetPosition();
|
||||
pos += CVector(0.5f * float(i), 1.5f, 0.0f);
|
||||
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.x += float(i) * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.y += 3.0f * CGeneral::GetRandomNumberInRange(0.001f, 0.006f);
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, vel, NULL, 0.0f, this->m_Color);
|
||||
}
|
||||
|
||||
for ( int32 i = 0; i < 8; i++ )
|
||||
{
|
||||
pos = this->GetPosition();
|
||||
pos.x += CGeneral::GetRandomNumberInRange(-3.0f, 3.0f);
|
||||
pos.y += CGeneral::GetRandomNumberInRange(-3.0f, 3.0f);
|
||||
|
||||
vel = this->m_vecTarget;
|
||||
vel.z += CGeneral::GetRandomNumberInRange(0.03f, 0.06f);
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, vel, NULL, 0.0f, this->m_Color);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
113
src/peds/Ped.cpp
113
src/peds/Ped.cpp
@ -2019,7 +2019,7 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
|
||||
}
|
||||
|
||||
static void
|
||||
particleProduceFootDust(CPed *ped, CVector *pos, float size, int times)
|
||||
particleProduceFootDust(CPed *ped, CVector const &pos, float size, int times)
|
||||
{
|
||||
switch (ped->m_nSurfaceTouched)
|
||||
{
|
||||
@ -2028,7 +2028,7 @@ particleProduceFootDust(CPed *ped, CVector *pos, float size, int times)
|
||||
case SURFACE_PAVEMENT:
|
||||
case SURFACE_SAND:
|
||||
for (int i = 0; i < times; ++i) {
|
||||
CVector adjustedPos = *pos;
|
||||
CVector adjustedPos = pos;
|
||||
adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
|
||||
adjustedPos.y += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
|
||||
CParticle::AddParticle(PARTICLE_PEDFOOT_DUST, adjustedPos, CVector(0.0f, 0.0f, 0.0f), nil, size, CRGBA(0, 0, 0, 0), 0, 0, 0, 0);
|
||||
@ -2040,16 +2040,27 @@ particleProduceFootDust(CPed *ped, CVector *pos, float size, int times)
|
||||
}
|
||||
|
||||
static void
|
||||
particleProduceFootSplash(CPed *ped, CVector *pos, float size, int times)
|
||||
particleProduceFootSplash(CPed *ped, CVector const &pos, float size, int times)
|
||||
{
|
||||
#ifdef PC_PARTICLE
|
||||
for (int i = 0; i < times; i++) {
|
||||
CVector adjustedPos = *pos;
|
||||
CVector adjustedPos = pos;
|
||||
adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
|
||||
adjustedPos.y += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
|
||||
|
||||
CVector direction = ped->GetForward() * -0.05f;
|
||||
CParticle::AddParticle(PARTICLE_RAIN_SPLASHUP, adjustedPos, direction, nil, size, CRGBA(32, 32, 32, 32), 0, 0, CGeneral::GetRandomNumber() & 1, 200);
|
||||
}
|
||||
#else
|
||||
for ( int32 i = 0; i < times; i++ )
|
||||
{
|
||||
CVector adjustedPos = pos;
|
||||
adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
|
||||
adjustedPos.y += CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
|
||||
|
||||
CParticle::AddParticle(PARTICLE_RAIN_SPLASHUP, adjustedPos, CVector(0.0f, 0.0f, 0.0f), nil, size, CRGBA(0, 0, 0, 0), 0, 0, CGeneral::GetRandomNumber() & 1, 200);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -2080,6 +2091,50 @@ CPed::PlayFootSteps(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GTA_PS2_STUFF
|
||||
CAnimBlendAssociation *runStopAsoc = NULL;
|
||||
|
||||
if ( IsPlayer() )
|
||||
{
|
||||
runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
|
||||
|
||||
if ( runStopAsoc == NULL )
|
||||
runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
|
||||
}
|
||||
|
||||
if ( runStopAsoc != NULL && runStopAsoc->blendAmount > 0.1f )
|
||||
{
|
||||
{
|
||||
CVector pos(0.0f, 0.0f, 0.0f);
|
||||
RwFrame *parent = m_pFrames[PED_FOOTL]->frame;
|
||||
while( parent )
|
||||
{
|
||||
RwV3dTransformPoints(pos, pos, 1, RwFrameGetMatrix(parent));
|
||||
parent = RwFrameGetParent(parent);
|
||||
}
|
||||
|
||||
pos.z -= 0.1f;
|
||||
pos += GetForward()*0.2f;
|
||||
particleProduceFootDust(this, pos, 0.02f, 1);
|
||||
}
|
||||
|
||||
{
|
||||
CVector pos(0.0f, 0.0f, 0.0f);
|
||||
RwFrame *parent = m_pFrames[PED_FOOTR]->frame;
|
||||
while( parent )
|
||||
{
|
||||
RwV3dTransformPoints(pos, pos, 1, RwFrameGetMatrix(parent));
|
||||
parent = RwFrameGetParent(parent);
|
||||
}
|
||||
|
||||
pos.z -= 0.1f;
|
||||
pos += GetForward()*0.2f;
|
||||
particleProduceFootDust(this, pos, 0.02f, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (walkRunAssoc && walkRunAssocBlend > 0.5f && idleAssocBlend < 1.0f) {
|
||||
float stepStart = 1 / 15.0f;
|
||||
float stepEnd = walkRunAssoc->hierarchy->totalLength / 2.0f + stepStart;
|
||||
@ -2121,9 +2176,15 @@ CPed::PlayFootSteps(void)
|
||||
}
|
||||
if (CWeather::Rain <= 0.1f || CCullZones::CamNoRain() || CCullZones::PlayerNoRain()) {
|
||||
if(IsPlayer())
|
||||
particleProduceFootDust(this, &footPos, 0.0f, 4);
|
||||
} else if(stepPart == 2) {
|
||||
particleProduceFootSplash(this, &footPos, 0.15f, 4);
|
||||
particleProduceFootDust(this, footPos, 0.0f, 4);
|
||||
}
|
||||
#ifdef PC_PARTICLE
|
||||
else if(stepPart == 2)
|
||||
#else
|
||||
else
|
||||
#endif
|
||||
{
|
||||
particleProduceFootSplash(this, footPos, 0.15f, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2131,6 +2192,7 @@ CPed::PlayFootSteps(void)
|
||||
if (m_nSurfaceTouched == SURFACE_PUDDLE) {
|
||||
float pedSpeed = CVector2D(m_vecMoveSpeed).Magnitude();
|
||||
if (pedSpeed > 0.03f && CTimer::GetFrameCounter() % 2 == 0 && pedSpeed > 0.13f) {
|
||||
#ifdef PC_PARTICLE
|
||||
float particleSize = pedSpeed * 2.0f;
|
||||
|
||||
if (particleSize < 0.25f)
|
||||
@ -2149,6 +2211,12 @@ CPed::PlayFootSteps(void)
|
||||
|
||||
particleDir.z = CGeneral::GetRandomNumberInRange(0.03f, 0.05f);
|
||||
CParticle::AddParticle(PARTICLE_RUBBER_SMOKE, particlePos, particleDir, nil, particleSize, CRGBA(255,255,255,255), 0, 0, 0, 0);
|
||||
#else
|
||||
CVector particlePos = (GetPosition() - 0.3f * GetUp()) + GetForward()*0.3f;
|
||||
CVector particleDir = m_vecMoveSpeed * 0.45f;
|
||||
particleDir.z = CGeneral::GetRandomNumberInRange(0.03f, 0.05f);
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH, particlePos-CVector(0.0f, 0.0f, 1.2f), particleDir, nil, 0.0f, CRGBA(155, 185, 155, 255));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15114,7 +15182,11 @@ CPed::ProcessBuoyancy(void)
|
||||
bIsInTheAir = false;
|
||||
}
|
||||
pos.z = pos.z - 0.8f;
|
||||
#ifdef PC_PARTICLE
|
||||
CParticleObject::AddObject(POBJECT_PED_WATER_SPLASH, pos, CVector(0.0f, 0.0f, 0.0f), 0.0f, 50, color, true);
|
||||
#else
|
||||
CParticleObject::AddObject(POBJECT_PED_WATER_SPLASH, pos, CVector(0.0f, 0.0f, 0.0f), 0.0f, 50, CRGBA(0, 0, 0, 0), true);
|
||||
#endif
|
||||
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
|
||||
m_nPedState = PED_IDLE;
|
||||
return;
|
||||
@ -15143,6 +15215,7 @@ CPed::ProcessBuoyancy(void)
|
||||
} else {
|
||||
m_vecMoveSpeed.z = -0.01f;
|
||||
DMAudio.PlayOneShot(m_audioEntityId, SOUND_SPLASH, 0.0f);
|
||||
#ifdef PC_PARTICLE
|
||||
CVector aBitForward = 2.2f * m_vecMoveSpeed + GetPosition();
|
||||
float level = 0.0f;
|
||||
if (CWaterLevel::GetWaterLevel(aBitForward, &level, false))
|
||||
@ -15151,6 +15224,18 @@ CPed::ProcessBuoyancy(void)
|
||||
CParticleObject::AddObject(POBJECT_PED_WATER_SPLASH, aBitForward, CVector(0.0f, 0.0f, 0.1f), 0.0f, 200, color, true);
|
||||
nGenerateRaindrops = CTimer::GetTimeInMilliseconds() + 80;
|
||||
nGenerateWaterCircles = CTimer::GetTimeInMilliseconds() + 100;
|
||||
#else
|
||||
CVector aBitForward = 1.6f * m_vecMoveSpeed + GetPosition();
|
||||
float level = 0.0f;
|
||||
if (CWaterLevel::GetWaterLevel(aBitForward, &level, false))
|
||||
aBitForward.z = level + 0.5f;
|
||||
|
||||
CVector vel = m_vecMoveSpeed * 0.1f;
|
||||
vel.z = 0.18f;
|
||||
CParticleObject::AddObject(POBJECT_PED_WATER_SPLASH, aBitForward, vel, 0.0f, 350, CRGBA(0, 0, 0, 0), true);
|
||||
nGenerateRaindrops = CTimer::GetTimeInMilliseconds() + 300;
|
||||
nGenerateWaterCircles = CTimer::GetTimeInMilliseconds() + 60;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else
|
||||
@ -15167,9 +15252,15 @@ CPed::ProcessBuoyancy(void)
|
||||
if (pos.z != 0.0f) {
|
||||
nGenerateWaterCircles = 0;
|
||||
for(int i = 0; i < 4; i++) {
|
||||
#ifdef PC_PARTICLE
|
||||
pos.x += CGeneral::GetRandomNumberInRange(-0.75f, 0.75f);
|
||||
pos.y += CGeneral::GetRandomNumberInRange(-0.75f, 0.75f);
|
||||
CParticle::AddParticle(PARTICLE_RAIN_SPLASH_BIGGROW, pos, CVector(0.0f, 0.0f, 0.0f), nil, 0.0f, color, 0, 0, 0, 0);
|
||||
#else
|
||||
pos.x += CGeneral::GetRandomNumberInRange(-2.5f, 2.5f);
|
||||
pos.y += CGeneral::GetRandomNumberInRange(-2.5f, 2.5f);
|
||||
CParticle::AddParticle(PARTICLE_RAIN_SPLASH_BIGGROW, pos+CVector(0.0f, 0.0f, 1.0f), CVector(0.0f, 0.0f, 0.0f));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15181,9 +15272,17 @@ CPed::ProcessBuoyancy(void)
|
||||
pos.z = level;
|
||||
|
||||
if (pos.z >= 0.0f) {
|
||||
#ifdef PC_PARTICLE
|
||||
pos.z += 0.25f;
|
||||
#else
|
||||
pos.z += 0.5f;
|
||||
#endif
|
||||
nGenerateRaindrops = 0;
|
||||
#ifdef PC_PARTICLE
|
||||
CParticleObject::AddObject(POBJECT_SPLASHES_AROUND, pos, CVector(0.0f, 0.0f, 0.0f), 4.5f, 1500, CRGBA(0,0,0,0), true);
|
||||
#else
|
||||
CParticleObject::AddObject(POBJECT_SPLASHES_AROUND, pos, CVector(0.0f, 0.0f, 0.0f), 4.5f, 2500, CRGBA(0,0,0,0), true);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,6 @@
|
||||
#include "ParticleObject.h"
|
||||
#include "Particle.h"
|
||||
|
||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||
bool CParticle::bEnableBannedParticles = false;
|
||||
#endif
|
||||
|
||||
#define MAX_PARTICLES_ON_SCREEN (1000)
|
||||
|
||||
@ -388,7 +385,11 @@ void CParticle::Initialise()
|
||||
|
||||
gpFlame5Tex = RwTextureRead("flame5", nil);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
gpFlame5Raster = RwTextureGetRaster(gpFlame5Tex);
|
||||
#else
|
||||
gpFlame5Raster = RwTextureGetRaster(gpFlame1Tex); // copy-paste bug ?
|
||||
#endif
|
||||
|
||||
gpRainDropSmallTex = RwTextureRead("rainsmall", nil);
|
||||
gpRainDropSmallRaster = RwTextureGetRaster(gpRainDropSmallTex);
|
||||
@ -767,9 +768,8 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
|
||||
{
|
||||
if ( CTimer::GetIsPaused() )
|
||||
return NULL;
|
||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||
if(!bEnableBannedParticles)
|
||||
#endif
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
if ( ( type == PARTICLE_ENGINE_SMOKE
|
||||
|| type == PARTICLE_ENGINE_SMOKE2
|
||||
|| type == PARTICLE_ENGINE_STEAM
|
||||
@ -782,6 +782,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
CParticle *pParticle = m_pUnusedListHead;
|
||||
|
||||
@ -853,6 +854,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
|
||||
|
||||
pParticle->m_nRotation = nRotation;
|
||||
|
||||
// PC only
|
||||
if ( pParticle->m_nRotation >= 360 )
|
||||
pParticle->m_nRotation -= 360;
|
||||
else if ( pParticle->m_nRotation < 0 )
|
||||
@ -1348,12 +1350,13 @@ void CParticle::Update()
|
||||
|
||||
particle->m_nAlpha = clamp(particle->m_nAlpha - psystem->m_nFadeAlphaAmount,
|
||||
0, 255);
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
if ( particle->m_nAlpha == 0 )
|
||||
{
|
||||
bRemoveParticle = true;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
++particle->m_nFadeAlphaTimer;
|
||||
@ -1448,18 +1451,15 @@ void CParticle::Render()
|
||||
for ( int32 i = 0; i < MAX_PARTICLES; i++ )
|
||||
{
|
||||
tParticleSystemData *psystem = &mod_ParticleSystemManager.m_aParticles[i];
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
bool particleBanned = false;
|
||||
|
||||
#endif
|
||||
CParticle *particle = psystem->m_pParticles;
|
||||
|
||||
RwRaster **frames = psystem->m_ppRaster;
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
tParticleType type = psystem->m_Type;
|
||||
|
||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||
if (!bEnableBannedParticles)
|
||||
#endif
|
||||
if ( type == PARTICLE_ENGINE_SMOKE
|
||||
|| type == PARTICLE_ENGINE_SMOKE2
|
||||
|| type == PARTICLE_ENGINE_STEAM
|
||||
@ -1471,6 +1471,7 @@ void CParticle::Render()
|
||||
{
|
||||
particleBanned = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( particle )
|
||||
{
|
||||
@ -1512,10 +1513,11 @@ void CParticle::Render()
|
||||
while ( particle != nil )
|
||||
{
|
||||
bool canDraw = true;
|
||||
#ifdef PC_PARTICLE
|
||||
|
||||
if ( particle->m_nAlpha == 0 )
|
||||
canDraw = false;
|
||||
|
||||
#endif
|
||||
if ( canDraw && psystem->m_nFinalAnimationFrame != 0 && frames != nil )
|
||||
{
|
||||
RwRaster *curFrame = frames[particle->m_nCurrentFrame];
|
||||
@ -1538,7 +1540,7 @@ void CParticle::Render()
|
||||
particle->m_fSize * 63.0f,
|
||||
particle->m_Color,
|
||||
particle->m_nColorIntensity,
|
||||
(float)particle->m_nRotation,
|
||||
(float)particle->m_nRotation, //DEGTORAD((float)particle->m_nRotation) ps2
|
||||
particle->m_nAlpha);
|
||||
}
|
||||
else
|
||||
@ -1564,8 +1566,10 @@ void CParticle::Render()
|
||||
|
||||
if ( CSprite::CalcScreenCoors(particle->m_vecPosition, coors, &w, &h, true) )
|
||||
{
|
||||
#ifdef PC_PARTICLE
|
||||
if ( (!particleBanned || SCREEN_WIDTH * fParticleScaleLimit >= w)
|
||||
&& SCREEN_HEIGHT * fParticleScaleLimit >= h )
|
||||
#endif
|
||||
{
|
||||
if ( particle->m_nRotation != 0 )
|
||||
{
|
||||
@ -1576,7 +1580,7 @@ void CParticle::Render()
|
||||
particle->m_Color.blue,
|
||||
particle->m_nColorIntensity,
|
||||
1.0f / coors.z,
|
||||
float(particle->m_nRotation),
|
||||
float(particle->m_nRotation), // DEGTORAD((float)particle->m_nRotation) ps2
|
||||
particle->m_nAlpha);
|
||||
}
|
||||
else if ( psystem->Flags & SCREEN_TRAIL )
|
||||
@ -1601,7 +1605,6 @@ void CParticle::Render()
|
||||
|
||||
fTrailLength = fDist;
|
||||
|
||||
//Float fRot = Atan2( vecDist.x / fDist, Sqrt(1.0f - vecDist.x / fDist * (vecDist.x / fDist)) );
|
||||
float fRot = Asin(vecDist.x / fDist);
|
||||
|
||||
fRotation = fRot;
|
||||
@ -1653,7 +1656,6 @@ void CParticle::Render()
|
||||
|
||||
fTrailLength = fDist;
|
||||
|
||||
//Float fRot = Atan2(vecDist.x / fDist, Sqrt(1.0f - vecDist.x / fDist * (vecDist.x / fDist)));
|
||||
float fRot = Asin(vecDist.x / fDist);
|
||||
|
||||
fRotation = fRot;
|
||||
|
@ -89,10 +89,6 @@ public:
|
||||
|
||||
static void AddJetExplosion(CVector const &vecPos, float fPower, float fSize);
|
||||
static void AddYardieDoorSmoke(CVector const &vecPos, CMatrix const &matMatrix);
|
||||
|
||||
#ifdef TOGGLEABLE_BETA_FEATURES
|
||||
static bool bEnableBannedParticles;
|
||||
#endif
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CParticle, 0x68);
|
@ -8,8 +8,7 @@ cParticleSystemMgr mod_ParticleSystemManager;
|
||||
|
||||
const char *ParticleFilename = "PARTICLE.CFG";
|
||||
|
||||
//cParticleSystemMgr::cParticleSystemMgr()
|
||||
void cParticleSystemMgr::ctor()
|
||||
cParticleSystemMgr::cParticleSystemMgr()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
@ -118,11 +118,11 @@ class cParticleSystemMgr
|
||||
public:
|
||||
tParticleSystemData m_aParticles[MAX_PARTICLES];
|
||||
|
||||
cParticleSystemMgr() { ctor(); } void ctor();
|
||||
cParticleSystemMgr();
|
||||
|
||||
void Initialise();
|
||||
void LoadParticleData();
|
||||
//void RangeCheck(tParticleSystemData *pData);
|
||||
void RangeCheck(tParticleSystemData *pData) { }
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(cParticleSystemMgr, 0x2420);
|
||||
|
@ -1,9 +1,6 @@
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4005)
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#pragma warning( pop )
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#include "win.h"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#define USEALTERNATIVEWINFUNCS
|
||||
#include "crossplatform.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "AudioScriptObject.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#define USEALTERNATIVEWINFUNCS
|
||||
#include "crossplatform.h"
|
||||
|
||||
#include "FileMgr.h"
|
||||
#include "GenericGameStorage.h"
|
||||
@ -94,7 +95,7 @@ C_PcSave::PopulateSlotInfo()
|
||||
struct {
|
||||
int size;
|
||||
wchar FileName[24];
|
||||
_SYSTEMTIME SaveDateTime;
|
||||
SYSTEMTIME SaveDateTime;
|
||||
} header;
|
||||
sprintf(savename, "%s%i%s", DefaultPCSaveFileName, i + 1, ".b");
|
||||
int file = CFileMgr::OpenFile(savename, "rb");
|
||||
@ -110,8 +111,8 @@ C_PcSave::PopulateSlotInfo()
|
||||
}
|
||||
if (Slots[i + 1] == SLOT_OK) {
|
||||
if (CheckDataNotCorrupt(i, savename)) {
|
||||
_SYSTEMTIME st;
|
||||
memcpy(&st, &header.SaveDateTime, sizeof(_SYSTEMTIME));
|
||||
SYSTEMTIME st;
|
||||
memcpy(&st, &header.SaveDateTime, sizeof(SYSTEMTIME));
|
||||
const char *month;
|
||||
switch (st.wMonth)
|
||||
{
|
||||
|
81
src/skel/crossplatform.cpp
Normal file
81
src/skel/crossplatform.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
#include "common.h"
|
||||
#define USEALTERNATIVEWINFUNCS
|
||||
#include "crossplatform.h"
|
||||
|
||||
// For internal use
|
||||
// wMilliseconds is not needed
|
||||
void tmToSystemTime(const tm *tm, SYSTEMTIME *out) {
|
||||
out->wYear = tm->tm_year + 1900;
|
||||
out->wMonth = tm->tm_mon + 1;
|
||||
out->wDayOfWeek = tm->tm_wday;
|
||||
out->wDay = tm->tm_mday;
|
||||
out->wHour = tm->tm_hour;
|
||||
out->wMinute = tm->tm_min;
|
||||
out->wSecond = tm->tm_sec;
|
||||
}
|
||||
|
||||
void GetLocalTime_CP(SYSTEMTIME *out) {
|
||||
time_t timestamp = time(nil);
|
||||
tm *localTm = localtime(×tamp);
|
||||
tmToSystemTime(localTm, out);
|
||||
}
|
||||
|
||||
#if !defined _WIN32 || defined __MINGW32__
|
||||
HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) {
|
||||
char newpathname[32];
|
||||
strncpy(newpathname, pathname, 32);
|
||||
char* path = strtok(newpathname, "\\*");
|
||||
strncpy(firstfile->folder, path, sizeof(firstfile->folder));
|
||||
|
||||
// Both w/ extension and w/o extension is ok
|
||||
if (strlen(path) + 2 != strlen(pathname))
|
||||
strncpy(firstfile->extension, strtok(NULL, "\\*"), sizeof(firstfile->extension));
|
||||
else
|
||||
strncpy(firstfile->extension, "", sizeof(firstfile->extension));
|
||||
|
||||
HANDLE d;
|
||||
if ((d = opendir(path)) == NULL || !FindNextFile(d, firstfile))
|
||||
return NULL;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
bool FindNextFile(HANDLE d, WIN32_FIND_DATA* finddata) {
|
||||
dirent *file;
|
||||
static struct stat fileStats;
|
||||
static char path[PATH_MAX], relativepath[NAME_MAX + sizeof(finddata->folder) + 1];
|
||||
int extensionLen = strlen(finddata->extension);
|
||||
while ((file = readdir(d)) != NULL) {
|
||||
|
||||
// We only want "DT_REG"ular Files, but reportedly some FS and OSes gives DT_UNKNOWN as type.
|
||||
if ((file->d_type == DT_UNKNOWN || file->d_type == DT_REG) &&
|
||||
(extensionLen == 0 || strncmp(&file->d_name[strlen(file->d_name) - extensionLen], finddata->extension, extensionLen) == 0)) {
|
||||
|
||||
sprintf(relativepath, "%s/%s", finddata->folder, file->d_name);
|
||||
realpath(relativepath, path);
|
||||
stat(path, &fileStats);
|
||||
strncpy(finddata->cFileName, file->d_name, sizeof(finddata->cFileName));
|
||||
finddata->ftLastWriteTime = fileStats.st_mtime;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void GetDateFormat(int unused1, int unused2, SYSTEMTIME* in, int unused3, char* out, int size) {
|
||||
tm linuxTime;
|
||||
linuxTime.tm_year = in->wYear - 1900;
|
||||
linuxTime.tm_mon = in->wMonth - 1;
|
||||
linuxTime.tm_wday = in->wDayOfWeek;
|
||||
linuxTime.tm_mday = in->wDay;
|
||||
linuxTime.tm_hour = in->wHour;
|
||||
linuxTime.tm_min = in->wMinute;
|
||||
linuxTime.tm_sec = in->wSecond;
|
||||
strftime(out, size, nl_langinfo(D_FMT), &linuxTime);
|
||||
}
|
||||
|
||||
void FileTimeToSystemTime(time_t* writeTime, SYSTEMTIME* out) {
|
||||
tm *ptm = gmtime(writeTime);
|
||||
tmToSystemTime(ptm, out);
|
||||
}
|
||||
#endif
|
65
src/skel/crossplatform.h
Normal file
65
src/skel/crossplatform.h
Normal file
@ -0,0 +1,65 @@
|
||||
#include <time.h>
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#if !defined _WIN32 || defined __MINGW32__
|
||||
#define MAX_PATH PATH_MAX
|
||||
#else
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Mostly wrappers around Windows functions
|
||||
|
||||
// TODO: Remove USEALTERNATIVEWINFUNCS and don't use it anywhere when re3 becomes fully cross-platform, this is for testing
|
||||
// Codes compatible with Windows and Linux
|
||||
#if defined USEALTERNATIVEWINFUNCS || !defined _WIN32 || defined __MINGW32__
|
||||
#define DeleteFile unlink
|
||||
|
||||
// Needed for save games
|
||||
struct SYSTEMTIME {
|
||||
uint16 wYear;
|
||||
uint16 wMonth;
|
||||
uint16 wDayOfWeek;
|
||||
uint16 wDay;
|
||||
uint16 wHour;
|
||||
uint16 wMinute;
|
||||
uint16 wSecond;
|
||||
uint16 wMilliseconds;
|
||||
};
|
||||
|
||||
#define GetLocalTime GetLocalTime_CP
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
void GetLocalTime_CP(SYSTEMTIME* out);
|
||||
|
||||
|
||||
// Only runs on GNU/POSIX/etc.
|
||||
#if !defined _WIN32 || defined __MINGW32__
|
||||
#define OutputDebugString(s) re3_debug("[DBG-2]: " s "\n")
|
||||
|
||||
#include <iostream>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <langinfo.h>
|
||||
|
||||
typedef DIR* HANDLE;
|
||||
#define INVALID_HANDLE_VALUE NULL
|
||||
#define FindClose closedir
|
||||
#define LOCALE_USER_DEFAULT 0
|
||||
#define DATE_SHORTDATE 0
|
||||
|
||||
struct WIN32_FIND_DATA {
|
||||
char extension[32]; // for searching
|
||||
char folder[32]; // for searching
|
||||
char cFileName[256]; // because tSkinInfo has it 256
|
||||
time_t ftLastWriteTime;
|
||||
};
|
||||
|
||||
HANDLE FindFirstFile(char*, WIN32_FIND_DATA*);
|
||||
bool FindNextFile(HANDLE, WIN32_FIND_DATA*);
|
||||
void FileTimeToSystemTime(time_t*, SYSTEMTIME*);
|
||||
void GetDateFormat(int, int, SYSTEMTIME*, int, char*, int);
|
||||
#endif
|
@ -2,18 +2,12 @@
|
||||
#include "skeleton.h"
|
||||
#include "events.h"
|
||||
|
||||
//#include "main.h"
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#include "common.h"
|
||||
#include "Pad.h"
|
||||
#include "ControllerConfig.h"
|
||||
#include "Frontend.h"
|
||||
#include "Camera.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
@ -1986,7 +1986,7 @@ WinMain(HINSTANCE instance,
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetEnterJustDown() )
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetCharJustDown(VK_SPACE) )
|
||||
else if ( CPad::GetPad(0)->GetCharJustDown(' ') )
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetAltJustDown() )
|
||||
++gGameState;
|
||||
@ -2022,7 +2022,7 @@ WinMain(HINSTANCE instance,
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetEnterJustDown() )
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetCharJustDown(VK_SPACE) )
|
||||
else if ( CPad::GetPad(0)->GetCharJustDown(' ') )
|
||||
++gGameState;
|
||||
else if ( CPad::GetPad(0)->GetAltJustDown() )
|
||||
++gGameState;
|
||||
|
@ -5,6 +5,11 @@
|
||||
#define RSREGSETBREAKALLOC(_name) /* No op */
|
||||
#endif /* (!defined(RSREGSETBREAKALLOC)) */
|
||||
|
||||
#ifndef _INC_WINDOWS
|
||||
#define _X86_
|
||||
#include <windef.h>
|
||||
#endif
|
||||
|
||||
enum eGameState
|
||||
{
|
||||
GS_START_UP = 0,
|
||||
@ -17,7 +22,9 @@ enum eGameState
|
||||
GS_FRONTEND,
|
||||
GS_INIT_PLAYING_GAME,
|
||||
GS_PLAYING_GAME,
|
||||
#ifndef MASTER
|
||||
GS_ANIMVIEWER,
|
||||
#endif
|
||||
};
|
||||
|
||||
enum eWinVersion
|
||||
@ -33,6 +40,7 @@ extern DWORD _dwOperatingSystemVersion;
|
||||
|
||||
extern RwUInt32 gGameState;
|
||||
|
||||
#ifdef __DINPUT_INCLUDED__
|
||||
/* platform specfic global data */
|
||||
typedef struct
|
||||
{
|
||||
@ -86,6 +94,7 @@ public:
|
||||
};
|
||||
|
||||
extern CJoySticks AllValidWinJoys;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -97,6 +106,7 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
RwBool IsForegroundApp();
|
||||
|
||||
#ifdef __DINPUT_INCLUDED__
|
||||
HRESULT _InputInitialise();
|
||||
HRESULT _InputInitialiseMouse();
|
||||
HRESULT CapturePad(RwInt32 padID);
|
||||
@ -110,6 +120,7 @@ BOOL _InputTranslateKey(RsKeyCodes *rs, UINT flag, UINT key);
|
||||
void _InputTranslateShiftKeyUpDown(RsKeyCodes *rs);;
|
||||
BOOL _InputTranslateShiftKey(RsKeyCodes *rs, UINT key, BOOLEAN bDown);
|
||||
BOOL _InputIsExtended(INT flag);
|
||||
#endif
|
||||
|
||||
void InitialiseLanguage();
|
||||
RwBool _psSetVideoMode(RwInt32 subSystem, RwInt32 videoMode);
|
||||
|
@ -2848,6 +2848,7 @@ CAutomobile::ProcessBuoyancy(void)
|
||||
static uint32 nGenerateWaterCircles = 0;
|
||||
|
||||
if(initialSpeed.z < -0.3f && impulse.z > 0.3f){
|
||||
#if defined(PC_PARTICLE) || defined (PS2_ALTERNATIVE_CARSPLASH)
|
||||
RwRGBA color;
|
||||
color.red = (0.5f * CTimeCycle::GetDirectionalRed() + CTimeCycle::GetAmbientRed())*0.45f*255;
|
||||
color.green = (0.5f * CTimeCycle::GetDirectionalGreen() + CTimeCycle::GetAmbientGreen())*0.45f*255;
|
||||
@ -2856,6 +2857,30 @@ CAutomobile::ProcessBuoyancy(void)
|
||||
CParticleObject::AddObject(POBJECT_CAR_WATER_SPLASH, GetPosition(),
|
||||
CVector(0.0f, 0.0f, CGeneral::GetRandomNumberInRange(0.15f, 0.3f)),
|
||||
0.0f, 75, color, true);
|
||||
#else
|
||||
CVector pos = (initialSpeed * 2.0f) + (GetPosition() + point);
|
||||
|
||||
for ( int32 i = 0; i < 360; i += 4 )
|
||||
{
|
||||
float fSin = Sin(float(i));
|
||||
float fCos = Cos(float(i));
|
||||
|
||||
CVector dir(fSin*0.01f, fCos*0.01f, CGeneral::GetRandomNumberInRange(0.25f, 0.45f));
|
||||
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH,
|
||||
pos + CVector(fSin*4.5f, fCos*4.5f, 0.0f),
|
||||
dir, NULL, 0.0f, CRGBA(225, 225, 255, 180));
|
||||
|
||||
for ( int32 j = 0; j < 3; j++ )
|
||||
{
|
||||
float fMul = 1.5f * float(j + 1);
|
||||
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH,
|
||||
pos + CVector(fSin * fMul, fCos * fMul, 0.0f),
|
||||
dir, NULL, 0.0f, CRGBA(225, 225, 255, 180));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
nGenerateRaindrops = CTimer::GetTimeInMilliseconds() + 300;
|
||||
nGenerateWaterCircles = CTimer::GetTimeInMilliseconds() + 60;
|
||||
@ -2909,9 +2934,16 @@ CAutomobile::ProcessBuoyancy(void)
|
||||
CVector pos = m_aWheelColPoints[i].point + 0.3f*GetUp() - GetPosition();
|
||||
CVector vSpeed = GetSpeed(pos);
|
||||
vSpeed.z = 0.0f;
|
||||
#ifdef GTA_PS2_STUFF
|
||||
// ps2 puddle physics
|
||||
CVector moveForce = CTimer::GetTimeStep() * (m_fMass * (vSpeed * -0.003f));
|
||||
ApplyMoveForce(moveForce.x, moveForce.y, moveForce.z);
|
||||
#endif
|
||||
float fSpeed = vSpeed.MagnitudeSqr();
|
||||
#ifdef PC_PARTICLE
|
||||
if(fSpeed > sq(0.05f)){
|
||||
fSpeed = Sqrt(fSpeed);
|
||||
|
||||
float size = Min((fSpeed < 0.15f ? 0.25f : 0.75f)*fSpeed, 0.6f);
|
||||
CVector right = 0.2f*fSpeed*GetRight() + 0.2f*vSpeed;
|
||||
|
||||
@ -2928,6 +2960,35 @@ CAutomobile::ProcessBuoyancy(void)
|
||||
if((CTimer::GetFrameCounter() & 0xF) == 0)
|
||||
DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_SPLASH, 2000.0f*fSpeed);
|
||||
}
|
||||
#else
|
||||
if ( ( (CTimer::GetFrameCounter() + i) & 3 ) == 0 )
|
||||
{
|
||||
if(fSpeed > sq(0.05f))
|
||||
{
|
||||
fSpeed = Sqrt(fSpeed);
|
||||
CRGBA color(155, 185, 155, 255);
|
||||
float boxY = GetColModel()->boundingBox.max.y;
|
||||
CVector right = 0.5f * GetRight();
|
||||
|
||||
if ( i == 2 )
|
||||
{
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH,
|
||||
GetPosition() + (boxY * GetForward()) + right,
|
||||
0.75f*m_vecMoveSpeed, NULL, 0.0f, color);
|
||||
|
||||
}
|
||||
else if ( i == 0 )
|
||||
{
|
||||
CParticle::AddParticle(PARTICLE_PED_SPLASH,
|
||||
GetPosition() + (boxY * GetForward()) - right,
|
||||
0.75f*m_vecMoveSpeed, NULL, 0.0f, color);
|
||||
}
|
||||
|
||||
if((CTimer::GetFrameCounter() & 0xF) == 0)
|
||||
DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_SPLASH, 2000.0f*fSpeed);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3486,14 +3547,29 @@ CAutomobile::AddWheelDirtAndWater(CColPoint *colpoint, uint32 belowEffectSpeed)
|
||||
}
|
||||
return 0;
|
||||
default:
|
||||
// Is this even visible?
|
||||
if(CWeather::WetRoads > 0.01f && CTimer::GetFrameCounter() & 1){
|
||||
CParticle::AddParticle(PARTICLE_WATERSPRAY,
|
||||
if ( CWeather::WetRoads > 0.01f
|
||||
#ifdef PC_PARTICLE
|
||||
&& CTimer::GetFrameCounter() & 1
|
||||
#endif
|
||||
)
|
||||
{
|
||||
CParticle::AddParticle(
|
||||
#ifdef FIX_BUGS
|
||||
PARTICLE_WHEEL_WATER,
|
||||
#else
|
||||
PARTICLE_WATERSPRAY,
|
||||
#endif
|
||||
colpoint->point + CVector(0.0f, 0.0f, 0.25f+0.25f),
|
||||
CVector(0.0f, 0.0f, 1.0f), nil,
|
||||
#ifdef PC_PARTICLE
|
||||
CVector(0.0f, 0.0f, 1.0f),
|
||||
#else
|
||||
CVector(0.0f, 0.0f, CGeneral::GetRandomNumberInRange(0.005f, 0.04f)),
|
||||
#endif
|
||||
nil,
|
||||
CGeneral::GetRandomNumberInRange(0.1f, 0.5f), waterCol);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -340,27 +340,46 @@ CBoat::ProcessControl(void)
|
||||
else
|
||||
jetPos.z = 0.0f;
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
CVector wakePos = GetPosition() + sternPos;
|
||||
wakePos.z -= 0.65f;
|
||||
#else
|
||||
CVector wakePos = GetPosition() + sternPos;
|
||||
wakePos.z = -0.3f;
|
||||
#endif
|
||||
|
||||
CVector wakeDir = 0.75f * jetDir;
|
||||
|
||||
CParticle::AddParticle(PARTICLE_BOAT_THRUSTJET, jetPos, jetDir, nil, 0.0f, jetColor);
|
||||
#ifdef PC_PARTICLE
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, jetPos, 0.25f * jetDir, nil, 1.0f, splashColor,
|
||||
CGeneral::GetRandomNumberInRange(0, 30),
|
||||
CGeneral::GetRandomNumberInRange(0, 90), 3);
|
||||
#endif
|
||||
if(!cameraHack)
|
||||
CParticle::AddParticle(PARTICLE_BOAT_WAKE, wakePos, wakeDir, nil, 0.0f, jetColor);
|
||||
}else if((CTimer::GetFrameCounter() + m_randomSeed) & 1){
|
||||
#ifdef PC_PARTICLE
|
||||
jetDir.z = 0.018f;
|
||||
jetDir.x *= 0.01f;
|
||||
jetDir.y *= 0.01f;
|
||||
propellerWorld.z += 1.5f;
|
||||
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, propellerWorld, jetDir, nil, 1.5f, jetColor);
|
||||
#else
|
||||
jetDir.z = 0.018f;
|
||||
jetDir.x *= 0.03f;
|
||||
jetDir.y *= 0.03f;
|
||||
propellerWorld.z += 1.0f;
|
||||
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, propellerWorld, jetDir, nil, 0.0f, jetColor);
|
||||
#endif
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, propellerWorld, 0.1f * jetDir, nil, 0.5f, splashColor,
|
||||
CGeneral::GetRandomNumberInRange(0, 30),
|
||||
CGeneral::GetRandomNumberInRange(0, 90), 3);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}else if(!onLand){
|
||||
@ -416,36 +435,66 @@ CBoat::ProcessControl(void)
|
||||
}
|
||||
|
||||
// Spray particles on sides of boat
|
||||
if(m_nDeltaVolumeUnderWater > 75){
|
||||
#ifdef PC_PARTICLE
|
||||
if(m_nDeltaVolumeUnderWater > 75)
|
||||
#else
|
||||
if(m_nDeltaVolumeUnderWater > 120)
|
||||
#endif
|
||||
{
|
||||
float speed = m_vecMoveSpeed.Magnitude();
|
||||
float splash1Size = speed;
|
||||
float splash2Size = m_nDeltaVolumeUnderWater * 0.005f * 0.2f;
|
||||
float splash2Size = float(m_nDeltaVolumeUnderWater) * 0.005f * 0.2f;
|
||||
float front = 0.9f * GetColModel()->boundingBox.max.y;
|
||||
if(splash1Size > 0.75f) splash1Size = 0.75f;
|
||||
|
||||
CVector dir, pos;
|
||||
|
||||
// right
|
||||
#ifdef PC_PARTICLE
|
||||
dir = -0.5f*m_vecMoveSpeed;
|
||||
dir.z += 0.1f*speed;
|
||||
dir += 0.5f*GetRight()*speed;
|
||||
pos = front*GetForward() + 0.5f*GetRight() + GetPosition() + m_vecBuoyancePoint;
|
||||
CWaterLevel::GetWaterLevel(pos, &pos.z, true);
|
||||
#else
|
||||
dir = 0.3f*m_vecMoveSpeed;
|
||||
dir.z += 0.05f*speed;
|
||||
dir += 0.5f*GetRight()*speed;
|
||||
pos = (GetPosition() + m_vecBuoyancePoint) + (1.5f*GetRight());
|
||||
#endif
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, 0.75f * dir, nil, splash1Size, splashColor,
|
||||
CGeneral::GetRandomNumberInRange(0, 30),
|
||||
CGeneral::GetRandomNumberInRange(0, 90), 1);
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size, jetColor);
|
||||
#else
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size);
|
||||
#endif
|
||||
|
||||
|
||||
// left
|
||||
#ifdef PC_PARTICLE
|
||||
dir = -0.5f*m_vecMoveSpeed;
|
||||
dir.z += 0.1f*speed;
|
||||
dir -= 0.5f*GetRight()*speed;
|
||||
pos = front*GetForward() - 0.5f*GetRight() + GetPosition() + m_vecBuoyancePoint;
|
||||
CWaterLevel::GetWaterLevel(pos, &pos.z, true);
|
||||
#else
|
||||
dir = 0.3f*m_vecMoveSpeed;
|
||||
dir.z += 0.05f*speed;
|
||||
dir -= 0.5f*GetRight()*speed;
|
||||
pos = (GetPosition() + m_vecBuoyancePoint) - (1.5f*GetRight());
|
||||
#endif
|
||||
|
||||
#ifdef PC_PARTICLE
|
||||
CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, 0.75f * dir, nil, splash1Size, splashColor,
|
||||
CGeneral::GetRandomNumberInRange(0, 30),
|
||||
CGeneral::GetRandomNumberInRange(0, 90), 1);
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size, jetColor);
|
||||
#else
|
||||
CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size);
|
||||
#endif
|
||||
}
|
||||
|
||||
m_fPrevVolumeUnderWater = m_fVolumeUnderWater;
|
||||
|
@ -1002,18 +1002,12 @@ void
|
||||
DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle)
|
||||
{
|
||||
if (pVehicle->pDriver) {
|
||||
#ifndef FIX_BUGS
|
||||
// this just isn't fair
|
||||
CDarkel::RegisterKillByPlayer(pVehicle->pDriver, WEAPONTYPE_UNIDENTIFIED);
|
||||
#endif
|
||||
pVehicle->pDriver->FlagToDestroyWhenNextProcessed();
|
||||
}
|
||||
for (int i = 0; i < pVehicle->m_nNumMaxPassengers; i++) {
|
||||
if (pVehicle->pPassengers[i]) {
|
||||
#ifndef FIX_BUGS
|
||||
// this just isn't fair
|
||||
CDarkel::RegisterKillByPlayer(pVehicle->pPassengers[i], WEAPONTYPE_UNIDENTIFIED);
|
||||
#endif
|
||||
pVehicle->pPassengers[i]->FlagToDestroyWhenNextProcessed();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user