mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
internalising more global functions
This commit is contained in:
@@ -67,8 +67,8 @@ class VMGUI(val loaderInfo: EmulInstance, val viewportWidth: Int, val viewportHe
|
||||
private fun init() {
|
||||
if (loaderInfo.display != null) {
|
||||
val loadedClass = Class.forName(loaderInfo.display)
|
||||
val loadedClassConstructor = loadedClass.getConstructor(vm::class.java)
|
||||
val loadedClassInstance = loadedClassConstructor.newInstance(vm)
|
||||
val loadedClassConstructor = loadedClass.getConstructor(String::class.java, vm::class.java)
|
||||
val loadedClassInstance = loadedClassConstructor.newInstance("./assets", vm)
|
||||
gpu = (loadedClassInstance as GraphicsAdapter)
|
||||
|
||||
vm.getIO().blockTransferPorts[0].attachDevice(TestDiskDrive(vm, 0, File(loaderInfo.diskPath)))
|
||||
|
||||
@@ -212,4 +212,4 @@ class PeripheralEntry2(
|
||||
vararg val args: Any
|
||||
)
|
||||
|
||||
fun Int.kB() = this * 1024L
|
||||
internal fun Int.kB() = this * 1024L
|
||||
|
||||
@@ -1748,17 +1748,17 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
infix fun Int.fmod(other: Int): Int {
|
||||
internal infix fun Int.fmod(other: Int): Int {
|
||||
return Math.floorMod(this, other)
|
||||
}
|
||||
|
||||
fun FrameBuffer.inUse(action: () -> Unit) {
|
||||
internal fun FrameBuffer.inUse(action: () -> Unit) {
|
||||
this.begin()
|
||||
action()
|
||||
this.end()
|
||||
}
|
||||
|
||||
fun SpriteBatch.inUse(action: () -> Unit) {
|
||||
internal fun SpriteBatch.inUse(action: () -> Unit) {
|
||||
this.begin()
|
||||
action()
|
||||
this.end()
|
||||
|
||||
Reference in New Issue
Block a user