From c90b56b603d89355a0870bd37b6f68a351ee0992 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sat, 30 Sep 2023 02:48:18 -0700 Subject: [PATCH] fix obvious bugs not working: ship bounds, "blast" weapon --- updatedshmup.p8 | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/updatedshmup.p8 b/updatedshmup.p8 index 689e64b..303ceb4 100644 --- a/updatedshmup.p8 +++ b/updatedshmup.p8 @@ -142,23 +142,17 @@ function init_hpcols() hpcols = hpcols_lut[min(primary_ship.maxhp,6)] end -function new_linked() - local ret = {} - ret.tail = ret - return ret -end - function wipe_level() primary_ship = new_p1() init_hpcols() - pships = linked_list:new() + pships = linked_list.new() pships:push_back(primary_ship) - eships = linked_list:new() - pbullets = linked_list:new() - ebullets = linked_list:new() - intangibles_fg = linked_list:new() - intangibles_bg = linked_list:new() - events = linked_list:new() + eships = linked_list.new() + pbullets = linked_list.new() + ebullets = linked_list.new() + intangibles_fg = linked_list.new() + intangibles_bg = linked_list.new() + events = linked_list.new() end function _update60() @@ -175,7 +169,7 @@ end function updategame() leveldone = level_frame() - new_events = new_linked() + new_events = linked_list.new() events:strip(call_move) events:vore(new_events) for _, lst in ipairs{intangibles_bg, pships, eships, pbullets, ebullets} do @@ -1826,7 +1820,9 @@ weird coding conventions -->8 -- standard events -blip_fx = {} +blip_fx = { + cancel=false +} function blip_fx:move() if (self.cancel) return true @@ -1849,7 +1845,7 @@ function blip(obj, col, frames) obj.fx_pal = p for i=1,15 do p[i]=col end if (obj.___fx_pal_event) obj.___fx_pal_event:abort() - events:push_back(blip_fx:new{frames=frames, obj=obj}) + events:push_back(blip_fx.new{frames=frames, obj=obj}) end bossspark = split"7,7,10,10,9,9,9,8,8,8,2,2,5,5"