Skip to content

Commit

Permalink
#368 GBA remove mode5 support, fix 9bit sound output range
Browse files Browse the repository at this point in the history
  • Loading branch information
XProger committed Jul 30, 2021
1 parent 1b0fbc2 commit b5e52c8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 865 deletions.
1 change: 0 additions & 1 deletion src/platform/gba/OpenLara.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<ClInclude Include="object.h" />
<ClInclude Include="rasterizer_mode13.h" />
<ClInclude Include="rasterizer_mode4.h" />
<ClInclude Include="rasterizer_mode5.h" />
<ClInclude Include="room.h" />
<ClInclude Include="sound.h" />
</ItemGroup>
Expand Down
15 changes: 2 additions & 13 deletions src/platform/gba/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@

#if defined(_WIN32)
#define MODE4
//#define MODE5
//#define MODE13
#elif defined(__GBA__)
#define MODE4
//#define MODE5

//#define USE_9BIT_SOUND
#elif defined(__TNS__)
#define MODE13
Expand All @@ -27,10 +24,6 @@
#error unsupported platform
#endif

#if defined(MODE5)
//#define DEBUG_OVERDRAW
#endif

#define NO_STATIC_MESH_PLANTS

#if defined(_WIN32)
Expand Down Expand Up @@ -61,10 +54,6 @@
#define VRAM_WIDTH 120 // in shorts (240 bytes)
#define FRAME_WIDTH 240
#define FRAME_HEIGHT 160
#elif defined(MODE5)
#define VRAM_WIDTH 160
#define FRAME_WIDTH 120
#define FRAME_HEIGHT 80
#elif defined(MODE13)
#define MODE_PAL
#define VRAM_WIDTH 160 // in shorts (320 bytes)
Expand Down Expand Up @@ -281,8 +270,8 @@ extern int32 fps;
#define SND_DECODE(x) ((x) - 128)

#ifdef USE_9BIT_SOUND
#define SND_MIN -256
#define SND_MAX 255
#define SND_MIN -255
#define SND_MAX 254
#else
#define SND_MIN -128
#define SND_MAX 127
Expand Down
6 changes: 0 additions & 6 deletions src/platform/gba/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,9 @@ int main(void) {

uint16 mode = DCNT_BG2 | DCNT_PAGE;

#ifdef MODE4
mode |= DCNT_MODE4;
REG_BG2PA = (1 << 8);
REG_BG2PD = (1 << 8);
#else
mode |= DCNT_MODE5;
REG_BG2PA = (1 << 7);
REG_BG2PD = (1 << 7);
#endif

int32 lastFrameIndex = -1;

Expand Down
Loading

0 comments on commit b5e52c8

Please sign in to comment.