mirror of
https://github.com/pevans/erc-c.git
synced 2024-10-15 00:23:42 +00:00
Remove screen area field; document area fields
This commit is contained in:
parent
27f91ec00f
commit
30223e0bca
@ -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;
|
||||
|
@ -61,7 +61,6 @@ vm_screen_create()
|
||||
|
||||
screen->window = NULL;
|
||||
screen->render = NULL;
|
||||
vm_area_set(&screen->area, 0, 0, 0, 0);
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user