ppm colors are weird, though

This commit is contained in:
Kartik K. Agaram 2021-07-08 00:12:31 -07:00
parent 91af9ccf2c
commit d1482a9e89
4 changed files with 16404 additions and 1 deletions

6
img.mu
View File

@ -20,12 +20,16 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
fn load-image self: (addr image), data-disk: (addr disk) {
# data-disk -> stream
var s-storage: (stream byte 0x40000) # 512 sectors
var s-storage: (stream byte 0xc0000) # 512*3 sectors
var s/ebx: (addr stream byte) <- address s-storage
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "loading sectors from data disk", 3/fg, 0/bg
move-cursor-to-left-margin-of-next-line 0/screen
load-sectors data-disk, 0/lba, 0x100/sectors, s
load-sectors data-disk, 0x100/lba, 0x100/sectors, s
load-sectors data-disk, 0x200/lba, 0x100/sectors, s
load-sectors data-disk, 0x300/lba, 0x100/sectors, s
load-sectors data-disk, 0x400/lba, 0x100/sectors, s
load-sectors data-disk, 0x500/lba, 0x100/sectors, s
# stream -> gap-buffer (HACK: we temporarily cannibalize the sandbox's gap-buffer)
draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, "parsing", 3/fg, 0/bg
move-cursor-to-left-margin-of-next-line 0/screen

16387
snail.ppm Normal file

File diff suppressed because it is too large Load Diff

5
x1.ppm Normal file
View File

@ -0,0 +1,5 @@
P3
3 2
255
255 0 0 0 255 0 0 0 255
255 255 0 255 255 255 0 0 0

7
x2.ppm Normal file
View File

@ -0,0 +1,7 @@
P3
4 4
255
0 0 0 100 0 0 0 0 0 255 0 255
0 0 0 0 255 175 0 0 0 0 0 0
0 0 0 0 0 0 0 15 175 0 0 0
255 0 255 0 0 0 0 0 0 255 255 255