Mercurial > mm7
comparison 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 |
comparison
equal
deleted
inserted
replaced
631:3d03a3a674bc | 635:71ecba604995 |
---|---|
2415 v3 = v3 + this->pTileTypes[(v3 - 90) / 36].uTileID - 36 * ((v3 - 90) / 36) - 90; | 2415 v3 = v3 + this->pTileTypes[(v3 - 90) / 36].uTileID - 36 * ((v3 - 90) / 36) - 90; |
2416 } | 2416 } |
2417 else | 2417 else |
2418 v3 = v3 + this->pTileTypes[3].uTileID - 198; | 2418 v3 = v3 + this->pTileTypes[3].uTileID - 198; |
2419 | 2419 |
2420 static int f = 0; | 2420 #pragma region "New: seasons change" |
2421 if (f) | 2421 extern bool change_seasons; |
2422 pParty->uCurrentMonth = 2; | 2422 if (change_seasons) |
2423 | 2423 switch (pParty->uCurrentMonth) |
2424 switch (pParty->uCurrentMonth) | 2424 { |
2425 { | 2425 case 11: case 0: case 1: // winter |
2426 case 11: case 0: case 1: // winter | 2426 if (v3 >= 90) // Tileset_Grass begins at TileID = 90 |
2427 if (v3 >= 90) // Tileset_Grass begins at TileID = 90 | 2427 { |
2428 { | 2428 if (v3 <= 95) // some grastyl entries |
2429 if (v3 <= 95) // some grastyl entries | 2429 v3 = 348; |
2430 v3 = 348; | 2430 else if (v3 <= 113) // rest of grastyl & all grdrt* |
2431 else if (v3 <= 113) // rest of grastyl & all grdrt* | 2431 v3 = 348 + (v3 - 96); |
2432 v3 = 348 + (v3 - 96); | 2432 } |
2433 } | |
2434 /*switch (v3) | 2433 /*switch (v3) |
2435 { | 2434 { |
2436 case 102: v3 = 354; break; // grdrtNE -> SNdrtne | 2435 case 102: v3 = 354; break; // grdrtNE -> SNdrtne |
2437 case 104: v3 = 356; break; // grdrtNW -> SNdrtnw | 2436 case 104: v3 = 356; break; // grdrtNW -> SNdrtnw |
2438 case 108: v3 = 360; break; // grdrtN -> SNdrtn | 2437 case 108: v3 = 360; break; // grdrtN -> SNdrtn |
2439 }*/ | 2438 }*/ |
2440 break; | 2439 break; |
2441 | 2440 |
2442 case 2: case 3: case 4: // spring | 2441 case 2: case 3: case 4: // spring |
2443 case 8: case 9: case 10: // autumn | 2442 case 8: case 9: case 10: // autumn |
2444 if (v3 >= 90 && v3 <= 113) // just convert all Tileset_Grass to dirt | 2443 if (v3 >= 90 && v3 <= 113) // just convert all Tileset_Grass to dirt |
2445 v3 = 1; | 2444 v3 = 1; |
2446 break; | 2445 break; |
2447 | 2446 |
2448 case 5: case 6: case 7: // summer | 2447 case 5: case 6: case 7: // summer |
2449 //all tiles are green grass by default | 2448 //all tiles are green grass by default |
2450 break; | 2449 break; |
2451 | 2450 |
2452 default: assert(pParty->uCurrentMonth >= 0 && pParty->uCurrentMonth < 12); | 2451 default: assert(pParty->uCurrentMonth >= 0 && pParty->uCurrentMonth < 12); |
2453 } | 2452 } |
2453 #pragma endregion | |
2454 | 2454 |
2455 return pTileTable->pTiles[v3].uBitmapID; | 2455 return pTileTable->pTiles[v3].uBitmapID; |
2456 } | 2456 } |
2457 | 2457 |
2458 //----- (0047ED83) -------------------------------------------------------- | 2458 //----- (0047ED83) -------------------------------------------------------- |