Skip to content

Commit

Permalink
Fix linux build, badly merged file
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed Aug 28, 2011
1 parent af75c28 commit 7d41a1d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 24 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,6 @@ IF(UNIX)
# ${PROJECT_LIBS}
# )
ELSE()
SET(PROJECT_LIBS
allegro
allegro_primitives
allegro_font
allegro_image
allegro_ttf
${PROJECT_LIBS}
)
OPTION(STONESENSE_INTERNAL_SO "Link with prebuilt internal allegro libs and headers." ON)
IF(STONESENSE_INTERNAL_SO)
SET(PROJECT_LIBS
Expand Down
60 changes: 44 additions & 16 deletions SpriteObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,27 +619,55 @@ void c_sprite::draw_world_offset(int x, int y, int z, Block * b, int tileoffset,
{
int foo = 0;
if(
(snowmin <= b->snowlevel &&
(snowmax == -1 || snowmax >= b->snowlevel)) &&
(bloodmin <= b->bloodlevel && (bloodmax == -1 || bloodmax >= b->bloodlevel)) &&
(mudmin <= b->mudlevel && (mudmax == -1 || mudmax >= b->mudlevel)) &&
(grassmin <= b->grasslevel && (grassmax == -1 || grassmax >= b->grasslevel)) &&
((light==LIGHTANY) || ((light==LIGHTYES) && b->designation.bits.skyview) || ((light==LIGHTNO) && !(b->designation.bits.skyview))) &&//only bother with this tile if it's in the light, or not.
((grasstype == -1) || (grasstype == b->grassmat)) &&
(
(grass_growth == GRASS_GROWTH_ANY) ||
snowmin <= b->snowlevel &&
(snowmax == -1 || snowmax >= b->snowlevel)
) &&
(
(grass_growth == GRASS_GROWTH_NORMAL) &&
((tileTypeTable[b->tileType].material == GRASS) || (tileTypeTable[b->tileType].material == GRASS2))
) ||
bloodmin <= b->bloodlevel &&
(bloodmax == -1 || bloodmax >= b->bloodlevel)
) &&
(
(grass_growth == GRASS_GROWTH_DRY) &&
(tileTypeTable[b->tileType].material == GRASS_DRY)
) ||
mudmin <= b->mudlevel &&
(mudmax == -1 || mudmax >= b->mudlevel)
) &&
(
(grass_growth == GRASS_GROWTH_DEAD) &&
(tileTypeTable[b->tileType].material == GRASS_DEAD)
grassmin <= b->grasslevel &&
(grassmax == -1 || grassmax >= b->grasslevel)
) &&
//only bother with this tile if it's in the light, or not.
(
(light==LIGHTANY) ||
(
(light==LIGHTYES) && b->designation.bits.skyview
)
||
(
(light==LIGHTNO) && !(b->designation.bits.skyview)
)
) &&
(
(grasstype == -1) || (grasstype == b->grassmat)
) &&
(
(grass_growth == GRASS_GROWTH_ANY) ||
(
(grass_growth == GRASS_GROWTH_NORMAL) &&
(
(tileTypeTable[b->tileType].material == GRASS) ||
(tileTypeTable[b->tileType].material == GRASS2)
)
) ||
(
(grass_growth == GRASS_GROWTH_DRY) &&
(tileTypeTable[b->tileType].material == GRASS_DRY)
) ||
(
(grass_growth == GRASS_GROWTH_DEAD) &&
(tileTypeTable[b->tileType].material == GRASS_DEAD)
)
)
)
{
int32_t drawx = x;
int32_t drawy = y;
Expand Down

0 comments on commit 7d41a1d

Please sign in to comment.