mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-27 03:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			605 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			605 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <iostream>
 | |
| #include <fstream>
 | |
| 
 | |
| using namespace std;
 | |
| 
 | |
| #include "../servers/sdl_driver.hpp"
 | |
| 
 | |
| using namespace Mangle::Rend2D;
 | |
| 
 | |
| int main()
 | |
| {
 | |
|   SDLDriver sdl;
 | |
| 
 | |
|   sdl.setVideoMode(640,480,0,false);
 | |
|   sdl.setWindowTitle("Testing 123");
 | |
|   Sprite *screen = sdl.getScreen();
 | |
|   const char* imgName = "tile1-blue.png";
 | |
|   Sprite *image = sdl.loadImage(imgName);
 | |
| 
 | |
|   for(int frames=0; frames<170; frames++)
 | |
|     {
 | |
|       screen->fill(0);
 | |
|       for(int j=0; j<10; j++)
 | |
|         for(int i=0; i<25; i++)
 | |
|           screen->draw(image, 2*frames+30*j, 20*i);
 | |
|       sdl.update();
 | |
|       sdl.sleep(10);
 | |
|     }
 | |
|   return 0;
 | |
| }
 |