Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gbs.c to fix a building issue #50

Open
wants to merge 1 commit into
base: progress
Choose a base branch
from

Conversation

gas-was-taken
Copy link

Before making those 2 changes, the make modern command was outputting that error:

src/gbs.c:704:151: warning: comparison between pointer and integer
704 | if (patternID < ARRAY_COUNT(sWaveTrackPatterns) && soundInfo->cgbChans[CGBCHANNEL_WAVE].currentPointer != (u32)sWaveTrackPatterns[patternID])
| ^
src/gbs.c:708:65: error: assignment to 'u32 *' {aka 'long unsigned int *'} from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion]tools/gbagfx/gbagfx.exe graphics/battle_anims/backgrounds/drill.png graphics/battle_anims/backgrounds/drill.4bpp

708 | soundInfo->cgbChans[CGBCHANNEL_WAVE].currentPointer = (u32)sWaveTrackPatterns[patternID];

Before making those 2 changes, the make modern command was outputting that error:

src/gbs.c:704:151: warning: comparison between pointer and integer
  704 |         if (patternID < ARRAY_COUNT(sWaveTrackPatterns) && soundInfo->cgbChans[CGBCHANNEL_WAVE].currentPointer != (u32)sWaveTrackPatterns[patternID])
      |                                                                                                                                                       ^
src/gbs.c:708:65: error: assignment to 'u32 *' {aka 'long unsigned int *'} from 'long unsigned int' makes pointer from integer without a cast [-Wint-conversion]tools/gbagfx/gbagfx.exe graphics/battle_anims/backgrounds/drill.png graphics/battle_anims/backgrounds/drill.4bpp

  708 |             soundInfo->cgbChans[CGBCHANNEL_WAVE].currentPointer = (u32)sWaveTrackPatterns[patternID];
@MoriyaFaith
Copy link

Hey, just bumping this to say that this fix is needed to build the rom as of the current moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants