Adjusted whitespace and remove some comment syntax.
This commit is contained in:
parent
bee6419eb0
commit
c546f29ff4
|
@ -1,6 +1,4 @@
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
// Initial code from devkitARM - http://www.devkit.tk
|
// Initial code from devkitARM - http://www.devkit.tk
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
#include "gba_video.h"
|
#include "gba_video.h"
|
||||||
#include "gba_systemcalls.h"
|
#include "gba_systemcalls.h"
|
||||||
#include "gba_input.h"
|
#include "gba_input.h"
|
||||||
|
@ -13,12 +11,12 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
// headers for binary data generated by bin2o macro in makefile
|
||||||
// header for binary data generated by bin2o macro in makefile
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
#include "car_pal_bin.h"
|
#include "car_pal_bin.h"
|
||||||
#include "car_bin.h"
|
#include "car_bin.h"
|
||||||
#include "chaser_bin.h"
|
#include "chaser_bin.h"
|
||||||
|
|
||||||
|
|
||||||
#include "sinlut.h"
|
#include "sinlut.h"
|
||||||
|
|
||||||
typedef s32 FIXED; // 32bit FIXED in 24.8 format
|
typedef s32 FIXED; // 32bit FIXED in 24.8 format
|
||||||
|
@ -26,40 +24,27 @@ typedef s32 FIXED; // 32bit FIXED in 24.8 format
|
||||||
#define INT2FIX(n) ((n)<<FIX_SHIFT)
|
#define INT2FIX(n) ((n)<<FIX_SHIFT)
|
||||||
#define FIX2INT(n) ((n)>>FIX_SHIFT)
|
#define FIX2INT(n) ((n)>>FIX_SHIFT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SIN_SIZE 512
|
#define SIN_SIZE 512
|
||||||
#define SIN_MASK (SIN_SIZE-1)
|
#define SIN_MASK (SIN_SIZE-1)
|
||||||
#define lut_sin(x) _sinLUT[x]
|
#define lut_sin(x) _sinLUT[x]
|
||||||
#define lut_cos(x) _sinLUT[(x + (SIN_SIZE>>2)) & SIN_MASK]
|
#define lut_cos(x) _sinLUT[(x + (SIN_SIZE>>2)) & SIN_MASK]
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
// storage space for palette data
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
u16 PaletteBuffer[256];
|
|
||||||
|
|
||||||
#define NUMCHASERS 10
|
#define NUMCHASERS 10
|
||||||
|
|
||||||
// 4 sprites and one
|
u16 PaletteBuffer[256];
|
||||||
OBJATTR oe_buffer[1+NUMCHASERS];
|
OBJATTR oe_buffer[1+NUMCHASERS];
|
||||||
OBJAFFINE *const oa_buffer = (OBJAFFINE*)oe_buffer;
|
OBJAFFINE *const oa_buffer = (OBJAFFINE*)oe_buffer;
|
||||||
|
|
||||||
unsigned int frame;
|
unsigned int frame;
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
void VblankInterrupt()
|
void VblankInterrupt()
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
frame += 1;
|
frame += 1;
|
||||||
ScanKeys();
|
ScanKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
// Program entry point
|
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
int main(void)
|
int main(void)
|
||||||
//---------------------------------------------------------------------------------
|
|
||||||
{
|
{
|
||||||
OBJATTR*car = &oe_buffer[0];
|
OBJATTR*car = &oe_buffer[0];
|
||||||
OBJAFFINE*car_aff = &oa_buffer[0];
|
OBJAFFINE*car_aff = &oa_buffer[0];
|
||||||
|
|
Reference in New Issue