bsnes/higan/sfc/ppu/sprite/sprite.hpp
Tim Allen 94b2538af5 Update to higan v091 release.
byuu says:

Basically just a project rename, with s/bsnes/higan and the new icon
from lowkee added in.

It won't compile on Windows because I forgot to update the resource.rc
file, and a path transform command isn't working on Windows.
It was really just meant as a starting point, so that v091 WIPs can flow
starting from .00 with the new name (it overshadows bsnes v091, so
publicly speaking this "shouldn't exist" and will probably be deleted
from Google Code when v092 is ready.)
2012-12-26 17:46:36 +11:00

83 lines
1.3 KiB
C++
Executable File

struct Sprite {
struct SpriteItem {
uint16 x;
uint16 y;
uint8 character;
bool nameselect;
bool vflip;
bool hflip;
uint8 priority;
uint8 palette;
bool size;
unsigned width() const;
unsigned height() const;
} list[128];
struct TileItem {
uint16 x;
uint16 priority;
uint16 palette;
bool hflip;
uint8 d0, d1, d2, d3;
};
struct State {
unsigned x;
unsigned y;
unsigned item_count;
unsigned tile_count;
bool active;
uint8 item[2][32];
TileItem tile[2][34];
} t;
struct Regs {
bool main_enable;
bool sub_enable;
bool interlace;
uint3 base_size;
uint2 nameselect;
uint16 tiledata_addr;
uint8 first_sprite;
unsigned priority0;
unsigned priority1;
unsigned priority2;
unsigned priority3;
bool time_over;
bool range_over;
} regs;
struct Output {
struct Pixel {
unsigned priority; //0 = none (transparent)
uint8 palette;
} main, sub;
} output;
//list.cpp
void update(unsigned addr, uint8 data);
void synchronize();
//sprite.cpp
void address_reset();
void set_first_sprite();
void frame();
void scanline();
void run();
void tilefetch();
void reset();
bool on_scanline(SpriteItem&);
void serialize(serializer&);
Sprite(PPU &self);
PPU &self;
friend class PPU;
};