[ET] Add atmospheric effects

mowl

Coders
Hello.

I was wondering where atmospheric effects are added into the game.
Since 'railgun' has snow, and 'radar' has rain. This is a little extra / nothing serious.

I looked up some atmo-arguments, and I came up with this:
Code:
.text:3002762F loc_3002762F:                           ; CODE XREF: sub_30026FF0+49Aj
.text:3002762F                 mov     [esp+2FCh+var_2FC], esi
.text:30027632                 mov     ebx, offset aBv ; "BV"
.text:30027637                 mov     dword ptr [esp+2FCh+var_2F8], ebx
.text:3002763B                 call    sub_300B58A0
.text:30027640                 test    eax, eax
.text:30027642                 jz      loc_300276E6

Pseudo dump:
Code:
void __cdecl sub_30026FF0(int a1)

Code:
if ( sub_300B58A0(v12, "RAIN") )
{
        if ( !sub_300B58A0(v12, "SNOW") )
        {
          	v17 = sub_300268C0;
          	dword_329FD92C = (int)sub_300269B0;
         	v18 = sub_300266F0;
          	v16 = -1029701632;
          	v40 = 2;
          	goto LABEL_44;
        }
        if ( sub_300B58A0(v12, "FIRE") )
        {
          	dword_329FD8BC = 0;
          	sub_3006AED0("Only effect type 'rain', 'snow', and 'fire' are supported.\n", v39);
          	return;
        }
        v15 = 3;
}

Adding an atmosphere-effect:
Code:
AddAtmoEffect = (AddAtmoEffect_t) ((DWORD)  0x026FF0);

And a few effects for you to mess with:
Code:
[b]Snowstorm[/b]
AddAtmoEffect( "T=SNOW,B=20 30,C=0.8,G=0.5 8,BV=100 100,GV=70 150,W=3 5,D=5000" );

[b]Heavy rain[/b]
AddAtmoEffect( "T=RAIN,B=5 10,C=0.5,G=0.5 2,BV=50 50,GV=200 200,W=1 2,D=1000" );

[b]Mild snowstorm[/b]
AddAtmoEffect( "T=SNOW,B=5 10,C=0.5,G=0.3 2,BV=20 30,GV=25 40,W=3 5,D=2000" );

Or more usefull, hook the call and simply block it. So you get rid of any atmo-effect.

Edit:
1) 'AddAtmoEffect_t' just holds a 'const char*' as argument. The seperation happens within the function itself.
2) If you got no clue where they are added, search for the argument string in 'AddAtmoEffect' and hook the upper laying function. They are commented out in the 2.60b patch.
3) Untested, just some fast reversing, but I'm sure people get the idea :)

Regards,
mOwl
 
Top