76
General Jo Engine Help / Re: 30 FPS?
« on: August 29, 2017, 08:59:59 pm »
I will check that
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
/** @brief Set animation frame
* @param anim_id Id returned by jo_create_sprite_anim()
* @param frame Frame of animation to be displayed, where 0 is the first frame.
*/
static __jo_force_inline void jo_set_sprite_anim_frame(const int anim_id, const unsigned char frame) { __jo_sprite_anim_tab[anim_id].cur_frame = frame; }
/** @brief Draw billboard with a specific scale
* @param sprite_id Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack()
* @param x X coordinate
* @param y Y coordinate
* @param z Z coordinate
* @param scale_x X scale
* @param scale_y Y scale
*/
void jo_3d_draw_billboard(const int sprite_id, const int x, const int y, const int z, const int scale_x, const int scale_y);
/** @brief Open a file
* @param file Pointer to an allocated jo_file struct
* @param filename Filename (upper case and shorter as possible like "A.TXT")
* @return true if succeed
*/
bool jo_fs_open(jo_file * const file, const char *const filename);
/** @brief Close a file
* @param file Pointer to an allocated and valid jo_file struct
*/
void jo_fs_close(jo_file * const file);
/** @brief Read bytes from a file
* @param file Pointer to an allocated and valid jo_file struct
* @param buffer Pointer to an allocated buffer (length >= nbytes)
* @param nbytes number of bytes to read
* @return Number of bytes read (<= 0 means EOF)
*/
int jo_fs_read_next_bytes(jo_file * const file, char *buffer, unsigned int nbytes);
jo_file file;
char buf[2048];
if (jo_fs_open(&file, "TEST.TXT"))
{
while (jo_fs_read_next_bytes(&file, buf, 2048) > 0)
/*DO SOMETHING */;
jo_fs_close(&file);
}
And man I still haven't actually played Panzer Dragoon Saga