--- /dev/null
+int main(){for(int i=0;++i<101;printf("%d%s%s\n",i,i%3?"":"\rFizz",i%5?"":"\rBuzz"+(i%3==0)));}
#include "vector.h"
#include "stl.h"
SDL_Event event;
-struct rgb {
- char r;
- char g;
- char b;
-};
rgb colorC(const color c) {
rgb colors;
char * arr = (char*)&colors;
c.rgb(arr);
return colors;
}
-class frame{
- public:
- size_t height;
- size_t width;
- rgb *framebuffer;
- frame(size_t height_, size_t width_){
- framebuffer = (rgb*)sdl_pixels_lock();
- height = height_;
- width = width_;
- }
- ~frame(){
- sdl_pixels_unlock();
- }
- rgb* operator[](const size_t h) {return framebuffer+h*width; }
- const rgb* operator[](const size_t h) const {return framebuffer+h*width; }
-};
double alias[2] = {.25,.5};
int threshold[2] = {30,10}; // corners sides
void sdl_frame();
char * sdl_pixels_lock();
void sdl_pixels_unlock();
+
+struct rgb {
+ char r;
+ char g;
+ char b;
+};
+
+class frame{
+ public:
+ size_t height;
+ size_t width;
+ rgb *framebuffer;
+ frame(size_t height_, size_t width_){
+ framebuffer = (rgb*)sdl_pixels_lock();
+ height = height_;
+ width = width_;
+ }
+ ~frame(){
+ sdl_pixels_unlock();
+ }
+ rgb* operator[](const size_t h) {return framebuffer+h*width; }
+ const rgb* operator[](const size_t h) const {return framebuffer+h*width; }
+};
void sdl_text(char * str);
#endif //__SDL_FUNC_H__
\ No newline at end of file