X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin2_src%2FWM%2Fvideo.c;h=39ba1e510c171d06eb9430b20366bf319c0d3aea;hb=ad2ec62655e1d6eb8f2b4a4684eb5d7952aea0fb;hp=5c604256422c285c3d614b007d846ec1665e597a;hpb=524b2b8fac4cc652c707bb0cddcb730dede3d7b1;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin2_src/WM/video.c b/Usermode/Applications/axwin2_src/WM/video.c index 5c604256..39ba1e51 100644 --- a/Usermode/Applications/axwin2_src/WM/video.c +++ b/Usermode/Applications/axwin2_src/WM/video.c @@ -131,7 +131,8 @@ void Video_DrawImage(short X, short Y, short W, short H, tImage *Image) { int r, g, b, a; // New int or, og, ob; // Original - for( x = 0; x < W; x ++ ) { + for( x = 0; x < W; x ++ ) + { b = data[x*4+0]; g = data[x*4+1]; r = data[x*4+2]; a = data[x*4+3]; if( a == 0 ) continue; // 100% transparent ob = buf[x*4+0]; og = buf[x*4+1]; or = buf[x*4+2]; @@ -165,7 +166,8 @@ void Video_DrawImage(short X, short Y, short W, short H, tImage *Image) case IMGFMT_RGB: for( y = 0; y < H; y ++ ) { - for( x = 0; x < W; x ++ ) { + for( x = 0; x < W; x ++ ) + { buf[x*4+0] = data[x*3+2]; // Blue buf[x*4+1] = data[x*3+1]; // Green buf[x*4+2] = data[x*3+0]; // Red @@ -174,5 +176,8 @@ void Video_DrawImage(short X, short Y, short W, short H, tImage *Image) buf += giScreenWidth * 4; } break; + default: + _SysDebug("ERROR: Unknown image format %i\n", Image->Format); + break; } }