@@ -85,8 +85,6 @@ rectangle menuBarRect;
|
|||||||
Region originalGrayRgn, newGrayRgn, underBarRgn;
|
Region originalGrayRgn, newGrayRgn, underBarRgn;
|
||||||
sf::View mainView;
|
sf::View mainView;
|
||||||
|
|
||||||
long anim_ticks = 0;
|
|
||||||
|
|
||||||
extern enum_map(eGuiArea, rectangle) win_to_rects;
|
extern enum_map(eGuiArea, rectangle) win_to_rects;
|
||||||
|
|
||||||
// 0 - title 1 - button 2 - credits 3 - base button
|
// 0 - title 1 - button 2 - credits 3 - base button
|
||||||
@@ -934,8 +932,6 @@ void draw_terrain(short mode) {
|
|||||||
if(fog_lifted) can_draw = true;
|
if(fog_lifted) can_draw = true;
|
||||||
|
|
||||||
if((can_draw != 0) && (overall_mode != MODE_RESTING)) { // if can see, not a pit, and not resting
|
if((can_draw != 0) && (overall_mode != MODE_RESTING)) { // if can see, not a pit, and not resting
|
||||||
if(is_combat()) anim_ticks = 0;
|
|
||||||
|
|
||||||
eTrimType trim = univ.scenario.ter_types[spec_terrain].trim_type;
|
eTrimType trim = univ.scenario.ter_types[spec_terrain].trim_type;
|
||||||
|
|
||||||
// Finally, draw this terrain spot
|
// Finally, draw this terrain spot
|
||||||
|
@@ -39,8 +39,6 @@ extern bool monsters_going;
|
|||||||
extern short num_targets_left;
|
extern short num_targets_left;
|
||||||
extern location spell_targets[8];
|
extern location spell_targets[8];
|
||||||
|
|
||||||
extern long anim_ticks;
|
|
||||||
|
|
||||||
extern char spot_seen[9][9];
|
extern char spot_seen[9][9];
|
||||||
extern short monster_index[21];
|
extern short monster_index[21];
|
||||||
|
|
||||||
@@ -52,6 +50,8 @@ extern cCustomGraphics spec_scen_g;
|
|||||||
rectangle boat_rects[4] = {{0,0,36,28}, {0,28,36,56},{0,56,36,84},{0,84,36,112}};
|
rectangle boat_rects[4] = {{0,0,36,28}, {0,28,36,56},{0,56,36,84},{0,84,36,112}};
|
||||||
bool gave_no_g_error = false;
|
bool gave_no_g_error = false;
|
||||||
|
|
||||||
|
long ter_anim_ticks = 0;
|
||||||
|
|
||||||
//short dest; // 0 - terrain gworld 1 - screen
|
//short dest; // 0 - terrain gworld 1 - screen
|
||||||
// if terrain_to_draw is -1, do black
|
// if terrain_to_draw is -1, do black
|
||||||
// if terrain_to_draw >= 10000, force to draw graphic which is terrain_to_draw - 10000
|
// if terrain_to_draw >= 10000, force to draw graphic which is terrain_to_draw - 10000
|
||||||
@@ -80,7 +80,7 @@ void draw_one_terrain_spot (short i,short j,short terrain_to_draw) {
|
|||||||
source_rect = calc_rect(terrain_to_draw % 10, terrain_to_draw / 10);
|
source_rect = calc_rect(terrain_to_draw % 10, terrain_to_draw / 10);
|
||||||
}
|
}
|
||||||
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 2000) { // custom
|
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 2000) { // custom
|
||||||
graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(univ.scenario.ter_types[terrain_to_draw].picture - 2000 + (anim_ticks % 4));
|
graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(univ.scenario.ter_types[terrain_to_draw].picture - 2000 + (ter_anim_ticks % 4));
|
||||||
}
|
}
|
||||||
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 1000) { // custom
|
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 1000) { // custom
|
||||||
graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(univ.scenario.ter_types[terrain_to_draw].picture - 1000);
|
graf_pos_ref(source_gworld, source_rect) = spec_scen_g.find_graphic(univ.scenario.ter_types[terrain_to_draw].picture - 1000);
|
||||||
@@ -88,7 +88,7 @@ void draw_one_terrain_spot (short i,short j,short terrain_to_draw) {
|
|||||||
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 960) { // animated
|
else if(univ.scenario.ter_types[terrain_to_draw].picture >= 960) { // animated
|
||||||
source_gworld = &ResMgr::graphics.get("teranim");
|
source_gworld = &ResMgr::graphics.get("teranim");
|
||||||
terrain_to_draw = univ.scenario.ter_types[terrain_to_draw].picture;
|
terrain_to_draw = univ.scenario.ter_types[terrain_to_draw].picture;
|
||||||
source_rect = calc_rect(4 * ((terrain_to_draw - 960) / 5) + (anim_ticks % 4),(terrain_to_draw - 960) % 5);
|
source_rect = calc_rect(4 * ((terrain_to_draw - 960) / 5) + (ter_anim_ticks % 4),(terrain_to_draw - 960) % 5);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
terrain_to_draw = univ.scenario.ter_types[terrain_to_draw].picture;
|
terrain_to_draw = univ.scenario.ter_types[terrain_to_draw].picture;
|
||||||
@@ -410,7 +410,7 @@ void draw_fields(location where){
|
|||||||
if(univ.town.is_web(where.x,where.y))
|
if(univ.town.is_web(where.x,where.y))
|
||||||
Draw_Some_Item(fields_gworld,calc_rect(5,0),terrain_screen_gworld(),where_draw,1,0);
|
Draw_Some_Item(fields_gworld,calc_rect(5,0),terrain_screen_gworld(),where_draw,1,0);
|
||||||
if(univ.town.is_fire_barr(where.x,where.y) || univ.town.is_force_barr(where.x,where.y))
|
if(univ.town.is_fire_barr(where.x,where.y) || univ.town.is_force_barr(where.x,where.y))
|
||||||
Draw_Some_Item(*ResMgr::graphics.get("teranim"),calc_rect(8+(anim_ticks%4),4),terrain_screen_gworld(),where_draw,1,0);
|
Draw_Some_Item(*ResMgr::graphics.get("teranim"),calc_rect(8+(ter_anim_ticks%4),4),terrain_screen_gworld(),where_draw,1,0);
|
||||||
if(univ.town.is_quickfire(where.x,where.y))
|
if(univ.town.is_quickfire(where.x,where.y))
|
||||||
Draw_Some_Item(fields_gworld,calc_rect(7,1),terrain_screen_gworld(),where_draw,1,0);
|
Draw_Some_Item(fields_gworld,calc_rect(7,1),terrain_screen_gworld(),where_draw,1,0);
|
||||||
if(univ.town.is_force_cage(where.x,where.y)) {
|
if(univ.town.is_force_cage(where.x,where.y)) {
|
||||||
|
@@ -208,7 +208,7 @@ std::unordered_map <std::string, std::shared_ptr <iEventListener>> event_listene
|
|||||||
cDrawableManager drawable_mgr;
|
cDrawableManager drawable_mgr;
|
||||||
|
|
||||||
sf::Clock animTimer;
|
sf::Clock animTimer;
|
||||||
extern long anim_ticks;
|
extern long ter_anim_ticks;
|
||||||
|
|
||||||
static void init_boe(int, char*[]);
|
static void init_boe(int, char*[]);
|
||||||
static void handle_scenario_args();
|
static void handle_scenario_args();
|
||||||
@@ -1464,7 +1464,7 @@ void update_terrain_animation() {
|
|||||||
if(overall_mode == MODE_STARTUP) return;
|
if(overall_mode == MODE_STARTUP) return;
|
||||||
if(animTimer.getElapsedTime().asMilliseconds() < fortyTicks) return;
|
if(animTimer.getElapsedTime().asMilliseconds() < fortyTicks) return;
|
||||||
|
|
||||||
anim_ticks++;
|
ter_anim_ticks++;
|
||||||
animTimer.restart();
|
animTimer.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,7 +56,6 @@ short monsters_faces[190] = {
|
|||||||
23,0,0,0,0,0,0,0,23,23,
|
23,0,0,0,0,0,0,0,23,23,
|
||||||
0,0,0,55,23,36,31,0,0,0};
|
0,0,0,55,23,36,31,0,0,0};
|
||||||
extern rectangle windRect;
|
extern rectangle windRect;
|
||||||
extern long anim_ticks;
|
|
||||||
extern tessel_ref_t bg[];
|
extern tessel_ref_t bg[];
|
||||||
extern short which_combat_type;
|
extern short which_combat_type;
|
||||||
extern eGameMode overall_mode;
|
extern eGameMode overall_mode;
|
||||||
|
Reference in New Issue
Block a user