@@ -19,60 +19,60 @@ using std::to_string;
1919* Returns the number of `animation`s within an `animation_script`.
2020* @param script The `animation_script` to count the animations in.
2121* @return Returns an `int` equal to the total number of animations in the script.
22- */ ;
22+ */
2323int animation_count (animation_script script);
2424/* *
2525* Returns the current cell (the part of the image or sprite) of this
2626* animation. This can be used to animate an image or sprite.
2727* @param anim The `animation` to return the cell of.
2828* @return Returns the current cell of the animation passed to the method.
29- */ ;
29+ */
3030int animation_current_cell (animation anim);
3131/* *
3232* Returns the `vector_2d` assigned to the current frame in the animation.
3333* @param anim The animation to check the vector of.
3434* @return Returns the `vector_2d` assigned to the current frame in the animation.
35- */ ;
35+ */
3636vector_2d animation_current_vector (animation anim);
3737/* *
3838* Checks if an `animation` has ended.
3939* @param anim The animation to check.
4040* @return Returns a `bool` denoting whether the `animation` has ended.
41- */ ;
41+ */
4242bool animation_ended (animation anim);
4343/* *
4444* Returns true if the `animation` entered a new frame on its last update.
4545* This can be used to trigger actions on frames within an animation.
4646* @param anim The animation to check.
4747* @return Returns a `bool` denoting whether the `animation` has ended.
48- */ ;
48+ */
4949bool animation_entered_frame (animation anim);
5050/* *
5151* Returns the amount of time spent in the current frame. When this
5252* exceeds the frames duration the animation moves to the next frame.
5353* @param anim The animation to check.
5454* @return Returns the amount of time spent in the current frame as a `float`.
55- */ ;
55+ */
5656float animation_frame_time (animation anim);
5757/* *
5858* Searches an `animation_script` for an `animation` and returns its
5959* index.
6060* @param script The `animation_script` to look for the `animation` in.
6161* @param name The name of the `animation` to look for.
6262* @return Returns the index of the `animation` in the `animation_script`
63- */ ;
63+ */
6464int animation_index (animation_script script, const string &name);
6565/* *
6666* Searches an `animation_script` for an animation and returns its name.
6767* @param temp The `animation` to search for.
6868* @return Returns the name of the `animation` in the `animation_script`.
69- */ ;
69+ */
7070string animation_name (animation temp);
7171/* *
7272* Retuns the name of an `animation_script`.
7373* @param script The `animation_script` to return the name of.
7474* @return Returns a `string` that is the name of the animation script passed to the method.
75- */ ;
75+ */
7676string animation_script_name (animation_script script);
7777/* *
7878* Loads and returns a `animation_script`. The supplied filename is
@@ -82,7 +82,7 @@ string animation_script_name(animation_script script);
8282* the animation_script_named method.
8383* @param name Indicates the name used to locate the animation_script to load
8484* @return Returns the newly loaded `animation_script`.
85- */ ;
85+ */
8686animation_script animation_script_named (const string &name);
8787/* *
8888* Setup an `animation` to follow the script from an indicated name.
@@ -93,7 +93,7 @@ animation_script animation_script_named(const string &name);
9393* @param script The `animation_script` to assign the `animation` to.
9494* @param name The name of the `animation` to be assigned.
9595*
96- */ ;
96+ */
9797void assign_animation (animation anim, animation_script script, const string &name);
9898/* *
9999* Assigns an `animation` to an `animation_script`. This may play a
@@ -104,15 +104,15 @@ void assign_animation(animation anim, animation_script script, const string &nam
104104* @param name The name of the `animation` to be assigned.
105105* @param with_sound Denotes whether the `animation` should play audio.
106106*
107- */ ;
107+ */
108108void assign_animation (animation anim, animation_script script, const string &name, bool with_sound);
109109/* *
110110* Assigns an `animation` to an `animation_script`.
111111* @param anim The `animation` to be assigned.
112112* @param script The `animation_script` to assign the `animation` to.
113113* @param idx The index of the `animation` to create.
114114*
115- */ ;
115+ */
116116void assign_animation (animation anim, animation_script script, int idx);
117117/* *
118118* Assigns an `animation` to an `animation_script`. This may play a
@@ -123,15 +123,15 @@ void assign_animation(animation anim, animation_script script, int idx);
123123* @param idx The index of the `animation` to create.
124124* @param with_sound Denotes whether the `animation` should play audio.
125125*
126- */ ;
126+ */
127127void assign_animation (animation anim, animation_script script, int idx, bool with_sound);
128128/* *
129129* Assigns an `animation` to an `animation_script`.
130130* @param anim The `animation` to be assigned.
131131* @param script_name The name of the `animation_script` to assign the `animation` to.
132132* @param name The name of the `animation` to be assigned.
133133*
134- */ ;
134+ */
135135void assign_animation (animation anim, const string &script_name, const string &name);
136136/* *
137137* Assigns an `animation` to an `animation_script`. This may play a
@@ -142,7 +142,7 @@ void assign_animation(animation anim, const string &script_name, const string &n
142142* @param name The name of the `animation` to be assigned
143143* @param with_sound Denotes whether the `animation` should play audio.
144144*
145- */ ;
145+ */
146146void assign_animation (animation anim, const string &script_name, const string &name, bool with_sound);
147147/* *
148148* Setup an `animation` to follow the script from an indicated index.
@@ -151,7 +151,7 @@ void assign_animation(animation anim, const string &script_name, const string &n
151151* @param anim The `animation` to be assigned.
152152* @param idx The index of the animation to use from its current script.
153153*
154- */ ;
154+ */
155155void assign_animation (animation anim, int idx);
156156/* *
157157* Setup an `animation` to follow the script from an indicated index.
@@ -161,7 +161,7 @@ void assign_animation(animation anim, int idx);
161161* @param idx The index of the animation to use from its current script.
162162* @param with_sound Denotes whether the `animation` should play audio.
163163*
164- */ ;
164+ */
165165void assign_animation (animation anim, int idx, bool with_sound);
166166/* *
167167* Setup an `animation` to follow the script from an indicated name.
@@ -170,7 +170,7 @@ void assign_animation(animation anim, int idx, bool with_sound);
170170* @param anim The `animation` to be assigned.
171171* @param name The name of the animation to use from its current script.
172172*
173- */ ;
173+ */
174174void assign_animation (animation anim, string name);
175175/* *
176176* Setup an `animation` to follow the script from an indicated name.
@@ -180,7 +180,7 @@ void assign_animation(animation anim, string name);
180180* @param name The name of the animation to use from its current script.
181181* @param with_sound Denotes whether the `animation` should play audio.
182182*
183- */ ;
183+ */
184184void assign_animation (animation anim, string name, bool with_sound);
185185/* *
186186* Creates an animation from an `animation_script`. This may play a
@@ -190,14 +190,14 @@ void assign_animation(animation anim, string name, bool with_sound);
190190* @param idx The index of the `animation` to create.
191191* @param with_sound Denotes whether the `animation` should play audio.
192192* @return Returns the newly created `animation_script`.
193- */ ;
193+ */
194194animation create_animation (animation_script script, int idx, bool with_sound);
195195/* *
196196* Creates an animation from an `animation_script`.
197197* @param script The `animation_script` to create the `animation` from
198198* @param name The name for the new `animation`
199199* @return Returns the newly created `animation`
200- */ ;
200+ */
201201animation create_animation (animation_script script, const string &name);
202202/* *
203203* Creates an animation from a `animation_script`. This may play a
@@ -207,7 +207,7 @@ animation create_animation(animation_script script, const string &name);
207207* @param name The name for the new `animation`
208208* @param with_sound Denotes whether the `animation` should play audio.
209209* @return Returns the newly created `animation`.
210- */ ;
210+ */
211211animation create_animation (animation_script script, const string &name, bool with_sound);
212212/* *
213213* Creates an animation from an `animation_script`'s name. This may
@@ -216,7 +216,7 @@ animation create_animation(animation_script script, const string &name, bool wit
216216* @param script_name The name of the `animation_script` to create the `animation` from
217217* @param name The name for the new `animation`
218218* @return Returns the newly created `animation`
219- */ ;
219+ */
220220animation create_animation (const string &script_name, const string &name);
221221/* *
222222* Creates an animation from an `animation_script`'s name. This may
@@ -226,72 +226,72 @@ animation create_animation(const string &script_name, const string &name);
226226* @param name The name for the new `animation`
227227* @param with_sound Denotes whether the `animation` should play audio.
228228* @return Returns the newly created `animation`
229- */ ;
229+ */
230230animation create_animation (const string &script_name, const string &name, bool with_sound);
231231/* *
232232* Frees all loaded `animation_script`s.
233233
234234*
235- */ ;
235+ */
236236void free_all_animation_scripts ();
237237/* *
238238* Disposes of the resources used in the animation.
239239* @param ani The `animation` to be disposed of.
240240*
241- */ ;
241+ */
242242void free_animation (animation ani);
243243/* *
244244* Frees loaded animation frames data. Use this when you will no
245245* longer be using the animation for any purpose, including within
246246* sprite.
247247* @param script_to_free The `animation_script` to be freed.
248248*
249- */ ;
249+ */
250250void free_animation_script (animation_script script_to_free);
251251/* *
252252* Frees loaded `animation_script` data. Use this when you will no
253253* longer be using the animation for any purpose, including within
254254* sprite.
255255* @param name The name of the `animation_script` to be freed.
256256*
257- */ ;
257+ */
258258void free_animation_script (const string &name);
259259/* *
260260* Returns whether an `animation_script` has been loaded with the
261261* given name.
262262* @param script The `animation_script` to check.
263263* @param name The name of the `animation_script` to look for.
264264* @return Returns a `bool` that denotes whether the `animation_script` has been loaded.
265- */ ;
265+ */
266266bool has_animation_named (animation_script script, const string &name);
267267/* *
268268* Determines if SplashKit has animation frames loaded for the
269269* supplied name. This checks against all loaded animation frames,
270270* those loaded without a name are assigned the filename as a default.
271271* @param name The name of the animation script to look for.
272272* @return Returns the `bool` that denotes if the animation has the `animation_script`
273- */ ;
273+ */
274274bool has_animation_script (const string &name);
275275/* *
276276* Load animation details from an animation frames file.
277277* @param name The name of the `animation_script`.
278278* @param filename The file to load the `animation_script` from.
279279* @return Returns the newly loaded `animation_script`.
280- */ ;
280+ */
281281animation_script load_animation_script (const string &name, const string &filename);
282282/* *
283283* Restarts an `animation`.
284284* @param anim The `animation` to restart.
285285*
286- */ ;
286+ */
287287void restart_animation (animation anim);
288288/* *
289289* Restarts an `animation`. This may play a sound effect if the first
290290* frame triggers a sound.
291291* @param anim The `animation` to restart.
292292* @param with_sound Denotes whether the `animation` should play audio.
293293*
294- */ ;
294+ */
295295void restart_animation (animation anim, bool with_sound);
296296/* *
297297* Updates the animation, updating the time spent and possibly moving to
@@ -301,15 +301,15 @@ void restart_animation(animation anim, bool with_sound);
301301* @param pct The amount that the frame time will be incremented
302302* @param with_sound Denotes whether the `animation` should play audio.
303303*
304- */ ;
304+ */
305305void update_animation (animation anim, float pct, bool with_sound);
306306/* *
307307* Updates the animation, updating the time spent and possibly moving to
308308* a new frame in the animation. This may play a sound effect if the new
309309* frame triggers a sound.
310310* @param anim The `animation` to update.
311311*
312- */ ;
312+ */
313313void update_animation (animation anim);
314314/* *
315315* Updates the animation, updating the time spent and possibly moving to
@@ -318,7 +318,7 @@ void update_animation(animation anim);
318318* @param anim The `animation` to update.
319319* @param pct The amount that the frame time will be incremented
320320*
321- */ ;
321+ */
322322void update_animation (animation anim, float pct);
323323
324324#endif /* __animations_h */
0 commit comments