This commit is contained in:
Irmen de Jong 2019-03-10 18:23:38 +01:00
parent f5ba072294
commit cd2c4e13da
6 changed files with 9 additions and 8 deletions

View File

@ -1645,7 +1645,7 @@ class Subroutine(override val name: String,
.map { (it as InlineAssembly).assembly }
.count { " rti" in it || "\trti" in it || " rts" in it || "\trts" in it || " jmp" in it || "\tjmp" in it }
val canBeAsmSubroutine =false // TODO see below
val canBeAsmSubroutine =false // TODO disabled for now, see below about problem with converting to asm subroutine
// !isAsmSubroutine
// && ((parameters.size == 1 && parameters[0].type in setOf(DataType.BYTE, DataType.UBYTE, DataType.WORD, DataType.UWORD))
// || (parameters.size == 2 && parameters.map { it.type }.all { it == DataType.BYTE || it == DataType.UBYTE }))

View File

@ -357,14 +357,14 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
}
private fun encodeStr(str: String, dt: DataType): List<Short> {
when(dt) {
return when(dt) {
DataType.STR -> {
val bytes = Petscii.encodePetscii(str, true)
return bytes.plus(0)
bytes.plus(0)
}
DataType.STR_S -> {
val bytes = Petscii.encodeScreencode(str, true)
return bytes.plus(0)
bytes.plus(0)
}
else -> throw AssemblyError("invalid str type")
}

View File

@ -5,7 +5,6 @@ import prog8.ast.*
import prog8.compiler.LauncherType
import prog8.compiler.OutputType
import prog8.determineCompilationOptions
import java.io.File
import java.io.InputStream
import java.nio.file.Files
import java.nio.file.Path

View File

@ -4,7 +4,9 @@
; @todo: holding a block
; @todo: joystick control
; @todo: sometimes the game gets confused about what the current tetromino is and will draw the wrong one. Maybe occurs when rotating directly after dropping the previous?
; @todo: large explosion with ding when clearing 4 lines
; @todo: click sound (same as rotate) when block lands in place (without dropping it)
; @todo: sometimes the game gets confused about what the current tetromino is and will draw the wrong one. When rotating a square it turns into the previous piece!
~ main {

View File

@ -1,4 +1,4 @@
// Generated from /home/irmen/Projects/prog8/parser/antlr/prog8.g4 by ANTLR 4.7.2
// Generated from ./parser/antlr/prog8.g4 by ANTLR 4.7.2
package prog8.parser;

View File

@ -1,4 +1,4 @@
// Generated from /home/irmen/Projects/prog8/parser/antlr/prog8.g4 by ANTLR 4.7.2
// Generated from ./parser/antlr/prog8.g4 by ANTLR 4.7.2
package prog8.parser;