klips/cpp/sdl-cmake/apps/sdl-test.cpp

43 lines
1.4 KiB
C++
Raw Normal View History

2019-10-15 01:51:50 +00:00
/*#############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2019 Shaun Reed, all rights reserved ##
2020-06-12 04:35:55 +00:00
## Requires SDL: `sudo apt-get install libsdl2-dev` ##
## To build: `mkdir build && cd build && cmake .. cmake --build .` ##
2019-10-15 01:51:50 +00:00
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## apps/inherited.cpp
*/
#include <src/lib-sdl-test.h>
2019-10-15 01:51:50 +00:00
#include <iostream>
//#include <string>
int main (int argc, char const * argv[]) {
// Cast cli arguments to void since they are unused in this exe
(void)argc;
(void)argv;
// Ensure SDL is initialized before continuing
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
exit(2);
SDL_Window *window;
SDL_Renderer *renderer;
if (InitScreen(window, renderer) < 0)
std::cout << "Error - Unable to initialize SDL screen\n";
DrawDelay(renderer, 3000);
std::cout << "Test\n";
Shape shape(4,4), dShape;
Rectangle rect(4,8), dRect;
std::cout << dShape.PrintInfo() << std::endl;
std::cout << shape.PrintInfo() << std::endl;
std::cout << dRect.PrintInfo() << std::endl;
std::cout << rect.PrintInfo() << std::endl;
return 0;
}