Skip to content

Commit

Permalink
Tweak initRandomGenerator().
Browse files Browse the repository at this point in the history
  • Loading branch information
litan committed May 3, 2022
1 parent f273bda commit fa70ab4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/net/kogics/kojo/lite/Builtins.scala
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ Here's a partial list of the available commands:
@volatile var cwidth = 0
@volatile var cheight = 0

def resetPictureDraw(): Unit = {
private[lite] def onClear(): Unit = {
PictureDraw.reset()
val cb = canvasBounds
cwidth = cb.width.toInt
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/net/kogics/kojo/lite/CoreBuiltins.scala
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ trait CoreBuiltins extends Rationals {
def randomColor = Color(random(256), random(256), random(256))
def randomTransparentColor = Color(random(256), random(256), random(256), 100 + random(156))
def initRandomGenerator(): Unit = {
initRandomGenerator(randomLong)
initRandomGenerator(System.currentTimeMillis())
}

def initRandomGenerator(seed: Long): Unit = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/net/kogics/kojo/lite/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package net.kogics.kojo.lite
object Versions {
val KojoMajorVersion = "2.9"
val KojoVersion = "2.9.21"
val KojoRevision = "r2"
val KojoRevision = "r3"
val KojoBuildDate = "3 May 2022"
val JavaVersion = {
val jrv = System.getProperty("java.runtime.version")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class SpriteCanvas(val kojoCtx: core.KojoCtx) extends PSwingCanvas with SCanvas
pictures.removeAllChildren()
zoom(1, 0, 0)
enablePanAndZoom()
Builtins.instance.resetPictureDraw()
Builtins.instance.onClear()
}
PicCache.clear()
Utils.clearGuiBatchQ()
Expand Down

0 comments on commit fa70ab4

Please sign in to comment.