From 447a1bedd0d89834937bc61b5dad7a5823d9c254 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 1 Oct 2023 15:47:01 -0700 Subject: [PATCH] set up candidate "tyrian" palette --- updatedshmup.p8 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/updatedshmup.p8 b/updatedshmup.p8 index cb28c6c..f71db41 100644 --- a/updatedshmup.p8 +++ b/updatedshmup.p8 @@ -123,8 +123,7 @@ function _init() primary_ship.main_gun = zap_gun.new() load_level(example_level) state = game - pal(2,129) - pal() + pal(0) end function once_next_frame(f) @@ -232,6 +231,17 @@ function updategame() if (not pships.next) state = lose end +function parse_pal(str) + local ret = split(str) + for i=0,15 do + ret[i]=ret[i+1] + end + ret[16] = nil + return ret +end + +mainpal = parse_pal"0,134,141,138,4,5,6,7,8,9,10,11,12,13,8,12" + function _draw() fillp(0) drawgame() @@ -297,6 +307,8 @@ function pukeboard(item) end function drawgame() + pal(0) + pal(mainpal, 1) clip(0,0,112,128) rectfill(0,0,112,128,0) for slist in all{intangibles_bg, pbullets, pships, eships, ebullets, intangibles_fg} do @@ -465,7 +477,7 @@ end function ship_m:draw() if(self.fx_pal) pal(self.fx_pal) spr(self.sprite, self.x, self.y, self.size, self.size) - pal() + pal(0) end function hurtbox(ship) @@ -750,7 +762,7 @@ function spawn_xl_chasey_at(x, y) draw = function(self) if(self.fx_pal) pal(self.fx_pal) sspr(40, 0, 8, 8, self.x, self.y, 16, 16) - pal() + pal(0) end, } eships:push_back(c) @@ -1918,7 +1930,7 @@ function spawn_spec_gun_at(x, y, gunt) draw = function(self) pal(spec_gun_pl) powerup.draw(self) - pal() + pal(0) spr(self.gun.icon, self.x+2, self.y+2, 1, 1) end }