Skip to content

Commit

Permalink
Updated loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
RepublicOfMars committed Apr 29, 2021
1 parent f3b62bc commit e44338f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Sources/ScenesShell/NewWorld.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ class SimpleWorld {

//render loading screen
renderNoise(canvas:canvas, quality:64, multiplier:64, frame:frame)
loadingMap.render(canvas:canvas)

let text = Text(location:Point(x:canvas.canvasSize!.width/2, y:3*(canvas.canvasSize!.height/4)), text:"Generating World: \((50*blocksGenerated)/blocksToGenerate)%")
text.font = "\(canvas.canvasSize!.height/64)pt Arial"
text.baseline = .middle
Expand Down Expand Up @@ -287,14 +289,13 @@ class SimpleWorld {
canvas.render(FillStyle(color:Color(red:255, green:255, blue:0)))
canvas.render(splash)

let version = Text(location:Point(x:0, y:(canvas.canvasSize!.height)), text:" v0.3.1")
let version = Text(location:Point(x:0, y:(canvas.canvasSize!.height)), text:" v0.3.2")
version.font = "\((canvas.canvasSize!.height/64))pt Arial"
version.baseline = .bottom
version.alignment = .left
canvas.render(FillStyle(color:Color(red:255, green:255, blue:255)))
canvas.render(version)

loadingMap.render(canvas:canvas)
} else {
for block in nearbyBlocks(cameraPosition:Point3d(x:camera.x, y:camera.y, z:camera.z)) {
block.renderBlock(camera:camera, canvas:canvas)
Expand Down
5 changes: 3 additions & 2 deletions Sources/ScenesShell/Splash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ public func splashText() -> String {
"Now with Physics!",
"Now with Trees!",
"Mr.Ben is cool!",
"2200+ lines of code!",
"2300+ lines of code!",
"Swift Edition!",
"100% guaranteed, almost bug free!",
"Singleplayer!",
"No more walking through walls!",
"The IGIS servers are on fire right now!"]
"The IGIS servers are on fire right now!",
"Now with better Render Distance!"]

return text[Int.random(in:0..<text.count)]
}

0 comments on commit e44338f

Please sign in to comment.