diff --git a/include/vm_screen.h b/include/vm_screen.h index 88b7e31..4a9bcba 100644 --- a/include/vm_screen.h +++ b/include/vm_screen.h @@ -8,9 +8,21 @@ #define VM_SCREEN_DEFHEIGHT 600 typedef struct { + /* + * These are the x and y coordinate offsets in the logical dimension + * established in a vm_screen. An offset of (0, 0) would be in the + * top-left; (5, 5) would be 5 pixels down, and 5 pixels to the + * right, of that top-left corner. + */ int xoff; int yoff; + /* + * These are the width and height of the area we're defining. A + * single pixel in the logical area would have a width and height of + * (1, 1); use larger numbers to indicate a larger square (if the + * two are equal) or rectangle (if unequal). + */ int width; int height; } vm_area; @@ -18,7 +30,6 @@ typedef struct { typedef struct { SDL_Window *window; SDL_Renderer *render; - vm_area area; int xcoords; int ycoords; diff --git a/src/vm_screen.c b/src/vm_screen.c index b946323..e8ba829 100644 --- a/src/vm_screen.c +++ b/src/vm_screen.c @@ -61,7 +61,6 @@ vm_screen_create() screen->window = NULL; screen->render = NULL; - vm_area_set(&screen->area, 0, 0, 0, 0); return screen; } diff --git a/tests/vm_screen.c b/tests/vm_screen.c index 5a40f7e..fc14d7b 100644 --- a/tests/vm_screen.c +++ b/tests/vm_screen.c @@ -33,10 +33,6 @@ Test(vm_screen, create) { cr_assert_eq(screen->window, NULL); cr_assert_eq(screen->render, NULL); - cr_assert_eq(screen->area.xoff, 0); - cr_assert_eq(screen->area.yoff, 0); - cr_assert_eq(screen->area.width, 0); - cr_assert_eq(screen->area.height, 0); cr_assert_eq(screen->xcoords, 0); cr_assert_eq(screen->ycoords, 0); }