mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
more minor changes
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -52,7 +52,7 @@ nopqrstuvwxyz
|
||||
|
||||
//g.drawString("Syö salmiakkia perkele", 480f, 10f)
|
||||
|
||||
val text = arrayOf(
|
||||
/*val text = arrayOf(
|
||||
"The bitmap font for game developers who seek good font that has real multilingual support,",
|
||||
"for free (as in freedom AND without cost).",
|
||||
"",
|
||||
@@ -88,6 +88,37 @@ nopqrstuvwxyz
|
||||
"ASCII Latin-1 Latin_Ext-A Latin_Ext-B Greek Cyrillic CJK-Ideo Kana Hangul_Syllables",
|
||||
"",
|
||||
"…not seeing your language/writing system? Let me know on the Issue Tracker!"
|
||||
)*/
|
||||
val text = arrayOf(
|
||||
"x64またはx86-64とは、x86アーキテクチャを64ビットに拡張した命令セットアーキテクチャ。",
|
||||
"実際には、AMDが発表したAMD64命令セット、続けてインテルが採用したIntel 64命令セット (かつてIA-32eまたはEM64Tと呼ばれていた)",
|
||||
"などを含む、各社のAMD64互換命令セットの総称である。x86命令セットと互換性を持っていることから、広義にはx86にx64を含む場合がある。",
|
||||
"",
|
||||
"x86-64는 x86 명령어 집합 아키텍처의 64비트 모임이다. x86-64 명령어 집합은 에뮬레이션 없이 인텔의 x86를 지원하며 AMD64로 이름 붙인",
|
||||
"AMD에 의해 고안되었다. 이 아키텍처는 인텔 64라는 이름으로 인텔에 의해 복제되기도 했다. (옘힐, 클래카마스 기술, CT, IA-32e, EM64T 등으로",
|
||||
"불렸음) 이로써 x86-64 또는 x64의 이름을 일상적으로 사용하기에 이르렀다.",
|
||||
"",
|
||||
"x86-64 (также AMD64/Intel64/EM64T) — 64-битное расширение, набор команд для архитектуры x86, разработанное",
|
||||
"компанией AMD, позволяющее выполнять программы в 64-разрядном режиме. Это расширение архитектуры x86 с",
|
||||
"почти полной обратной совместимостью.",
|
||||
"",
|
||||
"Επίσης η x86-64 έχει καταχωρητές γενικής χρήσης 64-bit και πολλές άλλες βελτιώσεις. Η αρχική προδιαγραφή",
|
||||
"δημιουργήθηκε από την AMD και έχει υλοποιηθεί από την AMD, την Intel, τη VIA και άλλες εταιρείες. Διατηρεί πλήρη",
|
||||
"συμβατότητα προς τα πίσω με κώδικα 32-bit.",
|
||||
"",
|
||||
"x86-64 (簡稱x64) 是64位版本的x86指令集,向后相容於16位及32位的x86架構。x64於1999年由AMD設計,AMD首次公開",
|
||||
"64位元集以擴充給x86,稱為「AMD64」。其後也為英特爾所採用,現時英特爾稱之為「Intel 64」,在之前曾使用過「Clackamas",
|
||||
"Technology」 (CT)、「IA-32e」及「EM64T」",
|
||||
"",
|
||||
"x86-64, ou x64, est une extension du jeu d'instructions x86 d'Intel, introduite par la société AMD avec la gamme",
|
||||
"AMD64. Intel utilisera cette extension en l'appelant initialement EM64T renommé aujourd'hui en Intel 64.",
|
||||
"",
|
||||
"Amd64 (також x86-64/intel64/em64t/x64) — 64-бітова архітектура мікропроцесора і відповідний набір інструкцій,",
|
||||
"розроблені компанією AMD. Це розширення архітектури x86 з повною зворотною сумісністю.",
|
||||
"",
|
||||
"x86-64 е наименованието на наборът от 64-битови разширения към x86 процесорната архитектура. Като синоним",
|
||||
"на това наименование, се използват и съкращенията AMD64 (използвано от AMD), EM64T и IA-32e (използвани от",
|
||||
"Intel) и x64 (използвано от Microsoft)."
|
||||
)
|
||||
val SP = "${0x3000.toChar()}${0x3000.toChar()}"
|
||||
|
||||
@@ -95,6 +126,8 @@ nopqrstuvwxyz
|
||||
"${0xe006.toChar()} ${Lang["GAME_INVENTORY_USE"p]}$SP${0xe011.toChar()}..${0xe019.toChar()} ${Lang["GAME_INVENTORY_REGISTER"]}$SP${0xe034.toChar()} ${Lang["GAME_INVENTORY_DROP"]}"
|
||||
)*/
|
||||
|
||||
Terrarum.gameLocale = "bgBG"
|
||||
|
||||
text.forEachIndexed { i, s ->
|
||||
g.drawString(s, 10f, 70f + 20 * i)
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ class BeeperSlave {
|
||||
}
|
||||
|
||||
fun playTone(leninmilli: Int, freq: Double) {
|
||||
audioData = makeAudioData(leninmilli, freq)
|
||||
/*audioData = makeAudioData(leninmilli, freq)
|
||||
|
||||
|
||||
if (!AL.isCreated()) AL.create()
|
||||
@@ -282,7 +282,7 @@ class BeeperSlave {
|
||||
}
|
||||
catch (e: ALException) {
|
||||
AL10.alDeleteSources(beepSource)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Custom implementation of Util.checkALError() that uses our custom exception.
|
||||
|
||||
@@ -35,11 +35,11 @@ internal object Inventory : ConsoleCommand {
|
||||
Echo("(inventory empty)")
|
||||
}
|
||||
else {
|
||||
target!!.inventory.forEach {
|
||||
if (it.amount == 0) {
|
||||
EchoError("Unexpected zero-amounted item: ID ${it.item.dynamicID}")
|
||||
target!!.inventory.forEach { val (item, amount) = it
|
||||
if (amount == 0) {
|
||||
EchoError("Unexpected zero-amounted item: ID ${item.dynamicID}")
|
||||
}
|
||||
Echo("ID ${it.item}${if (it.amount > 1) " (${it.amount})" else ""}")
|
||||
Echo("ID $item${if (amount > 1) " ($amount)" else ""}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ object AVKey {
|
||||
*/
|
||||
const val LUMINOSITY = "luminosity"
|
||||
const val DRAGCOEFF = "dragcoeff"
|
||||
const val FALLDAMPENMULT = "falldampenmult"
|
||||
|
||||
/** String
|
||||
* e.g. Jarppi
|
||||
|
||||
@@ -50,7 +50,7 @@ object PlayerBuilderSigrid {
|
||||
p.actorValue[AVKey.INTELLIGENT] = true
|
||||
|
||||
//p.actorValue[AVKey.LUMINOSITY] = Color(0x434aff).to10bit()
|
||||
p.actorValue[AVKey.LUMINOSITY] = 214127943 // bright purple
|
||||
//p.actorValue[AVKey.LUMINOSITY] = 214127943 // bright purple
|
||||
|
||||
p.actorValue[AVKey.BASEDEFENCE] = 141
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ class BasicDebugInfoWindow : UICanvas {
|
||||
"${if (player.walledLeft) "$ccR" else "$ccG"}L" +
|
||||
"${if (player.walledBottom) "$ccR" else "$ccG"}${0x1F.toChar()}" +
|
||||
"${if (player.walledTop) "$ccR" else "$ccG"}${0x1E.toChar()}" +
|
||||
"${if (player.walledRight) "$ccR" else "$ccG"}R"
|
||||
"${if (player.walledRight) "$ccR" else "$ccG"}R" +
|
||||
"${if (player.colliding) "$ccR" else "$ccG"}${0x08.toChar()}"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ class TerrarumComputer(peripheralSlots: Int) {
|
||||
}
|
||||
|
||||
private fun playTone(leninmilli: Int, freq: Double) {
|
||||
audioData = makeAudioData(leninmilli, freq)
|
||||
/*audioData = makeAudioData(leninmilli, freq)
|
||||
|
||||
|
||||
if (!AL.isCreated()) AL.create()
|
||||
@@ -577,7 +577,7 @@ class TerrarumComputer(peripheralSlots: Int) {
|
||||
}
|
||||
catch (e: ALException) {
|
||||
AL10.alDeleteSources(beepSource)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Custom implementation of Util.checkALError() that uses our custom exception.
|
||||
|
||||
@@ -12,4 +12,6 @@ abstract class Peripheral(val tableName: String) {
|
||||
abstract fun loadLib(globals: Globals)
|
||||
|
||||
override fun toString(): String = "Peripheral:$tableName"
|
||||
|
||||
abstract val memSize: Int
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package net.torvald.terrarum.virtualcomputer.peripheral
|
||||
|
||||
import net.torvald.terrarum.ModMgr
|
||||
import org.luaj.vm2.Globals
|
||||
import org.newdawn.slick.Graphics
|
||||
import org.newdawn.slick.SpriteSheet
|
||||
import org.newdawn.slick.SpriteSheetFont
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2017-05-31.
|
||||
*/
|
||||
class PeripheralCharLCD(val width: Int, val height: Int) : Peripheral("charLCD") {
|
||||
companion object {
|
||||
private val fontSheet = SpriteSheet(ModMgr.getPath("dwarventech", "mt-32.tga"), 16, 16)
|
||||
private val font = SpriteSheetFont(fontSheet, 0.toChar())
|
||||
private val fontW = fontSheet.width / fontSheet.horizontalCount
|
||||
private val fontH = fontSheet.height / fontSheet.verticalCount
|
||||
}
|
||||
|
||||
override fun loadLib(globals: Globals) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return super.toString()
|
||||
}
|
||||
|
||||
override val memSize = width * height
|
||||
|
||||
var cursor: Int = 0 // character LCDs are mostly single long line wrapped
|
||||
|
||||
val memory = ByteArray(memSize) // temporary; replace with proper VMPeripheralWrapper
|
||||
|
||||
/**
|
||||
* @param g Frame Buffer that holds the display of LCD screen
|
||||
*/
|
||||
fun render(g: Graphics) {
|
||||
g.font = PeripheralCharLCD.font
|
||||
|
||||
memory.forEachIndexed { index, byte ->
|
||||
g.drawString("${byte.toChar()}", (index % width) * fontW.toFloat(), (index / width) * fontH.toFloat())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,8 @@ import java.net.URL
|
||||
internal class PeripheralInternet(val host: TerrarumComputer)
|
||||
: Peripheral("internet"){
|
||||
|
||||
override val memSize = 1024
|
||||
|
||||
override fun loadLib(globals: Globals) {
|
||||
globals["internet"] = LuaTable()
|
||||
globals["internet"]["fetch"] = FetchWebPage()
|
||||
|
||||
@@ -14,6 +14,8 @@ import org.luaj.vm2.LuaValue
|
||||
internal class PeripheralPSG(val host: TerrarumComputer)
|
||||
: Peripheral("psg") {
|
||||
|
||||
override val memSize = 1024
|
||||
|
||||
override fun loadLib(globals: Globals) {
|
||||
globals["psg"] = LuaTable()
|
||||
}
|
||||
|
||||
@@ -83,6 +83,11 @@ class PeripheralVideoCard(val host: TerrarumComputer, val termW: Int = 80, val t
|
||||
val cursorSprite = ImageBuffer(blockW, blockH * 2)
|
||||
val cursorImage: Image
|
||||
|
||||
|
||||
override val memSize = 256 * 8 + (width * height * 2) + spritesCount * 16 * 7
|
||||
// fontRom + framebuffers + sprites
|
||||
|
||||
|
||||
init {
|
||||
Arrays.fill(cursorSprite.rgba, 0xFF.toByte())
|
||||
cursorImage = cursorSprite.image
|
||||
|
||||
@@ -28,7 +28,7 @@ object BlocksDrawer_NEW {
|
||||
private val TILE_SIZEF = FeaturesDrawer.TILE_SIZE.toFloat()
|
||||
|
||||
// TODO modular
|
||||
val tilesTerrain = SpriteSheet(ModMgr.getPath("basegame", "blocks/test.tga.gz"), TILE_SIZE, TILE_SIZE) // 64 MB
|
||||
val tilesTerrain = SpriteSheet(ModMgr.getPath("basegame", "blocks/terrain.tga.gz"), TILE_SIZE, TILE_SIZE) // 64 MB
|
||||
val terrainHorizontalTiles = tilesTerrain.horizontalCount
|
||||
val tilesWire = SpriteSheet(ModMgr.getPath("basegame", "blocks/wire.tga.gz"), TILE_SIZE, TILE_SIZE) // 4 MB
|
||||
val wireHorizontalTiles = tilesWire.horizontalCount
|
||||
|
||||
@@ -66,10 +66,10 @@ import org.dyn4j.Epsilon
|
||||
class Vector2 {
|
||||
|
||||
/** The magnitude of the x component of this [Vector2] */
|
||||
@Volatile var x: Double = 0.0
|
||||
var x: Double = 0.0
|
||||
|
||||
/** The magnitude of the y component of this [Vector2] */
|
||||
@Volatile var y: Double = 0.0
|
||||
var y: Double = 0.0
|
||||
|
||||
/** Default constructor. */
|
||||
constructor() {
|
||||
|
||||
BIN
work_files/UI/portable_computer_mockup.psd
LFS
Normal file
BIN
work_files/UI/portable_computer_mockup.psd
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
work_files/walk_bug_desc.png
Normal file
BIN
work_files/walk_bug_desc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 157 KiB |
Reference in New Issue
Block a user