Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4cdc4a64f | |||
| 3ad5afb81c | |||
| bed3f20118 | |||
| de67315178 | |||
| 8d5c0c7cad | |||
| a8271e01bd | |||
| 900b3f8558 | |||
| fdc4e056f9 | |||
| 7b98e40ccf | |||
| 01d89cf22c | |||
| 503a3c799a | |||
| 0b21388844 | |||
| 117bdf0c00 | |||
| 172dc5d37b | |||
| 874c6258ab | |||
| a2d0a12c1a | |||
| 38b24e1c3d | |||
| 5ecbbe296b | |||
| 9d7a769d8f | |||
| 9b75e5ed83 | |||
| a9ab8dc1d8 | |||
| a34831aa02 | |||
| 84ebaa0751 | |||
| 55352805ee | |||
| c0a3f2e16a | |||
| 28ff331a28 | |||
| f9a53ec719 | |||
| 6a403e6caf | |||
| a6f449bb93 | |||
| 0614bfc446 | |||
| bb020c36c1 | |||
| f17b0bfcfb | |||
| 2a85c9503f | |||
| 182428d6d6 | |||
| 8181a28557 | |||
| 88aed11d98 | |||
| 67010592b8 | |||
| dd22d6424a | |||
| e53775b97f | |||
| d326f6c1ac |
@@ -423,6 +423,29 @@ above the declaration with no blank line in between.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Color system
|
||||||
|
|
||||||
|
Colors are defined in `src/dusk/display/color.csv` and code-generated
|
||||||
|
into a `color.h` header by `tools/color/csv/__main__.py`.
|
||||||
|
|
||||||
|
Each row in the CSV has `name,r,g,b,a` with channel values in `[0.0, 1.0]`.
|
||||||
|
The script emits four `#define` variants per color plus a bare alias:
|
||||||
|
|
||||||
|
```
|
||||||
|
COLOR_<NAME>_4B color4b(r8, g8, b8, a8) // default alias target
|
||||||
|
COLOR_<NAME>_3B color3b(r8, g8, b8)
|
||||||
|
COLOR_<NAME>_3F color3f(rf, gf, bf)
|
||||||
|
COLOR_<NAME>_4F color4f(rf, gf, bf, af)
|
||||||
|
COLOR_<NAME> COLOR_<NAME>_4B
|
||||||
|
```
|
||||||
|
|
||||||
|
`color_t` is `color4b_t` (four `uint8_t` channels).
|
||||||
|
|
||||||
|
To add a new color, append a row to `color.csv` and rebuild — do not
|
||||||
|
hand-edit the generated header.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
- Tests live in `test/` mirroring `src/dusk/` structure.
|
- Tests live in `test/` mirroring `src/dusk/` structure.
|
||||||
- Use cmocka; include `dusktest.h`.
|
- Use cmocka; include `dusktest.h`.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,21 +0,0 @@
|
|||||||
// Copyright (c) 2026 Dominic Masters
|
|
||||||
//
|
|
||||||
// This software is released under the MIT License.
|
|
||||||
// https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
const platformNames = {
|
|
||||||
[System.PLATFORM_LINUX]: 'Linux',
|
|
||||||
[System.PLATFORM_KNULLI]: 'Knulli',
|
|
||||||
[System.PLATFORM_PSP]: 'PSP',
|
|
||||||
[System.PLATFORM_GAMECUBE]: 'GameCube',
|
|
||||||
[System.PLATFORM_WII]: 'Wii',
|
|
||||||
};
|
|
||||||
|
|
||||||
Console.print('Platform: ' + (platformNames[System.platform] || 'Unknown'));
|
|
||||||
|
|
||||||
UIFullboxOver.setColor(Color.BLACK);
|
|
||||||
|
|
||||||
requireAsync('testscene.js').then(Scene.set).catch(err => {
|
|
||||||
Console.print('Error loading scene: ' + err);
|
|
||||||
Engine.exit();
|
|
||||||
});
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_1.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_2.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_3.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_4.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_5.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_6.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_7.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_1_8.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_1.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_2.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_3.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_4.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_5.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_6.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_7.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_2_8.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_1.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_2.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_3.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_4.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_5.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"mesh": "meshes/buildings/house_3_6.dmf",
|
||||||
|
"color": [255, 0, 255, 255]
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user