remove unused roles[].femalenum, races[].femalenum

and rename {roles,races}[].malenum to {roles,races}[].mnum.

Pull request #653 from entrez.  Male and female player character
monsters are no long separate even when their title's differ and all
the entries for femalenum in the roles[] and races[] arrays were set
to NON_PM (meaning not used in this case).

The update in the pull request overlooked win/Qt/qt_plsel.cpp which
had four references to .malenum so this is more than just the fixes
entry.

Closes #653
This commit is contained in:
PatR
2022-01-14 14:09:00 -08:00
parent f5e3bc3d96
commit 689aed55ca
2 changed files with 6 additions and 4 deletions

View File

@@ -1580,4 +1580,6 @@ map_glyphinfo() now simply references an internal array that maps each unique
in-game that could have an impact on the mappings, but they remain
stable between those events
added MG_MALE glyphflag to complement the MG_FEMALE glyphflag that was there
remove obsolete roles[].femalenum and rename roles[].malenum to roles[].mnum;
likewise for races[]

View File

@@ -312,7 +312,7 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(
item = new QTableWidgetItem();
role->setItem(i, 0, item);
if (roles[i].malenum == PM_CLERIC)
if (roles[i].mnum == PM_CLERIC)
cleric_role_row = i; // for populate_races()
}
@@ -323,7 +323,7 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector(
item = new QTableWidgetItem();
race->setItem(i, 0, item);
if (races[i].malenum == PM_HUMAN)
if (races[i].mnum == PM_HUMAN)
human_race_row = i; // (always i==0) for populate_roles()
}
@@ -405,7 +405,7 @@ NetHackQtPlayerSelector::populate_roles()
for (int i = 0; roles[i].name.m; ++i) {
rolename = (is_f && roles[i].name.f) ? roles[i].name.f
: roles[i].name.m;
gf = monnum_to_glyph(roles[i].malenum, is_f ? FEMALE : MALE);
gf = monnum_to_glyph(roles[i].mnum, is_f ? FEMALE : MALE);
map_glyphinfo(0, 0, gf, 0, &gi);
v = ((ra < 0 || validrace(i, ra))
&& (gn < 0 || validgend(i, (ra >= 0) ? ra : hu, gn))
@@ -435,7 +435,7 @@ NetHackQtPlayerSelector::populate_races()
bool is_f = (gn == 1);
NetHackQtGlyphs& glyphs = qt_settings->glyphs();
for (int j = 0; races[j].noun; ++j) {
gf = monnum_to_glyph(races[j].malenum, is_f ? FEMALE : MALE);
gf = monnum_to_glyph(races[j].mnum, is_f ? FEMALE : MALE);
map_glyphinfo(0, 0, gf, 0, &gi);
v = ((ro < 0 || validrace(ro, j))
&& (al < 0 || validalign((ro >= 0) ? ro : cl, j, al)));