diff --git a/include/app.h b/include/app.h deleted file mode 100644 index b6fe230..0000000 --- a/include/app.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAPP_H - -#define _CAPP_H - - -#include - - - -#endif diff --git a/include/vscreen.h b/include/vscreen.h index 8943fb1..c13def8 100644 --- a/include/vscreen.h +++ b/include/vscreen.h @@ -6,6 +6,7 @@ #define VSCREEN_WIDTH 640 #define VSCREEN_HEIGHT 480 #define VSCREEN_COLUMN_COUNT 20 +#define VSCREEN_ROW_COUNT 20 void renderClientScreen(SDL_Renderer *); diff --git a/src/main.c b/src/main.c index 4c741a1..1c5d5ae 100644 --- a/src/main.c +++ b/src/main.c @@ -63,8 +63,6 @@ int main(int argc, char* args[]) { handleInput(); - //blit(player.texture, player.x, player.y); - presentScene(); SDL_Delay(16); diff --git a/src/vscreen.c b/src/vscreen.c index 9352596..ffc5a04 100644 --- a/src/vscreen.c +++ b/src/vscreen.c @@ -2,13 +2,35 @@ #include #include #include +#include void renderClientScreen(SDL_Renderer* renderer) { SDL_Rect dest; SDL_RenderGetViewport(renderer, &dest); - SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); + SDL_Rect cell; + cell.w = dest.w / VSCREEN_COLUMN_COUNT; + cell.h = dest.h / VSCREEN_ROW_COUNT; + + int row = 0; + unsigned char backgroundColor = 0x00; - SDL_RenderFillRect(renderer, &dest); + for (int i = 0; i < VSCREEN_ROW_COUNT; i++) { + + for(int j = 0; j