Loading...
Searching...
No Matches
mode7.h
Go to the documentation of this file.
1
43#ifndef OPENSNES_MODE7_H
44#define OPENSNES_MODE7_H
45
46#include <snes/types.h>
47
61void mode7Init(void);
62
77void mode7SetScale(u16 scale_x, u16 scale_y);
78
92void mode7SetAngle(u8 angle);
93
103
113
114/*============================================================================
115 * Higher-Level Mode 7 Functions
116 *============================================================================*/
117
130void mode7Rotate(u16 degrees);
131
146void mode7Transform(u16 degrees, u16 scalePercent);
147
162void mode7SetPivot(u8 x, u8 y);
163
180
191void mode7SetSettings(u8 settings);
192
193/*============================================================================
194 * Mode 7 Settings Constants
195 *============================================================================*/
196
198#define MODE7_WRAP 0x00
199
201#define MODE7_TRANSPARENT 0x80
202
204#define MODE7_TILE0 0xC0
205
207#define MODE7_FLIP_H 0x01
208
210#define MODE7_FLIP_V 0x02
211
212#endif /* OPENSNES_MODE7_H */
static u16 b
Definition main.c:157
static u16 a
Definition main.c:157
static u16 c
Definition main.c:157
signed short s16
16-bit signed integer (-32768 to 32767)
Definition types.h:49
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:52
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:46
void mode7SetCenter(s16 x, s16 y)
Set Mode 7 center point.
void mode7SetPivot(u8 x, u8 y)
Set pivot point (screen coordinates)
void mode7SetScroll(s16 x, s16 y)
Set Mode 7 scroll position.
void mode7SetSettings(u8 settings)
Set Mode 7 settings register.
void mode7Transform(u16 degrees, u16 scalePercent)
Set rotation and scale together.
void mode7SetScale(u16 scale_x, u16 scale_y)
Set Mode 7 scale factors.
void mode7Rotate(u16 degrees)
Set rotation in degrees (0-359)
void mode7SetMatrix(s16 a, s16 b, s16 c, s16 d)
Set Mode 7 matrix directly.
void mode7SetAngle(u8 angle)
Set Mode 7 rotation angle.
void mode7Init(void)
Initialize Mode 7.
OpenSNES Standard Types.