Skip to content

Commit

Permalink
Harmoy SLUMP monster roster work; fix inactive tab coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed May 24, 2024
1 parent 7cf27d3 commit 6df159d
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 52 deletions.
11 changes: 2 additions & 9 deletions source_files/obsidian_main/m_theme.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,8 @@ class UI_ThemeWin : public Fl_Window {
for (int x = 0; x < main_win->game_box->children(); x++) {
main_win->game_box->child(x)->redraw();
}
main_win->mod_tabs->color(BUTTON_COLOR, WINDOW_BG);
main_win->mod_tabs->redraw();
for (int t = 0; t < main_win->mod_tabs->children(); t++) {
UI_CustomMods *tab = (UI_CustomMods *)main_win->mod_tabs->child(t);
tab->sbar->color(GAP_COLOR, BUTTON_COLOR);
Expand Down Expand Up @@ -1414,15 +1416,6 @@ class UI_ThemeWin : public Fl_Window {
main_win->redraw();
main_win->build_box->progress->color(GAP_COLOR, GAP_COLOR);
main_win->build_box->redraw();
main_win->mod_tabs->color(GAP_COLOR, WINDOW_BG);
main_win->mod_tabs->redraw();
for (int t = 0; t < main_win->mod_tabs->children(); t++) {
UI_CustomMods *tab = (UI_CustomMods *)main_win->mod_tabs->child(t);
tab->color(GAP_COLOR, GAP_COLOR);
tab->sbar->color(GAP_COLOR, BUTTON_COLOR);
tab->mod_pack->color(GAP_COLOR);
tab->redraw();
}
}

static void callback_LoadDefaults(Fl_Widget *w, void *data) {
Expand Down
11 changes: 10 additions & 1 deletion source_files/obsidian_main/ui_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1698,22 +1698,31 @@ UI_CustomTabs::UI_CustomTabs(int X, int Y, int W, int H)
: Fl_Tabs(X, Y, W, H) {

box(box_style);


color(BUTTON_COLOR, WINDOW_BG);

visible_focus(0);

arch_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Architecture"));
arch_mods->color(BUTTON_COLOR, BUTTON_COLOR);
arch_mods->end();
combat_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Combat"));
combat_mods->color(BUTTON_COLOR, BUTTON_COLOR);
combat_mods->end();
pickup_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Pickups"));
pickup_mods->color(BUTTON_COLOR, BUTTON_COLOR);
pickup_mods->end();
other_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Other"));
other_mods->color(BUTTON_COLOR, BUTTON_COLOR);
other_mods->end();
debug_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Debug"));
debug_mods->color(BUTTON_COLOR, BUTTON_COLOR);
debug_mods->end();
experimental_mods = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Experimental"));
experimental_mods->color(BUTTON_COLOR, BUTTON_COLOR);
experimental_mods->end();
links = new UI_CustomMods(X, Y+kf_h(22), W, H-kf_h(22), _("Links"));
links->color(BUTTON_COLOR, BUTTON_COLOR);
links->end();

end();
Expand Down
206 changes: 164 additions & 42 deletions source_files/slump/slump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ void secretize_config(config *c)
}

/* Sometimes some DooM II nazis */
if (rollpercent(80)&&!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT|CHEX_BIT|HACX_BIT))) {
if (rollpercent(80)&&!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT|CHEX_BIT|HACX_BIT|HARMONY_BIT|STRIFE_BIT|REKKR_BIT))) {
c->forbidden_monster_bits &= ~SPECIAL;
something_special = SLUMP_TRUE;
if (rollpercent(50)) {
Expand Down Expand Up @@ -7374,7 +7374,7 @@ int timely_ammo(haa *haa, int *rlevels, config *c)
/* if to any, if any at all didn't have one yet. */

if ( (!c->weapons_are_special) && (need_shotgun) ) {
if ((!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT))) && rollpercent(30)) {
if ((!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT|HARMONY_BIT))) && rollpercent(30)) {
ammotype = ID_SSGUN;
} else if (c->gamemask & HERETIC_BIT) {
ammotype = ID_CROSSBOW;
Expand Down Expand Up @@ -7403,7 +7403,7 @@ int timely_ammo(haa *haa, int *rlevels, config *c)
case 4: ammotype = ID_FIREMACE; break;
}
} else {
if (c->gamemask&(DOOM0_BIT|DOOM1_BIT)) weapcount = 4;
if (c->gamemask&(DOOM0_BIT|DOOM1_BIT|HARMONY_BIT)) weapcount = 4;
else weapcount = 5;
switch (roll(weapcount)) {
case 0: if (c->big_weapons) {
Expand Down Expand Up @@ -8409,7 +8409,43 @@ boolean hardwired_nonswitch_nontheme_config(config *c)
genus *m;

/* get these obstacles registered as non-pickables */
if (!(c->gamemask & HERETIC_BIT)) {
if (c->gamemask & HACX_BIT) {
// Hacx decor
m = find_genus(c,ID_BARREL);
m->bits &= ~PICKABLE;
m->bits |= EXPLODES;
m->width = 33;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_CEILINGLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 32;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_TALLCEILINGLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 64;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_FLOORLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 128;
m->gamemask = HACX_BIT;

// Hacx ammo (pretty much the same as Doom ammo)
m = find_genus(c,ID_ROCKBOX);
m->bits |= AMMO;
m->ammo_provides = (float)500;
m = find_genus(c,ID_BULBOX);
m->bits |= AMMO;
m->ammo_provides = (float)500;
m = find_genus(c,ID_CELLPACK);
m->bits |= AMMO;
m->ammo_provides = (float)2000; /* Hoo-hoo! Same for BFG as plasgun? */
} else if (!(c->gamemask & HERETIC_BIT)) {
m = find_genus(c,ID_LAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
Expand Down Expand Up @@ -8531,42 +8567,6 @@ boolean hardwired_nonswitch_nontheme_config(config *c)
m = find_genus(c,ID_MACESPHEREPILE);
m->bits |= AMMO;
m->ammo_provides = (float)500;
} else if (c->gamemask & HACX_BIT) {
// Hacx decor
m = find_genus(c,ID_BARREL);
m->bits &= ~PICKABLE;
m->bits |= EXPLODES;
m->width = 33;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_CEILINGLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 32;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_TALLCEILINGLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 64;
m->gamemask = HACX_BIT;
m = find_genus(c,ID_FLOORLAMP);
m->bits &= ~PICKABLE;
m->bits |= LIGHT;
m->width = 33;
m->height = 128;
m->gamemask = HACX_BIT;

// Hacx ammo (pretty much the same as Doom ammo)
m = find_genus(c,ID_ROCKBOX);
m->bits |= AMMO;
m->ammo_provides = (float)500;
m = find_genus(c,ID_BULBOX);
m->bits |= AMMO;
m->ammo_provides = (float)500;
m = find_genus(c,ID_CELLPACK);
m->bits |= AMMO;
m->ammo_provides = (float)2000; /* Hoo-hoo! Same for BFG as plasgun? */
}

/* violence and mayhem */
Expand All @@ -8593,7 +8593,7 @@ boolean hardwired_nonswitch_nontheme_config(config *c)
* 11) Head
*/
/* Description of monsters */
if (!(c->gamemask&(HERETIC_BIT))) {
if (!(c->gamemask&(HERETIC_BIT|HARMONY_BIT|HACX_BIT))) {
m = find_monster(c,ID_TROOPER);
m->width = 42;
m->ammo_provides = (float)100;
Expand Down Expand Up @@ -8742,7 +8742,7 @@ boolean hardwired_nonswitch_nontheme_config(config *c)
}

/* DOOM2 monsters */
if (!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT|CHEX_BIT))) {
if (!(c->gamemask&(DOOM0_BIT|DOOM1_BIT|HERETIC_BIT|CHEX_BIT|HACX_BIT|HARMONY_BIT))) {
m = find_monster(c,ID_NAZI);
m->gamemask = DOOM2_BIT;
m->width = 42;
Expand Down Expand Up @@ -9250,6 +9250,128 @@ boolean hardwired_nonswitch_nontheme_config(config *c)
m->bits |= FLIES;
}

/* Harmony monsters */
if (c->gamemask&(HARMONY_BIT)) {
m = find_monster(c,ID_BEASTLING);
m->gamemask = HARMONY_BIT;
m->width = 62;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)385;
m->ammo_to_kill[HMP] = (float)236;
m->ammo_to_kill[UV] = (float)195;
m->damage[ITYTD] = (float)60;
m->damage[HMP] = (float)30;
m->damage[UV] = (float)15;
m->altdamage[ITYTD] = (float)40;
m->altdamage[HMP] = (float)20;
m->altdamage[UV] = (float)10;
m->min_level = 1;
m = find_monster(c,ID_FOLLOWER);
m->gamemask = HARMONY_BIT;
m->width = 42;
m->ammo_provides = (float)280;
m->ammo_to_kill[ITYTD] = (float)80;
m->ammo_to_kill[HMP] = (float)50;
m->ammo_to_kill[UV] = (float)40;
m->damage[ITYTD] = (float)25;
m->damage[HMP] = (float)6;
m->damage[UV] = (float)2;
m->altdamage[ITYTD] = (float)20;
m->altdamage[HMP] = (float)2;
m->altdamage[UV] = (float)1;
m->bits |= SHOOTS;
m->min_level = 1;
m = find_monster(c,ID_MUTANTSOLDIER);
m->gamemask = HARMONY_BIT;
m->width = 42;
m->ammo_provides = (float)100;
m->ammo_to_kill[ITYTD] = (float)155;
m->ammo_to_kill[HMP] = (float)106;
m->ammo_to_kill[UV] = (float)90;
m->damage[ITYTD] = (float)60;
m->damage[HMP] = (float)25;
m->damage[UV] = (float)15;
m->altdamage[ITYTD] = (float)40;
m->altdamage[HMP] = (float)20;
m->altdamage[UV] = (float)10;
m->bits |= SHOOTS;
m->min_level = 5;
m = find_monster(c,ID_PHAGE);
m->gamemask = HARMONY_BIT;
m->width = 98;
m->bits |= BIG | BOSS;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)100; /* Numbers are all guesses; fix */
m->ammo_to_kill[HMP] = (float)50;
m->ammo_to_kill[UV] = (float)30;
m->min_level = 23;
m = find_monster(c,ID_PREDATOR);
m->gamemask = HARMONY_BIT;
m->width = 42;
m->bits |= BIG;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)800;
m->ammo_to_kill[HMP] = (float)500;
m->ammo_to_kill[UV] = (float)400;
m->damage[ITYTD] = (float)125;
m->damage[HMP] = (float)70;
m->damage[UV] = (float)40;
m->altdamage[ITYTD] = (float)100;
m->altdamage[HMP] = (float)40;
m->altdamage[UV] = (float)25;
m->bits |= SHOOTS;
m->min_level = 7;
m = find_monster(c,ID_LANDMINE);
m->gamemask = HARMONY_BIT;
m->width = 34;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)260;
m->ammo_to_kill[HMP] = (float)165;
m->ammo_to_kill[UV] = (float)130;
m->damage[ITYTD] = (float)22;
m->damage[HMP] = (float)8;
m->damage[UV] = (float)5;
m->altdamage[ITYTD] = (float)18;
m->altdamage[HMP] = (float)5;
m->altdamage[UV] = (float)2;
m->min_level = 6;
m = find_monster(c,ID_AEROSOL);
m->gamemask = HARMONY_BIT;
m->width = 64;
m->bits |= BIG;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)1050;
m->ammo_to_kill[HMP] = (float)630;
m->ammo_to_kill[UV] = (float)590;
m->damage[ITYTD] = (float)60;
m->damage[HMP] = (float)35;
m->damage[UV] = (float)18;
m->altdamage[ITYTD] = (float)50;
m->altdamage[HMP] = (float)20;
m->altdamage[UV] = (float)10;
m->bits |= SHOOTS;
m->bits |= FLIES;
m->min_level = 11;
m = find_monster(c,ID_CENTAUR);
m->gamemask = HARMONY_BIT;
m->width = 84;
m->height = 110;
m->bits |= BIG | BOSS;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)8000; /* Numbers are all guesses; fix */
m->ammo_to_kill[HMP] = (float)6500;
m->ammo_to_kill[UV] = (float)6200;
m = find_monster(c,ID_ECHIDNA);
m->width = 260;
m->height = 100;
m->bits |= BIG | BOSS;
m->ammo_provides = (float)0;
m->ammo_to_kill[ITYTD] = (float)6000; /* Numbers are all guesses; fix */
m->ammo_to_kill[HMP] = (float)5000;
m->ammo_to_kill[UV] = (float)4500;
m->min_level=17;
}

return SLUMP_TRUE;
}

Expand Down
10 changes: 10 additions & 0 deletions source_files/slump/slump.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ typedef struct s_genus {
#define ID_THORNTHING (0x044)
#define ID_MECHAMANIAC (0x045)
#define ID_ROAMINGMINE (0x054)
/* The Harmony Monsters */
#define ID_BEASTLING (0x0bba)
#define ID_FOLLOWER (0x9)
#define ID_MUTANTSOLDIER (0x41)
#define ID_PHAGE (0x44)
#define ID_PREDATOR (0x42)
#define ID_LANDMINE (0xbbe)
#define ID_AEROSOL (0xbbd)
#define ID_CENTAUR (0x10)
#define ID_ECHIDNA (0x7)
short width;
short height;
int min_level; /* Minimum level to put monster in */
Expand Down

0 comments on commit 6df159d

Please sign in to comment.