mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
fixed opening sequence in 'Isle of Anduin'
This commit is contained in:
parent
04acf18631
commit
6f2f574960
@ -82,50 +82,76 @@ Defeat:
|
|||||||
[/message]
|
[/message]
|
||||||
[/event]
|
[/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]
|
[event]
|
||||||
name=start
|
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
|
#the ship that brought them here
|
||||||
[command]
|
[move_unit_fake]
|
||||||
[move_unit_fake]
|
type=Galleon
|
||||||
type=Galleon
|
x=32,32,32,32,32,31,31,31,31
|
||||||
x=32,32,32,32,32,31,31,31,31
|
y=1,2,3,4,5,6,7,8,9
|
||||||
y=1,2,3,4,5,6,7,8,9
|
[/move_unit_fake]
|
||||||
[/move_unit_fake]
|
[item]
|
||||||
[item]
|
x=31
|
||||||
x=31
|
y=9
|
||||||
y=9
|
image=galleon.png
|
||||||
image=galleon.png
|
[/item]
|
||||||
[/item]
|
|
||||||
[/command]
|
|
||||||
|
|
||||||
#move Konrad out of the ship and onto the keep
|
#move Konrad out of the ship and onto the keep
|
||||||
[command]
|
[move_unit_fake]
|
||||||
[move_unit_fake]
|
type=$konrad_store.type
|
||||||
type=Commander
|
x=31,30,29,28,27,26,25
|
||||||
x=31,30,29,28,27,26,25
|
y=9,9,10,10,11,11,12
|
||||||
y=9,9,10,10,11,11,12
|
[/move_unit_fake]
|
||||||
[/move_unit_fake]
|
|
||||||
[/command]
|
|
||||||
|
|
||||||
#show Konrad
|
#show Konrad
|
||||||
[command]
|
[unstore_unit]
|
||||||
[unhide_unit]
|
variable=konrad_store
|
||||||
[/unhide_unit]
|
[/unstore_unit]
|
||||||
[/command]
|
{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]
|
[command]
|
||||||
[recall]
|
|
||||||
description=Delfador
|
|
||||||
[/recall]
|
|
||||||
[message]
|
[message]
|
||||||
id=msg2_1
|
id=msg2_1
|
||||||
speaker=narrator
|
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);
|
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,
|
SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
|
||||||
const SDL_Color& colour, const std::string& txt,
|
const SDL_Color& colour, const std::string& txt,
|
||||||
int x, int y, SDL_Surface* bg, bool use_tooltips,
|
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,
|
int x, int y, SDL_Surface* bg=NULL,
|
||||||
bool use_tooltips=false, MARKUP use_markup=USE_MARKUP);
|
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.
|
// Returns a SDL surface containing only the text rendered in a given colour.
|
||||||
SDL_Surface* get_rendered_text(const std::string& str, int size,
|
SDL_Surface* get_rendered_text(const std::string& str, int size,
|
||||||
const SDL_Color& colour);
|
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";
|
std::cerr << "done handling command...\n";
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user