Mercurial > mm7
diff Outdoor.cpp @ 635:71ecba604995
Season change affects vegetation;
bool change_seasons == true - seasons change, otherwise eternal summer
author | Nomad |
---|---|
date | Mon, 11 Mar 2013 16:54:56 +0200 |
parents | 1b813023fcbd |
children | ccf8b4815a1f |
line wrap: on
line diff
--- a/Outdoor.cpp Mon Mar 11 03:38:59 2013 +0200 +++ b/Outdoor.cpp Mon Mar 11 16:54:56 2013 +0200 @@ -2417,40 +2417,40 @@ else v3 = v3 + this->pTileTypes[3].uTileID - 198; - static int f = 0; - if (f) - pParty->uCurrentMonth = 2; - - switch (pParty->uCurrentMonth) - { - case 11: case 0: case 1: // winter - if (v3 >= 90) // Tileset_Grass begins at TileID = 90 - { - if (v3 <= 95) // some grastyl entries - v3 = 348; - else if (v3 <= 113) // rest of grastyl & all grdrt* - v3 = 348 + (v3 - 96); - } + #pragma region "New: seasons change" + extern bool change_seasons; + if (change_seasons) + switch (pParty->uCurrentMonth) + { + case 11: case 0: case 1: // winter + if (v3 >= 90) // Tileset_Grass begins at TileID = 90 + { + if (v3 <= 95) // some grastyl entries + v3 = 348; + else if (v3 <= 113) // rest of grastyl & all grdrt* + v3 = 348 + (v3 - 96); + } /*switch (v3) { case 102: v3 = 354; break; // grdrtNE -> SNdrtne case 104: v3 = 356; break; // grdrtNW -> SNdrtnw case 108: v3 = 360; break; // grdrtN -> SNdrtn }*/ - break; + break; + + case 2: case 3: case 4: // spring + case 8: case 9: case 10: // autumn + if (v3 >= 90 && v3 <= 113) // just convert all Tileset_Grass to dirt + v3 = 1; + break; - case 2: case 3: case 4: // spring - case 8: case 9: case 10: // autumn - if (v3 >= 90 && v3 <= 113) // just convert all Tileset_Grass to dirt - v3 = 1; - break; + case 5: case 6: case 7: // summer + //all tiles are green grass by default + break; - case 5: case 6: case 7: // summer - //all tiles are green grass by default - break; - - default: assert(pParty->uCurrentMonth >= 0 && pParty->uCurrentMonth < 12); - } + default: assert(pParty->uCurrentMonth >= 0 && pParty->uCurrentMonth < 12); + } + #pragma endregion return pTileTable->pTiles[v3].uBitmapID; }