Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef blah
- #define SIMPLEDEBUG_W 30
- #define SIMPLEDEBUG_H 18
- #endif
- char charArray[SIMPLEDEBUG_W*SIMPLEDEBUG_H];
- void printChar(char c,float x, float y){
- charArray[x+y*SIMPLEDEBUG_W]=c;
- }
- void print(char* str,float x, float y){
- char* c;
- c=str;
- while(*c++){
- printChar(c,x,y);
- x++;
- }
- }
- void SimpleDebug.Draw(){
- float x,y;
- dcolor SIMPLEDEBUG_COLOR;
- for(x=0;x<SIMPLEDEBUG_W;x++){
- for(y=0;y<SIMPLEDEBUG_H;y++){
- SIMPLEDEBUG_CURPOS.x=x;
- SIMPLEDEBUG_CURPOS.y=y;
- dwrite SIMPLEDEBUG_CURPOS,charArray[x+y*SIMPLEDEBUG_W];
- }
- }
- }
- color SIMPLEDEBUG_COLOR,255,255,255;
- vec2f SIMPLEDEBUG_CURPOS,0,0;
Advertisement
Add Comment
Please, Sign In to add comment