#include "Content\\ShellScriptsX\\stddefs.h" #define nMSG_StopMovie 69 #define nMSG_MovieStop 70 main { GUI_CREATE { object o_cinema = cinema_script focus(o_cinema) } } cinema_script { GUI_CREATE { if (exists(@mouse@)) { @mouse@pointer.showMousePointer = 0 } stop 0 location = 0, 0, 0 movie cinema if ($$DEMO_MultiPlayer$$ == 1) { cinema = szPATH_MOVIES "GameClosexMPD.mpg" } else { if ($$DEMO_SinglePlayer$$ == 1) { cinema = szPATH_MOVIES "GameClosexSPD.mpg" } } //scale (cinema) = 800, 600, 100 movie cinemaSecond if ($$DEMO_MultiPlayer$$ == 1) { cinemaSecond = szPATH_MOVIES "GameClosexMPD2.mpg" } else { if ($$DEMO_SinglePlayer$$ == 1) { cinemaSecond = szPATH_MOVIES"GameClosexSPD2.mpg" } } int playingsecond = 0 play cinema region = 0,0 to 800,600 framerate = 30 int mstop } LBUTTON_UPDATE { if (mouse.left == BUTTON_PRESSED) { spew "left click" mail(nMSG_StopMovie,this) } } GUI_DRAW { if (playingSecond) { render cinemaSecond, location } else { render cinema,location//,0,30 } } GUI_MAILBOX { if (mstop ==1) { return } if (getmessage() == nMSG_StopMovie || getmessage() == nMSG_MovieStop) { if ( playingsecond == 1) { unfocus terminate } else { stop cinema play cinemaSecond playingsecond = 1 } } } GUI_EXECUTE { if (getstatus(cinema) == 3) { play cinema } } GUI_CHAR { int ch = getchar() if (ch == char(" ")) // only escape or space exit the cinema { mail(nMSG_StopMovie,this) } if (ch == 27) { mail(nMSG_StopMovie,this) } } }