mirror of
https://github.com/cxong/cdogs-sdl.git
synced 2025-07-23 07:23:01 +02:00
Show map powerup (fixes #654)
This commit is contained in:
4
missions/doom.cdogscpn/graphics/computer_map.txt
Normal file
4
missions/doom.cdogscpn/graphics/computer_map.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Derived from 140 Military Icons Set (fixed)
|
||||
by AngryMeteor.com
|
||||
https://opengameart.org/content/140-military-icons-set-fixed
|
||||
http://creativecommons.org/licenses/by/3.0/
|
BIN
missions/doom.cdogscpn/graphics/computer_map_13x13.png
Normal file
BIN
missions/doom.cdogscpn/graphics/computer_map_13x13.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 864 B |
File diff suppressed because it is too large
Load Diff
@@ -1,68 +1,107 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"Version": 2,
|
||||
"Pickups": [
|
||||
{
|
||||
"Name": "health_bonus",
|
||||
"Pic": "health_bonus",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "health_bonus"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 1
|
||||
},
|
||||
{
|
||||
"Name": "stimpack",
|
||||
"Pic": "stimpack",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "stimpack"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 10
|
||||
},
|
||||
{
|
||||
"Name": "medikit",
|
||||
"Pic": "health",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "health"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 25
|
||||
},
|
||||
{
|
||||
"Name": "supercharge",
|
||||
"Pic": "supercharge",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "supercharge"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 100
|
||||
},
|
||||
{
|
||||
"Name": "armor_bonus",
|
||||
"Pic": "armor_bonus",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "armor_bonus"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 1
|
||||
},
|
||||
{
|
||||
"Name": "armor",
|
||||
"Pic": "armor",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "armor"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 100
|
||||
},
|
||||
{
|
||||
"Name": "megaarmor",
|
||||
"Pic": "megaarmor",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "megaarmor"
|
||||
},
|
||||
"Type": "Health",
|
||||
"Health": 200
|
||||
},
|
||||
{
|
||||
"Name": "bullet_pickup2",
|
||||
"Pic": "bullet_pickup2",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "bullet_pickup2"
|
||||
},
|
||||
"Type": "Ammo",
|
||||
"Ammo": "Bullets",
|
||||
"Amount": 50
|
||||
},
|
||||
{
|
||||
"Name": "shells2",
|
||||
"Pic": "shells2",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "shells2"
|
||||
},
|
||||
"Type": "Ammo",
|
||||
"Ammo": "Shells",
|
||||
"Amount": 20
|
||||
},
|
||||
{
|
||||
"Name": "rockets2",
|
||||
"Pic": "rockets2",
|
||||
"Pic": {
|
||||
"Type": "Normal",
|
||||
"Pic": "rockets2"
|
||||
},
|
||||
"Type": "Ammo",
|
||||
"Ammo": "Rockets",
|
||||
"Amount": 10
|
||||
},
|
||||
{
|
||||
"Name": "computer_map",
|
||||
"Pic": {
|
||||
"Type": "AnimatedRandom",
|
||||
"Sprites": "computer_map",
|
||||
"TicksPerFrame": 10
|
||||
},
|
||||
"Type": "ShowMap"
|
||||
}
|
||||
]
|
||||
}
|
BIN
sounds/show_map.ogg
Normal file
BIN
sounds/show_map.ogg
Normal file
Binary file not shown.
3
sounds/show_map.txt
Normal file
3
sounds/show_map.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Derived from 9 sci-fi computer sounds and beeps by Michel Baradari
|
||||
https://opengameart.org/content/9-sci-fi-computer-sounds-and-beeps
|
||||
http://creativecommons.org/licenses/by/3.0/
|
@@ -581,6 +581,8 @@ static void FindObjectivesSortedByDistance(
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case PICKUP_SHOW_MAP:
|
||||
break;
|
||||
default:
|
||||
// Not something we want to pick up
|
||||
continue;
|
||||
|
@@ -140,9 +140,6 @@ static void AddPickupAtObject(const TObject *o, const PickupType type)
|
||||
GameEvent e = GameEventNew(GAME_EVENT_ADD_PICKUP);
|
||||
switch (type)
|
||||
{
|
||||
case PICKUP_JEWEL:
|
||||
CASSERT(false, "unexpected pickup type");
|
||||
break;
|
||||
case PICKUP_HEALTH:
|
||||
if (!ConfigGetBool(&gConfig, "Game.HealthPickups"))
|
||||
{
|
||||
@@ -162,9 +159,6 @@ static void AddPickupAtObject(const TObject *o, const PickupType type)
|
||||
sprintf(e.u.AddPickup.PickupClass, "ammo_%s", a->Name);
|
||||
}
|
||||
break;
|
||||
case PICKUP_KEYCARD:
|
||||
CASSERT(false, "unexpected pickup type");
|
||||
break;
|
||||
case PICKUP_GUN:
|
||||
// Pick a random mission gun type and spawn it
|
||||
{
|
||||
|
@@ -190,6 +190,15 @@ void PickupPickup(TActor *a, Pickup *p, const bool pickupAll)
|
||||
}
|
||||
break;
|
||||
|
||||
case PICKUP_SHOW_MAP: {
|
||||
GameEvent e = GameEventNew(GAME_EVENT_EXPLORE_TILES);
|
||||
e.u.ExploreTiles.Runs_count = 1;
|
||||
e.u.ExploreTiles.Runs[0].Run = gMap.Size.x * gMap.Size.y;
|
||||
GameEventsEnqueue(&gGameEvents, e);
|
||||
sound = "show_map";
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
CASSERT(false, "unexpected pickup type");
|
||||
break;
|
||||
|
@@ -43,6 +43,7 @@ PickupType StrPickupType(const char *s)
|
||||
S2T(PICKUP_AMMO, "Ammo");
|
||||
S2T(PICKUP_KEYCARD, "Key");
|
||||
S2T(PICKUP_GUN, "Gun");
|
||||
S2T(PICKUP_SHOW_MAP, "ShowMap");
|
||||
return PICKUP_NONE;
|
||||
}
|
||||
const char *PickupTypeStr(const PickupType pt)
|
||||
@@ -54,6 +55,7 @@ const char *PickupTypeStr(const PickupType pt)
|
||||
T2S(PICKUP_AMMO, "Ammo");
|
||||
T2S(PICKUP_KEYCARD, "Key");
|
||||
T2S(PICKUP_GUN, "Gun");
|
||||
T2S(PICKUP_SHOW_MAP, "ShowMap");
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@@ -257,6 +259,9 @@ static bool TryLoadPickupclass(PickupClass *c, json_t *node, const int version)
|
||||
case PICKUP_GUN:
|
||||
CASSERT(false, "unimplemented");
|
||||
break;
|
||||
case PICKUP_SHOW_MAP:
|
||||
// do nothing
|
||||
break;
|
||||
default:
|
||||
CASSERT(false, "Unknown pickup type");
|
||||
break;
|
||||
|
@@ -41,7 +41,8 @@ typedef enum
|
||||
PICKUP_HEALTH,
|
||||
PICKUP_AMMO,
|
||||
PICKUP_KEYCARD,
|
||||
PICKUP_GUN
|
||||
PICKUP_GUN,
|
||||
PICKUP_SHOW_MAP
|
||||
} PickupType;
|
||||
PickupType StrPickupType(const char *s);
|
||||
const char *PickupTypeStr(const PickupType pt);
|
||||
|
@@ -158,6 +158,8 @@ static void DrawPropsSidebar(struct nk_context *ctx, const PickupClass *pc)
|
||||
sprintf(buf, "Weapon: %s", wc->name);
|
||||
nk_label(ctx, buf, NK_TEXT_LEFT);
|
||||
}
|
||||
case PICKUP_SHOW_MAP:
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
CASSERT(false, "Unknown pickup type");
|
||||
|
Reference in New Issue
Block a user