diff --git a/bin/muffin/Makefile b/bin/muffin/Makefile index 062e4c0..d5c54eb 100644 --- a/bin/muffin/Makefile +++ b/bin/muffin/Makefile @@ -6,7 +6,7 @@ include ../Makefile.incl #Compiler Flags -CFLAGS = -g +CFLAGS = -std=c++11 # -DNOBOOL -fno-builtin -fno-exceptions #Linker @@ -31,15 +31,15 @@ # Link The Binary $(BINARY) : $(OBJS) - $(CC) $(CFLAGS) -o ${BUILD_DIR}/bin/$@ $(STARTUP) $(LIBRARIES) $(LIBRARIES2) $(OBJS) + $(CC) -static $(CFLAGS) -o ${BUILD_DIR}/bin/$@ $(LIBRARIES2) $(OBJS) #strip $(BINARY) # Compile the source files .cc.o: - $(CXX) -Wall -fomit-frame-pointer -O $(CFLAGS) $(INCLUDE2) -c -o $@ $< + $(CXX) -Wall -O $(CFLAGS) $(INCLUDE2) -c -o $@ $< .cc.s: - $(CXX) -Wall -fomit-frame-pointer -O $(CFLAGS) $(INCLUDE2) -S -o $@ $< + $(CXX) -Wall -O $(CFLAGS) $(INCLUDE2) -S -o $@ $< .c.o: $(CC) -Wall -O $(CFLAGS) $(INCLUDE) -c -o $@ $< diff --git a/bin/muffin/main.cc b/bin/muffin/main.cc index 1f8327b..906c0c5 100644 --- a/bin/muffin/main.cc +++ b/bin/muffin/main.cc @@ -28,32 +28,34 @@ #include #include -extern "C" { - #include - #include - #include - } +#include -int main() { +int main(int argc, char **argv) { vWindow *window = new vWindow(); uint16_t i = 0x0; uint16_t ii = 0x0; uint16_t iii = 0x0; - //if (fork() == 0x0) { window->vCreate(); // window->vSDECommand(1); + ogImage * image = new ogImage(); ogSurface * bgImage = new ogSurface(); + //image->Load("/var/background/ringed800_600.bmp", *bgImage); -//mage->Load("/var/background/sphere800x600.bmp", *bgImage); +//image->Load("/var/background/sphere800x600.bmp", *bgImage); image->Load("/var/background/carrot2_Running.bmp", *bgImage); +//bgImage->ogCreate(800,600,OG_PIXFMT_24BPP); + +//bgImage->ogLine(bgImage->ogGetMaxX(), bgImage->ogGetMaxY(), 0, 0, 0xFF00FFFF); window->ogCopy(*bgImage); -window->ogLine(0, 0, window->ogGetMaxX(), window->ogGetMaxY(), 0xFFFFFFFF); -window->vSDECommand(3); + +//window->ogLine(0, 0, window->ogGetMaxX(), window->ogGetMaxY(), 0x00FF00FF); +//window->vSDECommand(3); + return(0); while (1) { @@ -76,7 +78,5 @@ window->vSDECommand(4); - //} - return(0); } diff --git a/lib/objgfx/objgfx.cpp b/lib/objgfx/objgfx.cpp index 6b425e9..762279e 100644 --- a/lib/objgfx/objgfx.cpp +++ b/lib/objgfx/objgfx.cpp @@ -1338,8 +1338,16 @@ uInt8 r, g, b, a; void * srcPtr; - if (!ogAvail()) return; - if (!src.ogAvail()) return; +std::cout << "ogCopy" << std::endl; + + if (!ogAvail()) { +std::cout << "ogAvail" << std::endl; + return; + } + if (!src.ogAvail()) { +std::cout << "src.ogAvail" << std::endl; + return; + } xCount = src.maxX+1; if (xCount > maxX+1) xCount = maxX+1; diff --git a/lib/objgfx/objgfx40.so b/lib/objgfx/objgfx40.so index 6b44178..f037595 100755 --- a/lib/objgfx/objgfx40.so +++ b/lib/objgfx/objgfx40.so Binary files differ diff --git a/lib/objgfx/ogImage.cpp b/lib/objgfx/ogImage.cpp index d1596ac..bbe432e 100644 --- a/lib/objgfx/ogImage.cpp +++ b/lib/objgfx/ogImage.cpp @@ -224,8 +224,8 @@ ogImage::ogImage() : surface(nullptr), options(nullptr), - input(nullptr), - output(nullptr) + output(nullptr), + input(nullptr) { Decode[NoImage] = &ogImage::NoOp; Decode[BMP] = &ogImage::DecodeBMP; @@ -242,12 +242,20 @@ Win3xBitmapHeader bmpHeader; Win3xBitmapInfoHeader bmpInfoHeader; - if (!bmpHeader.Deserialize(*input)) return false; - if (!bmpInfoHeader.Deserialize(*input)) return false; + if (!bmpHeader.Deserialize(*input)) { + std::cout << "!bmpHeader" << std::endl; + return false; +} + if (!bmpInfoHeader.Deserialize(*input)) { + std::cout << "!bmpInfoHeader" << std::endl; +return false; +} size_t lineSize; size_t paddington; char linePadding[4]; + +std::cout <<"DecodeBMP" << std::endl; if (bmpInfoHeader.BitsPerPixel == 8) { @@ -507,6 +515,8 @@ assert(Decode.count(imageType) == 1); // make sure we can handle it + std::cout << "Load-istream2" << std::endl; + return (this->*Decode[imageType])(); // Decode } // bool ogImage::Load() diff --git a/lib/objgfx/ogPixCon.cpp b/lib/objgfx/ogPixCon.cpp index 21a8aad..af0d21f 100644 --- a/lib/objgfx/ogPixCon.cpp +++ b/lib/objgfx/ogPixCon.cpp @@ -1,148 +1,144 @@ -#include "objgfx.h" -#include "ogPixCon.h" - -// ogPixCon constructor -ogPixCon::ogPixCon(ogPixelFmt srcPixFmt, ogPixelFmt dstPixFmt) { - uInt8 channelIdx[4]; - uInt8 srcFieldSize[4]; - uInt8 srcFieldPos[4]; - uInt8 dstShifters[4]; - - uInt8 tmpb; - int32 i, j; - - channelIdx[0] = 0; - channelIdx[1] = 1; - channelIdx[2] = 2; - channelIdx[3] = 3; - - srcFieldSize[0] = srcPixFmt.alphaMaskSize; - srcFieldSize[1] = srcPixFmt.redMaskSize; - srcFieldSize[2] = srcPixFmt.greenMaskSize; - srcFieldSize[3] = srcPixFmt.blueMaskSize; - - srcFieldPos[0] = srcPixFmt.alphaFieldPosition; - srcFieldPos[1] = srcPixFmt.redFieldPosition; - srcFieldPos[2] = srcPixFmt.greenFieldPosition; - srcFieldPos[3] = srcPixFmt.blueFieldPosition; - - /* - * The dest shifters are 32-(fieldPosition+fieldSize). For things like - * 24bpp where there is no alpha, the field position will be 0, and the - * field size will be 0. 32-(0+0) is 32.. and when the shift takes place - * the 32 will turn into a 0 and the shift will do nothing - */ - - dstShifters[0] = 32-(dstPixFmt.alphaFieldPosition+dstPixFmt.alphaMaskSize); - dstShifters[1] = 32-(dstPixFmt.redFieldPosition+dstPixFmt.redMaskSize); - dstShifters[2] = 32-(dstPixFmt.greenFieldPosition+dstPixFmt.greenMaskSize); - dstShifters[3] = 32-(dstPixFmt.blueFieldPosition+dstPixFmt.blueMaskSize); - - i = srcPixFmt.redMaskSize - dstPixFmt.redMaskSize; - if (i>0) - srcMasker = ogPixelFmt::OG_MASKS[dstPixFmt.redMaskSize] << (srcPixFmt.redFieldPosition+i); - else - srcMasker = ogPixelFmt::OG_MASKS[srcPixFmt.redMaskSize] << srcPixFmt.redFieldPosition; - - i = srcPixFmt.greenMaskSize - dstPixFmt.greenMaskSize; - if (i>0) - srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.greenMaskSize] << (srcPixFmt.greenFieldPosition+i); - else - srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.greenMaskSize] << srcPixFmt.greenFieldPosition; - - i = srcPixFmt.blueMaskSize - dstPixFmt.blueMaskSize; - if (i>0) - srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.blueMaskSize] << (srcPixFmt.blueFieldPosition+i); - else - srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.blueMaskSize] << srcPixFmt.blueFieldPosition; - - i = srcPixFmt.alphaMaskSize - dstPixFmt.alphaMaskSize; - if (i>0) - srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.alphaMaskSize] << (srcPixFmt.alphaFieldPosition+i); - else - srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.alphaMaskSize] << srcPixFmt.alphaFieldPosition; - - /* - * sort in descending order based on srcFieldPos (oth field will hold - * highest position value) - */ - - for (i = 1; i < 4; i++ ) - for (j = 0; j < i; j++) { - if (srcFieldPos[j] < srcFieldPos[i]) { - tmpb = srcFieldPos[j]; - srcFieldPos[j] = srcFieldPos[i]; - srcFieldPos[i] = tmpb; - - tmpb = srcFieldSize[j]; - srcFieldSize[j] = srcFieldSize[i]; - srcFieldSize[i] = tmpb; - - tmpb = channelIdx[j]; - channelIdx[j] = channelIdx[i]; - channelIdx[i] = tmpb; - } // if - } // for j - - srcShifter = ((srcFieldSize[0] << 24) | - (srcFieldSize[1] << 16) | - (srcFieldSize[2] << 8) | - (srcFieldSize[3])); - - dstShifter = ((dstShifters[channelIdx[0]] << 24) | - (dstShifters[channelIdx[1]] << 16) | - (dstShifters[channelIdx[2]] << 8) | - (dstShifters[channelIdx[3]])); - return; -} // ogPixCon::ogPixCon() - -uInt32 ogPixCon::ConvPix(uInt32 pixel) -{ - /* - _asm { - xor ebx, ebx ; // ebx <- 0 - xor edi, edi ; // edi <- 0 - - mov eax, this - - mov edx, [eax + ogPixCon::srcMasker] - mov ecx, [eax + ogPixCon::srcShifter] ; // ecx <- src shifter - mov eax, [eax + ogPixCon::dstShifter] ; // eax <- dst shifter - mov esi, pixel ; // esi <- pixel to convert - - push eax ; // save the dest shifter for later - - and esi, edx ; // esi <- esi & srcMasker - xor eax, eax ; // eax <- 0 - xor edx, edx ; // edx <- 0 - - shrd eax, esi, cl ; // copy the 1st channel - shr esi, cl ; // shift the source - mov cl, ch ; // load next shifter - shrd ebx, esi, cl ; // copy the 2nd channel - shr esi, cl ; // shift the source - shr ecx, 16 ; // load the next shifter - shrd edx, esi, cl ; // copy the 3rd channel - shr esi, cl ; // shift the source - mov cl, ch ; // load the next shifter - shrd edi, esi, cl ; // copy the 4th channel - - pop ecx ; // restore the dest shifter - - shr eax, cl ; // shift 1st src chan to dest pos - shr ecx, 8 ; // load next shifter - shr ebx, cl ; // shift 2nd src chan to dest pos - shr ecx, 8 ; // load next shifter - shr edx, cl ; // shift 3rd src chan to dest pos - shr ecx, 8 ; // load next shifter - shr edi, cl ; // shift 4th src chan to dest pos - - or eax, ebx ; // combine 1st and 2nd channels - or edx, edi ; // combine 3rd and 4th channels - nop - or eax, edx ; // combine all to form new pixel - } // _asm -*/ - return 0; -} // uInt32 ogPixCon::ConvPix() - +#include "objgfx.h" +#include "ogPixCon.h" + +// ogPixCon constructor +ogPixCon::ogPixCon(ogPixelFmt srcPixFmt, ogPixelFmt dstPixFmt) { + uInt8 channelIdx[4]; + uInt8 srcFieldSize[4]; + uInt8 srcFieldPos[4]; + uInt8 dstShifters[4]; + + uInt8 tmpb; + int32 i, j; + + channelIdx[0] = 0; + channelIdx[1] = 1; + channelIdx[2] = 2; + channelIdx[3] = 3; + + srcFieldSize[0] = srcPixFmt.alphaMaskSize; + srcFieldSize[1] = srcPixFmt.redMaskSize; + srcFieldSize[2] = srcPixFmt.greenMaskSize; + srcFieldSize[3] = srcPixFmt.blueMaskSize; + + srcFieldPos[0] = srcPixFmt.alphaFieldPosition; + srcFieldPos[1] = srcPixFmt.redFieldPosition; + srcFieldPos[2] = srcPixFmt.greenFieldPosition; + srcFieldPos[3] = srcPixFmt.blueFieldPosition; + + /* + * The dest shifters are 32-(fieldPosition+fieldSize). For things like + * 24bpp where there is no alpha, the field position will be 0, and the + * field size will be 0. 32-(0+0) is 32.. and when the shift takes place + * the 32 will turn into a 0 and the shift will do nothing + */ + + dstShifters[0] = 32-(dstPixFmt.alphaFieldPosition+dstPixFmt.alphaMaskSize); + dstShifters[1] = 32-(dstPixFmt.redFieldPosition+dstPixFmt.redMaskSize); + dstShifters[2] = 32-(dstPixFmt.greenFieldPosition+dstPixFmt.greenMaskSize); + dstShifters[3] = 32-(dstPixFmt.blueFieldPosition+dstPixFmt.blueMaskSize); + + i = srcPixFmt.redMaskSize - dstPixFmt.redMaskSize; + if (i>0) + srcMasker = ogPixelFmt::OG_MASKS[dstPixFmt.redMaskSize] << (srcPixFmt.redFieldPosition+i); + else + srcMasker = ogPixelFmt::OG_MASKS[srcPixFmt.redMaskSize] << srcPixFmt.redFieldPosition; + + i = srcPixFmt.greenMaskSize - dstPixFmt.greenMaskSize; + if (i>0) + srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.greenMaskSize] << (srcPixFmt.greenFieldPosition+i); + else + srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.greenMaskSize] << srcPixFmt.greenFieldPosition; + + i = srcPixFmt.blueMaskSize - dstPixFmt.blueMaskSize; + if (i>0) + srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.blueMaskSize] << (srcPixFmt.blueFieldPosition+i); + else + srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.blueMaskSize] << srcPixFmt.blueFieldPosition; + + i = srcPixFmt.alphaMaskSize - dstPixFmt.alphaMaskSize; + if (i>0) + srcMasker += ogPixelFmt::OG_MASKS[dstPixFmt.alphaMaskSize] << (srcPixFmt.alphaFieldPosition+i); + else + srcMasker += ogPixelFmt::OG_MASKS[srcPixFmt.alphaMaskSize] << srcPixFmt.alphaFieldPosition; + + /* + * sort in descending order based on srcFieldPos (oth field will hold + * highest position value) + */ + + for (i = 1; i < 4; i++ ) + for (j = 0; j < i; j++) { + if (srcFieldPos[j] < srcFieldPos[i]) { + tmpb = srcFieldPos[j]; + srcFieldPos[j] = srcFieldPos[i]; + srcFieldPos[i] = tmpb; + + tmpb = srcFieldSize[j]; + srcFieldSize[j] = srcFieldSize[i]; + srcFieldSize[i] = tmpb; + + tmpb = channelIdx[j]; + channelIdx[j] = channelIdx[i]; + channelIdx[i] = tmpb; + } // if + } // for j + + srcShifter = ((srcFieldSize[0] << 24) | + (srcFieldSize[1] << 16) | + (srcFieldSize[2] << 8) | + (srcFieldSize[3])); + + dstShifter = ((dstShifters[channelIdx[0]] << 24) | + (dstShifters[channelIdx[1]] << 16) | + (dstShifters[channelIdx[2]] << 8) | + (dstShifters[channelIdx[3]])); + return; +} // ogPixCon::ogPixCon() + +uint32_t +ogPixCon::ConvPix(uint32_t pixel) { + __asm__ __volatile__( + " xor %%ebx, %%ebx \n" // xor ebx, ebx + " xor %%edi, %%edi \n" // xor edi, edi + " \n" + " push %%eax \n" // push eax + " \n" + " and %%edx, %%esi \n" // and esi, edx + " xor %%eax, %%eax \n" // xor eax, eax + " xor %%edx, %%edx \n" // xor edx, edx + " \n" + " shrdl %%cl, %%esi, %%eax \n" // shrd eax, esi, cl + " shr %%cl, %%esi \n" // shr esi, cl + " mov %%ch, %%cl \n" // mov cl, ch + " shrdl %%cl, %%esi, %%ebx \n" // shrd ebx, esi, cl + " shr %%cl, %%esi \n" // shr esi, cl + " shr $16, %%ecx \n" // shr ecx, 16 + " shrdl %%cl, %%esi, %%edx \n" // shrd edx, esi, cl + " shr %%cl, %%esi \n" // shr esi, cl + " mov %%ch, %%cl \n" // mov cl, ch + " shrdl %%cl, %%esi, %%edi \n" // shrd edi, esi, cl + " \n" + " pop %%ecx \n" // pop ecx + " \n" + " shr %%cl, %%eax \n" // shr eax, cl + " shr $8, %%ecx \n" // shr ecx, 8 + " shr %%cl, %%ebx \n" // shr ebx, cl + " shr $8, %%ecx \n" // shr ecx, 8 + " shr %%cl, %%edx \n" // shr edx, cl + " shr $8, %%ecx \n" // shr ecx, 8 + " shr %%cl, %%edi \n" // shr edi, cl + " \n" + " or %%ebx, %%eax \n" // or eax, ebx + " or %%edi, %%edx \n" // or edx, edi + " nop \n" // nop + " or %%edx, %%eax \n" // or eax, edx + + : "=a" (pixel) // %0 + : "S" (pixel), "d" (srcMasker), // %1, %2 + "c" (srcShifter), "a" (dstShifter) // %3, %4 + // "ecx" (srcShifter), "eax" (dstShifter) // %2, %3 + ); + return pixel; +}; // ogPixCon::ConvPix + diff --git a/sys/fs/vfs/file.c b/sys/fs/vfs/file.c index 9c44aab..35fb2b2 100644 --- a/sys/fs/vfs/file.c +++ b/sys/fs/vfs/file.c @@ -116,6 +116,8 @@ //int sys_fseek(userFileDescriptor *userFd,long offset,int whence) { int sys_fseek( struct thread *td, struct sys_fseek_args *args ) { + kprintf("offset: 0x%X, whence: 0x%X", args->offset, args->whence); + // TODO : coredump? if ( args->FILE == NULL ) { td->td_retval[0] = -1; @@ -127,10 +129,56 @@ return (-1); } - args->FILE->fd->offset = args->offset + args->whence; + + switch (args->whence) { + case 0: + args->FILE->fd->offset = args->offset + args->whence; + break; + case 1: + args->FILE->fd->offset += args->offset; + break; + default: + kprintf ("seek-whence: %i", args->whence); + break; + } + return (0); } +int sys_lseek( struct thread *td, struct sys_lseek_args *args ) { + int error = 0; + struct file *fdd = 0x0; + fileDescriptor_t *fd = 0x0; + + getfd(td, &fdd, args->fd); + + fd = fdd->fd; + + if (fdd == 0 || fdd->fd == 0x0) { + error = -1; + kprintf("ERROR!"); + } + + kprintf("offset: 0x%X, whence: 0x%X", args->offset, args->whence); + + switch (args->whence) { + case 0: + fd->offset = args->offset + args->whence; + td->td_retval[0] = fd->offset; + break; + case 1: + fd->offset += args->offset; + td->td_retval[0] = fd->offset; + break; + default: + kprintf ("seek-whence: %i", args->whence); + break; + } + + return (error); +} + + int sys_chdir( struct thread *td, struct sys_chdir_args *args ) { if ( strstr( args->path, ":" ) == 0x0 ) { sprintf( _current->oInfo.cwd, "%s%s", _current->oInfo.cwd, args->path ); @@ -410,8 +458,7 @@ /* in order to save resources we will allocate the buffer later when it is needed */ tmpFd->buffer = (char *) kmalloc( 4096 ); - if ( tmpFd->buffer == 0x0 ) - { + if ( tmpFd->buffer == 0x0 ) { kfree( tmpFd ); kprintf( "Error: tmpFd->buffer == NULL, File: %s, Line: %i\n", __FILE__, __LINE__ ); spinUnlock( &fdTable_lock ); @@ -444,6 +491,7 @@ return (tmpFd); } else { + kprintf("Freeing"); kfree( tmpFd->buffer ); kfree( tmpFd ); spinUnlock( &fdTable_lock ); @@ -480,6 +528,7 @@ systemVitals->openFiles--; spinUnlock( &fdTable_lock ); +kprintf("Fclose\n"); if ( tmpFd->buffer != NULL ) kfree( tmpFd->buffer ); kfree( tmpFd ); diff --git a/sys/include/sys/sysproto_posix.h b/sys/include/sys/sysproto_posix.h index 80d1f15..904c267 100644 --- a/sys/include/sys/sysproto_posix.h +++ b/sys/include/sys/sysproto_posix.h @@ -215,6 +215,17 @@ int whence; char whence_r_[PADR_(int)]; }; +struct sys_lseek_args { + char fd_l_[PADL_(uint32_t)]; + uint32_t fd; + char fd_r_[PADR_(uint32_t)]; + char offset_l_[PADL_(long)]; + long offset; + char offset_r_[PADR_(long)]; + char whence_l_[PADL_(int)]; + int whence; + char whence_r_[PADR_(int)]; +}; struct sys_sysctl_args { char name_l_[PADL_(int *)]; @@ -701,6 +712,7 @@ int sys_fclose(struct thread *td, struct sys_fclose_args *); int sys_fgetc(struct thread *td, struct sys_fgetc_args *); int sys_fseek(struct thread *td, struct sys_fseek_args *); +int sys_lseek(struct thread *td, struct sys_lseek_args *); int sys_sched_yield(struct thread *td, void *); diff --git a/sys/kernel/syscalls_posix.c b/sys/kernel/syscalls_posix.c index f2ee8b0..55aee11 100644 --- a/sys/kernel/syscalls_posix.c +++ b/sys/kernel/syscalls_posix.c @@ -509,7 +509,7 @@ { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 475 - Invalid */ { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 476 - Invalid */ { ARG_COUNT(sys_mmap_args), "MMAP", (sys_call_t *) sys_mmap, SYSCALL_VALID }, /* 477 - sys_mmap */ - { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 478 - Invalid */ + { ARG_COUNT(sys_lseek_args), "lseek", (sys_call_t *) sys_lseek, SYSCALL_VALID }, /* 478 - sys_lseek */ { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 359 - Invalid */ { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 350 - Invalid */ { 0, "No Call", sys_invalid, SYSCALL_VALID }, /* 351 - Invalid */ diff --git a/sys/kernel/vfs_calls.c b/sys/kernel/vfs_calls.c index 2bf501d..aa13043 100644 --- a/sys/kernel/vfs_calls.c +++ b/sys/kernel/vfs_calls.c @@ -153,9 +153,8 @@ kprintf("[%i]", uap->nbyte); buffer = kmalloc(uap->nbyte); memcpy(buffer, uap->buf, uap->nbyte); - //kprint(buffer); - kfree(buffer); kprintf("(%i) %s", uap->fd, uap->buf); + kfree(buffer); td->td_retval[0] = uap->nbyte; } return (0x0); diff --git a/sys/sde/sde.cc b/sys/sde/sde.cc index 028719e..ea025d8 100644 --- a/sys/sde/sde.cc +++ b/sys/sde/sde.cc @@ -69,6 +69,7 @@ kprintf("oldBuf->ogGetBPP(): %i\n", oldBuf->ogGetBPP()); screen->ogCopyBuf(screen->ogGetMaxX() - oldBuf->ogGetMaxX(), screen->ogGetMaxY() - oldBuf->ogGetMaxY(), *oldBuf, 0, 0, oldBuf->ogGetMaxX(), oldBuf->ogGetMaxY()); kprintf("sX: %i, oX: %i, sY: %i, oY: %i", screen->ogGetMaxX(), oldBuf->ogGetMaxX(), screen->ogGetMaxY(), oldBuf->ogGetMaxY()); + kprintf("sID: 0x%X, oID: 0x%X", screen->ogGetPixFmtID(), oldBuf->ogGetPixFmtID()); // oldBuf->ogLine(0, 0, oldBuf->ogGetMaxX(), oldBuf->ogGetMaxY(), 0xFFFFFFFF); // kprintf("Did ogLine\n"); // screen->ogCopyBuf(screen->ogGetMaxX() - oldBuf->ogGetMaxX(), screen->ogGetMaxY() - oldBuf->ogGetMaxY(), *oldBuf, 0, 0, oldBuf->ogGetMaxX(), oldBuf->ogGetMaxY());