LibGDX, here I am.

This commit is contained in:
minjaesong
2017-06-22 02:31:07 +09:00
parent ae00e2b8a6
commit 8e5e95e5a9
356 changed files with 3125 additions and 21138 deletions

View File

@@ -5,11 +5,6 @@ import net.torvald.terrarum.gameactors.DecodeTapestry
import net.torvald.terrarum.gameactors.abs
import net.torvald.terrarum.gamecontroller.Key
import net.torvald.terrarum.virtualcomputer.computer.TerrarumComputer
import net.torvald.terrarum.virtualcomputer.peripheral.PeripheralVideoCard
import org.newdawn.slick.Color
import org.newdawn.slick.GameContainer
import org.newdawn.slick.Graphics
import org.newdawn.slick.Image
import java.util.*
/**
@@ -18,7 +13,7 @@ import java.util.*
*
* Created by SKYHi14 on 2017-02-08.
*/
class GraphicsTerminal(private val host: TerrarumComputer) : Terminal {
/*class GraphicsTerminal(private val host: TerrarumComputer) : Terminal {
lateinit var videoCard: PeripheralVideoCard
override val width: Int; get() = videoCard.termW
@@ -314,4 +309,4 @@ class GraphicsTerminal(private val host: TerrarumComputer) : Terminal {
videoScreen = Image(videoCard.width, videoCard.height)
}
}
}*/

View File

@@ -1,25 +1,12 @@
package net.torvald.terrarum.virtualcomputer.terminal
import net.torvald.aa.AAFrame
import net.torvald.terrarum.*
import net.torvald.terrarum.gameactors.DecodeTapestry
import net.torvald.terrarum.gameactors.abs
import net.torvald.terrarum.gamecontroller.Key
import net.torvald.terrarum.virtualcomputer.computer.TerrarumComputer
import org.lwjgl.BufferUtils
import org.lwjgl.openal.AL
import org.lwjgl.openal.AL10
import org.lwjgl.openal.AL11
import org.newdawn.slick.*
import java.nio.ByteBuffer
import java.util.*
/**
* Default text terminal.
*
* Created by minjaesong on 16-09-07.
*/
open class SimpleTextTerminal(
/*open class SimpleTextTerminal(
phosphorColour: Color, override val width: Int, override val height: Int, private val host: TerrarumComputer,
colour: Boolean = false, hires: Boolean = false
) : Terminal {
@@ -387,7 +374,7 @@ open class SimpleTextTerminal(
val CLUT = DecodeTapestry.colourIndices16
}
}
}*/
class ALException(errorCode: Int) : Exception("ALerror: $errorCode") {

View File

@@ -1,7 +1,6 @@
package net.torvald.terrarum.virtualcomputer.terminal
import org.newdawn.slick.GameContainer
import org.newdawn.slick.Graphics
import com.badlogic.gdx.graphics.g2d.SpriteBatch
/**
* Created by minjaesong on 16-09-14.
@@ -19,8 +18,8 @@ interface Teletype {
*/
val coloursCount: Int
fun update(gc: GameContainer, delta: Int)
fun render(gc: GameContainer, g: Graphics)
fun update(delta: Float)
fun render(batch: SpriteBatch)
fun keyPressed(key: Int, c: Char)
/** Prints a char and move cursor accordingly */

View File

@@ -1,15 +1,14 @@
package net.torvald.terrarum.virtualcomputer.terminal
import net.torvald.imagefont.GameFontBase
import net.torvald.terrarumsansbitmap.slick2d.GameFontBase
import net.torvald.terrarum.blendMul
import net.torvald.terrarum.blendNormal
import org.newdawn.slick.*
import java.util.*
/**
* Created by minjaesong on 16-09-15.
*/
class TeletypeTerminal : Teletype {
/*class TeletypeTerminal : Teletype {
override val width = 40
override val displayW: Int
get() = width * font.W
@@ -203,4 +202,4 @@ class TeletypeTerminal : Teletype {
private fun charToSpriteNum(ch: Int): Int? = mappingTable[ch]
}
}
}*/

View File

@@ -1,10 +1,8 @@
package net.torvald.terrarum.virtualcomputer.terminal
import net.torvald.terrarum.Millisec
import org.newdawn.slick.Color
import org.newdawn.slick.GameContainer
import org.newdawn.slick.Graphics
import org.newdawn.slick.Input
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.gameactors.Second
/**
* A terminal
@@ -30,8 +28,8 @@ interface Terminal : Teletype {
val displayH: Int
fun getColor(index: Int): Color
override fun update(gc: GameContainer, delta: Int)
override fun render(gc: GameContainer, g: Graphics)
override fun update(delta: Float)
override fun render(batch: SpriteBatch)
override fun keyPressed(key: Int, c: Char)
// API calls
@@ -60,7 +58,7 @@ interface Terminal : Teletype {
* @param duration: milliseconds
* @param freg: Frequency (float)
*/
fun emitTone(duration: Millisec, freq: Double)
fun emitTone(duration: Second, freq: Double)
override fun bell(pattern: String)
}