575 |
} |
} |
576 |
} |
} |
577 |
|
|
578 |
void |
void |
579 |
DL_Sprites::draw (px::GC &gc, const WorldArea &a, int x, int y) |
DL_Sprites::draw (px::GC &/*gc*/, const WorldArea &/*a*/, int /*x*/, int /*y*/) |
580 |
{} |
{} |
581 |
|
|
582 |
|
|
824 |
inline bool only_image_shadows (Model *models[4], ImageQuad &q) { |
inline bool only_image_shadows (Model *models[4], ImageQuad &q) { |
825 |
int nimages=4; |
int nimages=4; |
826 |
|
|
827 |
for (int i=0; i<4; ++i) |
for (int i=0; i<4; ++i) |
828 |
{ |
{ |
829 |
if (models[i] == 0) |
if (models[i] == 0) |
830 |
{ |
{ |
965 |
return 0; |
return 0; |
966 |
} |
} |
967 |
|
|
968 |
/* |
/* |
969 |
* Try to lookup the shadow created by the four models in `models[]' in the |
* Try to lookup the shadow created by the four models in `models[]' in the |
970 |
* shadow cache. Of course, because shadows aren't easy in general, there |
* shadow cache. Of course, because shadows aren't easy in general, there |
971 |
* are a few complications. |
* are a few complications. |
981 |
ImageQuad images; |
ImageQuad images; |
982 |
|
|
983 |
// Only cache static stone shadows, i.e., those consisting |
// Only cache static stone shadows, i.e., those consisting |
984 |
// only of Image models. |
// only of Image models. |
985 |
if (only_image_shadows (models, images)) { |
if (only_image_shadows (models, images)) { |
986 |
shadow = find_in_cache(images); |
shadow = find_in_cache(images); |
987 |
if (!shadow) { |
if (!shadow) { |
1096 |
DL_Shadows::get_shadow_model(int x, int y) |
DL_Shadows::get_shadow_model(int x, int y) |
1097 |
{ |
{ |
1098 |
if (x >= 0 && y >= 0) { |
if (x >= 0 && y >= 0) { |
1099 |
if (Model *m = m_grid->get_model(x,y)) |
if (Model *m = m_grid->get_model(x,y)) |
1100 |
return m; //return m->get_shadow(); |
return m; //return m->get_shadow(); |
1101 |
} |
} |
1102 |
return 0; |
return 0; |
1214 |
void |
void |
1215 |
Follower::center(const px::V2 &point) |
Follower::center(const px::V2 &point) |
1216 |
{ |
{ |
1217 |
set_offset(V2 (int(point[0] / m_hoff) * m_hoff, |
set_offset(V2 (int(point[0] / m_hoff) * m_hoff, |
1218 |
int(point[1] / m_voff) * m_voff)); |
int(point[1] / m_voff) * m_voff)); |
1219 |
} |
} |
1220 |
|
|
1268 |
engine->mark_redraw_screen(); |
engine->mark_redraw_screen(); |
1269 |
else |
else |
1270 |
break; |
break; |
1271 |
} |
} |
1272 |
} |
} |
1273 |
|
|
1274 |
|
|
1279 |
scrollspeed(0), resttime(0) |
scrollspeed(0), resttime(0) |
1280 |
{} |
{} |
1281 |
|
|
1282 |
void |
void |
1283 |
Follower_Scrolling::center(const px::V2 &point) |
Follower_Scrolling::center(const px::V2 &point) |
1284 |
{ |
{ |
1285 |
Follower::center(point); |
Follower::center(point); |
1526 |
{ |
{ |
1527 |
switch (m) { |
switch (m) { |
1528 |
case FOLLOW_NONE: set_follower(0); break; |
case FOLLOW_NONE: set_follower(0); break; |
1529 |
case FOLLOW_SCROLLING: |
case FOLLOW_SCROLLING: |
1530 |
set_follower (new Follower_Scrolling(get_engine())); break; |
set_follower (new Follower_Scrolling(get_engine())); break; |
1531 |
case FOLLOW_SCREEN: |
case FOLLOW_SCREEN: |
1532 |
set_follower (new Follower_Screen(get_engine())); break; |
set_follower (new Follower_Screen(get_engine())); break; |
1533 |
}; |
}; |
1534 |
} |
} |
1604 |
draw_borders(gc); |
draw_borders(gc); |
1605 |
} |
} |
1606 |
|
|
1607 |
void |
void |
1608 |
GameDisplay::draw_borders (GC &gc) |
GameDisplay::draw_borders (GC &gc) |
1609 |
{ |
{ |
1610 |
RectList rl; |
RectList rl; |