Skip to content

Commit

Permalink
Show LOVE version & codename in system info.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Apr 27, 2019
1 parent 6de6819 commit 90469ea
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ love.filesystem.load("errorhandler.lua")()
-- Set in main.lua later
DEPLS_VERSION = false
DEPLS_VERSION_NUMBER = false
DEPLS_VERSION_CODENAME = false

if love._exe then
setmetatable(_G, {
Expand Down
6 changes: 4 additions & 2 deletions game/states/main_menu.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Main Menu
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
-- luacheck: read_globals DEPLS_VERSION DEPLS_VERSION_NUMBER
-- luacheck: read_globals DEPLS_VERSION DEPLS_VERSION_NUMBER DEPLS_VERSION_CODENAME

local love = require("love")
local Luaoop = require("libs.Luaoop")
Expand Down Expand Up @@ -81,7 +81,9 @@ local function initializeVersionText()

bld[#bld + 1] = "Live Simulator: 2 v"
bld[#bld + 1] = DEPLS_VERSION
bld[#bld + 1] = " ("
bld[#bld + 1] = " \""
bld[#bld + 1] = DEPLS_VERSION_CODENAME
bld[#bld + 1] = "\" ("
bld[#bld + 1] = string.format("%08d", DEPLS_VERSION_NUMBER)
bld[#bld + 1] = ") ("
bld[#bld + 1] = jit and jit.version or _VERSION
Expand Down
11 changes: 6 additions & 5 deletions game/states/systeminfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
-- Part of Live Simulator: 2
-- See copyright notice in main.lua

-- luacheck: read_globals DEPLS_VERSION
-- luacheck: read_globals DEPLS_VERSION_NUMBER
-- luacheck: read_globals DEPLS_VERSION DEPLS_VERSION_NUMBER DEPLS_VERSION_CODENAME

local love = require("love")
local color = require("color")
Expand Down Expand Up @@ -102,6 +101,7 @@ do
end
elseif ver.dwMajorVersion == 5 then
if ver.dwMinorVersion == 2 then
-- Probably not
osVersionString = string.format("OS: Windows XP Professional 64-bit (%s)", build)
elseif ver.dwMinorVersion == 1 then
osVersionString = string.format("OS: Windows XP (%s)", build)
Expand Down Expand Up @@ -134,7 +134,8 @@ local function buildTextString()
local sb = {
"Before reporting bug, please screenshot this window",
"",
string.format("Live Simulator: 2 v%s -- %08d", DEPLS_VERSION, DEPLS_VERSION_NUMBER),
string.format("Live Simulator: 2 v%s \"%s\" %08d", DEPLS_VERSION, DEPLS_VERSION_CODENAME, DEPLS_VERSION_NUMBER),
string.format("LOVE %d.%d.%d \"%s\"", love.getVersion())
}

do
Expand Down Expand Up @@ -237,9 +238,9 @@ function sysInfo:load()
for i = 0, 360, 45 do
local mag = i % 90 == 0 and 1 or math.sqrt(2)
local x, y = mag * math.cos(math.rad(i)), mag * math.sin(math.rad(i))
self.data.text:addf({color.black, textString}, 950, "left", 2 + x, 60 + y)
self.data.text:addf({color.black, textString}, 956, "left", 2 + x, 50 + y)
end
self.data.text:addf({color.white, textString}, 950, "left", 2, 60)
self.data.text:addf({color.white, textString}, 956, "left", 2, 50)
end
glow.addFixedElement(self.data.back, 0, 0)
end
Expand Down
24 changes: 14 additions & 10 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

-- luacheck: globals DEPLS_VERSION
-- luacheck: globals DEPLS_VERSION_NUMBER
-- luacheck: globals DEPLS_VERSION_CODENAME

-- Version string
DEPLS_VERSION = "3.0.5"
DEPLS_VERSION = "3.0.6"
-- Version number
-- In form xxyyzzww. x = major, y = minor, z = patch, w = pre-release counter (99 = not a pre release)
DEPLS_VERSION_NUMBER = 03000599
DEPLS_VERSION_NUMBER = 03000699
-- Version codename
DEPLS_VERSION_CODENAME = "Time Lapse"

local love = require("love")
local Yohane = require("libs.Yohane")
Expand Down Expand Up @@ -302,15 +305,11 @@ Options:
* -dump Dump beatmap data to stdout instead of playing
the game. It will output SIF-compatible JSON
beatmap format.
beatmap format by default.
* -dumpformat <format> Set the format of the beatmap dump for -dump
option.
* -dumpformat json Dump beatmap as JSON beatmap. This is default.
* -dumpformat llp Dump beatmap as LLP beatmap.
* -dumpformat ls2 Dump beatmap as Live Simulator: 2 v2.0 binary
beatmap. If this is used, -dumpout must be
specified for Windows (unimplemented).
* -fullscreen Start Live Simulator: 2 fullscreen.
Expand Down Expand Up @@ -342,8 +341,8 @@ Options:
container and audio is in WAV format. FFmpeg
libraries must be installed to use this feature!
* -renderfxaa Use Fast Approximate Anti-Aliasing for the whole
rendering.
* -renderfxaa Apply Fast Approximate Anti-Aliasing to the whole
screen while rendering to video file.
* -renderheight <height> Set video rendering height. Defaults to window
height if not specified.
Expand Down Expand Up @@ -505,7 +504,12 @@ function love.load(argv, gameargv)
i = i + 1
elseif arg == "-version" then
local capabilities = require("capabilities")
print(string.format("Live Simulator: 2 v%s (%08d)", DEPLS_VERSION, DEPLS_VERSION_NUMBER))
print(string.format(
"Live Simulator: 2 v%s \"%s\" (%08d)",
DEPLS_VERSION,
DEPLS_VERSION_CODENAME,
DEPLS_VERSION_NUMBER
))
print("Capabilities: "..capabilities())
love.event.quit()
return
Expand Down

0 comments on commit 90469ea

Please sign in to comment.