OldSchool Library 1.6.0
Loading...
Searching...
No Matches
OSL_IMAGE Struct Reference

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.
 

Detailed Description

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.

Parameters
sizeXDisplayable width of the image.
sizeYDisplayable height of the image.
sysSizeXWidth aligned to the next power of two, used for system-level optimizations.
sysSizeYHeight aligned to the next power of two, used for system-level optimizations.
realSizeXActual buffer width of the image. Never write outside of these dimensions!
realSizeYActual buffer height of the image. Never write outside of these dimensions!
dataPointer to the raw image data in memory.
flagsSpecial flags for the image, defined by OSL_IMAGE_FLAGS.
totalSizeTotal size of the image in bytes.
locationLocation of the image, either in RAM (OSL_IN_RAM) or VRAM (OSL_IN_VRAM).
pixelFormatPixel format of the image data, determining how the colors are stored.
palettePointer to the palette used in 4-bit and 8-bit color modes.
frameSizeXWidth of a frame in the image, useful for animations.
frameSizeYHeight of a frame in the image, useful for animations.
xX-coordinate of the image position on the screen.
yY-coordinate of the image position on the screen.
stretchXFinal width of the image when drawn, allowing for stretching.
stretchYFinal height of the image when drawn, allowing for stretching.
offsetX0Horizontal offset in the texture for the first point.
offsetY0Vertical offset in the texture for the first point.
offsetX1Horizontal offset in the texture for the second point.
offsetY1Vertical offset in the texture for the second point.
centerXX-coordinate of the rotation center.
centerYY-coordinate of the rotation center.
angleRotation angle in degrees, used for rotating the image.

The documentation for this struct was generated from the following file: