@@ -1395,12 +1395,14 @@ void prepare_map_dat_to_play(void)
13951395
13961396TbResult load_map_mad (ushort mapno )
13971397{
1398- char mad_fname [52 ];
1398+ char mad_fname [DISKPATH_SIZE ];
1399+ PathInfo * pinfo ;
13991400 long fsize ;
14001401
14011402 next_local_mat = 1 ;
14021403
1403- sprintf (mad_fname , "%s/map%03d.mad" , "maps" , mapno );
1404+ pinfo = & game_dirs [DirPlace_Maps ];
1405+ snprintf (mad_fname , DISKPATH_SIZE - 1 , "%s/map%03d.mad" , pinfo -> directory , mapno );
14041406 fsize = LbFileLoadAt (mad_fname , scratch_malloc_mem );
14051407 if (fsize == Lb_FAIL )
14061408 return Lb_FAIL ;
@@ -1414,11 +1416,11 @@ TbResult load_map_mad(ushort mapno)
14141416 return Lb_SUCCESS ;
14151417}
14161418
1417- void load_map_bnb (int a1 )
1419+ void load_map_bnb (ushort mapno )
14181420{
14191421#if 0
14201422 asm volatile ("call ASM_load_map_bnb\n"
1421- : : "a" (a1 ));
1423+ : : "a" (mapno ));
14221424#endif
14231425 char locstr [DISKPATH_SIZE ];
14241426 PathInfo * pinfo ;
@@ -1427,7 +1429,7 @@ void load_map_bnb(int a1)
14271429 ubyte Bmin , Bmax ;
14281430
14291431 pinfo = & game_dirs [DirPlace_Maps ];
1430- snprintf (locstr , DISKPATH_SIZE - 1 , "%s/map%03d.b&b" , pinfo -> directory , a1 );
1432+ snprintf (locstr , DISKPATH_SIZE - 1 , "%s/map%03d.b&b" , pinfo -> directory , mapno );
14311433 fh = LbFileOpen (locstr , Lb_FILE_MODE_READ_ONLY );
14321434 if (fh == INVALID_FILE )
14331435 {
0 commit comments