tamtam palette

Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-06-27 09:14:17 -04:00
parent 518c2296e7
commit 45b6b7f185
3 changed files with 45 additions and 12 deletions

14
TODO.md
View File

@ -1,5 +1,19 @@
# TODO # TODO
- [ ] Vertical slice/demo
- [ ] Bla'futyo level
- [ ] Puzzles
- [ ] unlock two gates to the gem of power
- [ ] math puzzle
- [ ] rock and button puzzle
- [ ] Tile map engine
- [ ] Warp points to other maps
- [ ] Save/load game
- [ ] auto save
- [ ] Palettes
- [ ] Level ends when king is freed
- [ ] Congradulations screen for beating the demo
- [ ] Tile map - [ ] Tile map
- [ ] Write engine to render tiles to the screen - [ ] Write engine to render tiles to the screen
- [ ] Camera logic for maps bigger than the screen - [ ] Camera logic for maps bigger than the screen

View File

@ -1,6 +1,7 @@
const w4 = @import("wasm4.zig"); const w4 = @import("wasm4.zig");
const sh0rk = @import("sh0rk.zig"); const sh0rk = @import("sh0rk.zig");
const sprites = @import("sprites.zig"); const sprites = @import("sprites.zig");
const palette = @import("palette.zig");
const Direction = sh0rk.Direction; const Direction = sh0rk.Direction;
const Point = sh0rk.Point; const Point = sh0rk.Point;
@ -14,16 +15,7 @@ var mara_speed: i32 = 0;
var screen = Rect{.base = Point{.x = 0, .y = 0}, .width = 160, .height = 160}; var screen = Rect{.base = Point{.x = 0, .y = 0}, .width = 160, .height = 160};
export fn start() void { export fn start() void {
w4.m.palette.* = .{ palette.tamtam();
w4.Color{.blue = 0xAF, .green = 0xB0, .red = 0xD9},
//0xD9B0AF,
w4.Color{.blue = 0x83, .green = 0x63, .red = 0xAA},
//0xAA6383,
w4.Color{.blue = 0x83, .green = 0x3C, .red = 0xAA},
//0x6A3C4F,
w4.Color{.blue = 0x2D, .green = 0x23, .red = 0x36},
//0x36232D,
};
} }
export fn update() void { export fn update() void {
@ -36,6 +28,8 @@ export fn update() void {
w4.m.colors._0 = .p2; w4.m.colors._0 = .p2;
} }
w4.text("Press X to blink", 16, 90);
var old_speed = mara_speed; var old_speed = mara_speed;
mara_speed -= 1; mara_speed -= 1;
@ -82,8 +76,6 @@ export fn update() void {
mara_box.base.y = 160 - mara_box.height; mara_box.base.y = 160 - mara_box.height;
} }
w4.text("Press X to blink", 16, 90);
w4.m.colors._0 = .transparent; w4.m.colors._0 = .transparent;
w4.m.colors._1 = .p0; w4.m.colors._1 = .p0;
w4.m.colors._2 = .p1; w4.m.colors._2 = .p1;

27
src/palette.zig Normal file
View File

@ -0,0 +1,27 @@
const w4 = @import("./wasm4.zig");
pub fn orca() void {
w4.m.palette.* = .{
w4.Color{.blue = 0xAF, .green = 0xB0, .red = 0xD9},
//0xD9B0AF,
w4.Color{.blue = 0x83, .green = 0x63, .red = 0xAA},
//0xAA6383,
w4.Color{.blue = 0x83, .green = 0x3C, .red = 0xAA},
//0x6A3C4F,
w4.Color{.blue = 0x2D, .green = 0x23, .red = 0x36},
//0x36232D,
};
}
pub fn tamtam() void {
w4.m.palette.* = .{
w4.Color{.blue = 0xE4, .green = 0xEB, .red = 0xEE},
//0xEEEBE4,
w4.Color{.blue = 0x6F, .green = 0x67, .red = 0xC7},
//0xC7676F,
w4.Color{.blue = 0x55, .green = 0x92, .red = 0xBA},
//0xBA9255,
w4.Color{.blue = 0x5E, .green = 0x1F, .red = 0x16},
//0x161F5E,
};
}