Rename editor symbols

This commit is contained in:
Alexander Batalov 2022-06-11 00:32:57 +03:00
parent e3c27a3def
commit e17e30e13f
7 changed files with 1637 additions and 1632 deletions

File diff suppressed because it is too large Load Diff

View File

@ -126,10 +126,12 @@ typedef struct TownReputationEntry {
int city; int city;
} TownReputationEntry; } TownReputationEntry;
typedef struct STRUCT_56FCB0 { typedef struct PerkDialogOption {
int field_0; // Depending on the current mode this value is the id of either
char* field_4; // perk, trait (handling Mutate perk), or skill (handling Tag perk).
} STRUCT_56FCB0; int value;
char* name;
} PerkDialogOption;
// TODO: Field order is probably wrong. // TODO: Field order is probably wrong.
typedef struct KillInfo { typedef struct KillInfo {
@ -138,11 +140,11 @@ typedef struct KillInfo {
int kills; int kills;
} KillInfo; } KillInfo;
extern int _grph_id[50]; extern int gCharacterEditorFrmIds[50];
extern const unsigned char _copyflag[EDITOR_GRAPHIC_COUNT]; extern const unsigned char gCharacterEditorFrmShouldCopy[EDITOR_GRAPHIC_COUNT];
extern const int word_431D3A[EDITOR_DERIVED_STAT_COUNT]; extern const int gCharacterEditorDerivedStatFrmIds[EDITOR_DERIVED_STAT_COUNT];
extern const int _StatYpos[7]; extern const int gCharacterEditorPrimaryStatY[7];
extern const int word_431D6C[EDITOR_DERIVED_STAT_COUNT]; extern const int gCharacterEditorDerivedStatsMap[EDITOR_DERIVED_STAT_COUNT];
extern char byte_431D93[64]; extern char byte_431D93[64];
extern const int dword_431DD4[7]; extern const int dword_431DD4[7];
@ -151,10 +153,10 @@ extern const double dbl_501713;
extern const double dbl_5018F0; extern const double dbl_5018F0;
extern const double dbl_5019BE; extern const double dbl_5019BE;
extern bool _bk_enable_0; extern bool gCharacterEditorIsoWasEnabled;
extern int _skill_cursor; extern int gCharacterEditorCurrentSkill;
extern int _slider_y; extern int gCharacterEditorSkillValueAdjustmentSliderY;
extern int characterEditorRemainingCharacterPoints; extern int gCharacterEditorRemainingCharacterPoints;
extern KarmaEntry* gKarmaEntries; extern KarmaEntry* gKarmaEntries;
extern int gKarmaEntriesLength; extern int gKarmaEntriesLength;
extern GenericReputationEntry* gGenericReputationEntries; extern GenericReputationEntry* gGenericReputationEntries;
@ -162,148 +164,148 @@ extern int gGenericReputationEntriesLength;
extern const TownReputationEntry gTownReputationEntries[TOWN_REPUTATION_COUNT]; extern const TownReputationEntry gTownReputationEntries[TOWN_REPUTATION_COUNT];
extern const int gAddictionReputationVars[ADDICTION_REPUTATION_COUNT]; extern const int gAddictionReputationVars[ADDICTION_REPUTATION_COUNT];
extern const int gAddictionReputationFrmIds[ADDICTION_REPUTATION_COUNT]; extern const int gAddictionReputationFrmIds[ADDICTION_REPUTATION_COUNT];
extern int _folder_up_button; extern int gCharacterEditorFolderViewScrollUpBtn;
extern int _folder_down_button; extern int gCharacterEditorFolderViewScrollDownBtn;
extern char _folder_card_string[256]; extern char gCharacterEditorFolderCardString[256];
extern int _skillsav[SKILL_COUNT]; extern int gCharacterEditorSkillsBackup[SKILL_COUNT];
extern MessageList editorMessageList; extern MessageList gCharacterEditorMessageList;
extern STRUCT_56FCB0 _name_sort_list[DIALOG_PICKER_NUM_OPTIONS]; extern PerkDialogOption gPerkDialogOptionList[DIALOG_PICKER_NUM_OPTIONS];
extern int _trait_bids[TRAIT_COUNT]; extern int gCharacterEditorOptionalTraitBtns[TRAIT_COUNT];
extern MessageListItem editorMessageListItem; extern MessageListItem gCharacterEditorMessageListItem;
extern char _old_str1[48]; extern char gCharacterEditorCardTitle[48];
extern char _old_str2[48]; extern char gPerkDialogCardTitle[48];
extern int _tag_bids[SKILL_COUNT]; extern int gCharacterEditorTagSkillBtns[SKILL_COUNT];
extern char _name_save[32]; extern char gCharacterEditorNameBackup[32];
extern Size _GInfo[EDITOR_GRAPHIC_COUNT]; extern Size gCharacterEditorFrmSize[EDITOR_GRAPHIC_COUNT];
extern CacheEntry* _grph_key[EDITOR_GRAPHIC_COUNT]; extern CacheEntry* gCharacterEditorFrmHandle[EDITOR_GRAPHIC_COUNT];
extern unsigned char* _grphcpy[EDITOR_GRAPHIC_COUNT]; extern unsigned char* gCharacterEditorFrmCopy[EDITOR_GRAPHIC_COUNT];
extern unsigned char* _grphbmp[EDITOR_GRAPHIC_COUNT]; extern unsigned char* gCharacterEditorFrmData[EDITOR_GRAPHIC_COUNT];
extern int _folder_max_lines; extern int gCharacterEditorFolderViewMaxLines;
extern int _folder_line; extern int gCharacterEditorFolderViewCurrentLine;
extern int _folder_card_fid; extern int gCharacterEditorFolderCardFrmId;
extern int _folder_top_line; extern int gCharacterEditorFolderViewTopLine;
extern char* _folder_card_title; extern char* gCharacterEditorFolderCardTitle;
extern char* _folder_card_title2; extern char* gCharacterEditorFolderCardSubtitle;
extern int _folder_yoffset; extern int gCharacterEditorFolderViewOffsetY;
extern int _folder_karma_top_line; extern int gCharacterEditorKarmaFolderTopLine;
extern int _folder_highlight_line; extern int gCharacterEditorFolderViewHighlightedLine;
extern char* _folder_card_desc; extern char* gCharacterEditorFolderCardDescription;
extern int _folder_ypos; extern int gCharacterEditorFolderViewNextY;
extern int _folder_kills_top_line; extern int gCharacterEditorKillsFolderTopLine;
extern int _folder_perk_top_line; extern int gCharacterEditorPerkFolderTopLine;
extern unsigned char* gEditorPerkBackgroundBuffer; extern unsigned char* gPerkDialogBackgroundBuffer;
extern int gEditorPerkWindow; extern int gPerkDialogWindow;
extern int _SliderPlusID; extern int gCharacterEditorSliderPlusBtn;
extern int _SliderNegID; extern int gCharacterEditorSliderMinusBtn;
extern int _stat_bids_minus[7]; extern int gCharacterEditorPrimaryStatMinusBtns[7];
extern unsigned char* characterEditorWindowBuf; extern unsigned char* gCharacterEditorWindowBuffer;
extern int characterEditorWindowHandle; extern int gCharacterEditorWindow;
extern int _stat_bids_plus[7]; extern int gCharacterEditorPrimaryStatPlusBtns[7];
extern unsigned char* gEditorPerkWindowBuffer; extern unsigned char* gPerkDialogWindowBuffer;
extern CritterProtoData _dude_data; extern CritterProtoData gCharacterEditorDudeDataBackup;
extern unsigned char* characterEditorWindowBackgroundBuf; extern unsigned char* gCharacterEditorWindowBackgroundBuffer;
extern int _cline; extern int gPerkDialogCurrentLine;
extern int _oldsline; extern int gPerkDialogPreviousCurrentLine;
extern int _upsent_points_back; extern int gCharacterEditorUnspentSkillPointsBackup;
extern int _last_level; extern int gCharacterEditorLastLevel;
extern int characterEditorWindowOldFont; extern int gCharacterEditorOldFont;
extern int _kills_count; extern int gCharacterEditorKillsCount;
extern CacheEntry* _bck_key; extern CacheEntry* gCharacterEditorWindowBackgroundHandle;
extern int _hp_back; extern int gCharacterEditorHitPointsBackup;
extern int _mouse_ypos; extern int gCharacterEditorMouseY;
extern int _mouse_xpos; extern int gCharacterEditorMouseX;
extern int characterEditorSelectedItem; extern int characterEditorSelectedItem;
extern int characterEditorWindowSelectedFolder; extern int characterEditorWindowSelectedFolder;
extern int _frstc_draw1; extern bool gCharacterEditorCardDrawn;
extern int _crow; extern int gPerkDialogTopLine;
extern int _frstc_draw2; extern bool gPerkDialogCardDrawn;
extern int _perk_back[PERK_COUNT]; extern int gCharacterEditorPerksBackup[PERK_COUNT];
extern unsigned int _repFtime; extern unsigned int _repFtime;
extern unsigned int _frame_time; extern unsigned int _frame_time;
extern int _old_tags; extern int gCharacterEditorOldTaggedSkillCount;
extern int _last_level_back; extern int gCharacterEditorLastLevelBackup;
extern bool gCharacterEditorIsCreationMode; extern bool gCharacterEditorIsCreationMode;
extern int _tag_skill_back[NUM_TAGGED_SKILLS]; extern int gCharacterEditorTaggedSkillsBackup[NUM_TAGGED_SKILLS];
extern int _card_old_fid2; extern int gPerkDialogCardFrmId;
extern int _card_old_fid1; extern int gCharacterEditorCardFrmId;
extern int _trait_back[3]; extern int gCharacterEditorOptionalTraitsBackup[3];
extern int _trait_count; extern int gCharacterEditorTempTraitCount;
extern int _optrt_count; extern int gPerkDialogOptionCount;
extern int _temp_trait[3]; extern int gCharacterEditorTempTraits[3];
extern int _tagskill_count; extern int gCharacterEditorTaggedSkillCount;
extern int _temp_tag_skill[NUM_TAGGED_SKILLS]; extern int gCharacterEditorTempTaggedSkills[NUM_TAGGED_SKILLS];
extern char _free_perk_back; extern char gCharacterEditorHasFreePerkBackup;
extern unsigned char _free_perk; extern unsigned char gCharacterEditorHasFreePerk;
extern unsigned char _first_skill_list; extern unsigned char gCharacterEditorIsSkillsFirstDraw;
int _editor_design(bool isCreationMode); int characterEditorShow(bool isCreationMode);
int characterEditorWindowInit(); int characterEditorWindowInit();
void characterEditorWindowFree(); void characterEditorWindowFree();
void _CharEditInit(); void characterEditorInit();
int _get_input_str(int win, int cancelKeyCode, char* text, int maxLength, int x, int y, int textColor, int backgroundColor, int flags); int _get_input_str(int win, int cancelKeyCode, char* text, int maxLength, int x, int y, int textColor, int backgroundColor, int flags);
bool _isdoschar(int ch); bool _isdoschar(int ch);
char* _strmfe(char* dest, const char* name, const char* ext); char* _strmfe(char* dest, const char* name, const char* ext);
void editorRenderFolders(); void characterEditorDrawFolders();
void editorRenderPerks(); void characterEditorDrawPerksFolder();
int _kills_list_comp(const KillInfo* a, const KillInfo* b); int characterEditorKillsCompare(const void* a1, const void* a2);
int editorRenderKills(); int characterEditorDrawKillsFolder();
void characterEditorRenderBigNumber(int x, int y, int flags, int value, int previousValue, int windowHandle); void characterEditorDrawBigNumber(int x, int y, int flags, int value, int previousValue, int windowHandle);
void editorRenderPcStats(); void characterEditorDrawPcStats();
void editorRenderPrimaryStat(int stat, bool animate, int previousValue); void characterEditorDrawPrimaryStat(int stat, bool animate, int previousValue);
void editorRenderGender(); void characterEditorDrawGender();
void editorRenderAge(); void characterEditorDrawAge();
void editorRenderName(); void characterEditorDrawName();
void editorRenderSecondaryStats(); void characterEditorDrawDerivedStats();
void editorRenderSkills(int a1); void characterEditorDrawSkills(int a1);
void editorRenderDetails(); void characterEditorDrawCard();
int characterEditorEditName(); int characterEditorEditName();
void _PrintName(unsigned char* buf, int a2); void _PrintName(unsigned char* buf, int pitch);
int characterEditorRunEditAgeDialog(); int characterEditorEditAge();
void characterEditorEditGender(); void characterEditorEditGender();
void characterEditorHandleIncDecPrimaryStat(int eventCode); void characterEditorAdjustPrimaryStat(int eventCode);
int _OptionWindow(); int characterEditorShowOptions();
bool characterFileExists(const char* fname); bool characterFileExists(const char* fname);
int characterPrintToFile(const char* fileName); int characterPrintToFile(const char* fileName);
char* _AddSpaces(char* string, int length); char* _AddSpaces(char* string, int length);
char* _AddDots(char* string, int length); char* _AddDots(char* string, int length);
void _ResetScreen(); void characterEditorResetScreen();
void _RegInfoAreas(); void characterEditorRegisterInfoAreas();
void _SavePlayer(); void characterEditorSavePlayer();
void _RestorePlayer(); void characterEditorRestorePlayer();
char* _itostndn(int value, char* dest); char* _itostndn(int value, char* dest);
int _DrawCard(int graphicId, const char* name, const char* attributes, char* description); int characterEditorDrawCardWithOptions(int graphicId, const char* name, const char* attributes, char* description);
void _FldrButton(); void characterEditorHandleFolderButtonPressed();
void _InfoButton(int eventCode); void characterEditorHandleInfoButtonPressed(int eventCode);
void editorAdjustSkill(int a1); void characterEditorHandleAdjustSkillButtonPressed(int a1);
void characterEditorToggleTaggedSkill(int skill); void characterEditorToggleTaggedSkill(int skill);
void characterEditorWindowRenderTraits(); void characterEditorDrawOptionalTraits();
void characterEditorToggleOptionalTrait(int trait); void characterEditorToggleOptionalTrait(int trait);
void editorRenderKarma(); void characterEditorDrawKarmaFolder();
int _editor_save(File* stream); int characterEditorSave(File* stream);
int _editor_load(File* stream); int characterEditorLoad(File* stream);
void _editor_reset(); void characterEditorReset();
int _UpdateLevel(); int characterEditorUpdateLevel();
void _RedrwDPrks(); void perkDialogRefreshPerks();
int editorSelectPerk(); int perkDialogShow();
int _InputPDLoop(int count, void (*refreshProc)()); int perkDialogHandleInput(int count, void (*refreshProc)());
int _ListDPerks(); int perkDialogDrawPerks();
void _RedrwDMPrk(); void perkDialogRefreshTraits();
bool editorHandleMutate(); bool perkDialogHandleMutatePerk();
void _RedrwDMTagSkl(); void perkDialogRefreshSkills();
bool editorHandleTag(); bool perkDialogHandleTagPerk();
void _ListNewTagSkills(); void perkDialogDrawSkills();
int _ListMyTraits(int a1); int perkDialogDrawTraits(int a1);
int _name_sort_comp(const void* a1, const void* a2); int perkDialogOptionCompare(const void* a1, const void* a2);
int _DrawCard2(int frmId, const char* name, const char* rank, char* description); int perkDialogDrawCard(int frmId, const char* name, const char* rank, char* description);
void _pop_perks(); void _pop_perks();
int _is_supper_bonus(); int _is_supper_bonus();
int _folder_init(); int characterEditorFolderViewInit();
void _folder_scroll(int direction); void characterEditorFolderViewScroll(int direction);
void _folder_clear(); void characterEditorFolderViewClear();
int _folder_print_seperator(const char* string); int characterEditorFolderViewDrawHeading(const char* string);
bool _folder_print_line(const char* string); bool characterEditorFolderViewDrawString(const char* string);
bool editorDrawKillsEntry(const char* name, int kills); bool characterEditorFolderViewDrawKillsEntry(const char* name, int kills);
int karmaInit(); int karmaInit();
void karmaFree(); void karmaFree();
int karmaEntryCompare(const void* a1, const void* a2); int karmaEntryCompare(const void* a1, const void* a2);

View File

@ -179,7 +179,7 @@ int characterSelectorOpen()
case KEY_UPPERCASE_C: case KEY_UPPERCASE_C:
case KEY_LOWERCASE_C: case KEY_LOWERCASE_C:
_ResetPlayer(); _ResetPlayer();
if (_editor_design(1) == 0) { if (characterEditorShow(1) == 0) {
rc = 2; rc = 2;
done = true; done = true;
} }
@ -187,7 +187,7 @@ int characterSelectorOpen()
break; break;
case KEY_UPPERCASE_M: case KEY_UPPERCASE_M:
case KEY_LOWERCASE_M: case KEY_LOWERCASE_M:
if (!_editor_design(1)) { if (!characterEditorShow(1)) {
rc = 2; rc = 2;
done = true; done = true;
} }

View File

@ -976,7 +976,7 @@ int gcdLoad(const char* path)
return -1; return -1;
} }
if (fileReadInt32(stream, &characterEditorRemainingCharacterPoints) == -1) { if (fileReadInt32(stream, &gCharacterEditorRemainingCharacterPoints) == -1) {
fileClose(stream); fileClose(stream);
return -1; return -1;
} }
@ -1048,7 +1048,7 @@ int gcdSave(const char* path)
return -1; return -1;
} }
if (fileWriteInt32(stream, characterEditorRemainingCharacterPoints) == -1) { if (fileWriteInt32(stream, gCharacterEditorRemainingCharacterPoints) == -1) {
fileClose(stream); fileClose(stream);
return -1; return -1;
} }

View File

@ -267,7 +267,7 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4
debugPrint(">wmWorldMap_init\t"); debugPrint(">wmWorldMap_init\t");
_CharEditInit(); characterEditorInit();
debugPrint(">CharEditInit\t"); debugPrint(">CharEditInit\t");
pipboyInit(); pipboyInit();
@ -367,7 +367,7 @@ void gameReset()
scriptsReset(); scriptsReset();
worldmapReset(); worldmapReset();
partyMembersReset(); partyMembersReset();
_CharEditInit(); characterEditorInit();
pipboyReset(); pipboyReset();
_ResetLoadSave(); _ResetLoadSave();
gameDialogReset(); gameDialogReset();
@ -516,7 +516,7 @@ int gameHandleKey(int eventCode, bool isInCombatMode)
if (interfaceBarEnabled()) { if (interfaceBarEnabled()) {
soundPlayFile("ib1p1xx1"); soundPlayFile("ib1p1xx1");
bool isoWasEnabled = isoDisable(); bool isoWasEnabled = isoDisable();
_editor_design(false); characterEditorShow(false);
if (isoWasEnabled) { if (isoWasEnabled) {
isoEnable(); isoEnable();
} }

View File

@ -111,7 +111,7 @@ SaveGameHandler* _master_save_list[LOAD_SAVE_HANDLER_COUNT] = {
traitsSave, traitsSave,
automapSave, automapSave,
preferencesSave, preferencesSave,
_editor_save, characterEditorSave,
worldmapSave, worldmapSave,
pipboySave, pipboySave,
gameMoviesSave, gameMoviesSave,
@ -142,7 +142,7 @@ LoadGameHandler* _master_load_list[LOAD_SAVE_HANDLER_COUNT] = {
traitsLoad, traitsLoad,
automapLoad, automapLoad,
preferencesLoad, preferencesLoad,
_editor_load, characterEditorLoad,
worldmapLoad, worldmapLoad,
pipboyLoad, pipboyLoad,
gameMoviesLoad, gameMoviesLoad,

View File

@ -1854,7 +1854,7 @@ int _ResetPlayer()
pcStatsReset(); pcStatsReset();
protoCritterDataResetStats(&(proto->critter.data)); protoCritterDataResetStats(&(proto->critter.data));
critterReset(); critterReset();
_editor_reset(); characterEditorReset();
protoCritterDataResetSkills(&(proto->critter.data)); protoCritterDataResetSkills(&(proto->critter.data));
skillsReset(); skillsReset();
perksReset(); perksReset();