diff --git a/main/main.cpp b/main/main.cpp index 8dbc8b4..1f17a93 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -75,54 +75,96 @@ int main(){ vkvm::registerEvent(vkvm::Timer, [](){ std::cout <<"picture" << std::endl; vkvm::Color backgroundColor = vkvm::getBackgroundColor(); + for(int i = 0; i<1000; i++) { Imagedisplay imagedisplay("../src/P6.bmp"); for (int w = 0; w < vkvm::getWidth(); w++) { for (int h = 0; h < vkvm::getHeight(); h++) { + vkvm::setMode(vkvm::GraphicMode(2)); unsigned int a ; a = imagedisplay.getPixel(w, h); vkvm::setPixel(w,h,vkvm::Color(a)); - } } - outPutPixel(vkvm::getHeight() ,vkvm::getWidth()); - sleep(5); + sleep(3); + vkvm::setDefaultValues(); + for (int w = 0; w < vkvm::getWidth(); w++) { + for (int h = 0; h < vkvm::getHeight(); h++) { + vkvm::setMode(vkvm::GraphicMode(4)); + unsigned int a ; + a = imagedisplay.getPixel(w, h); + vkvm::setPixel(w,h,vkvm::Color(a)); + } + } + sleep(3); vkvm::setDefaultValues(); Imagedisplay imagedisplay2("../src/P8.bmp"); for (int w = 0; w < vkvm::getWidth(); w++) { for (int h = 0; h < vkvm::getHeight(); h++) { + vkvm::setMode(vkvm::GraphicMode(3)); unsigned int a ; a = imagedisplay2.getPixel(w, h); vkvm::setPixel(w,h,vkvm::Color(a)); } } - sleep(5); + sleep(3); + vkvm::setDefaultValues(); + + for (int w = 0; w < vkvm::getWidth(); w++) { + for (int h = 0; h < vkvm::getHeight(); h++) { + vkvm::setMode(vkvm::GraphicMode(4)); + unsigned int a ; + a = imagedisplay2.getPixel(w, h); + vkvm::setPixel(w,h,vkvm::Color(a)); + } + } + sleep(3); vkvm::setDefaultValues(); Imagedisplay imagedisplay3("../src/P9.bmp"); for (int w = 0; w < vkvm::getWidth(); w++) { for (int h = 0; h < vkvm::getHeight(); h++){ + vkvm::setMode(vkvm::GraphicMode(3)); unsigned int a ; a = imagedisplay3.getPixel(w, h); vkvm::setPixel(w,h,vkvm::Color(a)); } - } - sleep(5); + sleep(3); + vkvm::setDefaultValues(); + for (int w = 0; w < vkvm::getWidth(); w++) { + for (int h = 0; h < vkvm::getHeight(); h++) { + vkvm::setMode(vkvm::GraphicMode(4)); + unsigned int a ; + a = imagedisplay3.getPixel(w, h); + vkvm::setPixel(w,h,vkvm::Color(a)); + } + } + sleep(3); vkvm::setDefaultValues(); - Imagedisplay imagedisplay4("../src/P10.bmp"); for (int w = 0; w < vkvm::getWidth(); w++) { for (int h = 0; h < vkvm::getHeight(); h++){ + vkvm::setMode(vkvm::GraphicMode(3)); unsigned int a ; a = imagedisplay4.getPixel(w, h); vkvm::setPixel(w,h,vkvm::Color(a)); } - } - sleep(5); + sleep(3); + vkvm::setDefaultValues(); + for (int w = 0; w < vkvm::getWidth(); w++) { + for (int h = 0; h < vkvm::getHeight(); h++){ + vkvm::setMode(vkvm::GraphicMode(4)); + unsigned int a ; + a = imagedisplay4.getPixel(w, h); + vkvm::setPixel(w,h,vkvm::Color(a)); + } + } + sleep(3); + outPutPixel(vkvm::getHeight() ,vkvm::getWidth()); } }); @@ -130,12 +172,12 @@ int main(){ } - void outPutPixel(int windowHeight, int windowWidth) { for(int y = 0; y < windowHeight; y++) { for(int x = 0; x < windowWidth; x++) { if(vkvm::getPixel(x, y).getRed() !=0) { - std::cout << "*"; + std::cout << "*" ; + } else { std::cout << " "; } diff --git a/src/font1.bmp b/src/font1.bmp new file mode 100644 index 0000000..56e6810 Binary files /dev/null and b/src/font1.bmp differ diff --git a/src/test.bmp b/src/test.bmp new file mode 100644 index 0000000..a9a6d72 Binary files /dev/null and b/src/test.bmp differ diff --git a/src/test1.bmp b/src/test1.bmp new file mode 100644 index 0000000..40a274d Binary files /dev/null and b/src/test1.bmp differ diff --git a/src/test2.bmp b/src/test2.bmp new file mode 100644 index 0000000..24c7409 Binary files /dev/null and b/src/test2.bmp differ