sgdk: types.h File Reference

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Classes | Defines | Typedefs | Functions
types.h File Reference

Types definition. More...

Go to the source code of this file.

## Classes

struct | Box
| Simple Box structure. More...
struct | Circle
| Simple Circle structure. More...

## Defines

#define | FALSE 0
| FALSE define (equivalent to 0).
#define | TRUE 1
| TRUE define (equivalent to 1).
#define | NULL 0
| NULL define (equivalent to 0).
#define | MIN_U8 0x00
#define | MAX_U8 0xFF
#define | MIN_S8 -0x80
#define | MAX_S8 0x7F
#define | MIN_U16 0x0000
#define | MAX_U16 0xFFFF
#define | MIN_S16 -0x8000
#define | MAX_S16 0x7FFF
#define | MIN_U32 0x0000
#define | MAX_U32 0xFFFFFFFF
#define | MIN_S32 -0x80000000
#define | MAX_S32 0x7FFFFFFF
#define | uint8_t u8
#define | int8_t s8
#define | uint16_t u16
#define | int16_t s16
#define | uint32_t u32
#define | int32_t s32
#define | FASTCALL

## Typedefs

typedef unsigned short | bool
typedef char | s8
typedef short | s16
typedef long | s32
typedef unsigned char | u8
typedef unsigned short | u16
typedef unsigned long | u32
typedef volatile u16 | vbool
typedef volatile s8 | vs8
typedef volatile s16 | vs16
typedef volatile s32 | vs32
typedef volatile u8 | vu8
typedef volatile u16 | vu16
typedef volatile u32 | vu32
typedef s16 | fix16
typedef s32 | fix32
typedef s16 | f16
typedef s32 | f32
typedef void | VoidCallback ()

## Functions

u8 | getZeroU8 ()
u16 | getZeroU16 ()
u32 | getZeroU32 ()
u8 | rol8 (u8 value, u16 number)
| ROL instruction for byte (8 bit) value.
u16 | rol16 (u16 value, u16 number)
| ROL instruction for short (16 bit) value.
u32 | rol32 (u32 value, u16 number)
| ROL instruction for long (32 bit) value.
u8 | ror8 (u8 value, u16 number)
| ROR instruction for byte (8 bit) value.
u16 | ror16 (u16 value, u16 number)
| ROR instruction for short (16 bit) value.
u32 | ror32 (u32 value, u16 number)
| ROR instruction for long (32 bit) value.

## Detailed Description

Types definition.

Author:
  Stephane Dallongeville

Date:
  08/2011

SGDK Types definition.

## Typedef Documentation

bool

boolean type, to be used with TRUE and FALSE constant. (internally set as unsigned short)

f16

16 bits fixed floating point type (short version).

f32

32 bits fixed floating point type (short version).

fix16

16 bits fixed floating point type.

fix32

32 bits fixed floating point type.

s16

16 bits signed integer (equivalent to short).

s32

32 bits signed integer (equivalent to long).

s8

8 bits signed integer (equivalent to char).

u16

16 bits unsigned integer (equivalent to unsigned short).

u32

32 bits unsigned integer (equivalent to unsigned long).

u8

8 bits unsigned integer (equivalent to unsigned char).

vbool

volatile boolean type. (internally set as volatile unsigned short)

vs16

volatile 16 bits signed integer.

vs32

volatile 32 bits signed integer.

vs8

volatile 8 bits signed integer.

vu16

volatile 16 bits unsigned integer.

vu32

volatile 32 bits unsigned integer.

vu8

volatile 8 bits unsigned integer.

## Function Documentation

u16 rol16 | ( | u16 | value,
|  | u16 | number
| ) |  |

ROL instruction for short (16 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

u32 rol32 | ( | u32 | value,
|  | u16 | number
| ) |  |

ROL instruction for long (32 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

u8 rol8 | ( | u8 | value,
|  | u16 | number
| ) |  |

ROL instruction for byte (8 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

u16 ror16 | ( | u16 | value,
|  | u16 | number
| ) |  |

ROR instruction for short (16 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

u32 ror32 | ( | u32 | value,
|  | u16 | number
| ) |  |

ROR instruction for long (32 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

u8 ror8 | ( | u8 | value,
|  | u16 | number
| ) |  |

ROR instruction for byte (8 bit) value.

Parameters:

  value | value to apply bit rotation
  number | number of bit rotation

All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines