[beryl-commits] Animation plugin: Changes to 'master' (bca74a5898c8976c7d0beea0ac72aaecb2d29c57)
maniac at server.beryl-project.org
maniac at server.beryl-project.org
Sat Jun 23 12:51:51 CEST 2007
New commits:
commit bca74a5898c8976c7d0beea0ac72aaecb2d29c57
Author: Danny Baumann <dannybaumann at web.de>
Date: Sat Jun 23 12:51:22 2007 +0200
dded comments noting that the NUM_EFFECT macros and the actual list size never should become out of sync.
commit 9da430e54296a251ef97d323ba784fd41ae63e88
Author: Danny Baumann <dannybaumann at web.de>
Date: Sat Jun 23 12:50:12 2007 +0200
Add prefix to display private index variable to prevent symbol conflicts.
commit 02f86deac139959d6bbdb64416d716ed2657bc09
Author: Danny Baumann <dannybaumann at web.de>
Date: Sat Jun 23 12:48:59 2007 +0200
Function and variable scope cleanup.
Sort prototypes in header files and get rid of the tiny source-file specific header files.
Move polygon and particle set specific functions to polygon.c / particle.c.
animation-internal.h | 342 ++++++++++++++++++++++++++++++++++++++++++++------
animation.c | 70 ++---------
beamup.c | 3 +-
beamup.h | 5 -
burn.c | 23 +---
burn.h | 6 -
curvedfold.c | 3 +-
curvedfold.h | 3 -
dodge.c | 5 +-
dodge.h | 6 -
domino.c | 1 -
domino.h | 2 -
dream.c | 3 +-
explode3d.c | 1 -
explode3d.h | 2 -
fade.c | 1 -
fade.h | 2 -
focusfade.c | 1 -
focusfade.h | 3 -
glide.c | 3 +-
glide.h | 7 -
horizontalfold.c | 3 +-
horizontalfold.h | 4 -
leafspread.c | 1 -
leafspread.h | 2 -
magiclamp.c | 3 +-
magiclamp.h | 14 --
particle.c | 18 +++
polygon.c | 41 ++++++-
rollup.c | 3 +-
rollup.h | 4 -
wave.c | 3 +-
wave.h | 9 --
zoomside.c | 7 +-
zoomside.h | 6 -
35 files changed, 386 insertions(+), 224 deletions(-)
delete mode 100644 beamup.h
delete mode 100644 burn.h
delete mode 100644 curvedfold.h
delete mode 100644 dodge.h
delete mode 100644 domino.h
delete mode 100644 explode3d.h
delete mode 100644 fade.h
delete mode 100644 focusfade.h
delete mode 100644 glide.h
delete mode 100644 horizontalfold.h
delete mode 100644 leafspread.h
delete mode 100644 magiclamp.h
delete mode 100644 rollup.h
delete mode 100644 wave.h
delete mode 100644 zoomside.h
Modified: fusion/plugins/animation/animation-internal.h
===================================================================
--- fusion/plugins/animation/animation-internal.h
+++ fusion/plugins/animation/animation-internal.h
@@ -302,6 +302,13 @@ typedef enum
#define RANDOM_EFFECT_OFFSET 2 /* skip none and random */
+/* These macros definitions _always_ must match the number
+ of array items in the corresponding EffectType structure
+ in animation.c.
+ LAST_*_EFFECT always must be NUM_*_EFFECT - 1
+ LAST_RANDOM_*_EFFECT always must be LAST_*_EFFECT - RANDOM_EFFECT_OFFSET
+ */
+
#define NUM_MINIMIZE_EFFECT 17
#define LAST_MINIMIZE_EFFECT 16
#define LAST_RANDOM_MINIMIZE_EFFECT 14
@@ -324,7 +331,7 @@ typedef struct RestackInfo
Bool raised;
} RestackInfo;
-extern int displayPrivateIndex;
+extern int animDisplayPrivateIndex;
extern CompMetadata animMetadata;
typedef struct _AnimDisplay
@@ -583,7 +590,7 @@ typedef struct _AnimEffectProperties
AnimEffectProperties *animEffectPropertiesTmp;
#define GET_ANIM_DISPLAY(d) \
- ((AnimDisplay *) (d)->privates[displayPrivateIndex].ptr)
+ ((AnimDisplay *) (d)->privates[animDisplayPrivateIndex].ptr)
#define ANIM_DISPLAY(d) \
AnimDisplay *ad = GET_ANIM_DISPLAY (d)
@@ -626,74 +633,329 @@ AnimEffectProperties *animEffectPropertiesTmp;
#define SPRING_PERCEIVED_T 0.5f
//0.52884f
+/*
+ * Function prototypes
+ *
+ */
+
+/* animation.c*/
+
+ void
+modelInitObjects (Model * model,
+ int x, int y,
+ int width, int height);
+
+void
+postAnimationCleanup (CompWindow * w,
+ Bool resetAnimation);
+
+void
+modelCalcBounds (Model * model);
+
+float
+defaultAnimProgress (AnimWindow * aw);
+
+float
+decelerateProgressCustom (float progress,
+ float minx, float maxx);
+
+float
+decelerateProgress2 (float progress);
+
+void
+applyTransformToObject (Object *obj, GLfloat *mat);
+
+void
+obtainTransformMatrix (CompScreen *s, GLfloat *mat,
+ float rotAngle, Vector3d rotAxis,
+ Point3d translation);
+
+void polygonsAnimStep (CompScreen * s,
+ CompWindow * w,
+ float time);
+
+AnimDirection
+getAnimationDirection (CompWindow * w,
+ CompOptionValue *value,
+ Bool openDir);
+
+void
+defaultAnimStep (CompScreen * s,
+ CompWindow * w,
+ float time);
+
+void
+defaultAnimInit (CompScreen * s,
+ CompWindow * w);
void
-modelInitObjects(Model * model, int x, int y, int width, int height);
+animDrawWindowGeometry(CompWindow * w);
+
+
+/* beamup.c */
void
-postAnimationCleanup(CompWindow * w, Bool resetAnimation);
+fxBeamupUpdateWindowAttrib (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
-void modelCalcBounds(Model * model);
+void
+fxBeamUpModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
-float defaultAnimProgress(AnimWindow * aw);
+void fxBeamUpInit (CompScreen *s,
+ CompWindow *w);
-float decelerateProgressCustom(float progress, float minx, float maxx);
-float decelerateProgress2(float progress);
+/* burn.c */
void
-applyTransformToObject(Object *obj, GLfloat *mat);
+fxBurnModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
+
+void fxBurnInit (CompScreen *s,
+ CompWindow *w);
+
+
+/* curvedfold.c */
void
-obtainTransformMatrix (CompScreen *s, GLfloat *mat,
- float rotAngle, Vector3d rotAxis,
- Point3d translation);
+fxCurvedFoldModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
+
+
+/* dodge.c */
+
+void
+fxDodgePostPreparePaintScreen (CompScreen *s,
+ CompWindow *w);
-void polygonsAnimStep(CompScreen * s, CompWindow * w, float time);
+void
+fxDodgeUpdateWindowTransform (CompScreen *s,
+ CompWindow *w,
+ CompTransform *wTransform);
-AnimDirection getAnimationDirection(CompWindow * w,
- CompOptionValue *value,
- Bool openDir);
+void
+fxDodgeAnimStep (CompScreen *s,
+ CompWindow *w,
+ float time);
-void defaultAnimStep(CompScreen * s, CompWindow * w, float time);
+/* domino.c */
-void defaultAnimInit(CompScreen * s, CompWindow * w);
+void
+fxDomino3DInit (CompScreen *s,
+ CompWindow *w);
-void freePolygonObjects(PolygonSet * pset);
-void freeClipsPolygons(PolygonSet * pset);
+/* dream.c */
-void freePolygonSet(AnimWindow * aw);
+void
+fxDreamModelStep (CompScreen * s,
+ CompWindow * w,
+ float time);
-Bool
-tessellateIntoRectangles(CompWindow * w,
- int gridSizeX, int gridSizeY, float thickness);
+void
+fxDreamUpdateWindowAttrib(AnimScreen * as,
+ AnimWindow * aw,
+ WindowPaintAttrib * wAttrib);
-Bool
-tessellateIntoHexagons(CompWindow * w,
- int gridSizeX, int gridSizeY, float thickness);
+
+/* explode3d.c */
+
+void
+fxExplode3DInit (CompScreen *s,
+ CompWindow *w);
+
+
+/* fade.c */
+
+void
+fxFadeUpdateWindowAttrib (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
+
+
+/* focusfade.c */
+
+void
+fxFocusFadeUpdateWindowAttrib2 (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
+
+void
+fxFocusFadeUpdateWindowAttrib (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
+
+
+/* glide.c */
+
+void
+fxGlideInit (CompScreen *s,
+ CompWindow *w);
+
+void
+fxGlideUpdateWindowAttrib (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
+
+void
+fxGlideAnimStep (CompScreen *s,
+ CompWindow *w,
+ float time);
+
+float
+fxGlideAnimProgress (AnimWindow *aw);
+
+void
+fxGlideGetParams (AnimScreen *as,
+ AnimWindow *aw,
+ float *finalDistFac,
+ float *finalRotAng,
+ float *thickness);
+
+
+/* horizontalfold.c */
+
+void
+fxHorizontalFoldsModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
+
+void
+fxHorizontalFoldsInitGrid (AnimScreen *as,
+ WindowEvent forWindowEvent,
+ int *gridWidth,
+ int *gridHeight);
+
+
+/* leafspread.c */
+
+void
+fxLeafSpread3DInit (CompScreen *s,
+ CompWindow *w);
+
+
+/* magiclamp.c */
+
+void
+fxMagicLampInitGrid(AnimScreen * as,
+ WindowEvent forWindowEvent,
+ int *gridWidth,
+ int *gridHeight);
+
+void
+fxMagicLampVacuumInitGrid (AnimScreen * as,
+ WindowEvent forWindowEvent,
+ int *gridWidth,
+ int *gridHeight);
void
-polygonsStoreClips(CompScreen * s, CompWindow * w,
- int nClip, BoxPtr pClip, int nMatrix, CompMatrix * matrix);
+fxMagicLampInit (CompScreen * s,
+ CompWindow * w);
+
+void
+fxMagicLampModelStep (CompScreen * s,
+ CompWindow * w,
+ float time);
+
+
+/* particle.c */
+
+void
+initParticles (int numParticles,
+ ParticleSystem * ps);
+
+void
+drawParticles (CompScreen * s,
+ CompWindow * w,
+ ParticleSystem * ps);
+
+void
+updateParticles (ParticleSystem * ps,
+ float time);
+
+void
+finiParticles (ParticleSystem * ps);
+
+void
+drawParticleSystems (CompScreen *s,
+ CompWindow *w);
-Bool processIntersectingPolygons(CompScreen * s, PolygonSet * pset);
-void polygonsDrawCustomGeometry(CompScreen * s, CompWindow * w);
+/* polygon.c */
-void polygonsPrePaintWindow(CompScreen * s, CompWindow * w);
+Bool
+tessellateIntoRectangles (CompWindow * w,
+ int gridSizeX,
+ int gridSizeY,
+ float thickness);
+
+ Bool
+tessellateIntoHexagons (CompWindow * w,
+ int gridSizeX,
+ int gridSizeY,
+ float thickness);
+
+ void
+polygonsStoreClips (CompScreen * s,
+ CompWindow * w,
+ int nClip, BoxPtr pClip,
+ int nMatrix, CompMatrix * matrix);
+
+void
+polygonsDrawCustomGeometry (CompScreen * s,
+ CompWindow * w);
-void polygonsPostPaintWindow(CompScreen * s, CompWindow * w);
+void
+polygonsPrePaintWindow (CompScreen * s,
+ CompWindow * w);
+
+void
+polygonsPostPaintWindow (CompScreen * s,
+ CompWindow * w);
+
+void
+freePolygonSet (AnimWindow * aw);
+
+
+/* rollup.c */
+
+void
+fxRollUpModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
+
+void fxRollUpInitGrid (AnimScreen *as,
+ WindowEvent forWindowEvent,
+ int *gridWidth,
+ int *gridHeight);
+
+
+/* wave.c */
+
+void
+fxWaveModelStep (CompScreen * s,
+ CompWindow * w,
+ float time);
-Bool ensureLargerClipCapacity(PolygonSet * pset);
+/* zoomside.c */
-void initParticles(int numParticles, ParticleSystem * ps);
-void drawParticles(CompScreen * s, CompWindow * w, ParticleSystem * ps);
-void updateParticles(ParticleSystem * ps, float time);
-void finiParticles(ParticleSystem * ps);
+void
+fxZoomUpdateWindowAttrib (AnimScreen *as,
+ AnimWindow *aw,
+ WindowPaintAttrib *wAttrib);
-void cleanUpParentChildChainItem(AnimScreen *as, AnimWindow *aw);
+void
+fxZoomModelStep (CompScreen *s,
+ CompWindow *w,
+ float time);
-void animDrawWindowGeometry(CompWindow * w);
+void
+fxSidekickInit (CompScreen *s,
+ CompWindow *w);
Modified: fusion/plugins/animation/animation.c
===================================================================
--- fusion/plugins/animation/animation.c
+++ fusion/plugins/animation/animation.c
@@ -77,26 +77,16 @@
#include "animation-internal.h"
-#include "beamup.h"
-#include "burn.h"
-#include "curvedfold.h"
-#include "dodge.h"
-#include "domino.h"
-#include "dream.h"
-#include "explode3d.h"
-#include "fade.h"
-#include "focusfade.h"
-#include "glide.h"
-#include "horizontalfold.h"
-#include "leafspread.h"
-#include "magiclamp.h"
-#include "rollup.h"
-#include "wave.h"
-#include "zoomside.h"
-
-int displayPrivateIndex;
+int animDisplayPrivateIndex;
CompMetadata animMetadata;
+/*
+ * NOTE:
+ * Be sure to always update the NUM_EFFECT_TYPE
+ * macro definitions in animation-internal.h whenever
+ * elements of these arrays are added or removed.
+ */
+
static AnimEffect minimizeEffectType[] = {
AnimEffectNone,
AnimEffectRandom,
@@ -257,40 +247,6 @@ void modelCalcBounds(Model * model)
}
}
-Bool ensureLargerClipCapacity(PolygonSet * pset)
-{
- if (pset->clipCapacity == pset->nClips) // if list full
- {
- Clip4Polygons *newList = realloc
- (pset->clips, sizeof(Clip4Polygons) *
- (pset->clipCapacity + ANIM_CLIP_LIST_INCREMENT));
- if (!newList)
- return FALSE;
- // reset newly allocated part of this memory to 0
- memset(newList + pset->clipCapacity,
- 0, sizeof(Clip4Polygons) * ANIM_CLIP_LIST_INCREMENT);
-
- int *newList2 = realloc
- (pset->lastClipInGroup, sizeof(int) *
- (pset->clipCapacity + ANIM_CLIP_LIST_INCREMENT));
- if (!newList2)
- {
- free(newList);
- pset->clips = 0;
- pset->lastClipInGroup = 0;
- return FALSE;
- }
- // reset newly allocated part of this memory to 0
- memset(newList2 + pset->clipCapacity,
- 0, sizeof(int) * ANIM_CLIP_LIST_INCREMENT);
-
- pset->clips = newList;
- pset->clipCapacity += ANIM_CLIP_LIST_INCREMENT;
- pset->lastClipInGroup = newList2;
- }
- return TRUE;
-}
-
float defaultAnimProgress(AnimWindow * aw)
{
float forwardProgress =
@@ -1149,7 +1105,7 @@ static Bool playingPolygonEffect(AnimScreen *as, AnimWindow *aw)
return (thickness > 1e-5); // glide is 3D if thickness > 0
}
-void cleanUpParentChildChainItem(AnimScreen *as, AnimWindow *aw)
+static void cleanUpParentChildChainItem(AnimScreen *as, AnimWindow *aw)
{
if (aw->winThisIsPaintedBefore && !aw->winThisIsPaintedBefore->destroyed)
{
@@ -3811,7 +3767,7 @@ static Bool animInitDisplay(CompPlugin * p, CompDisplay * d)
WRAP(ad, d, handleEvent, animHandleEvent);
WRAP(ad, d, handleCompizEvent, animHandleCompizEvent);
- d->privates[displayPrivateIndex].ptr = ad;
+ d->privates[animDisplayPrivateIndex].ptr = ad;
return TRUE;
}
@@ -4047,8 +4003,8 @@ static Bool animInit(CompPlugin * p)
ANIM_SCREEN_OPTION_NUM))
return FALSE;
- displayPrivateIndex = allocateDisplayPrivateIndex();
- if (displayPrivateIndex < 0)
+ animDisplayPrivateIndex = allocateDisplayPrivateIndex();
+ if (animDisplayPrivateIndex < 0)
{
compFiniMetadata (&animMetadata);
return FALSE;
@@ -4062,7 +4018,7 @@ static Bool animInit(CompPlugin * p)
static void animFini(CompPlugin * p)
{
- freeDisplayPrivateIndex(displayPrivateIndex);
+ freeDisplayPrivateIndex(animDisplayPrivateIndex);
compFiniMetadata (&animMetadata);
}
Modified: fusion/plugins/animation/beamup.c
===================================================================
--- fusion/plugins/animation/beamup.c
+++ fusion/plugins/animation/beamup.c
@@ -36,7 +36,6 @@
#include "animation-internal.h"
#include "animation_tex.h"
-#include "beamup.h"
// ===================== Effect: Beam Up =========================
@@ -92,7 +91,7 @@ void fxBeamUpInit(CompScreen * s, CompWindow * w)
}
-void
+static void
fxBeamUpGenNewFire(CompScreen * s, ParticleSystem * ps, int x, int y,
int width, int height, float size, float time)
{
Modified: fusion/plugins/animation/beamup.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/beamup.h
+++ /dev/null
@@ -1,5 +0,0 @@
-
-void fxBeamupUpdateWindowAttrib(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
-void fxBeamUpModelStep(CompScreen *s,CompWindow *w,float time);
-void fxBeamUpGenNewFire(CompScreen *s,ParticleSystem *ps,int x,int y,int width,int height,float size,float time);
-void fxBeamUpInit(CompScreen *s,CompWindow *w);
Modified: fusion/plugins/animation/burn.c
===================================================================
--- fusion/plugins/animation/burn.c
+++ fusion/plugins/animation/burn.c
@@ -36,7 +36,6 @@
#include "animation-internal.h"
#include "animation_tex.h"
-#include "burn.h"
// ===================== Effect: Burn =========================
@@ -101,7 +100,7 @@ void fxBurnInit(CompScreen * s, CompWindow * w)
}
}
-void
+static void
fxBurnGenNewFire(CompScreen * s, ParticleSystem * ps, int x, int y,
int width, int height, float size, float time)
{
@@ -192,7 +191,7 @@ fxBurnGenNewFire(CompScreen * s, ParticleSystem * ps, int x, int y,
}
-void
+static void
fxBurnGenNewSmoke(CompScreen * s, ParticleSystem * ps, int x, int y,
int width, int height, float size, float time)
{
@@ -441,21 +440,3 @@ void fxBurnModelStep(CompScreen * s, CompWindow * w, float time)
modelCalcBounds(model);
}
-void drawParticleSystems(CompScreen * s, CompWindow * w)
-{
- ANIM_WINDOW(w);
-
- if (aw->numPs)
- {
- int i = 0;
-
- for (i = 0; i < aw->numPs; i++)
- {
- if (aw->ps[i].active && !WINDOW_INVISIBLE(w))
- {
- drawParticles(s, w, &aw->ps[i]);
- }
- }
- }
-}
-
Modified: fusion/plugins/animation/burn.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/burn.h
+++ /dev/null
@@ -1,6 +0,0 @@
-
-void drawParticleSystems(CompScreen *s,CompWindow *w);
-void fxBurnModelStep(CompScreen *s,CompWindow *w,float time);
-void fxBurnGenNewSmoke(CompScreen *s,ParticleSystem *ps,int x,int y,int width,int height,float size,float time);
-void fxBurnGenNewFire(CompScreen *s,ParticleSystem *ps,int x,int y,int width,int height,float size,float time);
-void fxBurnInit(CompScreen *s,CompWindow *w);
Modified: fusion/plugins/animation/curvedfold.c
===================================================================
--- fusion/plugins/animation/curvedfold.c
+++ fusion/plugins/animation/curvedfold.c
@@ -35,11 +35,10 @@
*/
#include "animation-internal.h"
-#include "curvedfold.h"
// ===================== Effect: Curved Fold =========================
-void
+static void
fxCurvedFoldModelStepObject(CompWindow * w,
Model * model,
Object * object,
Modified: fusion/plugins/animation/curvedfold.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/curvedfold.h
+++ /dev/null
@@ -1,3 +0,0 @@
-
-void fxCurvedFoldModelStep(CompScreen *s,CompWindow *w,float time);
-void fxCurvedFoldModelStepObject(CompWindow *w,Model *model,Object *object,float forwardProgress,float curveMaxAmp);
Modified: fusion/plugins/animation/dodge.c
===================================================================
--- fusion/plugins/animation/dodge.c
+++ fusion/plugins/animation/dodge.c
@@ -35,11 +35,10 @@
*/
#include "animation-internal.h"
-#include "dodge.h"
// ===================== Effect: Dodge =========================
-void
+static void
fxDodgeProcessSubject (CompWindow *wCur,
Region wRegion,
Region dodgeRegion,
@@ -64,7 +63,7 @@ fxDodgeProcessSubject (CompWindow *wCur,
XUnionRegion(dodgeRegion, wCurRegion, dodgeRegion);
}
-void
+static void
fxDodgeFindDodgeBox (CompWindow *w, XRectangle *dodgeBox)
{
ANIM_SCREEN(w->screen);
Modified: fusion/plugins/animation/dodge.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/dodge.h
+++ /dev/null
@@ -1,6 +0,0 @@
-void fxDodgeProcessSubject (CompWindow *wCur, Region wRegion,
- Region dodgeRegion, Bool alwaysInclude);
-void fxDodgeFindDodgeBox (CompWindow *w, XRectangle *dodgeBox);
-void fxDodgePostPreparePaintScreen (CompScreen *s,CompWindow *w);
-void fxDodgeUpdateWindowTransform (CompScreen *s,CompWindow *w,CompTransform *wTransform);
-void fxDodgeAnimStep (CompScreen *s,CompWindow *w,float time);
Modified: fusion/plugins/animation/domino.c
===================================================================
--- fusion/plugins/animation/domino.c
+++ fusion/plugins/animation/domino.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "domino.h"
void fxDomino3DInit(CompScreen * s, CompWindow * w)
{
Modified: fusion/plugins/animation/domino.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/domino.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void fxDomino3DInit(CompScreen *s,CompWindow *w);
Modified: fusion/plugins/animation/dream.c
===================================================================
--- fusion/plugins/animation/dream.c
+++ fusion/plugins/animation/dream.c
@@ -35,9 +35,8 @@
*/
#include "animation-internal.h"
-#include "dream.h"
-void
+static void
fxDreamModelStepObject(CompWindow * w,
Model * model, Object * object, float forwardProgress)
{
Modified: fusion/plugins/animation/explode3d.c
===================================================================
--- fusion/plugins/animation/explode3d.c
+++ fusion/plugins/animation/explode3d.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "explode3d.h"
void fxExplode3DInit(CompScreen * s, CompWindow * w)
{
Modified: fusion/plugins/animation/explode3d.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/explode3d.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void fxExplode3DInit(CompScreen *s,CompWindow *w);
Modified: fusion/plugins/animation/fade.c
===================================================================
--- fusion/plugins/animation/fade.c
+++ fusion/plugins/animation/fade.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "fade.h"
// ===================== Effect: Fade =========================
Modified: fusion/plugins/animation/fade.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/fade.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void fxFadeUpdateWindowAttrib(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
Modified: fusion/plugins/animation/focusfade.c
===================================================================
--- fusion/plugins/animation/focusfade.c
+++ fusion/plugins/animation/focusfade.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "focusfade.h"
// ===================== Effect: Focus Fade =========================
Modified: fusion/plugins/animation/focusfade.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/focusfade.h
+++ /dev/null
@@ -1,3 +0,0 @@
-
-void fxFocusFadeUpdateWindowAttrib2(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
-void fxFocusFadeUpdateWindowAttrib(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
Modified: fusion/plugins/animation/glide.c
===================================================================
--- fusion/plugins/animation/glide.c
+++ fusion/plugins/animation/glide.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "glide.h"
// ===================== Effect: Glide =========================
@@ -77,7 +76,7 @@ float fxGlideAnimProgress(AnimWindow * aw)
return decelerateProgress2(forwardProgress);
}
-void
+static void
fxGlideModelStepObject(CompWindow * w,
Model * model,
Object * obj,
Modified: fusion/plugins/animation/glide.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/glide.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-void fxGlideInit(CompScreen *s,CompWindow *w);
-void fxGlideUpdateWindowAttrib(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
-void fxGlideAnimStep(CompScreen *s,CompWindow *w,float time);
-void fxGlideModelStepObject(CompWindow *w,Model *model,Object *obj,GLfloat *mat,Point3d rotAxisOffset);
-float fxGlideAnimProgress(AnimWindow *aw);
-void fxGlideGetParams(AnimScreen *as,AnimWindow *aw,float *finalDistFac,float *finalRotAng,float *thickness);
Modified: fusion/plugins/animation/horizontalfold.c
===================================================================
--- fusion/plugins/animation/horizontalfold.c
+++ fusion/plugins/animation/horizontalfold.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "horizontalfold.h"
// ===================== Effect: Horizontal Folds =========================
@@ -55,7 +54,7 @@ fxHorizontalFoldsInitGrid(AnimScreen * as,
as->opt[ANIM_SCREEN_OPTION_HORIZONTAL_FOLDS_NUM_FOLDS].value.i;
}
-void
+static void
fxHorizontalFoldsModelStepObject(CompWindow * w,
Model * model,
Object * object,
Modified: fusion/plugins/animation/horizontalfold.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/horizontalfold.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-void fxHorizontalFoldsModelStep(CompScreen *s,CompWindow *w,float time);
-void fxHorizontalFoldsModelStepObject(CompWindow *w,Model *model,Object *object,float forwardProgress,float curveMaxAmp,int rowNo);
-void fxHorizontalFoldsInitGrid(AnimScreen *as,WindowEvent forWindowEvent,int *gridWidth,int *gridHeight);
Modified: fusion/plugins/animation/leafspread.c
===================================================================
--- fusion/plugins/animation/leafspread.c
+++ fusion/plugins/animation/leafspread.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "leafspread.h"
void fxLeafSpread3DInit(CompScreen * s, CompWindow * w)
{
Modified: fusion/plugins/animation/leafspread.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/leafspread.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void fxLeafSpread3DInit(CompScreen *s,CompWindow *w);
Modified: fusion/plugins/animation/magiclamp.c
===================================================================
--- fusion/plugins/animation/magiclamp.c
+++ fusion/plugins/animation/magiclamp.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "magiclamp.h"
void
fxMagicLampInitGrid(AnimScreen * as,
@@ -138,7 +137,7 @@ void fxMagicLampInit(CompScreen * s, CompWindow * w)
model->magicLampWaveCount = 0;
}
-void
+static void
fxMagicLampModelStepObject(CompWindow * w,
Model * model,
Object * object,
Modified: fusion/plugins/animation/magiclamp.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/magiclamp.h
+++ /dev/null
@@ -1,14 +0,0 @@
-void
-fxMagicLampInitGrid(AnimScreen * as,
- WindowEvent forWindowEvent,
- int *gridWidth, int *gridHeight);
-void
-fxMagicLampVacuumInitGrid(AnimScreen * as, WindowEvent forWindowEvent,
- int *gridWidth, int *gridHeight);
-void fxMagicLampInit(CompScreen * s, CompWindow * w);
-void
-fxMagicLampModelStepObject(CompWindow * w,
- Model * model,
- Object * object,
- float forwardProgress, Bool minimizeToTop);
-void fxMagicLampModelStep(CompScreen * s, CompWindow * w, float time);
Modified: fusion/plugins/animation/particle.c
===================================================================
--- fusion/plugins/animation/particle.c
+++ fusion/plugins/animation/particle.c
@@ -279,6 +279,24 @@ void drawParticles(CompScreen * s, CompWindow * w, ParticleSystem * ps)
glDisable(GL_BLEND);
}
+void drawParticleSystems(CompScreen * s, CompWindow * w)
+{
+ ANIM_WINDOW(w);
+
+ if (aw->numPs)
+ {
+ int i = 0;
+
+ for (i = 0; i < aw->numPs; i++)
+ {
+ if (aw->ps[i].active && !WINDOW_INVISIBLE(w))
+ {
+ drawParticles(s, w, &aw->ps[i]);
+ }
+ }
+ }
+}
+
void updateParticles(ParticleSystem * ps, float time)
{
int i;
Modified: fusion/plugins/animation/polygon.c
===================================================================
--- fusion/plugins/animation/polygon.c
+++ fusion/plugins/animation/polygon.c
@@ -1,6 +1,41 @@
#include "animation-internal.h"
+
+static Bool ensureLargerClipCapacity(PolygonSet * pset)
+{
+ if (pset->clipCapacity == pset->nClips) // if list full
+ {
+ Clip4Polygons *newList = realloc
+ (pset->clips, sizeof(Clip4Polygons) *
+ (pset->clipCapacity + ANIM_CLIP_LIST_INCREMENT));
+ if (!newList)
+ return FALSE;
+ // reset newly allocated part of this memory to 0
+ memset(newList + pset->clipCapacity,
+ 0, sizeof(Clip4Polygons) * ANIM_CLIP_LIST_INCREMENT);
+
+ int *newList2 = realloc
+ (pset->lastClipInGroup, sizeof(int) *
+ (pset->clipCapacity + ANIM_CLIP_LIST_INCREMENT));
+ if (!newList2)
+ {
+ free(newList);
+ pset->clips = 0;
+ pset->lastClipInGroup = 0;
+ return FALSE;
+ }
+ // reset newly allocated part of this memory to 0
+ memset(newList2 + pset->clipCapacity,
+ 0, sizeof(int) * ANIM_CLIP_LIST_INCREMENT);
+
+ pset->clips = newList;
+ pset->clipCapacity += ANIM_CLIP_LIST_INCREMENT;
+ pset->lastClipInGroup = newList2;
+ }
+ return TRUE;
+}
+
// Frees up polygon objects in pset
-void freePolygonObjects(PolygonSet * pset)
+static void freePolygonObjects(PolygonSet * pset)
{
PolygonObject *p = pset->polygons;
@@ -44,7 +79,7 @@ void freePolygonObjects(PolygonSet * pset)
}
// Frees up intersecting polygon info of PolygonSet clips
-void freeClipsPolygons(PolygonSet * pset)
+static void freeClipsPolygons(PolygonSet * pset)
{
int k;
@@ -869,7 +904,7 @@ polygonsStoreClips(CompScreen * s, CompWindow * w,
// have a bounding box that intersects the clip. For intersecting
// polygons, it computes the texture coordinates for the vertices
// of that polygon (to draw the clip texture).
-Bool processIntersectingPolygons(CompScreen * s, PolygonSet * pset)
+static Bool processIntersectingPolygons(CompScreen * s, PolygonSet * pset)
{
int j;
Modified: fusion/plugins/animation/rollup.c
===================================================================
--- fusion/plugins/animation/rollup.c
+++ fusion/plugins/animation/rollup.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "rollup.h"
// ===================== Effect: Roll Up =========================
@@ -51,7 +50,7 @@ fxRollUpInitGrid(AnimScreen * as,
*gridHeight = 2;
}
-void
+static void
fxRollUpModelStepObject(CompWindow * w,
Model * model,
Object * object,
Modified: fusion/plugins/animation/rollup.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/rollup.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-void fxRollUpModelStep(CompScreen *s,CompWindow *w,float time);
-void fxRollUpModelStepObject(CompWindow *w,Model *model,Object *object,float forwardProgress,Bool fixedInterior);
-void fxRollUpInitGrid(AnimScreen *as,WindowEvent forWindowEvent,int *gridWidth,int *gridHeight);
Modified: fusion/plugins/animation/wave.c
===================================================================
--- fusion/plugins/animation/wave.c
+++ fusion/plugins/animation/wave.c
@@ -35,11 +35,10 @@
*/
#include "animation-internal.h"
-#include "wave.h"
// ===================== Effect: Wave =========================
-void
+static void
fxWaveModelStepObject(CompWindow * w,
Model * model,
Object * object,
Modified: fusion/plugins/animation/wave.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/wave.h
+++ /dev/null
@@ -1,9 +0,0 @@
-void
-fxWaveModelStepObject(CompWindow * w,
- Model * model,
- Object * object,
- float forwardProgress,
- float waveAmp, float waveHalfWidth);
-
-
-void fxWaveModelStep(CompScreen * s, CompWindow * w, float time);
Modified: fusion/plugins/animation/zoomside.c
===================================================================
--- fusion/plugins/animation/zoomside.c
+++ fusion/plugins/animation/zoomside.c
@@ -35,7 +35,6 @@
*/
#include "animation-internal.h"
-#include "zoomside.h"
// ===================== Effect: Zoom and Sidekick =========================
@@ -57,7 +56,7 @@ void fxSidekickInit(CompScreen * s, CompWindow * w)
-void fxZoomAnimProgressDir(AnimScreen * as,
+static void fxZoomAnimProgressDir(AnimScreen * as,
AnimWindow * aw,
float *moveProgress,
float *scaleProgress)
@@ -127,7 +126,7 @@ void fxZoomAnimProgressDir(AnimScreen * as,
}
}
-void
+static void
fxSidekickModelStepObject(CompWindow * w,
Model * model,
Object * object,
@@ -151,7 +150,7 @@ fxSidekickModelStepObject(CompWindow * w,
object->position.y += currentCenter.y;
}
-void
+static void
fxZoomModelStepObject(CompScreen *s, CompWindow * w,
Model * model, Object * object,
Point currentCenter, Point currentSize)
Modified: fusion/plugins/animation/zoomside.h
deleted file mode 100644
===================================================================
--- fusion/plugins/animation/zoomside.h
+++ /dev/null
@@ -1,6 +0,0 @@
-void fxZoomUpdateWindowAttrib(AnimScreen *as,AnimWindow *aw,WindowPaintAttrib *wAttrib);
-void fxZoomModelStep(CompScreen *s,CompWindow *w,float time);
-void fxZoomModelStepObject(CompScreen *s,CompWindow *w,Model *model,Object *object,Point currentCenter,Point currentSize);
-void fxSidekickModelStepObject(CompWindow *w,Model *model,Object *object,Point currentCenter,Point currentSize,float sinRot,float cosRot);
-void fxZoomAnimProgressDir(AnimScreen *as,AnimWindow *aw,float *moveProgress,float *scaleProgress);
-void fxSidekickInit(CompScreen *s,CompWindow *w);
More information about the commits
mailing list