Somepotato

AEIOU

Feb 3rd, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #ifndef blah
  2. #define SIMPLEDEBUG_W 30
  3. #define SIMPLEDEBUG_H 18
  4. #endif
  5. char charArray[SIMPLEDEBUG_W*SIMPLEDEBUG_H];
  6. void printChar(char c,float x, float y){
  7.     charArray[x+y*SIMPLEDEBUG_W]=c;
  8. }
  9. void print(char* str,float x, float y){
  10.     char* c;
  11.     c=str;
  12.     while(*c++){
  13.         printChar(c,x,y);
  14.         x++;
  15.     }
  16. }
  17. void SimpleDebug.Draw(){
  18.     float x,y;
  19.     dcolor SIMPLEDEBUG_COLOR;
  20.     for(x=0;x<SIMPLEDEBUG_W;x++){
  21.         for(y=0;y<SIMPLEDEBUG_H;y++){
  22.             SIMPLEDEBUG_CURPOS.x=x;
  23.             SIMPLEDEBUG_CURPOS.y=y;
  24.             dwrite SIMPLEDEBUG_CURPOS,charArray[x+y*SIMPLEDEBUG_W];
  25.         }
  26.     }
  27. }
  28. color SIMPLEDEBUG_COLOR,255,255,255;
  29. vec2f SIMPLEDEBUG_CURPOS,0,0;
Advertisement
Add Comment
Please, Sign In to add comment