diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index 3321a42..791276a 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -741,15 +741,17 @@ function draw_gauge(deltaTime) local BgW, BgH = gfx.ImageSize(gaugeBgImage); local FillW, FillH = gfx.ImageSize(gaugeFillImage); - local gaugePosX = 1080 - BgW - 48; - local gaugePosY = 1920/2 - BgH/2 - 32; + local gaugePosX = 1080 - BgW - 110; + local gaugePosY = 1920/2 - BgH/2 - 95; -- gfx.Text('RESX: ' .. resx .. ' // RESY: ' .. resy .. ' // GPX: ' .. gaugePosX, 255,1200); + gfx.BeginPath() gfx.ImageRect(gaugePosX, gaugePosY, BgW, BgH, gaugeBgImage, 1, 0) - + gfx.GlobalAlpha(gaugeFillAlpha); - gfx.ImageRect(gaugePosX+22, gaugePosY+11+(FillH-(FillH*(gameplay.gauge.value))), FillW, FillH*(gameplay.gauge.value), gaugeFillImage, 1, 0) + gfx.BeginPath() + gfx.ImageRect(gaugePosX+18, gaugePosY+9+(FillH-(FillH*(gameplay.gauge.value))), FillW, FillH*(gameplay.gauge.value), gaugeFillImage, 1, 0) gfx.GlobalAlpha(1); diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index d29556b..cab520b 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -1,4 +1,4 @@ -game.Log("Something went wrong!", game.LOGGER_ERROR) +-- game.Log("Something went wrong!", game.LOGGER_ERROR) --Horizontal alignment TEXT_ALIGN_LEFT = 1 @@ -391,7 +391,7 @@ function deep_to_string(t) end draw_song = function(song, x, y, w, h, selected) - game.Log("draw_song", game.LOGGER_ERROR); + -- game.Log("draw_song", game.LOGGER_ERROR); local diffIndex = math.min(selectedDiff, #song.difficulties) local difficulty = song.difficulties[diffIndex] @@ -401,7 +401,7 @@ draw_song = function(song, x, y, w, h, selected) local clearLampA = 100 if difficulty ~= nil then - game.Log(deep_to_string(difficulty), game.LOGGER_ERROR); + -- game.Log(deep_to_string(difficulty), game.LOGGER_ERROR); if difficulty.scores[1] ~= nil then if difficulty.topBadge == 1 then -- fail/played clearLampR = 255 @@ -435,7 +435,7 @@ draw_song = function(song, x, y, w, h, selected) end end end - game.Log(" past difficulty check", game.LOGGER_ERROR); + -- game.Log(" past difficulty check", game.LOGGER_ERROR); check_or_create_cache(song) gfx.BeginPath() @@ -705,7 +705,7 @@ draw_songwheel = function(x,y,w,h) for i = math.max(selectedIndex - wheelSize/2, 1), math.max(selectedIndex - 1,0) do local song = songwheel.songs[i] local xpos = x + width - local offsetY = (selectedIndex - i + ioffset/2) * ( height * 1.05) + local offsetY = (selectedIndex - i + ioffset/2) * ( height * 1.0) local ypos = y+((h/2 - height/2) - offsetY) draw_song(song, xpos, ypos, width, height) end @@ -714,7 +714,7 @@ draw_songwheel = function(x,y,w,h) for i = math.min(selectedIndex + wheelSize/2, #songwheel.songs), selectedIndex + 1,-1 do local song = songwheel.songs[i] local xpos = x + width - local offsetY = (selectedIndex - i + ioffset/2) * ( height * 1.05) + local offsetY = (selectedIndex - i + ioffset/2) * ( height * 1.0) local ypos = y+((h/2 - height/2) - (selectedIndex - i) - offsetY) local alpha = 255 - (selectedIndex - i + ioffset) * 31 draw_song(song, xpos, ypos, width, height) @@ -801,7 +801,7 @@ render = function(deltaTime) timer = (timer + deltaTime) timer = timer % 2 resx,resy = game.GetResolution(); - game.Log("res :: " .. resx .. "," .. resy, game.LOGGER_ERROR); + -- game.Log("res :: " .. resx .. "," .. resy, game.LOGGER_ERROR); adjustScreen(resx,resy); gfx.BeginPath(); gfx.LoadSkinFont("dfmarugoth.ttf"); diff --git a/scripts/songtransition.lua b/scripts/songtransition.lua index fe7bd03..7bd7a4a 100644 --- a/scripts/songtransition.lua +++ b/scripts/songtransition.lua @@ -3,6 +3,9 @@ game.LoadSkinSample('song_transition_screen/transition_enter.wav'); local bgImage = gfx.CreateSkinImage("songtransition/bg.png", 0) + +local difficultyNumbers; + local difficultyLabelImages = { gfx.CreateSkinImage("songtransition/difficulty_labels/nov.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/adv.png", 0), @@ -33,11 +36,43 @@ function resetLayoutInformation() scale = resx / desw end +function load_number_image(path) + local images = {} + for i = 0, 9 do + images[i + 1] = gfx.CreateSkinImage(string.format("%s/%d.png", path, i), 0) + end + return images +end + +function draw_number(x, y, alpha, num, digits, images, is_dim, scale, kern) + scale = scale or 1; + kern = kern or 1; + local tw, th = gfx.ImageSize(images[1]) + tw = tw * scale; + th = th * scale; + x = x + (tw * (digits - 1)) / 2 + y = y - th / 2 + for i = 1, digits do + local mul = 10 ^ (i - 1) + local digit = math.floor(num / mul) % 10 + local a = alpha + if is_dim and num < mul then + a = 0.4 + end + gfx.BeginPath() + gfx.ImageRect(x, y, tw, th, images[digit + 1], a, 0) + x = x - (tw * kern) + end +end + function render(deltaTime) if not wasEnterSfxPlayed then game.PlaySample('song_transition_screen/transition_enter.wav'); wasEnterSfxPlayed = true; end + if not difficultyNumbers then + difficultyNumbers = load_number_image('diff_num') + end resetLayoutInformation() gfx.ResetTransform(); @@ -110,6 +145,11 @@ function render_screen(progress) gfx.Text(song.effector, desw/2+70 , EFFECTOR_LABEL_Y-1) gfx.Text(song.illustrator, desw/2+70 , ILLUSTRATOR_LABEL_Y-3) + -- Draw song diff level + gfx.BeginPath(); + draw_number(933, 1140, 1.0, song.level, 2, difficultyNumbers, false, 1, 1) + + -- Draw song diff label (NOV/ADV/EXH/MXM/etc.) gfx.BeginPath(); local diffLabelImage = difficultyLabelImages[song.difficulty+1]; local diffLabelW, diffLabelH = gfx.ImageSize(diffLabelImage); diff --git a/scripts/titlescreen.lua b/scripts/titlescreen.lua index dfdc219..1415b3e 100644 --- a/scripts/titlescreen.lua +++ b/scripts/titlescreen.lua @@ -139,8 +139,8 @@ draw_buttons = function() draw_button(buttons[indexes[3]], desw - 512, centerButtonY, false, 3); -- Placeholder for transition that goes to the top end - draw_button(buttons[indexes[4]], desw - 512, yBase + marginFromDesHCenter, false, 4); - draw_button(buttons[indexes[5]], desw - 512, yBase + marginFromDesHCenter + buttonHeight, false, 5); + draw_button(buttons[indexes[4]], desw - 512, yBase + marginFromDesHCenter + 10, false, 4); + draw_button(buttons[indexes[5]], desw - 512, yBase + marginFromDesHCenter + buttonHeight + 10, false, 5); if not scrollingUp then draw_button(buttons[indexes[1]], desw - 512, yBase + marginFromDesHCenter + buttonHeight*2, false, 6); @@ -283,7 +283,7 @@ render = function(deltaTime) drawTexts(); -- Draw the arrows around the selected button - gfx.ImageRect(desw-512, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - buttonHeight, 501, 277, selectorArrowsImage, 1, 0); + gfx.ImageRect(desw-512, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - buttonHeight - 8, 501, 300, selectorArrowsImage, 1, 0); -- Draw top and bottom bars --Bars.draw(); diff --git a/skin.cfg b/skin.cfg index bc471a4..d54f352 100644 --- a/skin.cfg +++ b/skin.cfg @@ -1 +1 @@ -username = "GSKBLADEZ" +username = "GSKBLADEZ" " diff --git a/textures/gameplay/gauges/effective/gauge_back.png b/textures/gameplay/gauges/effective/gauge_back.png index 263f0ed..02fcda4 100644 Binary files a/textures/gameplay/gauges/effective/gauge_back.png and b/textures/gameplay/gauges/effective/gauge_back.png differ diff --git a/textures/gameplay/gauges/effective/gauge_fill_fail.png b/textures/gameplay/gauges/effective/gauge_fill_fail.png index 69721aa..5132cfa 100644 Binary files a/textures/gameplay/gauges/effective/gauge_fill_fail.png 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 index 59d4aa1..5bdb666 100644 Binary files a/textures/gameplay/gauges/effective/gauge_fill_pass.png and b/textures/gameplay/gauges/effective/gauge_fill_pass.png differ diff --git a/textures/gameplay/gauges/excessive/gauge_back.png b/textures/gameplay/gauges/excessive/gauge_back.png index 0e5c916..f83f1aa 100644 Binary files a/textures/gameplay/gauges/excessive/gauge_back.png and b/textures/gameplay/gauges/excessive/gauge_back.png differ diff --git a/textures/gameplay/gauges/excessive/gauge_fill.png b/textures/gameplay/gauges/excessive/gauge_fill.png index 8af1e28..86ef72a 100644 Binary files a/textures/gameplay/gauges/excessive/gauge_fill.png and b/textures/gameplay/gauges/excessive/gauge_fill.png differ