coastline 0.0.4
Loading...
Searching...
No Matches
paintshop.h
Go to the documentation of this file.
1#ifndef COASTLINE_PAINTSHOP_H
2#define COASTLINE_PAINTSHOP_H
3
9
10#include <PR/ultratypes.h>
11
12#include "common/vecmath.h"
13#include "common/vehicle.h"
14#include "decaleditor.h"
15#include "sprite.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
22#define PAK_DIALOG_CANCELLED 999
23
25#define PAK_ERROR_RUMBLE_PAK 9999
26
28#define PAK_ERROR_TRANSFER 99999
29
31#define DECAL_BUFFER_SIZE 0x800
32
42
52
60extern Sprite g_texPanelRightDoor;
61
68extern Sprite g_texPanelLeftFrontFender;
69
76extern Sprite g_texPanelRightFrontFender;
77
84extern Sprite g_texPanel4;
85
92extern Sprite g_texPanel5;
93
100extern Sprite g_texPanelLeftRearFender;
101
108extern Sprite g_texPanelRightRearFender;
109
116extern Sprite g_texPanel8;
117
124extern Sprite g_texPanel9;
126
136
144extern Sprite g_texPanel9Overlay;
146
156
166
177
185extern Sprite g_texPaintFillCursor;
186
193extern Sprite g_texPaintBrushCursor;
194
201extern Sprite g_texPaintCrosshairCursor;
202
209extern Sprite g_texPaintTextCursor;
210
217extern Sprite g_texPaintEyedropperCursor;
219
229
239
249
250#if TGR_REGION == TGR_REGION_JP
257
259extern u8 _paintShopPaletteSegmentRomStart[];
260
262extern u8 _paintShopPaletteSegmentRomEnd[];
263#endif /* TGR_REGION == TGR_REGION_JP */
264
273extern u8 *g_pDecalUndoBuffer;
274
284
293extern u8 g_bShowPreview3D;
294
303extern u8 g_bUndoAvailable;
304
314
324
332extern s8 g_bPaintShopInitialized;
334
343extern u8 *s_pMirrorSource;
344
352extern u8 g_bPakDialogActive;
354
364
374
384
394
402extern u8 g_bPakRetryNewPak;
403
410extern s32 g_dwPakError;
411
418extern s32 g_dwPakFileNo;
420
429extern s32 g_dwPakChunkSize;
430
438extern u8 g_bPakDialogState;
440
449extern u8 g_bPakDecalIndex;
450
458extern u8 g_bPakWaitFrames;
460
469extern char g_szDecalText[24];
470
480
490
500
512void DrawPakErrorMessage(s32 error, u8 operation, u8 inCarSelect);
513
523
533
544
554
564
581s32 ProcessDecalSaveLoad(VehicleModel *model, u8 player, u8 operation, u8 inCarSelect, u8 *done);
582
583#ifdef __cplusplus
584}
585#endif
586
587#endif /* COASTLINE_PAINTSHOP_H */
The decal editor of the paint shop: the cursor, the palette and its color editor, the tools and the m...
#define DECAL_SLOTS
The decals of a car that the paint shop edits.
Definition decaleditor.h:22
@ PAINT_TOOLS
Definition decaleditor.h:48
Sprite g_texKeyboardBackground
The backing of the keys of the keyboard.
u8 * s_pMirrorSource
The texels of the decal a mirror copies from.
void ProcessMirrorFlipMenu(void)
Run one frame of the menu of the mirror tool.
u16 g_awPaintShopButtonPalette[16]
The palette of the pictures of the buttons of the paint shop, read from the cartridge.
s32 g_dwPakFileOffset
Where the next chunk of the file of the decals is.
Sprite * g_apPaintToolIcons[PAINT_TOOLS]
The pictures of the buttons of the paint shop, by their PAINT_TOOL_ values.
Sprite g_texKeyboardPanel
The keyboard of the text tool.
void AllocateEditorBuffers(void)
Allocate the buffer of the decals and load the textures of the A and B buttons.
u8 g_bShowPreview3D
Whether the car is drawn beside the decal.
Sprite g_texPanel8Overlay
The lights drawn over the buttons of panels 8 and 9.
void FlipDecalPixels(void)
Flip the decal being painted by the choice of the menu of the mirror tool.
u8 g_bUndoAvailable
Whether the undo buffer has an edit.
void DrawPakErrorMessage(s32 error, u8 operation, u8 inCarSelect)
Draw the message of an error of the controller pak in a box.
u8 g_bMirrorTargetPanel
The slot a mirror copies the decal to.
Sprite g_texBrushSizeRound
The brush sizes of the round brush, top to bottom.
Sprite g_texBrushSizeSquare
The brush sizes of the square brush.
u8 g_bKeyboardHoverKey
The key under the cursor.
u8 g_bPakFileNeedsCreate
Whether the file of the decals is created first.
void ProcessPaintShopScreen(void)
Run one frame of the paint shop.
Sprite g_texPaintWholeCar
The picture of a whole car on the menu of the clear tool.
u8 g_bPakRumbleSwapped
Whether the rumble pak was swapped for the controller pak.
void ProcessFillClearMenu(void)
Run one frame of the menu of the clear tool.
Sprite g_texPaintToolMirror
The button of the mirror; its style is the choice of its menu, 0 to mirror, 1 to flip horizontally,...
u8 g_bEyedropperActive
Whether the B button picks the color under the cursor.
u8 * g_pDecalUndoBuffer
The texels of the decal before the last edit.
void RenderDecalPreview3D(void)
Draw the car beside the decal, turning to the decal slot when it changes.
s32 g_dwPakChunkSize
The bytes of the chunk last moved.
void ResetPaintShopState(void)
Set the tools, the colors, and the cursor back to their state on entering the paint shop.
Vec3f s_aPanelViewDirections[DECAL_SLOTS]
The forward axis of the car that shows each decal slot.
char g_szDecalText[24]
The text typed.
u8 g_bPakDecalIndex
The decal being moved.
void MirrorDecalToOppositePanel(void)
Copy the decal being painted mirrored to the slot on the other side of the car, and paint that slot n...
s32 ProcessDecalSaveLoad(VehicleModel *model, u8 player, u8 operation, u8 inCarSelect, u8 *done)
Run one frame of the dialog that loads the decals of a model from the controller pak or saves them to...
Sprite g_texPanelLeftDoor
The buttons of the decal panels.
The sprites of the menus: pictures loaded from the cartridge and drawn in strips, and the rectangles ...
A picture of the menus.
Definition sprite.h:23
A point or direction in space.
Definition vecmath.h:17
The model of a car as it is loaded from the cartridge.
Definition vehiclemodel.h:55
Integer and floating-point types of libultra.
signed char s8
Definition ultratypes.h:23
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...
The vehicles of a race, the cars they are, and their place on the track.