PVSnesLib  4.3.0
Documentation to code in C or ASM for the Nintendo SNES
Loading...
Searching...
No Matches
snestypes.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------------------
2
3 snestypes.h -- Common types (and a few useful macros)
4
5 Copyright (C) 2012-2013
6 Alekmaul
7
8 This software is provided 'as-is', without any express or implied
9 warranty. In no event will the authors be held liable for any
10 damages arising from the use of this software.
11
12 Permission is granted to anyone to use this software for any
13 purpose, including commercial applications, and to alter it and
14 redistribute it freely, subject to the following restrictions:
15
16 1. The origin of this software must not be misrepresented; you
17 must not claim that you wrote the original software. If you use
18 this software in a product, an acknowledgment in the product
19 documentation would be appreciated but is not required.
20 2. Altered source versions must be plainly marked as such, and
21 must not be misrepresented as being the original software.
22 3. This notice may not be removed or altered from any source
23 distribution.
24
25---------------------------------------------------------------------------------*/
30#ifndef _SNESTYPES_INCLUDE
31#define _SNESTYPES_INCLUDE
32
34#define BIT(n) (1 << n)
35
37typedef signed char s8;
38typedef unsigned char u8;
39typedef signed short s16;
40typedef unsigned short u16;
41typedef signed long long s32;
42typedef unsigned long long u32;
43
44typedef volatile unsigned char vuint8;
45typedef volatile unsigned short vuint16;
46typedef volatile unsigned long long vuint32;
47typedef volatile char vint8;
48typedef volatile short vint16;
49typedef volatile long long vint32;
50
51// Handy function pointer typedefs
53typedef void (*VoidFn)(void);
54
56typedef unsigned char bool;
57#define FALSE 0
58#define TRUE 0xff
59#define false 0
60#define true 0xff
61
62// stdio definitions
63#define NULL 0
64
65#endif
signed char s8
8 bit volatile unsigned integer.
Definition snestypes.h:37
void(* VoidFn)(void)
a function pointer that takes no arguments and doesn't return anything.
Definition snestypes.h:53
unsigned char bool
boolean definitions
Definition snestypes.h:56