Removed some unused variables from the engine state
svn-id: r41123
This commit is contained in:
parent
7b31585e39
commit
d405b2880b
7 changed files with 25 additions and 49 deletions
|
@ -370,8 +370,6 @@ int script_init_engine(EngineState *s, sci_version_t version) {
|
||||||
s->_executionStack.clear(); // Start without any execution stack
|
s->_executionStack.clear(); // Start without any execution stack
|
||||||
s->execution_stack_base = -1; // No vm is running yet
|
s->execution_stack_base = -1; // No vm is running yet
|
||||||
|
|
||||||
s->parser_lastmatch_word = SAID_NO_MATCH;
|
|
||||||
|
|
||||||
s->_kernel = new Kernel(s->resmgr, (s->flags & GF_SCI0_OLD));
|
s->_kernel = new Kernel(s->resmgr, (s->flags & GF_SCI0_OLD));
|
||||||
s->_vocabulary = new Vocabulary(s->resmgr);
|
s->_vocabulary = new Vocabulary(s->resmgr);
|
||||||
|
|
||||||
|
|
|
@ -2567,8 +2567,6 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
#define K_ANIMATE_SCROLL_DOWN 0x2a
|
#define K_ANIMATE_SCROLL_DOWN 0x2a
|
||||||
#define K_ANIMATE_SCROLL_UP 0x2b
|
#define K_ANIMATE_SCROLL_UP 0x2b
|
||||||
|
|
||||||
#define K_ANIMATE_OPEN_SIMPLE 100 // No animation
|
|
||||||
|
|
||||||
#define GRAPH_BLANK_BOX(s, x, y, xl, yl, color) GFX_ASSERT(gfxop_fill_box(s->gfx_state, \
|
#define GRAPH_BLANK_BOX(s, x, y, xl, yl, color) GFX_ASSERT(gfxop_fill_box(s->gfx_state, \
|
||||||
gfx_rect(x, (((y) < 10)? 10 : (y)), xl, (((y) < 10)? ((y) - 10) : 0) + (yl)), s->ega_colors[color]));
|
gfx_rect(x, (((y) < 10)? 10 : (y)), xl, (((y) < 10)? ((y) - 10) : 0) + (yl)), s->ega_colors[color]));
|
||||||
|
|
||||||
|
@ -2576,6 +2574,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
gfx_rect(x, (((y) < 10)? 10 : (y)) - 10, xl, (((y) < 10)? ((y) - 10) : 0) + (yl)), Common::Point(x, ((y) < 10)? 10 : (y) )));
|
gfx_rect(x, (((y) < 10)? 10 : (y)) - 10, xl, (((y) < 10)? ((y) - 10) : 0) + (yl)), Common::Point(x, ((y) < 10)? 10 : (y) )));
|
||||||
|
|
||||||
static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
|
long animation_delay = 5;
|
||||||
int i, remaining_checkers;
|
int i, remaining_checkers;
|
||||||
int update_counter;
|
int update_counter;
|
||||||
int granularity0 = s->animation_granularity << 1;
|
int granularity0 = s->animation_granularity << 1;
|
||||||
|
@ -2604,9 +2603,6 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
|
|
||||||
gfxop_enable_dirty_frames(s->gfx_state);
|
gfxop_enable_dirty_frames(s->gfx_state);
|
||||||
|
|
||||||
if (s->animation_delay < 1)
|
|
||||||
s->pic_animate = K_ANIMATE_OPEN_SIMPLE;
|
|
||||||
|
|
||||||
switch (s->pic_animate) {
|
switch (s->pic_animate) {
|
||||||
case K_ANIMATE_BORDER_CLOSE_H_CENTER_OPEN_H :
|
case K_ANIMATE_BORDER_CLOSE_H_CENTER_OPEN_H :
|
||||||
for (i = 0; i < 159 + granularity1; i += granularity1) {
|
for (i = 0; i < 159 + granularity1; i += granularity1) {
|
||||||
|
@ -2614,7 +2610,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
GRAPH_BLANK_BOX(s, 319 - i, 10, granularity1, 190, 0);
|
GRAPH_BLANK_BOX(s, 319 - i, 10, granularity1, 190, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2626,7 +2622,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
GRAPH_UPDATE_BOX(s, 319 - i, 10, granularity1, 190);
|
GRAPH_UPDATE_BOX(s, 319 - i, 10, granularity1, 190);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2639,7 +2635,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
GRAPH_BLANK_BOX(s, 0, 199 - i, 320, granularity2, 0);
|
GRAPH_BLANK_BOX(s, 0, 199 - i, 320, granularity2, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, 2 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 2 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2651,7 +2647,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
GRAPH_UPDATE_BOX(s, 0, 199 - i, 320, granularity2);
|
GRAPH_UPDATE_BOX(s, 0, 199 - i, 320, granularity2);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, 2 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 2 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2662,7 +2658,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 0; i < 319 + granularity0; i += granularity0) {
|
for (i = 0; i < 319 + granularity0; i += granularity0) {
|
||||||
GRAPH_BLANK_BOX(s, i, 10, granularity0, 190, 0);
|
GRAPH_BLANK_BOX(s, i, 10, granularity0, 190, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 2 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 2 / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2671,7 +2667,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 319; i >= 1 - granularity0; i -= granularity0) {
|
for (i = 319; i >= 1 - granularity0; i -= granularity0) {
|
||||||
GRAPH_UPDATE_BOX(s, i, 10, granularity0, 190);
|
GRAPH_UPDATE_BOX(s, i, 10, granularity0, 190);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 2 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 2 / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2682,7 +2678,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 319; i >= 1 - granularity0; i -= granularity0) {
|
for (i = 319; i >= 1 - granularity0; i -= granularity0) {
|
||||||
GRAPH_BLANK_BOX(s, i, 10, granularity0, 190, 0);
|
GRAPH_BLANK_BOX(s, i, 10, granularity0, 190, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 2 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 2 / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2692,7 +2688,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 0; i < 319 + granularity0; i += granularity0) {
|
for (i = 0; i < 319 + granularity0; i += granularity0) {
|
||||||
GRAPH_UPDATE_BOX(s, i, 10, granularity0, 190);
|
GRAPH_UPDATE_BOX(s, i, 10, granularity0, 190);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 2 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 2 / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2703,7 +2699,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 10; i < 199 + granularity1; i += granularity1) {
|
for (i = 10; i < 199 + granularity1; i += granularity1) {
|
||||||
GRAPH_BLANK_BOX(s, 0, i, 320, granularity1, 0);
|
GRAPH_BLANK_BOX(s, 0, i, 320, granularity1, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2713,7 +2709,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 199; i >= 11 - granularity1; i -= granularity1) {
|
for (i = 199; i >= 11 - granularity1; i -= granularity1) {
|
||||||
GRAPH_UPDATE_BOX(s, 0, i, 320, granularity1);
|
GRAPH_UPDATE_BOX(s, 0, i, 320, granularity1);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2724,7 +2720,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 199; i >= 11 - granularity1; i -= granularity1) {
|
for (i = 199; i >= 11 - granularity1; i -= granularity1) {
|
||||||
GRAPH_BLANK_BOX(s, 0, i, 320, granularity1, 0);
|
GRAPH_BLANK_BOX(s, 0, i, 320, granularity1, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
GRAPH_BLANK_BOX(s, 0, 10, 320, 190, 0);
|
||||||
|
@ -2734,7 +2730,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
for (i = 10; i < 199 + granularity1; i += granularity1) {
|
for (i = 10; i < 199 + granularity1; i += granularity1) {
|
||||||
GRAPH_UPDATE_BOX(s, 0, i, 320, granularity1);
|
GRAPH_UPDATE_BOX(s, 0, i, 320, granularity1);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2759,7 +2755,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GRAPH_BLANK_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l, 0);
|
GRAPH_BLANK_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
|
|
||||||
gfxop_sleep(s->gfx_state, 4 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 4 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2782,7 +2778,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GRAPH_UPDATE_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l);
|
GRAPH_UPDATE_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
|
|
||||||
gfxop_sleep(s->gfx_state, 4 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 4 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2807,7 +2803,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GRAPH_BLANK_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l, 0);
|
GRAPH_BLANK_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l, 0);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
|
|
||||||
gfxop_sleep(s->gfx_state, 7 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 7 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2830,7 +2826,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GRAPH_UPDATE_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l);
|
GRAPH_UPDATE_BOX(s, width, 200 - height_l - height, 320 - 2 * width, height_l);
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
|
|
||||||
gfxop_sleep(s->gfx_state, 7 * s->animation_delay / 1000);
|
gfxop_sleep(s->gfx_state, 7 * animation_delay / 1000);
|
||||||
process_sound_events(s);
|
process_sound_events(s);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2865,7 +2861,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remaining_checkers & 1) {
|
if (remaining_checkers & 1) {
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 4 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 4 / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
--remaining_checkers;
|
--remaining_checkers;
|
||||||
|
@ -2897,7 +2893,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remaining_checkers & 1) {
|
if (remaining_checkers & 1) {
|
||||||
gfxop_sleep(s->gfx_state, s->animation_delay / 4 / 1000);
|
gfxop_sleep(s->gfx_state, animation_delay / 4 / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
--remaining_checkers;
|
--remaining_checkers;
|
||||||
|
@ -2912,7 +2908,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(320 - i, 0, i, 190), Common::Point(0, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(320 - i, 0, i, 190), Common::Point(0, 10)));
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, 0, 320 - i, 190), Common::Point(i, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, 0, 320 - i, 190), Common::Point(i, 10)));
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, (s->animation_delay >> 3) / 1000);
|
gfxop_sleep(s->gfx_state, (animation_delay >> 3) / 1000);
|
||||||
}
|
}
|
||||||
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
||||||
break;
|
break;
|
||||||
|
@ -2923,7 +2919,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 0, i, 190), Common::Point(319 - i, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 0, i, 190), Common::Point(319 - i, 10)));
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(i, 0, 320 - i, 190), Common::Point(0, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(i, 0, 320 - i, 190), Common::Point(0, 10)));
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, (s->animation_delay >> 3) / 1000);
|
gfxop_sleep(s->gfx_state, (animation_delay >> 3) / 1000);
|
||||||
}
|
}
|
||||||
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
||||||
break;
|
break;
|
||||||
|
@ -2934,7 +2930,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 190 - i, 320, i), Common::Point(0, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 190 - i, 320, i), Common::Point(0, 10)));
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, 0, 320, 190 - i), Common::Point(0, 10 + i)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, 0, 320, 190 - i), Common::Point(0, 10 + i)));
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, (s->animation_delay >> 3) / 1000);
|
gfxop_sleep(s->gfx_state, (animation_delay >> 3) / 1000);
|
||||||
}
|
}
|
||||||
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
||||||
break;
|
break;
|
||||||
|
@ -2945,14 +2941,13 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 0, 320, i), Common::Point(0, 200 - i)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, newscreen, gfx_rect(0, 0, 320, i), Common::Point(0, 200 - i)));
|
||||||
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, i, 320, 190 - i), Common::Point(0, 10)));
|
GFX_ASSERT(gfxop_draw_pixmap(s->gfx_state, s->old_screen, gfx_rect(0, i, 320, 190 - i), Common::Point(0, 10)));
|
||||||
gfxop_update(s->gfx_state);
|
gfxop_update(s->gfx_state);
|
||||||
gfxop_sleep(s->gfx_state, (s->animation_delay >> 3) / 1000);
|
gfxop_sleep(s->gfx_state, (animation_delay >> 3) / 1000);
|
||||||
}
|
}
|
||||||
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (s->pic_animate != K_ANIMATE_OPEN_SIMPLE)
|
warning("Unknown opening animation 0x%02x", s->pic_animate);
|
||||||
warning("Unknown opening animation 0x%02x", s->pic_animate);
|
|
||||||
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
GRAPH_UPDATE_BOX(s, 0, 10, 320, 190);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2963,7 +2958,7 @@ static void animate_do_animation(EngineState *s, int funct_nr, int argc, reg_t *
|
||||||
}
|
}
|
||||||
|
|
||||||
reg_t kAnimate(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
reg_t kAnimate(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
// Animations are supposed to take a maximum of s->animation_delay milliseconds.
|
// Animations are supposed to take a maximum of animation_delay milliseconds.
|
||||||
reg_t cast_list_ref = KP_ALT(0, NULL_REG);
|
reg_t cast_list_ref = KP_ALT(0, NULL_REG);
|
||||||
int cycle = (KP_ALT(1, NULL_REG)).offset;
|
int cycle = (KP_ALT(1, NULL_REG)).offset;
|
||||||
List *cast_list = NULL;
|
List *cast_list = NULL;
|
||||||
|
|
|
@ -120,10 +120,7 @@ reg_t kSaid(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
if (new_lastmatch != SAID_PARTIAL_MATCH)
|
if (new_lastmatch != SAID_PARTIAL_MATCH)
|
||||||
PUT_SEL32V(s->parser_event, claimed, 1);
|
PUT_SEL32V(s->parser_event, claimed, 1);
|
||||||
|
|
||||||
s->parser_lastmatch_word = new_lastmatch;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
s->parser_lastmatch_word = SAID_NO_MATCH;
|
|
||||||
return NULL_REG;
|
return NULL_REG;
|
||||||
}
|
}
|
||||||
return s->r_acc;
|
return s->r_acc;
|
||||||
|
@ -196,8 +193,6 @@ reg_t kParse(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||||
|
|
||||||
s->parser_event = event;
|
s->parser_event = event;
|
||||||
|
|
||||||
s->parser_lastmatch_word = SAID_NO_MATCH;
|
|
||||||
|
|
||||||
if (s->parser_valid == 2) {
|
if (s->parser_valid == 2) {
|
||||||
sciprintf("Parsing skipped: Parser in simparse mode\n");
|
sciprintf("Parsing skipped: Parser in simparse mode\n");
|
||||||
return s->r_acc;
|
return s->r_acc;
|
||||||
|
|
|
@ -777,7 +777,6 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
|
||||||
|
|
||||||
// Now copy all current state information
|
// Now copy all current state information
|
||||||
// Graphics and input state:
|
// Graphics and input state:
|
||||||
retval->animation_delay = s->animation_delay;
|
|
||||||
retval->animation_granularity = s->animation_granularity;
|
retval->animation_granularity = s->animation_granularity;
|
||||||
retval->gfx_state = s->gfx_state;
|
retval->gfx_state = s->gfx_state;
|
||||||
retval->old_screen = 0;
|
retval->old_screen = 0;
|
||||||
|
@ -845,7 +844,6 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
|
||||||
retval->bp_list = s->bp_list;
|
retval->bp_list = s->bp_list;
|
||||||
|
|
||||||
retval->kernel_opt_flags = 0;
|
retval->kernel_opt_flags = 0;
|
||||||
retval->have_mouse_flag = 1;
|
|
||||||
|
|
||||||
retval->successor = NULL;
|
retval->successor = NULL;
|
||||||
retval->pic_priority_table = (int *)gfxop_get_pic_metainfo(retval->gfx_state);
|
retval->pic_priority_table = (int *)gfxop_get_pic_metainfo(retval->gfx_state);
|
||||||
|
|
|
@ -42,7 +42,6 @@ EngineState::EngineState() : _dirseeker(this) {
|
||||||
sound_mute = 0;
|
sound_mute = 0;
|
||||||
|
|
||||||
restarting_flags = 0;
|
restarting_flags = 0;
|
||||||
have_mouse_flag = 0;
|
|
||||||
|
|
||||||
pic_not_valid = 0;
|
pic_not_valid = 0;
|
||||||
pic_is_new = 0;
|
pic_is_new = 0;
|
||||||
|
@ -72,7 +71,6 @@ EngineState::EngineState() : _dirseeker(this) {
|
||||||
|
|
||||||
drop_views = 0;
|
drop_views = 0;
|
||||||
|
|
||||||
animation_delay = 0;
|
|
||||||
animation_granularity = 0;
|
animation_granularity = 0;
|
||||||
|
|
||||||
_menubar = 0;
|
_menubar = 0;
|
||||||
|
@ -104,7 +102,6 @@ EngineState::EngineState() : _dirseeker(this) {
|
||||||
parser_event = NULL_REG;
|
parser_event = NULL_REG;
|
||||||
script_000 = 0;
|
script_000 = 0;
|
||||||
|
|
||||||
parser_lastmatch_word = 0;
|
|
||||||
bp_list = 0;
|
bp_list = 0;
|
||||||
have_bp = 0;
|
have_bp = 0;
|
||||||
sys_strings_segment = 0;
|
sys_strings_segment = 0;
|
||||||
|
|
|
@ -133,7 +133,6 @@ public:
|
||||||
unsigned int sound_mute; /**< 0 = not, else == saved value */
|
unsigned int sound_mute; /**< 0 = not, else == saved value */
|
||||||
|
|
||||||
byte restarting_flags; /**< Flags used for restarting */
|
byte restarting_flags; /**< Flags used for restarting */
|
||||||
byte have_mouse_flag; /**< Do we have a hardware pointing device? */
|
|
||||||
|
|
||||||
byte pic_not_valid; /**< Is 0 if the background picture is "valid" */
|
byte pic_not_valid; /**< Is 0 if the background picture is "valid" */
|
||||||
byte pic_is_new; /**< New pic was loaded or port was opened */
|
byte pic_is_new; /**< New pic was loaded or port was opened */
|
||||||
|
@ -162,10 +161,8 @@ public:
|
||||||
int pic_animate; /**< The animation used by Animate() to display the picture */
|
int pic_animate; /**< The animation used by Animate() to display the picture */
|
||||||
|
|
||||||
GfxList *dyn_views; /**< Pointers to pic and dynamic view lists */
|
GfxList *dyn_views; /**< Pointers to pic and dynamic view lists */
|
||||||
|
|
||||||
GfxList *drop_views; /**< A list Animate() can dump dropped dynviews into */
|
GfxList *drop_views; /**< A list Animate() can dump dropped dynviews into */
|
||||||
|
|
||||||
long animation_delay; /**< A delay factor for pic opening animations. Defaults to 500. */
|
|
||||||
int animation_granularity; /**< Number of animation steps to perform betwen updates for transition animations */
|
int animation_granularity; /**< Number of animation steps to perform betwen updates for transition animations */
|
||||||
|
|
||||||
Menubar *_menubar; /**< The menu bar */
|
Menubar *_menubar; /**< The menu bar */
|
||||||
|
@ -213,8 +210,6 @@ public:
|
||||||
|
|
||||||
uint16 currentRoomNumber() const { return KP_UINT(script_000->locals_block->_locals[13]); }
|
uint16 currentRoomNumber() const { return KP_UINT(script_000->locals_block->_locals[13]); }
|
||||||
|
|
||||||
int parser_lastmatch_word; /**< Position of the input word the parser last matched on, or SAID_NO_MATCH */
|
|
||||||
|
|
||||||
/* Debugger data: */
|
/* Debugger data: */
|
||||||
Breakpoint *bp_list; /**< List of breakpoints */
|
Breakpoint *bp_list; /**< List of breakpoints */
|
||||||
int have_bp; /**< Bit mask specifying which types of breakpoints are used in bp_list */
|
int have_bp; /**< Bit mask specifying which types of breakpoints are used in bp_list */
|
||||||
|
|
|
@ -200,8 +200,6 @@ Common::Error SciEngine::run() {
|
||||||
GfxState gfx_state;
|
GfxState gfx_state;
|
||||||
gfx_state.driver = &gfx_driver_scummvm;
|
gfx_state.driver = &gfx_driver_scummvm;
|
||||||
|
|
||||||
gamestate->have_mouse_flag = 1;
|
|
||||||
gamestate->animation_delay = 5;
|
|
||||||
gamestate->animation_granularity = 4;
|
gamestate->animation_granularity = 4;
|
||||||
gamestate->gfx_state = &gfx_state;
|
gamestate->gfx_state = &gfx_state;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue