Skip to content

Commit 935207c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into soldier_name_rules
2 parents 709f68f + 52dbe0d commit 935207c

28 files changed

Lines changed: 605 additions & 574 deletions

Makefile.am

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ openxcom_SOURCES = \
324324
src/Geoscape/CraftErrorState.h \
325325
src/Geoscape/CraftPatrolState.cpp \
326326
src/Geoscape/CraftPatrolState.h \
327-
src/Geoscape/DefeatState.cpp \
328-
src/Geoscape/DefeatState.h \
329327
src/Geoscape/DogfightState.cpp \
330328
src/Geoscape/DogfightState.h \
331329
src/Geoscape/FundingState.cpp \
@@ -370,8 +368,6 @@ openxcom_SOURCES = \
370368
src/Geoscape/UfoDetectedState.h \
371369
src/Geoscape/UfoLostState.cpp \
372370
src/Geoscape/UfoLostState.h \
373-
src/Geoscape/VictoryState.cpp \
374-
src/Geoscape/VictoryState.h \
375371
src/Interface/ArrowButton.cpp \
376372
src/Interface/ArrowButton.h \
377373
src/Interface/Bar.cpp \
@@ -410,12 +406,12 @@ openxcom_SOURCES = \
410406
src/Menu/AbandonGameState.h \
411407
src/Menu/ConfirmLoadState.cpp \
412408
src/Menu/ConfirmLoadState.h \
409+
src/Menu/CutsceneState.cpp \
410+
src/Menu/CutsceneState.h \
413411
src/Menu/DeleteGameState.cpp \
414412
src/Menu/DeleteGameState.h \
415413
src/Menu/ErrorMessageState.cpp \
416414
src/Menu/ErrorMessageState.h \
417-
src/Menu/IntroState.cpp \
418-
src/Menu/IntroState.h \
419415
src/Menu/ListGamesState.cpp \
420416
src/Menu/ListGamesState.h \
421417
src/Menu/ListLoadOriginalState.cpp \
@@ -458,10 +454,14 @@ openxcom_SOURCES = \
458454
src/Menu/PauseState.h \
459455
src/Menu/SaveGameState.cpp \
460456
src/Menu/SaveGameState.h \
457+
src/Menu/SlideshowState.cpp \
458+
src/Menu/SlideshowState.h \
461459
src/Menu/StartState.cpp \
462460
src/Menu/StartState.h \
463461
src/Menu/TestState.cpp \
464462
src/Menu/TestState.h \
463+
src/Menu/VideoState.cpp \
464+
src/Menu/VideoState.h \
465465
src/Resource/ResourcePack.cpp \
466466
src/Resource/ResourcePack.h \
467467
src/Resource/XcomResourcePack.cpp \

bin/standard/xcom1/cutscenes.rul

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,50 @@
11
cutscenes:
22
- type: intro
3+
useUfoAudioSequence: true
34
videos:
4-
- UFOINTRO/UFOINT.FLI
5+
- UFOINTRO/UFOINT.FLI
6+
- type: wingame
7+
slideshow:
8+
transitionSeconds: 30
9+
musicId: "GMWIN"
10+
slides:
11+
- imagePath: "UFOINTRO/PICT1.LBM"
12+
caption: STR_VICTORY_1
13+
captionSize: [195, 56]
14+
captionPos: [5, 0]
15+
captionColor: 249
16+
- imagePath: "UFOINTRO/PICT2.LBM"
17+
caption: STR_VICTORY_2
18+
captionSize: [232, 64]
19+
captionPos: [88, 136]
20+
captionColor: 249
21+
- imagePath: "UFOINTRO/PICT3.LBM"
22+
caption: STR_VICTORY_3
23+
captionSize: [254, 48]
24+
captionPos: [66, 152]
25+
captionColor: 249
26+
- imagePath: "UFOINTRO/PICT6.LBM"
27+
caption: STR_VICTORY_4
28+
captionSize: [300, 200]
29+
captionPos: [5, 0]
30+
captionColor: 249
31+
- imagePath: "UFOINTRO/PICT7.LBM"
32+
caption: STR_VICTORY_5
33+
captionSize: [310, 42]
34+
captionPos: [5, 158]
35+
captionColor: 249
36+
- type: losegame
37+
slideshow:
38+
transitionSeconds: 30
39+
musicId: "GMLOSE"
40+
slides:
41+
- imagePath: "UFOINTRO/PICT4.LBM"
42+
caption: STR_GAME_OVER_1
43+
captionSize: [190, 104]
44+
captionPos: [0, 0]
45+
captionColor: 249
46+
- imagePath: "UFOINTRO/PICT5.LBM"
47+
caption: STR_GAME_OVER_2
48+
captionSize: [200, 34]
49+
captionPos: [32, 0]
50+
captionColor: 249

bin/standard/xcom1/interfaces.rul

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,6 @@ interfaces:
532532
color: 6 # brown
533533
- id: errorMessage
534534
color: 241 # pink
535-
- type: gameOver
536-
elements:
537-
- id: defeatText
538-
color: 249
539-
- id: victoryText
540-
color: 249
541535
- type: sellMenu
542536
palette: PAL_BASESCAPE
543537
elements:

src/Battlescape/BattlescapeState.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,14 @@
6363
#include "../Engine/CrossPlatform.h"
6464
#include "../Engine/RNG.h"
6565
#include "../Engine/Exception.h"
66-
#include "../Geoscape/DefeatState.h"
67-
#include "../Geoscape/VictoryState.h"
6866
#include "../Interface/Cursor.h"
6967
#include "../Interface/FpsCounter.h"
7068
#include "../Interface/Text.h"
7169
#include "../Interface/Bar.h"
7270
#include "../Interface/ImageButton.h"
7371
#include "../Interface/BattlescapeButton.h"
7472
#include "../Interface/NumberText.h"
73+
#include "../Menu/CutsceneState.h"
7574
#include "../Menu/PauseState.h"
7675
#include "../Menu/LoadGameState.h"
7776
#include "../Menu/SaveGameState.h"
@@ -1945,7 +1944,7 @@ void BattlescapeState::finishBattle(bool abort, int inExitArea)
19451944
_game->getRuleset()->getDeployment(_save->getMissionType())->isNoRetreat() &&
19461945
_game->getSavedGame()->getMonthsPassed() > -1)
19471946
{
1948-
_game->pushState (new DefeatState);
1947+
_game->pushState(new CutsceneState("losegame"));
19491948
}
19501949
else
19511950
{
@@ -1960,7 +1959,7 @@ void BattlescapeState::finishBattle(bool abort, int inExitArea)
19601959
_game->getRuleset()->getDeployment(_save->getMissionType())->isFinalMission() &&
19611960
_game->getSavedGame()->getMonthsPassed() > -1)
19621961
{
1963-
_game->pushState (new VictoryState);
1962+
_game->pushState(new CutsceneState("wingame"));
19641963
}
19651964
else
19661965
{

src/Battlescape/DebriefingState.cpp

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,54 +1062,57 @@ void DebriefingState::recoverItems(std::vector<BattleItem*> *from, Base *base)
10621062
}
10631063
else
10641064
{
1065-
if ((*it)->getRules()->getRecoveryPoints() && !(*it)->getXCOMProperty())
1065+
if ((*it)->getRules()->isRecoverable())
10661066
{
1067-
if ((*it)->getRules()->getBattleType() == BT_CORPSE && (*it)->getUnit()->getStatus() == STATUS_DEAD)
1067+
if (!(*it)->getXCOMProperty())
10681068
{
1069-
addStat("STR_ALIEN_CORPSES_RECOVERED", 1, (*it)->getUnit()->getValue());
1070-
base->getItems()->addItem((*it)->getUnit()->getArmor()->getCorpseGeoscape(), 1);
1071-
}
1072-
else if ((*it)->getRules()->getBattleType() == BT_CORPSE && (*it)->getUnit()->getStatus() == STATUS_UNCONSCIOUS)
1073-
{
1074-
if ((*it)->getUnit()->getOriginalFaction() == FACTION_HOSTILE)
1069+
if ((*it)->getRules()->getBattleType() == BT_CORPSE && (*it)->getUnit()->getStatus() == STATUS_DEAD)
10751070
{
1076-
recoverAlien((*it)->getUnit(), base);
1071+
addStat("STR_ALIEN_CORPSES_RECOVERED", 1, (*it)->getUnit()->getValue());
1072+
base->getItems()->addItem((*it)->getUnit()->getArmor()->getCorpseGeoscape(), 1);
1073+
}
1074+
else if ((*it)->getRules()->getBattleType() == BT_CORPSE && (*it)->getUnit()->getStatus() == STATUS_UNCONSCIOUS)
1075+
{
1076+
if ((*it)->getUnit()->getOriginalFaction() == FACTION_HOSTILE)
1077+
{
1078+
recoverAlien((*it)->getUnit(), base);
1079+
}
1080+
else if ((*it)->getUnit()->getOriginalFaction() == FACTION_NEUTRAL)
1081+
{
1082+
addStat("STR_CIVILIANS_SAVED", 1, (*it)->getUnit()->getValue());
1083+
}
10771084
}
1078-
else if ((*it)->getUnit()->getOriginalFaction() == FACTION_NEUTRAL)
1085+
// only "recover" unresearched items
1086+
else if (!_game->getSavedGame()->isResearched((*it)->getRules()->getType()))
10791087
{
1080-
addStat("STR_CIVILIANS_SAVED", 1, (*it)->getUnit()->getValue());
1088+
addStat("STR_ALIEN_ARTIFACTS_RECOVERED", 1, (*it)->getRules()->getRecoveryPoints());
10811089
}
10821090
}
1083-
// only "recover" unresearched items
1084-
else if (!_game->getSavedGame()->isResearched((*it)->getRules()->getType()))
1085-
{
1086-
addStat("STR_ALIEN_ARTIFACTS_RECOVERED", 1, (*it)->getRules()->getRecoveryPoints());
1087-
}
1088-
}
1089-
// put items back in the base
1090-
if ((*it)->getRules()->isRecoverable() && !(*it)->getRules()->isFixed())
1091-
{
1092-
switch ((*it)->getRules()->getBattleType())
1091+
// put items back in the base
1092+
if (!(*it)->getRules()->isFixed())
10931093
{
1094-
case BT_CORPSE:
1095-
break;
1096-
case BT_AMMO:
1097-
// It's a clip, count any rounds left.
1098-
_rounds[(*it)->getRules()] += (*it)->getAmmoQuantity();
1099-
break;
1100-
case BT_FIREARM:
1101-
case BT_MELEE:
1102-
// It's a weapon, count any rounds left in the clip.
1103-
{
1104-
BattleItem *clip = (*it)->getAmmoItem();
1105-
if (clip && clip->getRules()->getClipSize() > 0 && clip != *it)
1094+
switch ((*it)->getRules()->getBattleType())
1095+
{
1096+
case BT_CORPSE:
1097+
break;
1098+
case BT_AMMO:
1099+
// It's a clip, count any rounds left.
1100+
_rounds[(*it)->getRules()] += (*it)->getAmmoQuantity();
1101+
break;
1102+
case BT_FIREARM:
1103+
case BT_MELEE:
1104+
// It's a weapon, count any rounds left in the clip.
11061105
{
1107-
_rounds[clip->getRules()] += clip->getAmmoQuantity();
1106+
BattleItem *clip = (*it)->getAmmoItem();
1107+
if (clip && clip->getRules()->getClipSize() > 0 && clip != *it)
1108+
{
1109+
_rounds[clip->getRules()] += clip->getAmmoQuantity();
1110+
}
11081111
}
1109-
}
1110-
// Fall-through, to recover the weapon itself.
1111-
default:
1112-
base->getItems()->addItem((*it)->getRules()->getType(), 1);
1112+
// Fall-through, to recover the weapon itself.
1113+
default:
1114+
base->getItems()->addItem((*it)->getRules()->getType(), 1);
1115+
}
11131116
}
11141117
}
11151118
}

src/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,6 @@ set ( geoscape_src
344344
Geoscape/MissionDetectedState.cpp
345345
Geoscape/NewPossibleManufactureState.h
346346
Geoscape/NewPossibleManufactureState.cpp
347-
Geoscape/VictoryState.h
348-
Geoscape/VictoryState.cpp
349-
Geoscape/DefeatState.h
350-
Geoscape/DefeatState.cpp
351347
Geoscape/ResearchRequiredState.h
352348
Geoscape/ResearchRequiredState.cpp
353349
)
@@ -392,8 +388,10 @@ set ( interface_src
392388
set ( menu_src
393389
Menu/StartState.cpp
394390
Menu/StartState.h
395-
Menu/IntroState.cpp
396-
Menu/IntroState.h
391+
Menu/CutsceneState.h
392+
Menu/CutsceneState.cpp
393+
Menu/SlideshowState.h
394+
Menu/SlideshowState.cpp
397395
Menu/MainMenuState.cpp
398396
Menu/MainMenuState.h
399397
Menu/TestState.h
@@ -446,6 +444,8 @@ set ( menu_src
446444
Menu/SaveGameState.h
447445
Menu/ListLoadOriginalState.cpp
448446
Menu/ListLoadOriginalState.h
447+
Menu/VideoState.cpp
448+
Menu/VideoState.h
449449
)
450450

451451
set ( resource_src

0 commit comments

Comments
 (0)