diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index e52dd38..70ea586 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -695,8 +695,18 @@ end -- -------------------------------------------------------------------------- -- -- draw_gauge: -- local gaugeNumBack = gfx.CreateSkinImage("gauge_num_back.png", 0) -local gaugeBgImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_back.png", 0) -local gaugeFillImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_fill.png", 0) + + +local gaugeEffBgImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_back.png", 0) +local gaugeEffFailFillImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_fill_fail.png", 0) +local gaugeEffPassFillImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_fill_pass.png", 0) + +local gaugeExcBgImage = gfx.CreateSkinImage("gameplay/gauges/excessive/gauge_back.png", 0) +local gaugeExcFillImage = gfx.CreateSkinImage("gameplay/gauges/excessive/gauge_fill.png", 0) + +local gaugeExcArsBgImage = gfx.CreateSkinImage("gameplay/gauges/excessive_ars/gauge_back.png", 0) +local gaugeExcArsFillImage = gfx.CreateSkinImage("gameplay/gauges/excessive_ars/gauge_fill.png", 0) + function draw_gauge(deltaTime) @@ -708,6 +718,25 @@ function draw_gauge(deltaTime) posx = resx - width posy = posy - 90 end + + -- fallbacks in case of unsupported type + local gaugeBgImage = gaugeEffBgImage; + local gaugeFillImage = gaugeEffPassFillImage; + + if gameplay.gauge.type == 0 then + gaugeBgImage = gaugeEffBgImage; + + if gameplay.gauge.value <= 0.7 then + gaugeFillImage = gaugeEffFailFillImage; + else + gaugeFillImage = gaugeEffPassFillImage; + end + + elseif gameplay.gauge.type == 1 then + gaugeBgImage = gaugeExcBgImage; + gaugeFillImage = gaugeExcFillImage; + end + local tw, th = gfx.ImageSize(gaugeBgImage) gfx.ImageRect(posx, posy, tw, th, gaugeBgImage, 1, 0) diff --git a/textures/gameplay/gauges/normal/gauge_back.png b/textures/gameplay/gauges/effective/gauge_back.png similarity index 100% rename from textures/gameplay/gauges/normal/gauge_back.png rename to textures/gameplay/gauges/effective/gauge_back.png diff --git a/textures/gameplay/gauges/effective/gauge_fill_fail.png b/textures/gameplay/gauges/effective/gauge_fill_fail.png new file mode 100644 index 0000000..69721aa Binary files /dev/null and b/textures/gameplay/gauges/effective/gauge_fill_fail.png differ diff --git a/textures/gameplay/gauges/effective/gauge_fill_pass.png b/textures/gameplay/gauges/effective/gauge_fill_pass.png new file mode 100644 index 0000000..59d4aa1 Binary files /dev/null and b/textures/gameplay/gauges/effective/gauge_fill_pass.png differ diff --git a/textures/gameplay/gauges/hard+ARS/gauge_front.png b/textures/gameplay/gauges/effective/gauge_front.png similarity index 100% rename from textures/gameplay/gauges/hard+ARS/gauge_front.png rename to textures/gameplay/gauges/effective/gauge_front.png diff --git a/textures/gameplay/gauges/hard+ARS/gauge_mask.png b/textures/gameplay/gauges/effective/gauge_mask.png similarity index 100% rename from textures/gameplay/gauges/hard+ARS/gauge_mask.png rename to textures/gameplay/gauges/effective/gauge_mask.png diff --git a/textures/gameplay/gauges/hard/gauge_back.png b/textures/gameplay/gauges/excessive/gauge_back.png similarity index 100% rename from textures/gameplay/gauges/hard/gauge_back.png rename to textures/gameplay/gauges/excessive/gauge_back.png diff --git a/textures/gameplay/gauges/hard+ARS/gauge_fill.png b/textures/gameplay/gauges/excessive/gauge_fill.png similarity index 100% rename from textures/gameplay/gauges/hard+ARS/gauge_fill.png rename to textures/gameplay/gauges/excessive/gauge_fill.png diff --git a/textures/gameplay/gauges/hard/gauge_front.png b/textures/gameplay/gauges/excessive/gauge_front.png similarity index 100% rename from textures/gameplay/gauges/hard/gauge_front.png rename to textures/gameplay/gauges/excessive/gauge_front.png diff --git a/textures/gameplay/gauges/hard/gauge_mask.png b/textures/gameplay/gauges/excessive/gauge_mask.png similarity index 100% rename from textures/gameplay/gauges/hard/gauge_mask.png rename to textures/gameplay/gauges/excessive/gauge_mask.png diff --git a/textures/gameplay/gauges/hard+ARS/Excessive+ARS.png b/textures/gameplay/gauges/excessive_ars/gauge_back.png similarity index 100% rename from textures/gameplay/gauges/hard+ARS/Excessive+ARS.png rename to textures/gameplay/gauges/excessive_ars/gauge_back.png diff --git a/textures/gameplay/gauges/hard/gauge_fill.png b/textures/gameplay/gauges/excessive_ars/gauge_fill.png similarity index 100% rename from textures/gameplay/gauges/hard/gauge_fill.png rename to textures/gameplay/gauges/excessive_ars/gauge_fill.png diff --git a/textures/gameplay/gauges/normal/gauge_front.png b/textures/gameplay/gauges/excessive_ars/gauge_front.png similarity index 100% rename from textures/gameplay/gauges/normal/gauge_front.png rename to textures/gameplay/gauges/excessive_ars/gauge_front.png diff --git a/textures/gameplay/gauges/normal/gauge_mask.png b/textures/gameplay/gauges/excessive_ars/gauge_mask.png similarity index 100% rename from textures/gameplay/gauges/normal/gauge_mask.png rename to textures/gameplay/gauges/excessive_ars/gauge_mask.png diff --git a/textures/gameplay/gauges/normal/gauge_fill.png b/textures/gameplay/gauges/normal/gauge_fill.png deleted file mode 100644 index 470f185..0000000 Binary files a/textures/gameplay/gauges/normal/gauge_fill.png and /dev/null differ