Skip to content

Commit

Permalink
Add some N3D adlib sound mappings #712
Browse files Browse the repository at this point in the history
Cleanup some unused pickups
  • Loading branch information
cxong committed Jun 22, 2024
1 parent 18f3647 commit c858fd0
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 92 deletions.
2 changes: 1 addition & 1 deletion data/.wolf3d/N3Ddata.cdogscpn/ammo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Type": "Normal",
"Pic": "small_feed_box"
},
"Sound": "ammo_pickup",
"Sound": "pickup",
"Amount": 5,
"Max": 299
}
Expand Down
Binary file removed data/.wolf3d/N3Ddata.cdogscpn/graphics/chest.png
Binary file not shown.
4 changes: 0 additions & 4 deletions data/.wolf3d/N3Ddata.cdogscpn/graphics/chest.txt

This file was deleted.

Binary file removed data/.wolf3d/N3Ddata.cdogscpn/graphics/cross.png
Binary file not shown.
Binary file removed data/.wolf3d/N3Ddata.cdogscpn/graphics/crown.png
Binary file not shown.
4 changes: 0 additions & 4 deletions data/.wolf3d/N3Ddata.cdogscpn/graphics/crown.txt

This file was deleted.

Binary file modified data/.wolf3d/N3Ddata.cdogscpn/graphics/pillar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/.wolf3d/N3Ddata.cdogscpn/graphics/spear.png
Binary file not shown.
4 changes: 0 additions & 4 deletions data/.wolf3d/N3Ddata.cdogscpn/graphics/spear.txt

This file was deleted.

24 changes: 24 additions & 0 deletions data/.wolf3d/N3Ddata.cdogscpn/guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,30 @@
"Recoil": 0.23,
"Ammo": "Feed"
},
{
"Pic": "blaster_yellow",
"Name": "Cantaloupe Feeder",
"Icon": "flamer",
"Bullet": "bullet",
"Cost": 1,
"Lock": 45,
"Sound": "super_feeder",
"SwitchSound": "chaingun_pickup",
"Recoil": 0.23,
"Ammo": "Feed"
},
{
"Pic": "rocket_green",
"Name": "Watermelon Feeder",
"Icon": "chemo_gun",
"Bullet": "bullet",
"Cost": 1,
"Lock": 45,
"Sound": "super_feeder",
"SwitchSound": "chaingun_pickup",
"Recoil": 0.23,
"Ammo": "Feed"
},
{
"Pic": "pistol",
"Name": "Sheep Spit",
Expand Down
4 changes: 2 additions & 2 deletions data/.wolf3d/N3Ddata.cdogscpn/map_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"Flags": ["Inside", "OneOrMoreWalls"]
},
{
"Name": "pillar_brown",
"Name": "pillar_candle",
"Pic": {
"Type": "Normal",
"Pic": "pillar_brown"
"Pic": "pillar_candle"
},
"Health": 80,
"Flags": ["Inside", "NoWalls"]
Expand Down
78 changes: 10 additions & 68 deletions data/.wolf3d/N3Ddata.cdogscpn/pickups.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Type": "Health",
"Health": 4
}],
"Sound": "health_small"
"Sound": "pickup"
},
{
"Name": "small_bandage",
Expand All @@ -23,7 +23,7 @@
"Type": "Health",
"Health": 10
}],
"Sound": "health_small"
"Sound": "pickup"
},
{
"Name": "large_bandage",
Expand All @@ -35,7 +35,7 @@
"Type": "Health",
"Health": 25
}],
"Sound": "health_big"
"Sound": "pickup"
},
{
"Name": "heart",
Expand All @@ -54,19 +54,7 @@
"Type": "Lives",
"Lives": 1
}],
"Sound": "1up"
},
{
"Name": "cross",
"Pic": {
"Type": "Normal",
"Pic": "cross"
},
"Effects": [{
"Type": "Score",
"Score": 100
}],
"Sound": "pickup_cross"
"Sound": "pickup"
},
{
"Name": "grapes",
Expand All @@ -78,7 +66,7 @@
"Type": "Score",
"Score": 500
}],
"Sound": "pickup_chalice"
"Sound": "pickup"
},
{
"Name": "orange",
Expand All @@ -90,7 +78,7 @@
"Type": "Score",
"Score": 500
}],
"Sound": "pickup_chalice"
"Sound": "pickup"
},
{
"Name": "apple",
Expand All @@ -102,7 +90,7 @@
"Type": "Score",
"Score": 500
}],
"Sound": "pickup_chalice"
"Sound": "pickup"
},
{
"Name": "banana",
Expand All @@ -114,7 +102,7 @@
"Type": "Score",
"Score": 500
}],
"Sound": "pickup_chalice"
"Sound": "pickup"
},
{
"Name": "scroll",
Expand All @@ -133,31 +121,7 @@
"Ammo": "Feed",
"Amount": 10
}],
"Sound": "pickup_chalice"
},
{
"Name": "chest",
"Pic": {
"Type": "Normal",
"Pic": "chest"
},
"Effects": [{
"Type": "Score",
"Score": 1000
}],
"Sound": "pickup_chest"
},
{
"Name": "crown",
"Pic": {
"Type": "Normal",
"Pic": "crown"
},
"Effects": [{
"Type": "Score",
"Score": 5000
}],
"Sound": "pickup_crown"
"Sound": "pickup"
},
{
"Name": "small_feed_box",
Expand All @@ -170,29 +134,7 @@
"Ammo": "Feed",
"Amount": 5
}],
"Sound": "ammo_pickup"
},
{
"Name": "ammo_box",
"Pic": {
"Type": "Normal",
"Pic": "ammo_box"
},
"Effects": [{
"Type": "Ammo",
"Ammo": "Feed",
"Amount": 25
}],
"Sound": "ammo_box"
},
{
"Name": "spear",
"Pic": {
"Type": "Normal",
"Pic": "spear"
},
"Effects": [],
"Sound": "spear"
"Sound": "pickup"
}
]
}
75 changes: 66 additions & 9 deletions src/cdogs/map_wolf.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ static const char *soundsSOD[] = {
"chars/alert/angel", "chars/die/angel", "chaingun_pickup", "spear"};
static const char *soundsN3D[] = {
// 0-9
"chars/alert/antelope", "chars/alert/bear", "bullet_pickup",
"chars/alert/camel", "door_close", "cantaloupe", "cantaloupe_feeder",
"goat_kick", "gulp?", "chars/die/animal",
"chars/alert/antelope", "chars/alert/bear", "pickup", "chars/alert/camel",
"door_close", "cantaloupe", "cantaloupe_feeder", "goat_kick", "gulp?",
"chars/die/animal",
// 10-19
"chars/alert/elephant", "1up", "super_feeder", "chars/alert/giraffe",
"chars/alert/goat", "small_feeder", "doof?", "chars/alert/kangaroo",
Expand Down Expand Up @@ -441,6 +441,26 @@ static const char *adlibSoundsSOD[] = {
NULL, // spear (digi sound)
NULL, // angel tired (not used in C-Dogs)
};
static const char *adlibSoundsN3D[] = {
// 0-9
NULL, // empty
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
// 10-19
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, // score tick
NULL, NULL,
// 20-29
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "wrong", // answer wrong
NULL,
// 30-39
NULL, NULL, NULL, NULL, NULL, NULL, "menu_back", "menu_switch",
"menu_switch2", // TODO: the correct sound is menu_switch + this one; can
// we concat the two?
NULL,
// 40-42
"menu_enter", NULL,
"bonus", // quiz correct, perfect score
};
static const char *GetAdlibSound(const CWMapType type, const int i)
{
// Map sound index to string
Expand All @@ -453,8 +473,7 @@ static const char *GetAdlibSound(const CWMapType type, const int i)
case CWMAPTYPE_SOD:
return adlibSoundsSOD[i];
case CWMAPTYPE_N3D:
// Not using any adlib sounds
return NULL;
return adlibSoundsN3D[i];
default:
CASSERT(false, "unknown map type");
return NULL;
Expand Down Expand Up @@ -2289,7 +2308,16 @@ static void LoadEntity(
}
break;
case CWENT_WHITE_COLUMN:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("pillar"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddItem(
&m->u.Static, StrMapObject("pillar_candle"), v);
break;
default:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("pillar"), v);
break;
}
break;
case CWENT_GREEN_PLANT:
switch (map->type)
Expand Down Expand Up @@ -2518,7 +2546,17 @@ static void LoadEntity(
}
break;
case CWENT_CROSS:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("cross"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("heart"), v);
break;
default:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("cross"), v);
break;
}
break;
case CWENT_CHALICE:
switch (map->type)
Expand All @@ -2533,10 +2571,29 @@ static void LoadEntity(
}
break;
case CWENT_CHEST:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("chest"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddItem(&m->u.Static, StrMapObject("pillar"), v);
break;
default:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("chest"), v);
break;
}
break;
case CWENT_CROWN:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("crown"), v);
switch (map->type)
{
case CWMAPTYPE_N3D:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("gun_Cantaloupe Feeder"), v);
break;
default:
MissionStaticTryAddPickup(
&m->u.Static, StrPickupClass("crown"), v);
break;
}
break;
case CWENT_LIFE:
MissionStaticTryAddPickup(&m->u.Static, StrPickupClass("heart"), v);
Expand Down

0 comments on commit c858fd0

Please sign in to comment.