From 48aa577e7425f2e11e84d7be935432ac6b07fb95 Mon Sep 17 00:00:00 2001 From: Cong Date: Fri, 11 Apr 2014 00:09:28 +1000 Subject: [PATCH] Complete doom E1M5 Fix crash when changing resolution Fix position of random background --- missions/doom.cpn | 744 ++++++++++++++++++++++++++++++++---------- src/cdogs/campaigns.c | 1 + src/cdogs/grafx_bg.c | 2 +- 3 files changed, 582 insertions(+), 165 deletions(-) diff --git a/missions/doom.cpn b/missions/doom.cpn index e8a323d1a..cf5ea59ac 100644 --- a/missions/doom.cpn +++ b/missions/doom.cpn @@ -9818,7 +9818,7 @@ "Description": "Extras", "Type": "Collect", "Index": 0, - "Count": 16, + "Count": 24, "Required": 0, "Flags": 1 }, @@ -9826,7 +9826,7 @@ "Description": "Extras", "Type": "Collect", "Index": 10, - "Count": 1, + "Count": 4, "Required": 0, "Flags": 1 }, @@ -9834,7 +9834,7 @@ "Description": "Extras", "Type": "Collect", "Index": 1, - "Count": 18, + "Count": 54, "Required": 0, "Flags": 1 }, @@ -9842,7 +9842,7 @@ "Description": "Extras", "Type": "Collect", "Index": 9, - "Count": 4, + "Count": 7, "Required": 0, "Flags": 1 }, @@ -9850,7 +9850,7 @@ "Description": "Extras", "Type": "Collect", "Index": 2, - "Count": 13, + "Count": 16, "Required": 0, "Flags": 1 }], @@ -10279,7 +10279,7 @@ 0, 0, 0, - 0, + 2, 0, 0, 0, @@ -10367,7 +10367,7 @@ 0, 0, 0, - 0, + 2, 0, 0, 0, @@ -10987,8 +10987,8 @@ 0, 0, 1, - 0, - 0, + 2, + 1, 1, 0, 0, @@ -11077,7 +11077,7 @@ 1, 0, 1, - 4, + 1, 1, 0, 0, @@ -11164,8 +11164,8 @@ 4, 1, 0, + 0, 1, - 4, 1, 0, 0, @@ -11414,7 +11414,7 @@ 0, 0, 0, - 0, + 2050, 0, 0, 0, @@ -11502,7 +11502,7 @@ 0, 0, 0, - 0, + 2050, 0, 0, 0, @@ -12395,7 +12395,7 @@ 1, 0, 1, - 2, + 2050, 1, 1, 4, @@ -13069,18 +13069,18 @@ 1, 1, 1, - 3, - 3, - 3, - 3, + 2, + 2, + 2, + 2, 1, 1, 4, 1, 3, - 3, - 0, + 2, 0, + 2, 0, 0, 1, @@ -13166,9 +13166,9 @@ 1, 1, 3, - 3, - 0, + 2, 0, + 2, 0, 0, 1, @@ -13252,8 +13252,8 @@ 3, 3, 3, - 3, - 3, + 1, + 1026, 1, 1, 1, @@ -13262,7 +13262,7 @@ 0, 0, 0, - 1, + 1026, 3, 3, 3, @@ -13350,20 +13350,20 @@ 0, 0, 0, - 1, + 1026, 3, 3, 3, 3, 1, + 0, + 0, + 0, 1, 1, - 1, - 1, - 1, - 1, - 1, - 1, + 0, + 0, + 0, 1, 1, 3, @@ -13629,7 +13629,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -13717,7 +13717,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -13771,10 +13771,10 @@ 0, 0, 0, - 0, - 0, - 0, - 0, + 4, + 4, + 4, + 4, 0, 0, 0, @@ -13805,7 +13805,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -13859,10 +13859,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -13947,10 +13947,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -14035,10 +14035,10 @@ 0, 0, 0, - 0, - 0, - 0, - 0, + 4, + 4, + 4, + 4, 0, 0, 0, @@ -14219,6 +14219,7 @@ 0, 3, 3, + 1, 3, 3, 3, @@ -14228,8 +14229,7 @@ 3, 3, 3, - 3, - 3, + 514, 3, 3, 3, @@ -14258,7 +14258,7 @@ 3, 3, 3, - 3, + 4, 3, 3, 3, @@ -14291,6 +14291,7 @@ 0, 1, 0, + 2, 0, 0, 0, @@ -14304,11 +14305,9 @@ 0, 0, 0, - 0, - 3, - 3, 3, 3, + 1, 3, 3, 3, @@ -14318,6 +14317,7 @@ 3, 3, 3, + 514, 3, 3, 3, @@ -14346,7 +14346,7 @@ 3, 3, 3, - 3, + 4, 3, 3, 3, @@ -14395,6 +14395,7 @@ 0, 3, 3, + 1, 3, 3, 3, @@ -14404,8 +14405,7 @@ 3, 3, 3, - 3, - 3, + 514, 3, 3, 3, @@ -14434,7 +14434,7 @@ 3, 3, 3, - 3, + 4, 3, 3, 3, @@ -14522,7 +14522,7 @@ 3, 3, 3, - 3, + 4, 3, 3, 1, @@ -14554,7 +14554,7 @@ 0, 0, 1, - 0, + 2, 1, 0, 0, @@ -14563,10 +14563,10 @@ 0, 0, 0, - 0, - 0, - 0, - 0, + 4, + 4, + 4, + 4, 0, 0, 0, @@ -14610,7 +14610,7 @@ 3, 3, 3, - 3, + 4, 3, 3, 1, @@ -14651,10 +14651,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -14739,10 +14739,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -14827,10 +14827,10 @@ 0, 0, 0, - 0, - 0, - 0, - 0, + 4, + 4, + 4, + 4, 0, 0, 0, @@ -14861,7 +14861,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -14949,7 +14949,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -15037,7 +15037,7 @@ 0, 0, 0, - 3, + 4, 3, 3, 3, @@ -15204,14 +15204,14 @@ 3, 3, 1, + 0, + 0, + 0, 1, 1, - 1, - 1, - 1, - 1, - 1, - 1, + 0, + 0, + 0, 1, 1, 3, @@ -15317,10 +15317,10 @@ 0, 0, 0, - 0, - 0, - 0, - 0, + 4, + 4, + 4, + 4, 0, 0, 0, @@ -15405,10 +15405,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -15481,9 +15481,9 @@ 3, 3, 1, - 3, - 3, - 3, + 2, + 2, + 2, 1, 1, 0, @@ -15493,10 +15493,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -15533,10 +15533,10 @@ 4, 4, 1, - 3, - 3, - 3, - 3, + 2, + 2, + 2, + 2, 1, 1, 4, @@ -15581,10 +15581,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -15669,10 +15669,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -15757,10 +15757,10 @@ 0, 0, 0, - 0, + 4, 3, 3, - 0, + 4, 0, 0, 0, @@ -15845,15 +15845,15 @@ 0, 0, 0, - 0, + 4, 3, 3, + 4, 0, - 0, - 1, 1, 1, 1, + 258, 1, 1, 1, @@ -16539,8 +16539,8 @@ 3, 3, 3, - 3, 1, + 258, 1, 3, 3, @@ -16629,7 +16629,7 @@ 1, 1, 3, - 1, + 3, 3, 3, 3, @@ -16717,7 +16717,7 @@ 1, 1, 3, - 1, + 3, 3, 3, 3, @@ -18514,8 +18514,6 @@ 70], [54, 74], - [20, - 69], [55, 62], [57, @@ -18523,60 +18521,197 @@ [47, 38], [55, - 46]] - }], - "StaticWrecks": [], - "StaticCharacters": [{ - "Index": 0, - "Positions": [[48, - 76], - [69, - 65], - [44, - 62], - [43, - 63], - [37, + 46], + [78, + 42], + [72, + 38], + [58, + 44], + [62, 53], - [39, - 48], - [39, - 40], - [42, - 37], [49, - 37], + 24], + [43, + 20], + [56, + 24], + [58, + 12], + [38, + 18], + [40, + 10], [45, - 37], - [54, - 43], - [53, - 42], - [78, - 32], - [84, - 40], - [85, - 44]] + 15], + [52, + 12], + [25, + 38], + [23, + 51], + [23, + 60], + [15, + 59], + [10, + 58], + [13, + 50], + [11, + 41]] }, { - "Index": 3, + "Index": 7, + "Positions": [[65, + 49], + [65, + 53]] + }], + "StaticWrecks": [{ + "Index": 20, + "Positions": [[30, + 29], + [31, + 29], + [32, + 29], + [33, + 29], + [31, + 28], + [32, + 28], + [31, + 30], + [30, + 31], + [32, + 30], + [33, + 31]] + }], + "StaticCharacters": [{ + "Index": 0, "Positions": [[48, - 67], - [68, - 69], - [68, + 76], + [69, + 65], + [44, + 62], + [43, 63], + [37, + 53], + [39, + 48], + [39, + 40], + [42, + 37], [49, - 34], - [52, + 37], + [45, + 37], + [54, + 43], + [53, + 42], + [78, + 32], + [84, + 40], + [85, + 44], + [73, 35], - [55, + [73, + 40], + [72, + 45], + [71, + 45], + [74, + 45], + [57, + 45], + [62, + 48], + [61, + 49], + [61, + 51], + [68, + 48], + [70, + 48], + [72, + 50], + [49, + 17], + [50, + 17], + [53, + 18], + [59, + 23], + [45, + 16], + [40, + 11], + [50, + 8], + [54, + 10], + [19, + 34], + [20, + 34], + [21, + 34], + [19, + 45], + [19, + 55], + [19, + 65], + [19, + 67], + [20, + 67], + [22, + 67], + [12, + 52], + [12, + 46]] + }, + { + "Index": 3, + "Positions": [[55, 42], [79, 43], [80, - 40]] + 40], + [79, + 37], + [61, + 39], + [62, + 50], + [44, + 1], + [41, + 1], + [41, + 4], + [33, + 51], + [31, + 50], + [15, + 60]] }, { "Index": 2, @@ -18615,7 +18750,29 @@ [85, 33], [85, - 42]] + 42], + [66, + 38], + [64, + 37], + [62, + 37], + [72, + 48], + [27, + 37], + [18, + 46], + [18, + 54], + [27, + 50], + [27, + 62], + [20, + 65], + [22, + 65]] }, { "Index": 1, @@ -18640,7 +18797,70 @@ [53, 46], [55, - 45]] + 45], + [75, + 38], + [63, + 39], + [59, + 39], + [57, + 50], + [62, + 52], + [48, + 4], + [58, + 13], + [39, + 21], + [18, + 55], + [18, + 45], + [29, + 49], + [29, + 51], + [10, + 52], + [11, + 51], + [10, + 46], + [11, + 47]] + }, + { + "Index": 4, + "Positions": [[48, + 67], + [68, + 69], + [68, + 63], + [19, + 69], + [20, + 69], + [16, + 38], + [21, + 31], + [19, + 31], + [52, + 35], + [49, + 34], + [42, + 14], + [47, + 8], + [56, + 11], + [60, + 14]] }], "StaticObjectives": [{ "Index": 0, @@ -18675,6 +18895,22 @@ [49, 33], [84, + 49], + [65, + 52], + [86, + 55], + [86, + 57], + [42, + 30], + [42, + 32], + [45, + 8], + [36, + 29], + [23, 49]], "Indices": [0, 0, @@ -18691,13 +18927,30 @@ 0, 0, 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 0] }, { "Index": 1, "Positions": [[40, - 80]], - "Indices": [0] + 80], + [82, + 55], + [29, + 36], + [21, + 57]], + "Indices": [0, + 0, + 0, + 0] }, { "Index": 2, @@ -18734,9 +18987,81 @@ [54, 47], [28, + 33], + [58, + 37], + [65, + 50], + [84, + 55], + [83, + 57], + [45, + 31], + [43, + 23], + [39, + 14], + [49, + 14], + [49, + 15], + [50, + 15], + [60, + 18], + [60, + 13], + [53, + 17], + [43, + 8], + [53, + 9], + [29, + 27], + [29, + 29], + [29, + 31], + [34, + 27], + [34, + 29], + [34, + 31], + [32, + 27], + [32, 32], - [28, - 33]], + [27, + 36], + [22, + 33], + [21, + 42], + [27, + 63], + [21, + 68], + [8, + 50], + [8, + 51], + [8, + 55], + [10, + 61], + [10, + 65], + [8, + 46], + [9, + 42], + [10, + 38], + [6, + 51]], "Indices": [0, 0, 0, @@ -18754,6 +19079,42 @@ 0, 0, 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, 0] }, { @@ -18765,10 +19126,19 @@ [78, 73], [55, - 64]], + 64], + [86, + 56], + [40, + 31], + [27, + 29]], "Indices": [0, 0, 0, + 0, + 0, + 0, 0] }, { @@ -18798,7 +19168,13 @@ [54, 45], [52, - 47]], + 47], + [82, + 57], + [84, + 57], + [43, + 31]], "Indices": [0, 0, 0, @@ -18811,16 +19187,38 @@ 0, 0, 0, + 0, + 0, + 0, 0] }], - "StaticKeys": [], + "StaticKeys": [{ + "Index": 0, + "Positions": [[68, + 64]] + }, + { + "Index": 1, + "Positions": [[65, + 51]] + }, + { + "Index": 2, + "Positions": [[8, + 60]] + }, + { + "Index": 3, + "Positions": [[85, + 56]] + }], "Start": [44, 93], "Exit": { - "Start": [0, - 0], - "End": [0, - 0] + "Start": [41, + 1], + "End": [44, + 6] } }], "Characters": [{ @@ -18894,5 +19292,23 @@ "probabilityToTrack": 25, "probabilityToShoot": 0, "actionDelay": 13 + }, + { + "armedBody": 1, + "unarmedBody": 0, + "face": 9, + "skin": 5, + "arm": 2, + "body": 5, + "leg": 5, + "hair": 5, + "speed": 384, + "Gun": "Knife", + "maxHealth": 70, + "flags": 3072, + "probabilityToMove": 60, + "probabilityToTrack": 25, + "probabilityToShoot": 0, + "actionDelay": 13 }] } \ No newline at end of file diff --git a/src/cdogs/campaigns.c b/src/cdogs/campaigns.c index cad34ccca..aff509232 100644 --- a/src/cdogs/campaigns.c +++ b/src/cdogs/campaigns.c @@ -64,6 +64,7 @@ void CampaignSettingTerminate(CampaignSetting *setting) } CArrayTerminate(&setting->Missions); CharacterStoreTerminate(&setting->characters); + memset(setting, 0, sizeof *setting); } void CampaignListInit(campaign_list_t *list); diff --git a/src/cdogs/grafx_bg.c b/src/cdogs/grafx_bg.c index e8750e24e..51fff1c69 100644 --- a/src/cdogs/grafx_bg.c +++ b/src/cdogs/grafx_bg.c @@ -52,7 +52,7 @@ void GrafxMakeRandomBackground( co->MissionIndex = 0; GrafxMakeBackground( device, &buffer, co, mo, map, - tint, 0, 1, Vec2iCenterOfTile(map->Size), NULL); + tint, 0, 1, Vec2iCenterOfTile(Vec2iScaleDiv(map->Size, 2)), NULL); DrawBufferTerminate(&buffer); KillAllActors(); KillAllObjects();