mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fix some code styles and move Perk and Trait structs into Structs.h
This commit is contained in:
@@ -135,6 +135,28 @@ struct TProgram {
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct PerkInfo {
|
||||
char* Name;
|
||||
char* Desc;
|
||||
__int32 Image;
|
||||
__int32 Ranks;
|
||||
__int32 Level;
|
||||
__int32 Stat;
|
||||
__int32 StatMag;
|
||||
__int32 Skill1;
|
||||
__int32 Skill1Mag;
|
||||
__int32 Type;
|
||||
__int32 Skill2;
|
||||
__int32 Skill2Mag;
|
||||
__int32 Str;
|
||||
__int32 Per;
|
||||
__int32 End;
|
||||
__int32 Chr;
|
||||
__int32 Int;
|
||||
__int32 Agl;
|
||||
__int32 Lck;
|
||||
};
|
||||
|
||||
struct DBFile {
|
||||
__int32 fileType;
|
||||
void* handle;
|
||||
@@ -206,6 +228,13 @@ struct SkillInfo
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
struct TraitInfo {
|
||||
char* Name;
|
||||
char* Desc;
|
||||
__int32 Image;
|
||||
};
|
||||
|
||||
//fallout2 path node structure
|
||||
struct sPath {
|
||||
char* path;
|
||||
|
||||
@@ -126,7 +126,7 @@ _VAR(pc_name, char)
|
||||
_VAR(pc_proto, DWORD)
|
||||
_VAR(pc_trait, DWORD) // 2 of them
|
||||
_VAR(pc_trait2, DWORD)
|
||||
_VAR(perk_data, DWORD)
|
||||
_VAR(perk_data, Perk)
|
||||
_VAR(perkLevelDataList, int*) // limited to PERK_Count
|
||||
_VAR(pip_win, DWORD)
|
||||
_VAR(pipboy_message_file, MessageList)
|
||||
@@ -171,7 +171,7 @@ _VAR(text_to_buf, DWORD)
|
||||
_VAR(text_width, DWORD)
|
||||
_VAR(title_color, DWORD)
|
||||
_VAR(title_font, DWORD)
|
||||
_VAR(trait_data, DWORD)
|
||||
_VAR(trait_data, Trait)
|
||||
_VAR(view_page, DWORD)
|
||||
_VAR(wd_obj, DWORD)
|
||||
_VAR(wmAreaInfoList, DWORD)
|
||||
|
||||
+148
-122
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ static DWORD real_unspent_skill_points;
|
||||
static DWORD real_sneak_working;
|
||||
//static DWORD real_sneak_queue_time;
|
||||
static DWORD real_hand;
|
||||
static DWORD real_itemButtonItems[6*2];
|
||||
static DWORD real_itemButtonItems[6 * 2];
|
||||
static DWORD real_perkLevelDataList[PERK_count];
|
||||
//static DWORD real_drug_gvar[6];
|
||||
//static DWORD real_jet_gvar;
|
||||
@@ -346,8 +346,9 @@ end:
|
||||
|
||||
void PartyControlInit() {
|
||||
Mode = GetPrivateProfileIntA("Misc", "ControlCombat", 0, ini);
|
||||
if (Mode > 2)
|
||||
if (Mode > 2) {
|
||||
Mode = 0;
|
||||
}
|
||||
if (Mode > 0) {
|
||||
char pidbuf[512];
|
||||
pidbuf[511] = 0;
|
||||
@@ -363,8 +364,9 @@ void PartyControlInit() {
|
||||
Chars.push_back((WORD)strtoul(ptr, 0, 0));
|
||||
ptr = comma + 1;
|
||||
}
|
||||
if (strlen(ptr) > 0)
|
||||
if (strlen(ptr) > 0) {
|
||||
Chars.push_back((WORD)strtoul(ptr, 0, 0));
|
||||
}
|
||||
}
|
||||
dlog_f(" Mode %d, Chars read: %d.", DL_INIT, Mode, Chars.size());
|
||||
|
||||
@@ -377,8 +379,9 @@ void PartyControlInit() {
|
||||
HookCall(0x454218, &stat_pc_add_experience_hook); // call inside op_give_exp_points_hook
|
||||
HookCall(0x4124F1, &pc_flag_toggle_hook);
|
||||
HookCall(0x41279A, &pc_flag_toggle_hook);
|
||||
} else
|
||||
} else {
|
||||
dlog(" Disabled.", DL_INIT);
|
||||
}
|
||||
}
|
||||
|
||||
void __stdcall PartyControlReset() {
|
||||
|
||||
+337
-316
File diff suppressed because it is too large
Load Diff
+18
-16
@@ -29,28 +29,30 @@ PremadeChar* premade;
|
||||
void PremadeInit() {
|
||||
char buf[512];
|
||||
GetPrivateProfileString("misc", "PremadePaths", "", buf, 512, ini);
|
||||
if(buf[0]) {
|
||||
if (buf[0]) {
|
||||
char buf2[512];
|
||||
GetPrivateProfileString("misc", "PremadeFIDs", "", buf2, 512, ini);
|
||||
|
||||
int count=1;
|
||||
char* tmp=buf;
|
||||
while(tmp=strchr(tmp, ',')) { tmp++; count++; }
|
||||
premade=new PremadeChar[count];
|
||||
int count = 1;
|
||||
char* tmp = buf;
|
||||
while (tmp = strchr(tmp, ',')) {
|
||||
tmp++; count++;
|
||||
}
|
||||
premade = new PremadeChar[count];
|
||||
|
||||
tmp=buf;
|
||||
char* tmp2=buf2;
|
||||
for(int i=0;i<count;i++) {
|
||||
char* tmp3=strchr(tmp, ',');
|
||||
if(tmp3) *tmp3=0;
|
||||
tmp = buf;
|
||||
char* tmp2 = buf2;
|
||||
for (int i = 0; i < count; i++) {
|
||||
char* tmp3 = strchr(tmp, ',');
|
||||
if (tmp3) *tmp3 = 0;
|
||||
strcpy_s(premade[i].path, 20, "premade\\");
|
||||
strcat_s(premade[i].path, 20, tmp);
|
||||
tmp=tmp3 + 1;
|
||||
|
||||
tmp3=strchr(tmp2, ',');
|
||||
if(tmp3) *tmp3=0;
|
||||
premade[i].fid=atoi(tmp2);
|
||||
tmp2=tmp3 + 1;
|
||||
tmp = tmp3 + 1;
|
||||
|
||||
tmp3 = strchr(tmp2, ',');
|
||||
if (tmp3) *tmp3 = 0;
|
||||
premade[i].fid = atoi(tmp2);
|
||||
tmp2 = tmp3 + 1;
|
||||
}
|
||||
|
||||
SafeWrite32(0x51C8D4, count);
|
||||
|
||||
@@ -98,6 +98,7 @@ smpfhj:
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) newhookresetvalue() {
|
||||
__asm {
|
||||
push eax;
|
||||
|
||||
Reference in New Issue
Block a user