From ca033ef4f1ecb61b2b688cb27e3964b53475a0bf Mon Sep 17 00:00:00 2001 From: DavidSM64 Date: Fri, 23 Oct 2015 19:59:11 -0500 Subject: [PATCH] Fixed dirt color --- source/Globals.h | 1 + source/Render.c | 1 + source/main.c | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/source/Globals.h b/source/Globals.h index 706ba81..2a87f47 100644 --- a/source/Globals.h +++ b/source/Globals.h @@ -55,6 +55,7 @@ u8 data[5][128*128]; u8 treeTable[256]; u16 rockTable[256]; u16 grassTable[16]; +int dirtColor[5]; char currentFileName[256]; extern u8 currentMenu; extern char fpsstr[]; diff --git a/source/Render.c b/source/Render.c index 8ceed54..316ca05 100644 --- a/source/Render.c +++ b/source/Render.c @@ -731,6 +731,7 @@ void renderMenuBackground(int xScroll, int yScroll) { } void renderBackground(int xScroll, int yScroll) { + sf2d_draw_rectangle(0, 0, 400, 240, dirtColor[currentLevel]); // dirt color int xo = xScroll >> 4; int yo = yScroll >> 4; int x, y; diff --git a/source/main.c b/source/main.c index ace61c1..758067e 100644 --- a/source/main.c +++ b/source/main.c @@ -219,6 +219,12 @@ int main() { loadSound(&snd_craft, "resources/craft.raw"); bakeLights(); + + dirtColor[0] = 0xAD9291FF; + dirtColor[1] = 0x826D6CFF; + dirtColor[2] = 0x666666FF; + dirtColor[3] = 0x555555FF; + dirtColor[4] = 0x444444FF; int i; for (i = 0; i < 5; ++i) {