fixed opening sequence in 'Isle of Anduin'
This commit is contained in:
parent
04acf18631
commit
6f2f574960
4 changed files with 74 additions and 34 deletions
|
@ -82,50 +82,76 @@ Defeat:
|
|||
[/message]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=prestart
|
||||
[store_unit]
|
||||
variable=konrad_store
|
||||
kill=yes
|
||||
[filter]
|
||||
description=Konrad
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
[store_unit]
|
||||
variable=delfador_store
|
||||
kill=yes
|
||||
[filter]
|
||||
description=Delfador
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=start
|
||||
|
||||
#hide Konrad until his unit moves there
|
||||
[command]
|
||||
[hide_unit]
|
||||
x=25
|
||||
y=12
|
||||
[/hide_unit]
|
||||
[/command]
|
||||
|
||||
#the ship that brought them here
|
||||
[command]
|
||||
[move_unit_fake]
|
||||
type=Galleon
|
||||
x=32,32,32,32,32,31,31,31,31
|
||||
y=1,2,3,4,5,6,7,8,9
|
||||
[/move_unit_fake]
|
||||
[item]
|
||||
x=31
|
||||
y=9
|
||||
image=galleon.png
|
||||
[/item]
|
||||
[/command]
|
||||
[move_unit_fake]
|
||||
type=Galleon
|
||||
x=32,32,32,32,32,31,31,31,31
|
||||
y=1,2,3,4,5,6,7,8,9
|
||||
[/move_unit_fake]
|
||||
[item]
|
||||
x=31
|
||||
y=9
|
||||
image=galleon.png
|
||||
[/item]
|
||||
|
||||
#move Konrad out of the ship and onto the keep
|
||||
[command]
|
||||
[move_unit_fake]
|
||||
type=Commander
|
||||
x=31,30,29,28,27,26,25
|
||||
y=9,9,10,10,11,11,12
|
||||
[/move_unit_fake]
|
||||
[/command]
|
||||
[move_unit_fake]
|
||||
type=$konrad_store.type
|
||||
x=31,30,29,28,27,26,25
|
||||
y=9,9,10,10,11,11,12
|
||||
[/move_unit_fake]
|
||||
|
||||
#show Konrad
|
||||
[command]
|
||||
[unhide_unit]
|
||||
[/unhide_unit]
|
||||
[/command]
|
||||
[unstore_unit]
|
||||
variable=konrad_store
|
||||
[/unstore_unit]
|
||||
{CLEAR_VARIABLE konrad_store}
|
||||
|
||||
[redraw]
|
||||
[/redraw]
|
||||
|
||||
#move Delfador out of the ship and onto the keep
|
||||
[move_unit_fake]
|
||||
type=$delfador_store.type
|
||||
x=31,30,29,28,27,26,25
|
||||
y=9,9,10,10,11,11,11
|
||||
[/move_unit_fake]
|
||||
|
||||
#set Delfador's position
|
||||
{VARIABLE delfador_store.x 25}
|
||||
{VARIABLE delfador_store.y 11}
|
||||
|
||||
#show Delfador
|
||||
[unstore_unit]
|
||||
variable=delfador_store
|
||||
[/unstore_unit]
|
||||
{CLEAR_VARIABLE konrad_store}
|
||||
|
||||
[redraw]
|
||||
[/redraw]
|
||||
|
||||
[command]
|
||||
[recall]
|
||||
description=Delfador
|
||||
[/recall]
|
||||
[message]
|
||||
id=msg2_1
|
||||
speaker=narrator
|
||||
|
|
|
@ -337,6 +337,12 @@ SDL_Rect draw_text_line(display* gui, const SDL_Rect& area, int size,
|
|||
return draw_text_line(surface, area, size, colour, text, x, y, bg, use_tooltips);
|
||||
}
|
||||
|
||||
SDL_Rect text_area(const std::string& text, int size)
|
||||
{
|
||||
const SDL_Rect area = {0,0,10000,10000};
|
||||
return draw_text(NULL,area,size,font::NORMAL_COLOUR,text,0,0);
|
||||
}
|
||||
|
||||
SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
|
||||
const SDL_Color& colour, const std::string& txt,
|
||||
int x, int y, SDL_Surface* bg, bool use_tooltips,
|
||||
|
|
|
@ -68,6 +68,9 @@ SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
|
|||
int x, int y, SDL_Surface* bg=NULL,
|
||||
bool use_tooltips=false, MARKUP use_markup=USE_MARKUP);
|
||||
|
||||
//function which returns the size of text if it were to be drawn.
|
||||
SDL_Rect text_area(const std::string& text, int size);
|
||||
|
||||
// Returns a SDL surface containing only the text rendered in a given colour.
|
||||
SDL_Surface* get_rendered_text(const std::string& str, int size,
|
||||
const SDL_Color& colour);
|
||||
|
|
|
@ -1072,6 +1072,11 @@ bool event_handler::handle_event_command(const queued_event& event_info, const s
|
|||
}
|
||||
}
|
||||
|
||||
else if(cmd == "redraw") {
|
||||
screen->invalidate_all();
|
||||
screen->draw(true);
|
||||
}
|
||||
|
||||
std::cerr << "done handling command...\n";
|
||||
|
||||
return rval;
|
||||
|
|
Loading…
Add table
Reference in a new issue