diff options
author | Max Horn | 2009-03-19 09:51:40 +0000 |
---|---|---|
committer | Max Horn | 2009-03-19 09:51:40 +0000 |
commit | b5bcc1a23af73761f6ff40f79db0a5beb8ae82f1 (patch) | |
tree | 6ddd0d5b8e01a63fdcbc1b1c9d1a1a0739a1966d /backends/platform/ds/arm7 | |
parent | 8dc12da206cc850b3bd2bd456e4607ded695704d (diff) | |
download | scummvm-rg350-b5bcc1a23af73761f6ff40f79db0a5beb8ae82f1.tar.gz scummvm-rg350-b5bcc1a23af73761f6ff40f79db0a5beb8ae82f1.tar.bz2 scummvm-rg350-b5bcc1a23af73761f6ff40f79db0a5beb8ae82f1.zip |
Merged Neil's NDS changes into trunk
svn-id: r39526
Diffstat (limited to 'backends/platform/ds/arm7')
-rw-r--r-- | backends/platform/ds/arm7/source/main.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp index d252ed44de..7029d96405 100644 --- a/backends/platform/ds/arm7/source/main.cpp +++ b/backends/platform/ds/arm7/source/main.cpp @@ -34,6 +34,8 @@ #include <bios.h> #include <arm7/touch.h> #include <arm7/clock.h> +#include <arm7/audio.h> +#include <system.h> #include <stdlib.h> #include <string.h> //#include <registers_alt.h> // not needed in current libnds @@ -135,13 +137,13 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8 switch (format) { case 1: { - flags |= SOUND_8BIT; + flags |= SOUND_FORMAT_8BIT; flags |= SOUND_REPEAT;// | (1 << 15); break; } case 0: { - flags |= SOUND_16BIT; + flags |= SOUND_FORMAT_16BIT; flags |= SOUND_REPEAT;// | (1 << 15); break; } @@ -433,13 +435,14 @@ void InterruptTimer3() { but = REG_KEYXY; if (!(but & 0x40)) { // Read the touch screen - touchPosition p = touchReadXY(); + touchPosition p; + touchReadXY(&p); // x = touchRead(TSC_MEASURE_X); // y = touchRead(TSC_MEASURE_Y); - x = p.x; - y = p.y; + x = p.rawx; + y = p.rawy; xpx = p.px; ypx = p.py; @@ -581,13 +584,13 @@ int main(int argc, char ** argv) { rtcReset(); //enable sound - powerON(POWER_SOUND); +// powerOn(POWER_SOUND); SOUND_CR = SOUND_ENABLE | SOUND_VOL(0x7F); IPC->soundData = 0; IPC->reset = false; - + fifoInit(); for (int r = 0; r < 8; r++) { IPC->adpcm.arm7Buffer[r] = (u8 *) malloc(512); |