Finished rewrite of actor animation system

* Rewrote the actor animation system to work like sprites
* Renamed a few functions
* Added DeleteSpriteAnimation() and the delete queue to sprites
* Removed transitions for the time being (they don't seem to work in irrlicht right now
* Added PreUpdate() function
* Added documentation for name changes and new functions
This commit is contained in:
n00b
2024-10-20 20:06:20 -04:00
parent 6f5cb3c6d5
commit 1033701d1d
36 changed files with 5043 additions and 1492 deletions

View File

@@ -0,0 +1,6 @@
#title ActorAnimationIsPlaying [RCBasic Doc]
#header function ActorAnimationIsPlaying(actor)
Returns true if an actor is currently playing an animation
Note: If the number of loops in the animation is set to -1 then this will always be true since it does not return false until it plays the last frame in the last loop

View File

@@ -0,0 +1,4 @@
#title CreateActorAnimation [RCBasic Doc]
#header Function CreateActorAnimation(actor, start_frame, end_frame, speed)

View File

@@ -0,0 +1,10 @@
#title CreateAnimatedActor [RCBasic Doc]
#header function CreateAnimatedActor( mesh )
Returns a new animated actor composed of a mesh
The mesh can either be created using CreateMesh() or Loaded using LoadMesh()
#ref CreateMesh LoadMesh LoadMeshFromAN8
<br>
#ref CreateOctreeActor CreateCubeActor CreateSphereActor CreateWaterActor CreateLightActor CreateBillboardActor CreateTerrainActor

View File

@@ -4,3 +4,5 @@
Returns a billboard actor
Billboard actors are flat textured planes that are always facing the camera.
#ref CreateAnimatedActor CreateOctreeActor CreateSphereActor CreateWaterActor CreateLightActor CreateCubeActor CreateTerrainActor

View File

@@ -3,4 +3,4 @@
Returns an actor with a cube mesh of the specified size ( cube_size x cube_size x cube_size )
#ref CreateMeshActor CreateMeshOctreeActor CreateSphereActor CreateWaterPlaneActor CreateLightActor CreateBillboardActor CreateTerrainActor
#ref CreateAnimatedActor CreateOctreeActor CreateSphereActor CreateWaterActor CreateLightActor CreateBillboardActor CreateTerrainActor

View File

@@ -1,10 +1,10 @@
#title CreateMeshActor [RCBasic Doc]
#header function CreateMeshActor( mesh )
#title CreateAnimatedActor [RCBasic Doc]
#header function CreateAnimatedActor( mesh )
Returns a new actor composed of a mesh
Returns a new animated actor composed of a mesh
The mesh can either be created using CreateMesh() or Loaded using LoadMesh()
#ref CreateMesh LoadMesh
#ref CreateMesh LoadMesh LoadMeshFromAN8
<br>
#ref CreateMeshOctreeActor CreateCubeActor CreateSphereActor CreateWaterPlaneActor CreateLightActor CreateBillboardActor CreateTerrainActor
#ref CreateOctreeActor CreateCubeActor CreateSphereActor CreateWaterPlaneActor CreateLightActor CreateBillboardActor CreateTerrainActor

View File

@@ -0,0 +1,8 @@
#title CreateOctreeActor [RCBasic Doc]
#header function CreateOctreeActor( mesh )
Returns a mesh actor optimized for large objects (such as levels)
#ref CreateMesh LoadMesh
<br>
#ref CreateAnimatedActor CreateCubeActor CreateSphereActor CreateWaterActor CreateLightActor CreateBillboardActor CreateTerrainActor

View File

@@ -3,4 +3,4 @@
Returns an actor composed of a sphere mesh
#ref CreateMeshActor CreateMeshOctreeActor CreateCubeActor CreateWaterPlaneActor CreateLightActor CreateBillboardActor CreateTerrainActor
#ref CreateAnimatedActor CreateOctreeActor CreateBillboardActor CreateWaterActor CreateLightActor CreateCubeActor CreateTerrainActor

View File

@@ -5,4 +5,4 @@ Returns terrain generated from a height map
Note: Height Maps can be any supported image format
#ref CreateMeshActor CreateMeshOctreeActor CreateCubeActor CreateSphereActor CreateWaterPlaneActor CreateLightActor CreateBillboardActor
#ref CreateAnimatedActor CreateOctreeActor CreateSphereActor CreateWaterActor CreateLightActor CreateCubeActor CreateBillboardActor

View File

@@ -2,3 +2,5 @@
#header function CreateWaterActor( mesh, waveHeight, waveSpeed, waveLength )
Creates an actor with water properties set on a base mesh
#ref CreateAnimatedActor CreateOctreeActor CreateSphereActor CreateCubeActor CreateLightActor CreateBillboardActor CreateTerrainActor

View File

@@ -0,0 +1,4 @@
#title DeleteActorAnimation [RCBasic Doc]
#header sub DeleteActorAnimation(actor, animation)
Deletes an actor's animation

View File

@@ -0,0 +1,6 @@
#title DeleteSpriteAnimation [RCBasic Doc]
#header Sub DeleteSpriteAnimation(sprite, animation)
Delete's a sprite's animation
#ref CreateSpriteAnimation

View File

@@ -0,0 +1,6 @@
#title GetActorAnimationEndFrame [RCBasic Doc]
#header Function GetActorAnimationEndFrame(actor, animation)
Returns the last frame in an actor's animation
#ref SetActorAnimationFrames

View File

@@ -1,4 +1,6 @@
#title GetActorAnimationSpeed [RCBasic Doc]
#header function GetActorAnimationSpeed( actor )
#header function GetActorAnimationSpeed( actor, animation )
Returns actors animation speed in frames per second
Returns actor's animation speed in frames per second
#ref SetActorAnimationSpeed

View File

@@ -0,0 +1,6 @@
#title GetActorAnimationStartFrame [RCBasic Doc]
#header Function GetActorAnimationStartFrame(actor, animation)
Returns the first frame in an actor's animation
#ref SetActorAnimationFrames

View File

@@ -0,0 +1,8 @@
#title GetActorCurrentAnimation [RCBasic Doc]
#header Function GetActorCurrentAnimation(actor)
Returns the current animation set on an actor
Note: Current animation will be 0 if the actor's frame was set with SetActorFrame()
#ref SetActorAnimation SetActorFrame

View File

@@ -0,0 +1,7 @@
#title GetActorFrame [RCBasic Doc]
#header function GetActorFrame(actor)
Returns the current frame number an actor is currently rendering
#ref SetActorFrame GetActorAnimationFrame

View File

@@ -0,0 +1,5 @@
#title NumActorAnimationLoops [RCBasic Doc]
#header function NumActorAnimationLoops(actor)
Returns the total number of loops the actor is set to repeat the animation for

View File

@@ -1,8 +1,12 @@
#title SetActorAnimation [RCBasic Doc]
#header sub SetActorAnimation( actor, start_frame, end_frame)
#header sub SetActorAnimation( actor, animation, num_loops)
Sets the start frame and end frame that an actor will loop through
Sets the current animation for an actor to start playing
Note: Use LoopActorAnimation() to enable or disable animation looping
Notes on num_loops
#list ol
#li <b>num_loops</b> is the number of times to loop the animation after its done playing. To play the animation once, set num_loops to 0.
#li To loop an animation infinitely, set num_loops to -1
#/list
#ref LoopActorAnimation SetActorFrame
#ref CreateActorAnimation

View File

@@ -0,0 +1,6 @@
#title SetActorAnimationFrames [RCBasic Doc]
#header sub SetActorAnimationFrames(actor, animation, start_frame, end_frame)
Changes the frames that plays in an actor's animation
#ref CreateActorAnimation

View File

@@ -1,5 +1,5 @@
#title SetActorAnimationSpeed [RCBasic Doc]
#header sub SetActorAnimationSpeed( actor, speed )
#header sub SetActorAnimationSpeed( actor, animation, speed )
Set the FPS of an actor animation

View File

@@ -2,3 +2,8 @@
#header sub SetActorFrame( actor, frame )
Sets the current frame of an actor
Note: This function will set the actor's animation to 0 which is a default 1 frame animation that is created when the actor is created.
#ref GetActorFrame

View File

@@ -0,0 +1,4 @@
#title SpriteAnimationIsPlaying [RCBasic Doc]
#header Function SpriteAnimationIsPlaying(sprite)