mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-23 02:42:38 +01:00
Merge pull request #68 from 50thomatoes50/fix_unsigned_char_dr2locale
use unsigned char to support extended ascii
This commit is contained in:
commit
bb123fc440
@ -57,9 +57,9 @@ void DeinitStringMng()
|
||||
// [D] Driver 1 PC function
|
||||
int InitStringLanguage(char *filename, int mission)
|
||||
{
|
||||
char *buffer;
|
||||
char *cptr;
|
||||
char *ln;
|
||||
unsigned char *buffer;
|
||||
unsigned char *cptr;
|
||||
unsigned char *ln;
|
||||
int i;
|
||||
int size;
|
||||
|
||||
@ -74,14 +74,14 @@ int InitStringLanguage(char *filename, int mission)
|
||||
size = ftell(fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
|
||||
buffer = (char*)malloc(size);
|
||||
buffer = (unsigned char*)malloc(size);
|
||||
fread(buffer, 1, size, fp);
|
||||
fclose(fp);
|
||||
|
||||
if (mission)
|
||||
gMisssionLanguageBuffer = buffer;
|
||||
gMisssionLanguageBuffer = (char*)buffer;
|
||||
else
|
||||
gGameLanguageBuffer = buffer;
|
||||
gGameLanguageBuffer = (char*)buffer;
|
||||
|
||||
cptr = buffer;
|
||||
for (i = 0; i < MAX_LANGUAGE_TEXT; i++)
|
||||
@ -96,9 +96,9 @@ int InitStringLanguage(char *filename, int mission)
|
||||
else
|
||||
{
|
||||
if (mission)
|
||||
gMissionLangTable[i] = cptr;
|
||||
gMissionLangTable[i] = (char*)cptr;
|
||||
else
|
||||
gGameLangTable[i] = cptr;
|
||||
gGameLangTable[i] = (char*)cptr;
|
||||
|
||||
// go to next line
|
||||
ln = cptr;
|
||||
|
Loading…
Reference in New Issue
Block a user