summaryrefslogtreecommitdiff
path: root/fobjects.c
diff options
context:
space:
mode:
Diffstat (limited to 'fobjects.c')
-rw-r--r--fobjects.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/fobjects.c b/fobjects.c
index f1fe8d3..acd8bac 100644
--- a/fobjects.c
+++ b/fobjects.c
@@ -131,8 +131,8 @@ static void
fobjectsMove (CompDisplay *d,
FObjectsObject *sf)
{
- float tmp = 1.0f / (101.0f - fobjectsGetSnowSpeed (d));
- int fobjectsUpdateDelay = fobjectsGetSnowUpdateDelay (d);
+ float tmp = 1.0f / (101.0f - fobjectsGetObjectSpeed (d));
+ int fobjectsUpdateDelay = fobjectsGetObjectUpdateDelay (d);
sf->x += (sf->xs * (float) fobjectsUpdateDelay) * tmp;
sf->y += (sf->ys * (float) fobjectsUpdateDelay) * tmp;
@@ -141,7 +141,7 @@ fobjectsMove (CompDisplay *d,
}
static Bool
-stepSnowPositions (void *closure)
+stepObjectPositions (void *closure)
{
CompScreen *s = closure;
int i, numObjects;
@@ -154,8 +154,8 @@ stepSnowPositions (void *closure)
return TRUE;
fobjectsObject = ss->allObjects;
- numObjects = fobjectsGetNumSnowflakes (s->display);
- onTop = fobjectsGetSnowOverWindows (s->display);
+ numObjects = fobjectsGetNumObjects (s->display);
+ onTop = fobjectsGetObjectOverWindows (s->display);
for (i = 0; i < numObjects; i++)
fobjectsThink(ss, fobjectsObject++);
@@ -221,7 +221,7 @@ mmRand (int min,
static void
setupDisplayList (FObjectsScreen *ss)
{
- float fobjectsSize = fobjectsGetSnowSize (ss->s->display);
+ float fobjectsSize = fobjectsGetObjectSize (ss->s->display);
ss->displayList = glGenLists (1);
@@ -264,8 +264,8 @@ beginRendering (FObjectsScreen *ss,
for (j = 0; j < ss->fobjectsTexturesLoaded; j++)
{
FObjectsObject *fobjectsObject = ss->allObjects;
- int i, numObjects = fobjectsGetNumSnowflakes (s->display);
- Bool fobjectsRotate = fobjectsGetSnowRotation (s->display);
+ int i, numObjects = fobjectsGetNumObjects (s->display);
+ Bool fobjectsRotate = fobjectsGetObjectRotation (s->display);
enableTexture (ss->s, &ss->fobjectsTex[j].tex,
COMP_TEXTURE_FILTER_GOOD);
@@ -290,7 +290,7 @@ beginRendering (FObjectsScreen *ss,
else
{
FObjectsObject *fobjectsObject = ss->allObjects;
- int i, numObjects = fobjectsGetNumSnowflakes (s->display);
+ int i, numObjects = fobjectsGetNumObjects (s->display);
for (i = 0; i < numObjects; i++)
{
@@ -325,14 +325,14 @@ fobjectsPaintOutput (CompScreen *s,
SNOW_SCREEN (s);
- if (ss->active && !fobjectsGetSnowOverWindows (s->display))
+ if (ss->active && !fobjectsGetObjectOverWindows (s->display))
mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
UNWRAP (ss, s, paintOutput);
status = (*s->paintOutput) (s, sa, transform, region, output, mask);
WRAP (ss, s, paintOutput, fobjectsPaintOutput);
- if (ss->active && fobjectsGetSnowOverWindows (s->display))
+ if (ss->active && fobjectsGetObjectOverWindows (s->display))
{
CompTransform sTransform = *transform;
@@ -365,7 +365,7 @@ fobjectsDrawWindow (CompWindow *w,
/* Check whether this is the Desktop Window */
if (ss->active && (w->type & CompWindowTypeDesktopMask) &&
- !fobjectsGetSnowOverWindows (w->screen->display))
+ !fobjectsGetObjectOverWindows (w->screen->display))
{
beginRendering (ss, w->screen);
}
@@ -380,27 +380,27 @@ initiateFObjectsObject (FObjectsScreen *ss,
/* TODO: possibly place objects based on FOV, instead of a cube. */
int boxing = fobjectsGetScreenBoxing (ss->s->display);
- switch (fobjectsGetSnowDirection (ss->s->display))
+ switch (fobjectsGetObjectDirection (ss->s->display))
{
- case SnowDirectionTopToBottom:
+ case ObjectDirectionTopToBottom:
sf->x = mmRand (-boxing, ss->s->width + boxing, 1);
sf->xs = mmRand (-1, 1, 500);
sf->y = mmRand (-300, 0, 1);
sf->ys = mmRand (1, 3, 1);
break;
- case SnowDirectionBottomToTop:
+ case ObjectDirectionBottomToTop:
sf->x = mmRand (-boxing, ss->s->width + boxing, 1);
sf->xs = mmRand (-1, 1, 500);
sf->y = mmRand (ss->s->height, ss->s->height + 300, 1);
sf->ys = -mmRand (1, 3, 1);
break;
- case SnowDirectionRightToLeft:
+ case ObjectDirectionRightToLeft:
sf->x = mmRand (ss->s->width, ss->s->width + 300, 1);
sf->xs = -mmRand (1, 3, 1);
sf->y = mmRand (-boxing, ss->s->height + boxing, 1);
sf->ys = mmRand (-1, 1, 500);
break;
- case SnowDirectionLeftToRight:
+ case ObjectDirectionLeftToRight:
sf->x = mmRand (-300, 0, 1);
sf->xs = mmRand (1, 3, 1);
sf->y = mmRand (-boxing, ss->s->height + boxing, 1);
@@ -417,7 +417,7 @@ initiateFObjectsObject (FObjectsScreen *ss,
}
static void
-setSnowflakeTexture (FObjectsScreen *ss,
+setObjectTexture (FObjectsScreen *ss,
FObjectsObject *sf)
{
if (ss->fobjectsTexturesLoaded)
@@ -425,11 +425,11 @@ setSnowflakeTexture (FObjectsScreen *ss,
}
static void
-updateSnowTextures (CompScreen *s)
+updateObjectTextures (CompScreen *s)
{
int i, count = 0;
- float fobjectsSize = fobjectsGetSnowSize(s->display);
- int numObjects = fobjectsGetNumSnowflakes(s->display);
+ float fobjectsSize = fobjectsGetObjectSize(s->display);
+ int numObjects = fobjectsGetNumObjects(s->display);
FObjectsObject *fobjectsObject;
SNOW_SCREEN (s);
@@ -499,7 +499,7 @@ updateSnowTextures (CompScreen *s)
ss->fobjectsTex = realloc (ss->fobjectsTex, sizeof (FObjectsTexture) * count);
for (i = 0; i < numObjects; i++)
- setSnowflakeTexture (ss, fobjectsObject++);
+ setObjectTexture (ss, fobjectsObject++);
}
static Bool
@@ -507,7 +507,7 @@ fobjectsInitScreen (CompPlugin *p,
CompScreen *s)
{
FObjectsScreen *ss;
- int i, numObjects = fobjectsGetNumSnowflakes (s->display);
+ int i, numObjects = fobjectsGetNumObjects (s->display);
FObjectsObject *fobjectsObject;
SNOW_DISPLAY (s->display);
@@ -534,18 +534,18 @@ fobjectsInitScreen (CompPlugin *p,
for (i = 0; i < numObjects; i++)
{
initiateFObjectsObject (ss, fobjectsObject);
- setSnowflakeTexture (ss, fobjectsObject);
+ setObjectTexture (ss, fobjectsObject);
fobjectsObject++;
}
- updateSnowTextures (s);
+ updateObjectTextures (s);
setupDisplayList (ss);
WRAP (ss, s, paintOutput, fobjectsPaintOutput);
WRAP (ss, s, drawWindow, fobjectsDrawWindow);
- ss->timeoutHandle = compAddTimeout (fobjectsGetSnowUpdateDelay (s->display),
- stepSnowPositions, s);
+ ss->timeoutHandle = compAddTimeout (fobjectsGetObjectUpdateDelay (s->display),
+ stepObjectPositions, s);
return TRUE;
}
@@ -588,7 +588,7 @@ fobjectsDisplayOptionChanged (CompDisplay *d,
switch (num)
{
- case FobjectsDisplayOptionSnowSize:
+ case FobjectsDisplayOptionObjectSize:
{
CompScreen *s;
@@ -596,11 +596,11 @@ fobjectsDisplayOptionChanged (CompDisplay *d,
{
SNOW_SCREEN (s);
ss->displayListNeedsUpdate = TRUE;
- updateSnowTextures (s);
+ updateObjectTextures (s);
}
}
break;
- case FobjectsDisplayOptionSnowUpdateDelay:
+ case FobjectsDisplayOptionObjectUpdateDelay:
{
CompScreen *s;
@@ -611,18 +611,18 @@ fobjectsDisplayOptionChanged (CompDisplay *d,
if (ss->timeoutHandle)
compRemoveTimeout (ss->timeoutHandle);
ss->timeoutHandle =
- compAddTimeout (fobjectsGetSnowUpdateDelay (d),
- stepSnowPositions, s);
+ compAddTimeout (fobjectsGetObjectUpdateDelay (d),
+ stepObjectPositions, s);
}
}
break;
- case FobjectsDisplayOptionNumSnowflakes:
+ case FobjectsDisplayOptionNumObjects:
{
CompScreen *s;
int i, numObjects;
FObjectsObject *fobjectsObject;
- numObjects = fobjectsGetNumSnowflakes (d);
+ numObjects = fobjectsGetNumObjects (d);
for (s = d->screens; s; s = s->next)
{
SNOW_SCREEN (s);
@@ -633,24 +633,24 @@ fobjectsDisplayOptionChanged (CompDisplay *d,
for (i = 0; i < numObjects; i++)
{
initiateFObjectsObject (ss, fobjectsObject);
- setSnowflakeTexture (ss, fobjectsObject);
+ setObjectTexture (ss, fobjectsObject);
fobjectsObject++;
}
}
}
break;
- case FobjectsDisplayOptionSnowTextures:
+ case FobjectsDisplayOptionObjectTextures:
{
CompScreen *s;
CompOption *texOpt;
- texOpt = fobjectsGetSnowTexturesOption (d);
+ texOpt = fobjectsGetObjectTexturesOption (d);
sd->fobjectsTexFiles = texOpt->value.list.value;
sd->fobjectsTexNFiles = texOpt->value.list.nValue;
for (s = d->screens; s; s = s->next)
- updateSnowTextures (s);
+ updateObjectTextures (s);
}
break;
default:
@@ -680,12 +680,12 @@ fobjectsInitDisplay (CompPlugin *p,
}
fobjectsSetToggleKeyInitiate (d, fobjectsToggle);
- fobjectsSetNumSnowflakesNotify (d, fobjectsDisplayOptionChanged);
- fobjectsSetSnowSizeNotify (d, fobjectsDisplayOptionChanged);
- fobjectsSetSnowUpdateDelayNotify (d, fobjectsDisplayOptionChanged);
- fobjectsSetSnowTexturesNotify (d, fobjectsDisplayOptionChanged);
+ fobjectsSetNumObjectsNotify (d, fobjectsDisplayOptionChanged);
+ fobjectsSetObjectSizeNotify (d, fobjectsDisplayOptionChanged);
+ fobjectsSetObjectUpdateDelayNotify (d, fobjectsDisplayOptionChanged);
+ fobjectsSetObjectTexturesNotify (d, fobjectsDisplayOptionChanged);
- texOpt = fobjectsGetSnowTexturesOption (d);
+ texOpt = fobjectsGetObjectTexturesOption (d);
sd->fobjectsTexFiles = texOpt->value.list.value;
sd->fobjectsTexNFiles = texOpt->value.list.nValue;