Discussion in 'NDS - ROM Hacking and Translations' started by Cid2mizard, Oct 25, 2007.

  1. Cid2mizard

    Cid2mizard GBAtemp Fan

    Aug 16, 2007
    I have a problem for create a FAT Player .mod, when i opened my first .mod it's good but with the 2nd i have no sound and a bug.

    When you touch the name of .mod, it's played... enjoy


    #define MAX_FILENAME_LEN 256;
    void ManipFichier(int number);

    char * buffer;
    char * debut;
    char * fin;

    typedef struct{
    Â char filename[100];
    Â char name[100];
    Â char ext[10];
    Â u32 size;
    } ÂPAfiletype;
    PAfiletype files[50];

    extern inline char PA_GetSmall(char letter){
    Â if((letter >= 'A')&&(letter = FileNumber-1) nfile = FileNumber-1;
    Â Â Â Â Â Â Â Â Â
    Â Â Â Â ManipFichier(nfile);
    Â Â Â Â PA_OutputSimpleText(1, 1, 14, "Lecture du .mod");
    Â Â Â Â PA_PlayMod(buffer); LectureEnCours = 1; Â Â Â Â
    Â Â Â}
    Â Â Â
    Â Â ÂPA_WaitForVBL();
    Â }
    Â Â Â
    Â return 0;

    Where is my problème ? [​IMG]
  2. chuckstudios

    chuckstudios Putting the pro in procrastination

    Jul 19, 2006
    United States
    North Carolina, USA
    I don't know if it will solve your problem, but you shouldn't be doing a free() on filename. free() is only supposed to be used on malloc()'d pointers, not char arrays.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice