From dd3240f66b93d8b94a65fb562636e65031861fed Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 14 Mar 2010 18:17:56 +0000 Subject: [PATCH] Fix C64 formats loading: 8000-byte hicolor was wrong, Multicolor was reading 'noise' in colors above 16 (described in issue 211 comment 34) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1382 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/miscfileformats.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/miscfileformats.c b/src/miscfileformats.c index b4cf7115..6c032a7b 100644 --- a/src/miscfileformats.c +++ b/src/miscfileformats.c @@ -2097,14 +2097,14 @@ void Load_C64_hires(T_IO_Context *context, byte *bitmap, byte *colors) void Load_C64_multi(T_IO_Context *context, byte *bitmap, byte *colors, byte *nybble, byte background) { int cx,cy,x,y,c[4],pixel,color; - c[0]=background; + c[0]=background&15; for(cy=0; cy<25; cy++) { for(cx=0; cx<40; cx++) { c[1]=colors[cy*40+cx]>>4; c[2]=colors[cy*40+cx]&15; - c[3]=nybble[cy*40+cx]; + c[3]=nybble[cy*40+cx]&15; for(y=0; y<8; y++) { @@ -2176,6 +2176,7 @@ void Load_C64(T_IO_Context * context) case 8000: // raw bitmap hasLoadAddr=0; loadFormat=F_bitmap; + break; case 8002: // raw bitmap with loadaddr hasLoadAddr=1;