Add more comments

develop
Warmist 2018-10-12 13:37:49 +03:00
parent 5c1b7030e7
commit ff452f9181
1 changed files with 3 additions and 1 deletions

@ -54,8 +54,9 @@ static int render_map_rect(lua_State* L)
int z = luaL_checkint(L, 3); int z = luaL_checkint(L, 3);
int w = luaL_checkint(L, 4); int w = luaL_checkint(L, 4);
int h = luaL_checkint(L, 5); int h = luaL_checkint(L, 5);
//backup state
uint8_t *s = df::global::gps->screen; uint8_t *s = df::global::gps->screen;
//backup state
//TODO: figure out if we can replace screen with other pointer. That way it could be a bit more tidy
int32_t win_h = df::global::gps->dimy; int32_t win_h = df::global::gps->dimy;
int32_t was_x = *window_x; int32_t was_x = *window_x;
int32_t was_y = *window_y; int32_t was_y = *window_y;
@ -69,6 +70,7 @@ static int render_map_rect(lua_State* L)
*window_z = z; *window_z = z;
//force full redraw //force full redraw
df::global::gps->force_full_display_count = 1; df::global::gps->force_full_display_count = 1;
//this modifies screen so it REALLY wants to redraw stuff
for (int ty = 0; ty < h; ty++) for (int ty = 0; ty < h; ty++)
for (int tx = 0; tx < w; tx++) for (int tx = 0; tx < w; tx++)
{ {