From 79c898d1c5332e5c8e5e5f4fcadb56c95b3d8153 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Tue, 30 May 2023 16:29:37 +0100 Subject: [PATCH] Upgrade to latest lwjgl --- advents/src/test/kotlin/net/fish/y2022/Day25Test.kt | 6 ++++++ gradle.properties | 2 +- .../main/kotlin/advents/dumbooctopus/DumboOctopusGame.kt | 2 +- visualisations/src/main/kotlin/advents/ui/Hud.kt | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/advents/src/test/kotlin/net/fish/y2022/Day25Test.kt b/advents/src/test/kotlin/net/fish/y2022/Day25Test.kt index b6aa7b8..7ecf4db 100644 --- a/advents/src/test/kotlin/net/fish/y2022/Day25Test.kt +++ b/advents/src/test/kotlin/net/fish/y2022/Day25Test.kt @@ -1,6 +1,7 @@ package net.fish.y2022 import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.CsvSource @@ -25,4 +26,9 @@ internal class Day25Test { assertThat(Day25.fromSnafu(s)).isEqualTo(d.toLong()) assertThat(Day25.toSnafu(d.toLong())).isEqualTo(s) } + + @Test + fun `can convert`() { + println(Day25.toSnafu(18L)) + } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index b5e00c9..8fc2bd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ mordantVersion=2.0.0-beta9 orToolsVersion=9.5.2237 kEvalVersion=0.8.0 -lwjglVersion=3.3.1 +lwjglVersion=3.3.2 jomlVersion=1.10.5 # see https://github.com/kotlin-graphics/mary/tree/master/kotlin/graphics for the subdirs and their versions diff --git a/visualisations/src/main/kotlin/advents/dumbooctopus/DumboOctopusGame.kt b/visualisations/src/main/kotlin/advents/dumbooctopus/DumboOctopusGame.kt index e01542e..7f7d667 100644 --- a/visualisations/src/main/kotlin/advents/dumbooctopus/DumboOctopusGame.kt +++ b/visualisations/src/main/kotlin/advents/dumbooctopus/DumboOctopusGame.kt @@ -194,7 +194,7 @@ class DumboOctopusGame : GameLogic, GameWorld( if (animationStep >= startsOn) { // now work out the compressed pulse flashing colour for this item. // Normally, if it started at animation 0, then we look up the animation colours at x position directly. - // Buf it we have less steps to take, we need to speed through the animation + // But if we have less steps to take, we need to speed through the animation val percentageThrough = (animationStep + 1 - startsOn) / (gameSpeed - startsOn) val brightness = SurfaceOptions.calculatePercentage(percentageThrough, flashingBrightnessMap, 5) val octopus = storage.getData(flasher.item)!! diff --git a/visualisations/src/main/kotlin/advents/ui/Hud.kt b/visualisations/src/main/kotlin/advents/ui/Hud.kt index d7a91a4..3d49a52 100644 --- a/visualisations/src/main/kotlin/advents/ui/Hud.kt +++ b/visualisations/src/main/kotlin/advents/ui/Hud.kt @@ -25,7 +25,7 @@ abstract class Hud { if (vg == MemoryUtil.NULL) { throw Exception("Could not init nanovg") } - val font = NanoVG.nvgCreateFontMem(vg, FONT_NAME, fontBuffer, 0) + val font = NanoVG.nvgCreateFontMem(vg, FONT_NAME, fontBuffer, false) if (font == -1) { throw Exception("Could not add font") }