Chhers For The Feedback So Far, I Believe This Command COuld Be Great For DarkGDK, So Lets Get It DOne People, I Thought It Might Be Easier If We Broke Up The Commmands, So Here Is
SETUP SNOW
If Anyone See's Problems With The Following, Please Fix It.
/*****************************************
SETUP SNOW
*****************************************/
void SQ_SetupSnow()
{
int SQ_MaxSnow;
int SQ_SnowIMG;
/* ????????????????????
Type SQ_Snow // ?? Anyone Know How To Do Types?
// ???????????????????? */
int obj;
/* ????????????????????
Endtype // ?? Do We Even Have To End Types In C++?
// ???????????????????? */
bool SQ_ShowSnow;
SQ_ShowSnow=1;
int SQ_SnowTimer;
}
MAKE SNOW
Mahoney Converted This. But Still Some Places Need Doing (Like DIMS)
/*************************************
MAKE SNOW
*************************************/
void SQ_MakeSnow ( int NumOFObjects, int SQ_Image, int SQ_Size, int SQ_Scale)
{
/*
SQ_NumOfObjects= The Number Of Snow Objects to create
SQ_Image= The Image number of your snow image. This will be used on the snow objects.
SQ_Size= The Size of each snow object.
*/
SQ_MaxSnow = SQ_NumOfObjects;
SQ_SnowIMG = SQ_Image;
/* ???????????????????????????????
DIM SQ_Snow(SQ_MaxSnow) as SQ_Snow
??????????????????????????????? */
for ( int s = 1; s <= SQ_NumOfObjects; s++ )
{
int maxi = 50;
/* ????????????????????????????
SQ_Snow(s).obj=SQ_FreeSnowOBJ()
p=SQ_Snow(s).obj
???????????????????????????? */
dbMakeObjectPlain ( p, SQ_Size, SQ_Size );
dbPositionObject ( p, dbRND(100), 0, p*500 );
dbGhostObjectOn ( p );
dbFadeObject ( p, 30 );
dbTextureObject ( p, SQ_Image );
dbScaleObjectTexture ( p, SQ_Scale, SQ_Scale );
dbScrollObjectTexture ( p, dbRND(100) * 0.05, 0 );
dbDisableObjectZWrite ( p );
dbSetObjectTransparency ( p, 1 );
dbSetObjectFog ( p, 0 );
}
}
SHOW/HIDE SNOW COMMANDS
Mahoney Converted Again
/********************************************
SHOW/HIDE SNOW COMMANDS
********************************************/
void SQ_ShowSnow()
{
SQ_ShowSnow = 1;
}
void SQ_HideSnow()
{
SQ_ShowSnow = 0;
}
UPDATE SNOW
Not Been Touched Yet, But Ill Look At It Now.
rem *********************************************
rem
rem UPDATE SNOW
rem
rem *********************************************
Function SQ_UpdateSnow(Camera,Strength as integer,FallSpeed as float,SQ_SnowMode as integer)
remstart
Camera= Camera number of the camera to update to
Strength= The Strength of the snowstorm
FallSpeed= How fast the snow will fall (0 for default based on strength of storm)
SQ_SnowMode= The snow's style of falling
1= Normal Style
2= Alternate Style
*Test out both and see which one you like best!
remend
rem Strength can't be 0
if Strength=0 then Strength=1
rem if fallspeed is 0 then set it to the default based on strength
if FallSpeed=0 then FallSpeed=Strength/4.0
rem Snow mode can't be less than 1 or greater than 2. It has to be in range.
if SQ_SnowMode<1 or SQ_SnowMode>2 then SQ_SnowMode=1
rem Hide the snow if it should be hidden
if SQ_ShowSnow=0
for s = 1 to SQ_MaxSnow
exclude object on s
next s
exitfunction
endif
rem Snow mode 1:
if SQ_SnowMode=1
for s = 1 to SQ_MaxSnow
exclude object off s
p=SQ_Snow(s).obj
move object p,Strength
position object p,object position x(p),object position y(p)-FallSpeed,object position z(p)
if rnd(50)=0
sq_distance=(400+rnd(2000))
position object p,newxvalue(camera position x(Camera),camera angle y(camera),sq_distance),camera position y(Camera)+rnd(Object Size Y(p,1)/8),newzvalue(camera position z(Camera),camera angle y(camera),sq_distance)
point object p,camera position x(Camera),camera position y(Camera),camera position z(Camera)
yrotate object p,object angle y(p)-45+rnd(90)
endif
next s
endif
rem Snow mode 2:
if SQ_SnowMode=2
for s = 1 to SQ_MaxSnow
exclude object off s
p=SQ_Snow(s).obj
scroll object texture p,-0.004*Strength,0.002*Strength
move object p,Strength
if rnd(50)=0
position object p,camera position x(Camera),camera position y(Camera),camera position z(Camera)
rotate object p,rnd(180),camera angle y(Camera),rnd(359)
endif
next s
endif
Endfunction
Function SQ_FreeSnowOBJ()
t=0
repeat
inc t,1
until object exist(t)=0
Endfunction t