Clarify proto_make_path address

This commit is contained in:
Alexander Batalov 2023-07-22 15:36:51 +03:00
parent 3c7248af5f
commit d6c3d74b3f
2 changed files with 7 additions and 7 deletions

View File

@ -187,8 +187,8 @@ static char** _perk_code_strs;
// 0x6648BC // 0x6648BC
static char** _critter_stats_list; static char** _critter_stats_list;
// NOTE: Inlined. // 0x49E270
void _proto_make_path(char* path, int pid) void proto_make_path(char* path, int pid)
{ {
strcpy(path, _cd_path_base); strcpy(path, _cd_path_base);
strcat(path, _proto_path_base); strcat(path, _proto_path_base);
@ -211,7 +211,7 @@ int _proto_list_str(int pid, char* proto_path)
} }
char path[COMPAT_MAX_PATH]; char path[COMPAT_MAX_PATH];
_proto_make_path(path, pid); proto_make_path(path, pid);
strcat(path, "\\"); strcat(path, "\\");
strcat(path, artGetObjectTypeName(PID_TYPE(pid))); strcat(path, artGetObjectTypeName(PID_TYPE(pid)));
strcat(path, ".lst"); strcat(path, ".lst");
@ -1521,7 +1521,7 @@ static int _proto_header_load()
ptr->max_entries_num = 1; ptr->max_entries_num = 1;
char path[COMPAT_MAX_PATH]; char path[COMPAT_MAX_PATH];
_proto_make_path(path, index << 24); proto_make_path(path, index << 24);
strcat(path, "\\"); strcat(path, "\\");
strcat(path, artGetObjectTypeName(index)); strcat(path, artGetObjectTypeName(index));
strcat(path, ".lst"); strcat(path, ".lst");
@ -1931,7 +1931,7 @@ int _proto_save_pid(int pid)
} }
char path[260]; char path[260];
_proto_make_path(path, pid); proto_make_path(path, pid);
strcat(path, "\\"); strcat(path, "\\");
_proto_list_str(pid, path + strlen(path)); _proto_list_str(pid, path + strlen(path));
@ -1952,7 +1952,7 @@ int _proto_save_pid(int pid)
static int _proto_load_pid(int pid, Proto** protoPtr) static int _proto_load_pid(int pid, Proto** protoPtr)
{ {
char path[COMPAT_MAX_PATH]; char path[COMPAT_MAX_PATH];
_proto_make_path(path, pid); proto_make_path(path, pid);
strcat(path, "\\"); strcat(path, "\\");
if (_proto_list_str(pid, path + strlen(path)) == -1) { if (_proto_list_str(pid, path + strlen(path)) == -1) {

View File

@ -102,7 +102,7 @@ extern char _cd_path_base[COMPAT_MAX_PATH];
extern MessageList gProtoMessageList; extern MessageList gProtoMessageList;
extern char* _proto_none_str; extern char* _proto_none_str;
void _proto_make_path(char* path, int pid); void proto_make_path(char* path, int pid);
int _proto_list_str(int pid, char* proto_path); int _proto_list_str(int pid, char* proto_path);
size_t proto_size(int type); size_t proto_size(int type);
bool _proto_action_can_use(int pid); bool _proto_action_can_use(int pid);