p->Misc.tGender = data[132] & 0x80 ? 1 : 0; p->Misc.tID[0] = *(unsigned short *)&data[12]; p->Misc.tID[1] = *(unsigned short *)&data[14]; if (IsGeneration4(targetGame)) { G4ToUnicode((unsigned short *)&data[104],p->Misc.tName,8,0); } else { G5ToUnicode((unsigned short *)&data[104],p->Misc.tName,8); } ------------------------------------------------------------------------------------- p->Misc.tGender = data[132] & 0x80 ? 1 : 0; p->Misc.tID[0] = *(unsigned short *)&data[12]; p->Misc.tID[1] = *(unsigned short *)&data[14]; if (IsGeneration4(targetGame)) { if((p->Met.game < GAME_ALL_GEN3) || (p->Met.game == GAME_GC)){ memcpy(temp_ot_fix, &data[72], 16); for(int i = 0; i < 16; ++i) { if(data[i + 104]) temp_ot_fix[i] = data[i + 104]; } memcpy(&data[104], temp_ot_fix, 16); } G4ToUnicode((unsigned short *)&data[104],p->Misc.tName,8,0); } else { if((p->Met.game < GAME_ALL_GEN3) || (p->Met.game == GAME_GC)){ memcpy(temp_ot_fix, &data[72], 16); for(int i = 0; i < 16; ++i) { if(data[i + 104]) temp_ot_fix[i] = data[i + 104]; } memcpy(&data[104], temp_ot_fix, 16); } G5ToUnicode((unsigned short *)&data[104],p->Misc.tName,8); }