Skip to content

Commit

Permalink
FF7: Fix eye directpath basedir
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Dec 16, 2023
1 parent 88bdc53 commit 1cc8580
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int opcode_kawai_eye_texture() {
// Skip custom eye replacement for NPCs
if (eye_index < 9)
{
char directpath[MAX_PATH];
char directpath[MAX_PATH + sizeof(basedir)];
char filename[10];
char ext[4];

Expand All @@ -97,7 +97,7 @@ int opcode_kawai_eye_texture() {
if (left_eye_index > 0)
{
_splitpath(ff7_externals.field_models_eye_blink_buffer[eye_index].static_left_eye_filename, NULL, NULL, filename, ext);
_snprintf(directpath, sizeof(directpath), "%s/flevel/%s_%d.TEX", direct_mode_path.c_str(), filename, left_eye_index);
_snprintf(directpath, sizeof(directpath), "%s/%s/flevel/%s_%d.TEX", basedir, direct_mode_path.c_str(), filename, left_eye_index);

if (fileExists(directpath))
{
Expand All @@ -122,7 +122,7 @@ int opcode_kawai_eye_texture() {
if (right_eye_index > 0)
{
_splitpath(ff7_externals.field_models_eye_blink_buffer[eye_index].static_right_eye_filename, NULL, NULL, filename, ext);
_snprintf(directpath, sizeof(directpath), "%s/flevel/%s_%d.TEX", direct_mode_path.c_str(), filename, right_eye_index);
_snprintf(directpath, sizeof(directpath), "%s/%s/flevel/%s_%d.TEX", basedir, direct_mode_path.c_str(), filename, right_eye_index);

if (fileExists(directpath))
{
Expand Down

0 comments on commit 1cc8580

Please sign in to comment.