|
29 | 29 | #include "bflib_planar.h"
|
30 | 30 | #include "bflib_vidraw.h"
|
31 | 31 | #include "bflib_sound.h"
|
| 32 | +#include "bflib_fileio.h" |
32 | 33 |
|
33 | 34 | #include "engine_lenses.h"
|
34 | 35 | #include "engine_arrays.h"
|
@@ -374,10 +375,23 @@ TbBool load_swipe_graphic_for_creature(const struct Thing *thing)
|
374 | 375 | sprintf(t_lfile->FName, "data/swipe%02d-%d.tab", swpe_idx, 32);
|
375 | 376 | t_lfile++;
|
376 | 377 | #else
|
377 |
| - sprintf(t_lfile->FName, "data/swipe%02d.dat", swpe_idx); |
378 |
| - t_lfile++; |
379 |
| - sprintf(t_lfile->FName, "data/swipe%02d.tab", swpe_idx); |
380 |
| - t_lfile++; |
| 378 | + |
| 379 | + char* fname = prepare_file_fmtpath(FGrp_CmpgConfig, "swipe%02d.dat",swpe_idx); |
| 380 | + if (!LbFileExists(fname)) |
| 381 | + { |
| 382 | + fname = prepare_file_fmtpath(FGrp_StdData, "swipe%02d.dat",swpe_idx); |
| 383 | + } |
| 384 | + sprintf(t_lfile->FName, "%s", fname); |
| 385 | + t_lfile++; |
| 386 | + |
| 387 | + fname = prepare_file_fmtpath(FGrp_CmpgConfig, "swipe%02d.tab",swpe_idx); |
| 388 | + if (!LbFileExists(fname)) |
| 389 | + { |
| 390 | + fname = prepare_file_fmtpath(FGrp_StdData, "swipe%02d.tab",swpe_idx); |
| 391 | + } |
| 392 | + sprintf(t_lfile->FName, "%s", fname); |
| 393 | + t_lfile++; |
| 394 | + |
381 | 395 | #endif
|
382 | 396 | }
|
383 | 397 | if ( LbDataLoadAll(swipe_load_file) )
|
|
0 commit comments