1#ifndef COASTLINE_DECALEDITOR_H
2#define COASTLINE_DECALEDITOR_H
19#define DECAL_SWATCHES 16
25#define DECAL_GLYPHS 50
28#define DECAL_TEXT_LENGTH 16
761void RedoDecalEdit(
void);
764void SaveAllDecalUndo(
void);
767void SaveDecalPaletteUndo(
void);
770void CancelDecalPaletteUndo(
void);
u16 * g_pDecalPalette
The palette of the decal being edited, in RGBA 5551.
#define DECAL_SWATCHES
The colors of the palette of a decal.
Definition decaleditor.h:19
ScreenRect g_aBrushSizeRects[BRUSH_SIZES]
The sizes of the brush, in texels, as rectangles.
u8 g_bDecalTextWidth
The width of the text to paint, in texels.
u8 g_bBrushSize
The size of the brush, an index of g_aBrushSizeRects.
const char * g_apszColorChannelNames[3]
The names of the bars of the color editor.
u8 g_bDecalSlot
The decal being edited.
u8 g_bDecalDragActive
Set while a press on the decal is being dealt with.
void ProcessPaintShopExitConfirm(void)
Run one frame of the dialog that warns of edits not saved on exit from the paint shop,...
void ProcessBrushStyleMenu(void)
Run one frame of the menu of the styles of the brush tool.
const char * g_apszOvalStyleNames[4]
The names of the styles of the oval tool.
u8 g_bTextShadowPickerOpen
Whether the text menu shows the colors of the shadow.
ScreenRect g_rcPaletteFrameLeft
The black area behind the two wide swatches of the palette.
Sprite g_texDecalFont
The font of the decals, 16 texels to a character.
Sprite g_texPaintToolClear
The picture of the clear tool.
u8 g_bDashColorB
The second colour of the marching dashes of a shape not yet drawn.
u8 g_bPaintShopPlayer
The player who paints, an index of g_aPlayerInputState.
u8 g_bPaletteEnabled
Whether the palette can be clicked.
u8 g_bDecalColor
The color painted with, an index of the palette.
u8 * g_pDecalTexels
The texels of the decal being edited, 4 bits each.
#define DECAL_TEXT_LENGTH
The characters a text painted on a decal may have.
Definition decaleditor.h:28
void UndoDecalEdit(void)
Restore the copy of the decal saved for undo.
#define BRUSH_SIZES
The sizes of the brush.
Definition decaleditor.h:31
u8 g_bDecalEditCount
The edits not saved, for the warning on exit.
Sprite g_texPaintToolOval
The picture of the oval tool, whose style is OVAL_STYLE_.
void SaveDecalUndo(void)
Save a copy of the decal being edited for undo, and count an edit.
void ResetBrushAndSlotHistory(void)
Set the brush to its size and every remembered decal to the decal being edited.
void ConvertPaletteToRgb(void)
Set the colors of the swatches from the palette of the decal.
#define DECAL_GLYPHS
The characters of the font of the decals, also the keys of the keyboard.
Definition decaleditor.h:25
u8 g_bUndoDecalSlot
The decal the copy that undo restores was taken of.
const char * g_apszTextStyleNames[2]
The names of the styles of the text tool.
ScreenRect g_rcDecalCanvas
Where the decal is shown, 4 pixels to a texel.
ScreenRect g_aDecalSlotRects[DECAL_SLOTS]
The buttons of the decals.
s32 IsCursorInRect(ScreenRect *rect)
Whether the cursor is in a rectangle.
u8 g_abSavedSwatchColor[3]
The color the color editor restores when it is cancelled.
s32 IsCursorInButton(Sprite *sprite)
Whether the cursor is on a sprite as it is drawn.
#define DECAL_SLOTS
The decals of a car that the paint shop edits.
Definition decaleditor.h:22
Sprite * g_apDecalSlotIcons[DECAL_SLOTS]
The icons of the decals.
u8 g_bDecalTextLength
The characters of the text to paint.
u8 g_bPreviousDecalSlot
The decal edited before the last was picked.
u8 * g_pDecalScratchTexels
A copy of the texels the flood fill works in.
Sprite g_texKeyboardHighlight
The highlight of a key of the keyboard, the size of a key.
u8 g_bDecalSlotHasMirror
Whether the decal being edited has a mirror image.
void ProcessRectStyleMenu(void)
Run one frame of the menu of the styles of the rectangle tool.
Sprite g_texPaintShapeFilledCircle
The icon of the round brush.
u8 g_bSavedColor
The color picked before the last, or the shadow color the text menu restores.
void ProcessColorEditorDialog(void)
Run one frame of the color editor of the color in use.
const char * g_apszRectStyleNames[4]
The names of the styles of the rectangle tool.
Sprite g_texPaintToolBrush
The picture of the brush tool, whose style is round or square.
Sprite * g_pDecalSlotIcon
The icon of the decal being edited.
u8 g_bDashColorA
The colors of the marching dashes of a shape not yet drawn.
u8 * g_pDecalMask
The mask of the decal being edited, or NULL.
void DrawDecalColorPalette(void)
Draw the palette, with the color in use outlined.
const char * g_apszBrushStyleNames[2]
The names of the styles of the brush tool.
ScreenRect g_rcBrush
The rectangle of the size of the brush.
@ RECT_STYLE_FILLED
Definition decaleditor.h:53
@ RECT_STYLE_FILLED_ROUND
Definition decaleditor.h:55
@ RECT_STYLE_OUTLINED_ROUND
Definition decaleditor.h:56
@ RECT_STYLE_OUTLINED
Definition decaleditor.h:54
u8 g_bColorEditorChannel
The bar of the color editor under its cursor.
s32 IsCursorOnKeyboardKey(DecalGlyph *key)
Whether the cursor is on a key of the keyboard.
u8 g_bPaintTool
The tool in use, a PAINT_TOOL_ value.
void ProcessDecalEditorInput(void)
Deal with a frame of the input of the decal editor: the decals, the palette, the tools and painting.
void UpdateCursorFromInput(void)
Move the cursor by the stick, the D-pad and the C buttons.
u8 g_bStyleMenuOpen
Whether the menu of the styles of the tool is open.
u8 g_bDecalSlotChanged
Set when another decal is picked.
void ProcessTextStyleMenu(void)
Run one frame of the menu of the styles of the text tool, and of its colors of the shadow.
u8 g_bPreviousPaintTool
The tool in use before the last was picked.
ScreenRect g_aPaintToolButtonRects[PAINT_TOOLS]
The buttons of the tools.
DecalGlyph g_aDecalGlyphs[DECAL_GLYPHS]
The characters of the font of the decals.
void ProcessTextInputKeyboard(void)
Run one frame of the keyboard of the text tool.
u8 g_bDecalHeight
The height of the decal being edited, in texels.
@ OVAL_STYLE_OUTLINED_CIRCLE
Definition decaleditor.h:64
@ OVAL_STYLE_FILLED_CIRCLE
Definition decaleditor.h:63
@ OVAL_STYLE_OUTLINED_ELLIPSE
Definition decaleditor.h:62
@ OVAL_STYLE_FILLED_ELLIPSE
Definition decaleditor.h:61
PaletteSwatch g_aDecalSwatches[DECAL_SWATCHES]
The palette of the decal as it is shown.
Sprite g_texPaintCursor
The cursor, whose origin is where it points.
@ PAINT_TOOL_LINE
Definition decaleditor.h:38
@ PAINT_TOOL_BRUSH_SIZE
Definition decaleditor.h:35
@ PAINT_TOOL_BRUSH
Definition decaleditor.h:36
@ PAINT_TOOL_CLEAR
Definition decaleditor.h:43
@ PAINT_TOOL_LOAD
Definition decaleditor.h:44
@ PAINT_TOOL_UNDO
Definition decaleditor.h:46
@ PAINT_TOOL_MIRROR
Definition decaleditor.h:42
@ PAINT_TOOLS
Definition decaleditor.h:48
@ PAINT_TOOL_FILL
Definition decaleditor.h:37
@ PAINT_TOOL_SAVE
Definition decaleditor.h:45
@ PAINT_TOOL_RECTANGLE
Definition decaleditor.h:40
@ PAINT_TOOL_OVAL
Definition decaleditor.h:41
@ PAINT_TOOL_TEXT
Definition decaleditor.h:39
@ PAINT_TOOL_EXIT
Definition decaleditor.h:47
u8 g_bPaintToolStarted
Set while a tool waits for its second click.
ScreenRect g_rcPaletteFrameRight
The black area behind the narrow swatches of the palette, right of the wide ones.
u8 g_bDecalWidth
The size of the decal being edited, in texels.
ScreenRect g_rcDecalCanvasFrame[3]
Three contiguous paint shop frames, starting with the area around the decal.
Sprite g_texPaintToolRect
The picture of the rectangle tool, whose style is RECT_STYLE_.
u8 g_bSavedDecalSlot
The decal slot selected before a tool temporarily visits every slot.
u8 g_bStyleMenuCursor
The style under the cursor of a style menu.
Sprite * g_apOvalStyleIcons[4]
The icons of the styles of the oval tool.
Sprite g_texPaintToolText
The picture of the text tool, whose style is the drop shadow.
u8 g_bColorEditorOpen
Whether the color editor is open.
DecalGlyph * g_apDecalTextGlyphs[DECAL_TEXT_LENGTH]
The glyphs of the text to paint.
Sprite * g_apRectStyleIcons[4]
The icons of the styles of the rectangle tool.
void ProcessOvalStyleMenu(void)
Run one frame of the menu of the styles of the oval tool.
ScreenRect g_aBrushSizeButtonRects[BRUSH_SIZES]
The buttons of the sizes of the brush.
s32 IsCursorInSwatch(PaletteSwatch *swatch)
Whether the cursor is on a swatch of the palette.
u8 g_bPaintShopExiting
Set once the paint shop fades out.
u8 g_bTextShadowColor
The color of the shadow of text.
u8 g_aabColorEditorBars[3][3]
The colors of the bars of the color editor.
The sprites of the menus: pictures loaded from the cartridge and drawn in strips, and the rectangles ...
A character of the font of the decals, and its key on the keyboard of the text tool.
Definition decaleditor.h:82
s32 x
Definition decaleditor.h:83
s32 kernRight
Definition decaleditor.h:89
s32 kernLeft
Definition decaleditor.h:88
u8 character
Definition decaleditor.h:85
s32 width
Definition decaleditor.h:87
s32 y
Definition decaleditor.h:84
s32 cellX
Definition decaleditor.h:86
A color of the palette of the decal, and where it is shown to be picked.
Definition decaleditor.h:76
ScreenRect rect
Definition decaleditor.h:77
u8 color[3]
Definition decaleditor.h:78
A rectangle of the screen of the paint shop, 640 by 480.
Definition decaleditor.h:68
s32 x
Definition decaleditor.h:69
s32 y
Definition decaleditor.h:70
s32 width
Definition decaleditor.h:71
s32 height
Definition decaleditor.h:72
A picture of the menus.
Definition sprite.h:23
Integer and floating-point types of libultra.
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18