|
coastline 0.0.4
|
The drawing of the paint shop: the texels of the decal being edited and the shapes painted into them, the dashed outlines of a shape not yet painted, and the text and the decal on the screen. More...
#include <PR/ultratypes.h>
Go to the source code of this file.
Functions | |
| u8 | GetPixel4Bit (s32 x, s32 y) |
| Read a texel of the decal being edited. | |
| u8 | ReadPixel4Bit (u8 *texels, s32 x, s32 y) |
| Read a texel of a decal the size of the one being edited. | |
| void | FloodFill4Bit (s32 x, s32 y) |
| Fill the area of the color under a point with the color painted with. | |
| void | StampTextOnDecal (s32 x, s32 y) |
| Paint the text into the decal, centered on a point, with its shadow when the text tool has it. | |
| void | DrawLine4Bit (s32 x0, s32 y0, s32 x1, s32 y1) |
| Paint a line with the brush. | |
| void | SetPixel4Bit (s32 x, s32 y, u8 color) |
| Write a texel of the decal being edited, unless it is outside the decal or the mask protects it. | |
| void | FillRect4Bit (s32 x0, s32 y0, s32 x1, s32 y1) |
| Fill a rectangle, excluding its far column and row. | |
| void | StrokeDecalRectangle (s32 x0, s32 y0, s32 x1, s32 y1) |
| Paint the outline of a rectangle with the brush. | |
| void | FillDecalRoundRect (s32 x0, s32 y0, s32 x1, s32 y1) |
| Fill a rectangle with rounded corners. | |
| void | DrawDecalRoundedRectOutline (s32 x0, s32 y0, s32 x1, s32 y1) |
| Paint the outline of a rectangle with rounded corners with the brush. | |
| void | DrawDecalFilledEllipse (s32 x0, s32 y0, s32 x1, s32 y1) |
| Fill the ellipse in a rectangle. | |
| void | DrawDecalEllipseOutline (s32 x0, s32 y0, s32 x1, s32 y1) |
| Paint the outline of the ellipse in a rectangle with the brush. | |
| void | FillCircle4Bit (s32 x, s32 y, s32 radius, u8 fromScreen) |
| Fill a circle. | |
| void | DrawDecalCircleOutline (s32 x, s32 y, s32 radius) |
| Paint the outline of a circle with the brush. | |
| void | DrawDashedLine (s32 x0, s32 y0, s32 x1, s32 y1) |
| Draw the dashed line from the first point of a line to the cursor. | |
| void | DrawDashedRectangle (s32 x0, s32 y0, s32 x1, s32 y1) |
| Draw the dashed outline of a rectangle. | |
| void | DrawDashedRoundedRect (s32 x0, s32 y0, s32 x1, s32 y1) |
| Draw the dashed outline of a rectangle with rounded corners. | |
| void | DrawDashedEllipse (s32 x0, s32 y0, s32 x1, s32 y1) |
| Draw the dashed outline of the ellipse in a rectangle. | |
| void | DrawDashedCircle (s32 x, s32 y, s32 radius) |
| Draw the dashed outline of a circle, the part over the decal only. | |
| void | DrawDecalTextPreview (s32 x, s32 y) |
| Draw the text not yet painted on the screen, centered on a point, with its shadow when the text tool has it. | |
| void | SwapBytes (u8 *a, u8 *b) |
| Swap two bytes. | |
| void | EmitScaledTextureRect (s32 textureWidth, s32 textureHeight, s32 x, s32 y, s32 width, s32 height) |
| Draw the texture already loaded over a rectangle of the screen, upside down: the decal being edited. | |
The drawing of the paint shop: the texels of the decal being edited and the shapes painted into them, the dashed outlines of a shape not yet painted, and the text and the decal on the screen.
The decal is 4 bits a texel, the even texel of a pair in the high nibble, with the words of every odd row swapped as the RDP loads them. Its rows go upwards from the bottom of g_rcDecalCanvas, where each texel is 4 pixels square. A routine that takes screen coordinates converts them.
Read a texel of the decal being edited.
| x | The column of the texel. |
| y | The row of the texel. |
Read a texel of a decal the size of the one being edited.
| texels | The texels of the decal. |
| x | The column of the texel. |
| y | The row of the texel. |
Fill the area of the color under a point with the color painted with.
The mask protects the texels only as the result is copied back.
| x | The X coordinate of the point on the screen. |
| y | The Y coordinate of the point on the screen. |
Paint the text into the decal, centered on a point, with its shadow when the text tool has it.
| x | The X coordinate of the point on the screen. |
| y | The Y coordinate of the point on the screen. |
Paint a line with the brush.
| x0 | The X coordinate of the start on the screen. |
| y0 | The Y coordinate of the start on the screen. |
| x1 | The X coordinate of the end on the screen. |
| y1 | The Y coordinate of the end on the screen. |
Write a texel of the decal being edited, unless it is outside the decal or the mask protects it.
| x | The column of the texel. |
| y | The row of the texel. |
| color | The color, an index of the palette. |
Fill a rectangle, excluding its far column and row.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Paint the outline of a rectangle with the brush.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Fill a rectangle with rounded corners.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Paint the outline of a rectangle with rounded corners with the brush.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Fill the ellipse in a rectangle.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Paint the outline of the ellipse in a rectangle with the brush.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Fill a circle.
| x | The X coordinate of the center. |
| y | The Y coordinate of the center. |
| radius | The radius, in texels. |
| fromScreen | Whether the center is on the screen rather than in texels. |
Paint the outline of a circle with the brush.
| x | The X coordinate of the center on the screen. |
| y | The Y coordinate of the center on the screen. |
| radius | The radius, in texels. |
Draw the dashed line from the first point of a line to the cursor.
| x0 | The X coordinate of the start on the screen. |
| y0 | The Y coordinate of the start on the screen. |
| x1 | The X coordinate of the end on the screen. |
| y1 | The Y coordinate of the end on the screen. |
Draw the dashed outline of a rectangle.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Draw the dashed outline of a rectangle with rounded corners.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Draw the dashed outline of the ellipse in a rectangle.
| x0 | The X coordinate of a corner on the screen. |
| y0 | The Y coordinate of a corner on the screen. |
| x1 | The X coordinate of the opposite corner on the screen. |
| y1 | The Y coordinate of the opposite corner on the screen. |
Draw the dashed outline of a circle, the part over the decal only.
| x | The X coordinate of the center on the screen. |
| y | The Y coordinate of the center on the screen. |
| radius | The radius, in pixels of the screen. |
Draw the text not yet painted on the screen, centered on a point, with its shadow when the text tool has it.
| x | The X coordinate of the point on the screen. |
| y | The Y coordinate of the point on the screen. |
Swap two bytes.
| a | The first byte. |
| b | The second byte. |
| void EmitScaledTextureRect | ( | s32 | textureWidth, |
| s32 | textureHeight, | ||
| s32 | x, | ||
| s32 | y, | ||
| s32 | width, | ||
| s32 | height ) |
Draw the texture already loaded over a rectangle of the screen, upside down: the decal being edited.
| textureWidth | The width of the texture. |
| textureHeight | The height of the texture. |
| x | The left edge of the rectangle on the 640 by 480 screen. |
| y | The top edge of the rectangle. |
| width | The width of the rectangle. |
| height | The height of the rectangle. |