mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
LibGDX, here I am.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@@ -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") {
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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]
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user