32 for (i = 0; i < 224; i++) {
33 if ((i < 17 || i > 23) && (i < 193 || i > 200)) {
34 u16 *pal = (
u16 *)(0x5000000 + i * 2);
46 s16 green = ((color >> 5) & 31);
47 s16 red = (color & 31);
48 s16 blue = ((color >> 10) & 31);
59 packed |= (blue << 10) | (green << 5);
The battle animation state, render objects and effect entries, and the palette buffer work.
struct BattleEffectBuffers * gPaletteBufferWork
The engine calls the debug menus import, and their palette swatch tiles.
DMA channel registers, and the DMA and CPU fills.
static __inline__ void Dma_Set(const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel)
Starts a DMA transfer: stores the source, destination and control words into channel's registers with...
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static s32 Math_Divide(s32 dividend, s32 divisor)
void Engine_ColorBufferApplyTarget(s32 value, s32 mode)
void Engine_ColorBufferApplySource(s32 value, s32 mode)
The screen blend's globals and the graphics routines.
The hardware's I/O registers and their bits, as pret names them.
u8 gKolimaPalette_First[1792]
u8 gKolimaPalette_Second[896]
The reel game's title lettering.
static void KolimaPalette_Capture(void)
Copies the palettes on the screen, background and sprites, into the colour buffer as the colours to f...
static void KolimaPalette_SaveFirst(void)
Keeps the healthy colours: the colour buffer into gKolimaPalette_First.
static u16 SceneEffect_AdjustColorChannels(u16 color, s32 adj)
One cursed colour: red gains a 4 * adj'th of itself (up to 31), and green and blue lose an adj'th.
static void KolimaPalette_SaveSecond(void)
Keeps the cursed colours: the colour buffer into gKolimaPalette_Second.
void KolimaPalette_Restore(s32 second)
Makes the healthy colours (second 0) or the cursed ones (second 1) the colours to fade to; the scene ...
void KolimaPalette_Curse(s32 strength)
Keeps the healthy colours, curses the background palettes 0 to 13 (all but colours 1 to 7 of palette ...
u16 palette[0x1c0]
The source palette, RGB555: 224 BG colours, then 224 OBJ colours; palette[0] is the backdrop.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.