Hashcode should use unsigned long.
This commit is contained in:
parent
6287e10746
commit
410400633b
|
@ -201,7 +201,7 @@ void loadMission(char *filename)
|
|||
|
||||
static char *getAutoBackground(char *filename)
|
||||
{
|
||||
int hash;
|
||||
unsigned long hash;
|
||||
|
||||
if (!game.currentMission->challengeData.isChallenge)
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ static char *getAutoBackground(char *filename)
|
|||
|
||||
static char *getAutoPlanet(char *filename)
|
||||
{
|
||||
int hash;
|
||||
unsigned long hash;
|
||||
|
||||
if (!game.currentMission->challengeData.isChallenge)
|
||||
{
|
||||
|
@ -233,7 +233,7 @@ static char *getAutoPlanet(char *filename)
|
|||
|
||||
static char *getAutoMusic(char *filename)
|
||||
{
|
||||
int hash;
|
||||
unsigned long hash;
|
||||
|
||||
if (!game.currentMission->challengeData.isChallenge)
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ static char *getAutoMusic(char *filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
hash = hashcode(filename);
|
||||
hash = hashcode(game.currentMission->description);
|
||||
}
|
||||
|
||||
return getMusicFilename(hash);
|
||||
|
|
|
@ -44,9 +44,9 @@ extern void initMissionInfo(void);
|
|||
extern char *getTranslatedString(char *string);
|
||||
extern void updateStarSystemMissions(void);
|
||||
extern void updateChallengeMissions(void);
|
||||
extern char *getBackgroundTextureName(int n);
|
||||
extern char *getPlanetTextureName(int n);
|
||||
extern char *getMusicFilename(int n);
|
||||
extern char *getBackgroundTextureName(unsigned long n);
|
||||
extern char *getPlanetTextureName(unsigned long n);
|
||||
extern char *getMusicFilename(unsigned long n);
|
||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
||||
extern void addAllToQuadtree(void);
|
||||
|
|
|
@ -81,17 +81,17 @@ void initResources(void)
|
|||
free(filenames);
|
||||
}
|
||||
|
||||
char *getBackgroundTextureName(int i)
|
||||
char *getBackgroundTextureName(unsigned long i)
|
||||
{
|
||||
return backgrounds[i % numBackgrounds];
|
||||
}
|
||||
|
||||
char *getPlanetTextureName(int i)
|
||||
char *getPlanetTextureName(unsigned long i)
|
||||
{
|
||||
return planets[i % numPlanets];
|
||||
}
|
||||
|
||||
char *getMusicFilename(int i)
|
||||
char *getMusicFilename(unsigned long i)
|
||||
{
|
||||
return musicFiles[i % numMusicFiles];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue