In editor builds the intro & sneak peak will open the scenario editor.

This commit is contained in:
Justin Marshall
2020-06-23 19:23:21 -07:00
parent 6d50fb6fca
commit 96bc8e95ff
7 changed files with 119 additions and 19 deletions
+57
View File
@@ -0,0 +1,57 @@
[Basic]
Name=In the thick of it
Intro=<none>
Brief=<none>
Win=<none>
Lose=<none>
Action=<none>
Player=Greece
Theme=No theme
CarryOverMoney=0
ToCarryOver=no
ToInherit=no
TimerInherit=no
CivEvac=no
NewINIFormat=3
CarryOverCap=0
EndOfGame=no
NoSpyPlane=no
SkipScore=no
OneTimeOnly=no
SkipMapSelect=no
Official=yes
FillSilos=no
TruckCrate=no
Percent=0
[Map]
Theater=SNOW
X=49
Y=49
Width=30
Height=30
[Waypoints]
98=8256
99=8256
[MapPack]
1=BwAAIIH//v8f/4AHAAAggf/+/x//gAcAACCB//7/H/+ABwAAIIH//v8f/4AHAAAggQD+/x
2=8AgAcAACCBAP7/HwCA
[Base]
Player=USSR
Count=0
[OverlayPack]
1=BwAAIIH//v8f/4AHAAAggf/+/x//gA==
[Briefing]
1=Rescue Einstein from the Headquarters inside this Soviet complex. Once
2=found, evacuate him via the helicopter at the signal flare. Einstein and
3=Tanya must be kept alive at all costs. Beware the Soviet's Tesla Coils.
4=Direct Tanya to destroy the westmost power plants to take them off-line.
[Digest]
1=bUa2F8EZhneJpy9AdS3S50JUrJE=
+1
View File
@@ -70,6 +70,7 @@ extern bool Debug_Cheat;
extern bool Debug_Remap; extern bool Debug_Remap;
extern bool Debug_Flag; extern bool Debug_Flag;
extern bool Debug_Lose; extern bool Debug_Lose;
extern bool Debug_SkipBriefing;
extern bool Debug_Map; extern bool Debug_Map;
extern bool Debug_Win; extern bool Debug_Win;
extern bool Debug_Icon; extern bool Debug_Icon;
+1
View File
@@ -43,6 +43,7 @@ bool Debug_Remap = false;
bool Debug_Icon = false; bool Debug_Icon = false;
bool Debug_Flag = true; bool Debug_Flag = true;
bool Debug_Lose = false; bool Debug_Lose = false;
bool Debug_SkipBriefing = false;
bool Debug_Win = false; bool Debug_Win = false;
bool Debug_Map = false; // true = map editor mode bool Debug_Map = false; // true = map editor mode
bool Debug_Passable = false; // true = show passable/impassable terrain bool Debug_Passable = false; // true = show passable/impassable terrain
+30 -1
View File
@@ -1294,6 +1294,34 @@ bool Select_Game(bool fade)
** Play a VQ ** Play a VQ
*/ */
case SEL_INTRO: case SEL_INTRO:
// jmarshall
#ifdef SCENARIO_EDITOR
Debug_Map = true;
Clear_Scenario();
//Scen.Set_Scenario_Name(1, SCEN_PLAYER_SPAIN, SCEN_DIR_EAST, SCEN_VAR_A);
strcpy(Scen.ScenarioName, "DEFAULTMAP.INI");
/*
** Create houses
*/
for (HousesType house = HOUSE_FIRST; house < HOUSE_COUNT; house++) {
new HouseClass(house);
}
PlayerPtr = HouseClass::As_Pointer(HOUSE_SPAIN);
PlayerPtr->IsHuman = true;
Base.House = HOUSE_USSR;
//LastHouse = HOUSE_GOOD;
Fill_In_Data();
//Size_Map(-1, -1, 30, 30);
Scen.Waypoint[WAYPT_REINF] = XY_Cell(Map.MapCellX + Map.MapCellWidth / 2, Map.MapCellY + Map.MapCellHeight / 2);
Scen.Waypoint[WAYPT_HOME] = XY_Cell(Map.MapCellX + Map.MapCellWidth / 2, Map.MapCellY + Map.MapCellHeight / 2);
// (*this)[TacticalCoord].IsWaypoint = 1;
Map.Flag_Cell(Coord_Cell(Map.TacticalCoord));
Map.Set_Tactical_Position(Cell_Coord(Scen.Waypoint[WAYPT_HOME] - (MAP_CELL_W * 4 * RESFACTOR) - (5 * RESFACTOR)));
Go_Editor(true);
process = false;
Debug_SkipBriefing = true;
#else
Theme.Fade_Out(); Theme.Fade_Out();
if (Debug_Flag) { if (Debug_Flag) {
@@ -1313,7 +1341,8 @@ bool Select_Game(bool fade)
display = true; display = true;
fade = true; fade = true;
selection = SEL_NONE; selection = SEL_NONE;
#endif
// jmarshall end
break; break;
/* /*
+6 -1
View File
@@ -549,8 +549,13 @@ int Main_Menu(unsigned long )
TextButtonClass multibtn(BUTTON_MULTI, TXT_MULTIPLAYER_GAME, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h); TextButtonClass multibtn(BUTTON_MULTI, TXT_MULTIPLAYER_GAME, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h);
d_button_y += d_button_dy; d_button_y += d_button_dy;
// jmarshall - Intro button is going to be the scenario editor button.
#ifdef SCENARIO_EDITOR
TextButtonClass introbtn(BUTTON_INTRO, "Scenario Editor", TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h);
#else
TextButtonClass introbtn(BUTTON_INTRO, TXT_INTRO, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h); TextButtonClass introbtn(BUTTON_INTRO, TXT_INTRO, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h);
#endif
// jmarshall end
d_button_y += d_button_dy; d_button_y += d_button_dy;
TextButtonClass exitbtn(BUTTON_EXIT, TXT_EXIT_GAME, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h); TextButtonClass exitbtn(BUTTON_EXIT, TXT_EXIT_GAME, TPF_BUTTON, d_button_x, d_button_y, d_button_w, d_button_h);
+21 -17
View File
@@ -399,26 +399,30 @@ bool Start_Scenario(char * name, bool briefing)
/* /*
** If there's no briefing movie, restate the mission at the beginning. ** If there's no briefing movie, restate the mission at the beginning.
*/ */
char buffer[25]; if (!Debug_SkipBriefing)
if (Scen.BriefMovie != VQ_NONE) { {
sprintf(buffer, "%s.VQA", VQName[Scen.BriefMovie]); char buffer[25];
} if (Scen.BriefMovie != VQ_NONE) {
if (Session.Type == GAME_NORMAL && ( Scen.BriefMovie == VQ_NONE || !CCFileClass(buffer).Is_Available() ) ) { sprintf(buffer, "%s.VQA", VQName[Scen.BriefMovie]);
/* }
** Make sure the mouse is visible before showing the restatement. if (Session.Type == GAME_NORMAL && (Scen.BriefMovie == VQ_NONE || !CCFileClass(buffer).Is_Available())) {
*/ /*
while(Get_Mouse_State()) { ** Make sure the mouse is visible before showing the restatement.
Show_Mouse(); */
while (Get_Mouse_State()) {
Show_Mouse();
}
Restate_Mission(Scen.ScenarioName, TXT_OK, TXT_NONE);
} }
Restate_Mission(Scen.ScenarioName, TXT_OK, TXT_NONE);
}
if (briefing) { if (briefing) {
Hide_Mouse(); Hide_Mouse();
VisiblePage.Clear(); VisiblePage.Clear();
Show_Mouse(); Show_Mouse();
Play_Movie(Scen.ActionMovie, Scen.TransitTheme); Play_Movie(Scen.ActionMovie, Scen.TransitTheme);
}
} }
Debug_SkipBriefing = false;
if (Scen.TransitTheme == THEME_NONE) { if (Scen.TransitTheme == THEME_NONE) {
Theme.Queue_Song(THEME_FIRST); Theme.Queue_Song(THEME_FIRST);
+3
View File
@@ -764,6 +764,9 @@ void ChronalVortexClass::Zap_Target (void)
void ChronalVortexClass::Coordinate_Remap ( GraphicViewPortClass *inbuffer, int x, int y, int width, int height, unsigned char *remap_table) void ChronalVortexClass::Coordinate_Remap ( GraphicViewPortClass *inbuffer, int x, int y, int width, int height, unsigned char *remap_table)
{ {
unsigned char getx,gety, remap_color, pixel_color; unsigned char getx,gety, remap_color, pixel_color;
// jmarshall - todo fix ChronalVortexClass
return;
// jmarshall end
BufferClass destbuf (width * height); BufferClass destbuf (width * height);