@@ -82,7 +82,7 @@ typedef struct AsepriteSlice {
82
82
// Aseprite functions
83
83
Aseprite LoadAseprite (const char * fileName ); // Load an .aseprite file
84
84
Aseprite LoadAsepriteFromMemory (unsigned char * fileData , int size ); // Load an aseprite file from memory
85
- bool IsAsepriteReady (Aseprite aseprite ); // Check if the given Aseprite was loaded successfully
85
+ bool IsAsepriteValid (Aseprite aseprite ); // Check if the given Aseprite was loaded successfully
86
86
void UnloadAseprite (Aseprite aseprite ); // Unloads the aseprite file
87
87
void TraceAseprite (Aseprite aseprite ); // Display all information associated with the aseprite
88
88
Texture GetAsepriteTexture (Aseprite aseprite ); // Retrieve the raylib texture associated with the aseprite
@@ -100,7 +100,7 @@ void DrawAsepriteProFlipped(Aseprite aseprite, int frame, Rectangle dest, Vector
100
100
AsepriteTag LoadAsepriteTag (Aseprite aseprite , const char * name ); // Load an Aseprite tag animation sequence
101
101
AsepriteTag LoadAsepriteTagFromIndex (Aseprite aseprite , int index ); // Load an Aseprite tag animation sequence from its index
102
102
int GetAsepriteTagCount (Aseprite aseprite ); // Get the total amount of available tags
103
- bool IsAsepriteTagReady (AsepriteTag tag ); // Check if the given Aseprite tag was loaded successfully
103
+ bool IsAsepriteTagValid (AsepriteTag tag ); // Check if the given Aseprite tag was loaded successfully
104
104
void UpdateAsepriteTag (AsepriteTag * tag ); // Update the tag animation frame
105
105
AsepriteTag GenAsepriteTagDefault (); // Generate an empty Tag with sane defaults
106
106
void DrawAsepriteTag (AsepriteTag tag , int posX , int posY , Color tint );
@@ -118,7 +118,7 @@ int GetAsepriteTagFrame(AsepriteTag tag);
118
118
AsepriteSlice LoadAsepriteSlice (Aseprite aseprite , const char * name ); // Load a slice from an Aseprite based on its name.
119
119
AsepriteSlice LoadAsperiteSliceFromIndex (Aseprite aseprite , int index ); // Load a slice from an Aseprite based on its index.
120
120
int GetAsepriteSliceCount (Aseprite aseprite ); // Get the amount of slices that are defined in the Aseprite.
121
- bool IsAsepriteSliceReady (AsepriteSlice slice ); // Return whether or not the given slice was found.
121
+ bool IsAsepriteSliceValid (AsepriteSlice slice ); // Return whether or not the given slice was found.
122
122
AsepriteSlice GenAsepriteSliceDefault (); // Generate empty Aseprite slice data.
123
123
124
124
#ifdef __cplusplus
@@ -241,7 +241,7 @@ Aseprite LoadAsepriteFromMemory(unsigned char* fileData, int size) {
241
241
* @return The loaded Aseprite object, or an empty one on failure.
242
242
*
243
243
* @see UnloadAseprite()
244
- * @see IsAsepriteReady ()
244
+ * @see IsAsepriteValid ()
245
245
*/
246
246
Aseprite LoadAseprite (const char * fileName ) {
247
247
int bytesRead ;
@@ -265,7 +265,7 @@ Aseprite LoadAseprite(const char* fileName) {
265
265
*
266
266
* @return True if the Aseprite was loaded successfully, false otherwise.
267
267
*/
268
- bool IsAsepriteReady (Aseprite aseprite ) {
268
+ bool IsAsepriteValid (Aseprite aseprite ) {
269
269
return aseprite .ase != 0 ;
270
270
}
271
271
@@ -387,7 +387,10 @@ void DrawAsepriteVFlipped(Aseprite aseprite, int frame, Vector2 position, bool h
387
387
return ;
388
388
}
389
389
390
- Rectangle source = {(float )(frame * ase -> w ), 0 , horizontalFlip ? (float )- ase -> w : ase -> w , verticalFlip ? (float )- ase -> h : (float )ase -> h };
390
+ Rectangle source = {(float )(frame * ase -> w ), 0 ,
391
+ horizontalFlip ? (float )- ase -> w : (float )ase -> w ,
392
+ verticalFlip ? (float )- ase -> h : (float )ase -> h
393
+ };
391
394
Texture2D texture = GetAsepriteTexture (aseprite );
392
395
DrawTextureRec (texture , source , position , tint );
393
396
}
@@ -402,7 +405,10 @@ void DrawAsepriteExFlipped(Aseprite aseprite, int frame, Vector2 position, float
402
405
return ;
403
406
}
404
407
405
- Rectangle source = {(float )(frame * ase -> w ), 0 , horizontalFlip ? (float )- ase -> w : ase -> w , verticalFlip ? (float )- ase -> h : (float )ase -> h };
408
+ Rectangle source = {(float )(frame * ase -> w ), 0 ,
409
+ horizontalFlip ? (float )- ase -> w : (float )ase -> w ,
410
+ verticalFlip ? (float )- ase -> h : (float )ase -> h
411
+ };
406
412
Texture2D texture = GetAsepriteTexture (aseprite );
407
413
Rectangle dest = {(float )position .x , (float )position .y , (float )ase -> w * scale , (float )ase -> h * scale };
408
414
Vector2 origin = {0 , 0 };
@@ -419,7 +425,11 @@ void DrawAsepriteProFlipped(Aseprite aseprite, int frame, Rectangle dest, Vector
419
425
return ;
420
426
}
421
427
422
- Rectangle source = {(float )(frame * ase -> w ), 0 , horizontalFlip ? (float )- ase -> w : ase -> w , verticalFlip ? (float )- ase -> h : (float )ase -> h };
428
+ Rectangle source = {
429
+ (float )(frame * ase -> w ), 0 ,
430
+ horizontalFlip ? (float )- ase -> w : (float )ase -> w ,
431
+ verticalFlip ? (float )- ase -> h : (float )ase -> h
432
+ };
423
433
Texture2D texture = GetAsepriteTexture (aseprite );
424
434
DrawTexturePro (texture , source , dest , origin , rotation , tint );
425
435
}
@@ -624,7 +634,7 @@ AsepriteTag GenAsepriteTagDefault() {
624
634
* @return The Aseprite tag information, or an empty tag on failure.
625
635
*
626
636
* @see LoadAsepriteTag()
627
- * @see IsAsepriteTagReady ()
637
+ * @see IsAsepriteTagValid ()
628
638
*/
629
639
AsepriteTag LoadAsepriteTagFromIndex (Aseprite aseprite , int index ) {
630
640
AsepriteTag tag = GenAsepriteTagDefault ();
@@ -684,7 +694,7 @@ AsepriteTag LoadAsepriteTagFromIndex(Aseprite aseprite, int index) {
684
694
*
685
695
* @return The loaded Aseprite tag, or an empty tag on failure.
686
696
*
687
- * @see IsAsepriteTagReady ()
697
+ * @see IsAsepriteTagValid ()
688
698
* @see UpdateAsepriteTag()
689
699
*/
690
700
AsepriteTag LoadAsepriteTag (Aseprite aseprite , const char * name ) {
@@ -715,7 +725,7 @@ AsepriteTag LoadAsepriteTag(Aseprite aseprite, const char* name) {
715
725
*
716
726
* @return True if the tag was loaded, false otherwise.
717
727
*/
718
- bool IsAsepriteTagReady (AsepriteTag tag ) {
728
+ bool IsAsepriteTagValid (AsepriteTag tag ) {
719
729
return tag .tag != 0 ;
720
730
}
721
731
@@ -789,7 +799,7 @@ int GetAsepriteSliceCount(Aseprite aseprite) {
789
799
/**
790
800
* Return whether or not the given slice was found.
791
801
*/
792
- bool IsAsepriteSliceReady (AsepriteSlice slice ) {
802
+ bool IsAsepriteSliceValid (AsepriteSlice slice ) {
793
803
return TextLength (slice .name ) != 0 ;
794
804
}
795
805
0 commit comments