From b06fef8700bc6c2985a5a4808d9a019a1c8abdf9 Mon Sep 17 00:00:00 2001 From: tangstad Date: Mon, 5 Dec 2005 22:18:43 +0000 Subject: [PATCH] Added spriteloader. --- gba/cartest/src/cartest.cpp | 54 ++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/gba/cartest/src/cartest.cpp b/gba/cartest/src/cartest.cpp index 74ce7b3..05d4f11 100644 --- a/gba/cartest/src/cartest.cpp +++ b/gba/cartest/src/cartest.cpp @@ -30,7 +30,7 @@ typedef s32 FIXED; // 32bit FIXED in 24.8 format #define lut_cos(x) _sinLUT[(x + (SIN_SIZE>>2)) & SIN_MASK] -#define NUMSMOKES 30 +#define NUMSMOKES 20 unsigned int frame; @@ -45,9 +45,10 @@ class Smoke { int num_entries; s8* smoke_frame; u8 next_smoke; + u16 sprite_start; public: - Smoke(int num_entries, OBJATTR* start) { + Smoke(int num_entries, OBJATTR* start, u16 sprite_index) { oam = start; smoke_frame = new s8[num_entries]; next_smoke = 0; @@ -58,6 +59,7 @@ public: // 6 == off smoke_frame[i] = 6; } + sprite_start = sprite_index; } void increase_frame_counts() { for (u8 i=0; i