mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
71 lines
2.7 KiB
Plaintext
71 lines
2.7 KiB
Plaintext
const nomodify byte GREEN = 5
|
|
const nomodify byte* LOAD_SPRITE = (byte*) 12288
|
|
const nomodify word OFFSET_SPRITE_PTRS = $3f8
|
|
const byte OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20
|
|
const byte OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE = $15
|
|
const nomodify byte* SCREEN = (byte*) 1024
|
|
const byte* SPRITE[] = kickasm {{ .var pic = LoadPicture("sprite.png", List().add($000000, $ffffff))
|
|
.for (var y=0; y<21; y++)
|
|
.for (var x=0;x<3; x++)
|
|
.byte pic.getSinglecolorByte(x,y)
|
|
}}
|
|
const nomodify byte* SPRITES_COLOR = (byte*) 53287
|
|
const nomodify byte* SPRITES_PTR = SCREEN+OFFSET_SPRITE_PTRS
|
|
const nomodify byte* SPRITES_XPOS = (byte*) 53248
|
|
const nomodify byte* SPRITES_YPOS = (byte*) 53249
|
|
const nomodify struct MOS6569_VICII* VICII = (struct MOS6569_VICII*) 53248
|
|
void error(byte error::err)
|
|
byte error::err
|
|
byte error::err#0 reg byte a 13.0
|
|
const nomodify byte* error::errCode = (byte*) 255
|
|
byte load(byte* load::address , bool load::verify)
|
|
byte* load::address
|
|
const byte** load::loadAddress = (byte**) 254
|
|
const byte* load::loadOrVerify = (byte*) 253
|
|
byte load::return
|
|
byte load::return#0 reg byte a 22.0
|
|
byte load::return#1 reg byte a 37.33333333333333
|
|
const byte* load::status = (byte*) 253
|
|
bool load::verify
|
|
byte loadFileToMemory(byte loadFileToMemory::device , byte* loadFileToMemory::filename , byte* loadFileToMemory::address)
|
|
byte* loadFileToMemory::address
|
|
byte loadFileToMemory::device
|
|
const byte loadFileToMemory::device#0 device = 8
|
|
byte* loadFileToMemory::filename
|
|
byte loadFileToMemory::return
|
|
byte loadFileToMemory::return#0 reg byte a 4.0
|
|
byte loadFileToMemory::return#1 reg byte a 4.333333333333333
|
|
void main()
|
|
const byte* main::filename[7] = "SPRITE"
|
|
byte main::status
|
|
byte main::status#0 reg byte x 2.0
|
|
byte main::toSpritePtr1_return
|
|
const byte main::toSpritePtr1_return#0 toSpritePtr1_return = (byte)(word)LOAD_SPRITE/$40
|
|
byte* main::toSpritePtr1_sprite
|
|
void setlfs(byte setlfs::device)
|
|
byte setlfs::device
|
|
const nomodify byte* setlfs::deviceNum = (byte*) 255
|
|
void setnam(byte* setnam::filename)
|
|
word~ setnam::$0 zp[2]:4 101.0
|
|
byte* setnam::filename
|
|
const nomodify byte* setnam::filename_len = (byte*) 253
|
|
const nomodify byte** setnam::filename_ptr = (byte**) 254
|
|
word strlen(byte* strlen::str)
|
|
word strlen::len
|
|
word strlen::len#1 len zp[2]:4 10001.0
|
|
word strlen::len#2 len zp[2]:4 5025.75
|
|
word strlen::return
|
|
word strlen::return#2 return zp[2]:4 202.0
|
|
byte* strlen::str
|
|
byte* strlen::str#0 str zp[2]:2 20002.0
|
|
byte* strlen::str#2 str zp[2]:2 10001.0
|
|
|
|
zp[2]:2 [ strlen::str#2 strlen::str#0 ]
|
|
zp[2]:4 [ strlen::len#2 strlen::len#1 strlen::return#2 setnam::$0 ]
|
|
reg byte a [ loadFileToMemory::return#0 ]
|
|
reg byte x [ main::status#0 ]
|
|
reg byte a [ error::err#0 ]
|
|
reg byte a [ load::return#0 ]
|
|
reg byte a [ loadFileToMemory::return#1 ]
|
|
reg byte a [ load::return#1 ]
|