use char[] type for string externs

This commit is contained in:
Alex Bates 2020-08-14 05:25:13 +01:00
parent d041f520ab
commit 9eb74da229
2 changed files with 6 additions and 6 deletions

View File

@ -15,8 +15,8 @@ extern s16* D_80151328;
extern s16 D_8010CD10;
extern s16 D_8010CD12;
extern s32 D_801595A0;
extern u8 gCloudyFlowerFieldsBg; // "fla_bg"
extern u8 gSunnyFlowerFieldsBg; // "flb_bg"
extern char gCloudyFlowerFieldsBg[]; // "fla_bg"
extern char gSunnyFlowerFieldsBg[]; // "flb_bg"
extern bg_header gBackgroundImage;
extern s8 D_8014F12F;

View File

@ -1,9 +1,9 @@
#include "common.h"
void load_map_bg(u8* optAssetName) {
void load_map_bg(char* optAssetName) {
UNK_PTR compressedData;
u32 assetSize;
u8* assetName;
char* assetName;
if (optAssetName == NULL) return;
assetName = optAssetName;
@ -12,8 +12,8 @@ void load_map_bg(u8* optAssetName) {
if (get_variable(0, 0xF5DE0180) >= 0x35) {
// Use sunny Flower Fields bg rather than cloudy
// TODO: these globals should be string literals
if (!strcmp(assetName, &gCloudyFlowerFieldsBg)) {
assetName = &gSunnyFlowerFieldsBg;
if (!strcmp(assetName, gCloudyFlowerFieldsBg)) {
assetName = gSunnyFlowerFieldsBg;
}
}