BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
sprprint.h
1#include <b8/ppu.h>
2#pragma once
52namespace sprprint {
53
65
74 enum EnCh {
77 CHMAX
78 };
79
86 struct Context {
87 b8PpuCmd* _cmd = nullptr;
88 };
89
96 void Reset();
97
104 struct Info {
105 s16 _xpix_locate = 0;
106 s16 _ypix_locate = 0;
107 b8PpuColor _fg;
108 b8PpuColor _bg;
109 u16 _otz = 0;
110 };
111
120 int GetInfo(FILE* fp_, Info& dest);
121
131 FILE* Open(EnCh ch_, sprprint::Context& ctx);
132
143 void Locate(FILE* fp_, s16 lx_, s16 ly_, u16 otz_);
144 void LocateZ(FILE* fp_, u16 otz_);
145 void Color(FILE* fp_, b8PpuColor b8col_ );
146} // namespace sprprint
This namespace contains functions and structures for managing sprite printing and positioning using t...
FILE * Open(EnCh ch_, sprprint::Context &ctx)
Opens a sprite printing channel.
Definition sprprint.cpp:285
void Reset()
Resets the sprite printing system.
Definition sprprint.cpp:264
int GetInfo(FILE *fp_, Info &dest)
Retrieves information about the current state of sprite printing.
Definition sprprint.cpp:320
EnCh
Enumeration for selecting the channel used for sprite printing.
Definition sprprint.h:74
@ CH0
Channel 0.
Definition sprprint.h:75
@ CH1
Channel 1.
Definition sprprint.h:76
@ CHMAX
Maximum number of channels.
Definition sprprint.h:77
EnCmd
Commands for controlling the sprite printing system.
Definition sprprint.h:61
@ GET_INFO
Command to retrieve information.
Definition sprprint.h:63
@ SET_SLOT_CONTEXT
Command to set the slot context.
Definition sprprint.h:62
void Locate(FILE *fp_, s16 lx_, s16 ly_, u16 otz_)
Sets the pixel location and Z-index for sprite printing.
Definition sprprint.cpp:305
Holds the command context for sprite printing operations.
Definition sprprint.h:86
b8PpuCmd * _cmd
Pointer to PPU command list.
Definition sprprint.h:87
Contains information about the current sprite printing state.
Definition sprprint.h:104
b8PpuColor _bg
Background color.
Definition sprprint.h:108
s16 _xpix_locate
X pixel location.
Definition sprprint.h:105
u16 _otz
Z-index (order of display).
Definition sprprint.h:109
s16 _ypix_locate
Y pixel location.
Definition sprprint.h:106
b8PpuColor _fg
Foreground color.
Definition sprprint.h:107