summaryrefslogtreecommitdiffstats
path: root/src/area.c
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-02-19 02:21:55 (EST)
committer P. J. McDermott <pjm@nac.net>2013-02-19 02:21:55 (EST)
commit3804573d65c9aef27f212dcece16fdb8f57b5f7d (patch)
treee900d1670167f311b04dbfa6186661dbb0ffe199 /src/area.c
parent8aff6e6c8590c23f7935fef5085f683d95e24db0 (diff)
downloadoverworld-rpg-3804573d65c9aef27f212dcece16fdb8f57b5f7d.zip
overworld-rpg-3804573d65c9aef27f212dcece16fdb8f57b5f7d.tar.gz
overworld-rpg-3804573d65c9aef27f212dcece16fdb8f57b5f7d.tar.bz2
Improve demo and clean up main().
Diffstat (limited to 'src/area.c')
-rw-r--r--src/area.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/area.c b/src/area.c
index 111a1a8..b0daca0 100644
--- a/src/area.c
+++ b/src/area.c
@@ -121,6 +121,8 @@ render_area_to_surface(struct area *area, SDL_Rect *arearect,
SDL_Surface *surface, SDL_Rect *surfacerect)
{
SDL_Rect srcrect, dstrect;
+ /* For demo */
+ SDL_Rect tmprect;
memcpy(&srcrect, arearect, sizeof(srcrect));
memcpy(&dstrect, surfacerect, sizeof(dstrect));
@@ -130,6 +132,12 @@ render_area_to_surface(struct area *area, SDL_Rect *arearect,
SDL_FillRect(surface, &dstrect,
SDL_MapRGB(surface->format, 63, 63, 63));
+ /* For demo */
+ tmprect.x = dstrect.x + 112;
+ tmprect.y = dstrect.y + 72;
+ tmprect.w = 16;
+ tmprect.h = 16;
+
/* Avoid fun glitches due to negative coordinates in source
* rectangles. */
if (srcrect.x < 0) {
@@ -159,6 +167,10 @@ render_area_to_surface(struct area *area, SDL_Rect *arearect,
/* TODO: Blit low sprites. */
+ /* For demo */
+ SDL_FillRect(surface, &tmprect,
+ SDL_MapRGB(surface->format, 31, 31, 127));
+
/* Blit middle objects layer. */
SDL_BlitSurface(area->map_layers[AREA_LAYER_OBJ_MID], &srcrect,
surface, &dstrect);