Skip to content

β2.2 - Smile for the Camera

Pre-release
Pre-release
Compare
Choose a tag to compare
@BtheDestroyer BtheDestroyer released this 17 Mar 00:56
· 37 commits to master since this release

Icon SpriteTools Beta 2.2

Ended up borrowing some code from the original SpriteTools to save time here.

Make sure you read the ReadME before asking questions. Many of them are answered there.

How to Use

NOTE: SpriteTools currently have the following dependencies that must be installed: ctrulib, citro3d, sf2d (sf2d will eventually not be needed, but for now it is)

Extract the Source listed below to an empty folder, then run the command make install to install the library just like you did for the dependencies above. You may need sudo privileges to do so on Linux and macOS.

Attached is an example.beta2.2.zip file as an example of how to use the library.

New to SpriteTools and/or programming? Check out the Tutorial on the Wiki. It's designed for beginners so even if you have no experience, you should get by fine. The tutorial for 2.2 will be released with the official release so if you need a tutorial, it's probably best to use an earlier official release rather than a beta.

New Features

Compiling

It's finally here! You can now compile and install the library to your development environment. No more copy-pasting .c and .h files.

Cameras

  • You can create and free cameras using ST_CameraCreate(s32 x, s32 y) (returns a pointer to a camera) and ST_CameraFree(st_camera *cam)

  • You can use the following functions to modify a camera by the given values: ST_CameraMoveBy(st_camera *cam, s32 x, s32 y), ST_CameraRotateBy(st_camera *cam, float rot), ST_CameraZoomBy(st_camera *cam, float zoom), ST_CameraColorChange(st_camera *cam, u8 r, u8 g, u8 b, u8 a)

  • You can use the following functions to set a camera's settings by the given values: ST_CameraMoveTo(st_camera *cam, s32 x, s32 y), ST_CameraRotateSet(st_camera *cam, float rot), ST_CameraZoomSet(st_camera *cam, float zoom), ST_CameraColorSet(st_camera *cam, u8 r, u8 g, u8 b, u8 a)

  • You can render with a camera using ST_RenderEntityCamera(st_entity *entity, st_camera *cam).

  • Alternatively, you can use ST_RenderEntityCameraNoSpriteRot(st_entity *entity, st_camera *cam) render without rotating sprites, just their positions.