OldSchool Library
|
Structure representing an image loaded in memory. More...
#include <drawing.h>
Data Fields | |
u16 | sizeY |
Displayable size. | |
u16 | sysSizeY |
Size aligned to the next power of two. | |
u16 | realSizeY |
Actual buffer size (never write outside of these dimensions!) | |
void * | data |
Raw image data in memory. | |
u8 | flags |
Special image flags. | |
int | totalSize |
Total image size in bytes. | |
short | location |
Image location (OSL_IN_RAM or OSL_IN_VRAM) | |
short | pixelFormat |
Image pixel format. | |
OSL_PALETTE * | palette |
Palette for 4 and 8-bit modes. | |
u16 | frameSizeY |
Size of a frame in the image. | |
int | y |
Image positions. | |
int | stretchY |
Final image size when drawn (stretched) | |
float | offsetY1 |
Offset in the texture. | |
int | centerY |
Rotation center. | |
int | angle |
Angle (rotation) in degrees. | |
Structure representing an image loaded in memory.
This structure defines an image in OSLib, including various properties like dimensions, raw data, pixel format, and additional attributes used for drawing and transforming the image. @struct OSL_IMAGE @param sizeX Displayable width of the image. @param sizeY Displayable height of the image. @param sysSizeX Width aligned to the next power of two, used for system-level optimizations. @param sysSizeY Height aligned to the next power of two, used for system-level optimizations. @param realSizeX Actual buffer width of the image. Never write outside of these dimensions! @param realSizeY Actual buffer height of the image. Never write outside of these dimensions! @param data Pointer to the raw image data in memory. @param flags Special flags for the image, defined by `OSL_IMAGE_FLAGS`. @param totalSize Total size of the image in bytes. @param location Location of the image, either in RAM (`OSL_IN_RAM`) or VRAM (`OSL_IN_VRAM`). @param pixelFormat Pixel format of the image data, determining how the colors are stored. @param palette Pointer to the palette used in 4-bit and 8-bit color modes. @param frameSizeX Width of a frame in the image, useful for animations. @param frameSizeY Height of a frame in the image, useful for animations. @param x X-coordinate of the image position on the screen. @param y Y-coordinate of the image position on the screen. @param stretchX Final width of the image when drawn, allowing for stretching. @param stretchY Final height of the image when drawn, allowing for stretching. @param offsetX0 Horizontal offset in the texture for the first point. @param offsetY0 Vertical offset in the texture for the first point. @param offsetX1 Horizontal offset in the texture for the second point. @param offsetY1 Vertical offset in the texture for the second point. @param centerX X-coordinate of the rotation center. @param centerY Y-coordinate of the rotation center. @param angle Rotation angle in degrees, used for rotating the image.