coastline 0.0.4
Loading...
Searching...
No Matches
coordinates.h File Reference
#include <PR/gbi.h>
#include "common/types.h"
Include dependency graph for coordinates.h:

Go to the source code of this file.

Macros

#define COORD_ADD(a, b)
 Add two coordinate components.
#define COORD_SUB(a, b)
 Subtract one coordinate component from another.
#define COORD_DOUBLE(value)
 Double a coordinate component.
#define COORD_SHIFT(value, shift)
 Shift a coordinate component left by the specified bit count.
#define FILL_COLOR(red, green, blue)
 Pack 8-bit RGB components into two identical RGBA5551 pixels.

Macro Definition Documentation

◆ COORD_ADD

#define COORD_ADD ( a,
b )
Value:
((a) + (b))

Add two coordinate components.

◆ COORD_SUB

#define COORD_SUB ( a,
b )
Value:
((a) - (b))

Subtract one coordinate component from another.

◆ COORD_DOUBLE

#define COORD_DOUBLE ( value)
Value:
((value) * 2)

Double a coordinate component.

◆ COORD_SHIFT

#define COORD_SHIFT ( value,
shift )
Value:
((value) << (shift))

Shift a coordinate component left by the specified bit count.

◆ FILL_COLOR

#define FILL_COLOR ( red,
green,
blue )
Value:
((u16)GPACK_RGBA5551(red, green, blue, 1) | (u32)(u16)GPACK_RGBA5551(red, green, blue, 1) << 16)
#define GPACK_RGBA5551(r, g, b, a)
A colour of RGBA 5551 from components of 8 bits and an alpha of 1 bit.
Definition gbi.h:708
unsigned int u32
Definition ultratypes.h:20
unsigned short u16
Definition ultratypes.h:19

Pack 8-bit RGB components into two identical RGBA5551 pixels.