[Scummvm-cvs-logs] SF.net SVN: scummvm:[50688] scummvm/trunk/backends
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Jul 5 18:10:23 CEST 2010
Revision: 50688
http://scummvm.svn.sourceforge.net/scummvm/?rev=50688&view=rev
Author: fingolfin
Date: 2010-07-05 16:10:22 +0000 (Mon, 05 Jul 2010)
Log Message:
-----------
DS: Code formatting: "char* foo" -> "char *foo"
Modified Paths:
--------------
scummvm/trunk/backends/fs/ds/ds-fs.cpp
scummvm/trunk/backends/fs/ds/ds-fs.h
scummvm/trunk/backends/platform/ds/arm7/source/main.cpp
scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp
scummvm/trunk/backends/platform/ds/arm9/source/blitters.h
scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp
scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h
scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h
scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp
scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h
scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h
scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp
scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp
scummvm/trunk/backends/platform/ds/arm9/source/ramsave.h
scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp
scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.h
scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp
scummvm/trunk/backends/platform/ds/arm9/source/zipreader.cpp
scummvm/trunk/backends/platform/ds/arm9/source/zipreader.h
scummvm/trunk/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
Modified: scummvm/trunk/backends/fs/ds/ds-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/fs/ds/ds-fs.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -115,7 +115,7 @@
// consolePrintf("Found: %d, Dir: %d\n", _isValid, _isDirectory);
}
-DSFileSystemNode::DSFileSystemNode(const DSFileSystemNode* node) {
+DSFileSystemNode::DSFileSystemNode(const DSFileSystemNode *node) {
//TODO: not implemented?
}
@@ -144,7 +144,7 @@
_zipFile->changeToRoot();
/* // This is the root dir, so add the RAM folder
- DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/ram");
+ DSFileSystemNode *dsfsn = new DSFileSystemNode("ds:/ram");
dsfsn->_isDirectory = true;
dirList->push_back(wrap(dsfsn));
*/
@@ -162,7 +162,7 @@
if ( (_zipFile->isDirectory() && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)) )
|| (!_zipFile->isDirectory() && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll)) ) )
{
- DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
+ DSFileSystemNode *dsfsn = new DSFileSystemNode("ds:/" + Common::String(n), _zipFile->isDirectory());
dsfsn->_isDirectory = _zipFile->isDirectory();
dirList.push_back((dsfsn));
}
@@ -173,7 +173,7 @@
return true;
}
-AbstractFSNode* DSFileSystemNode::getParent() const {
+AbstractFSNode *DSFileSystemNode::getParent() const {
// consolePrintf("parent\n");
DSFileSystemNode *p;
@@ -276,7 +276,7 @@
}
-GBAMPFileSystemNode::GBAMPFileSystemNode(const GBAMPFileSystemNode* node) {
+GBAMPFileSystemNode::GBAMPFileSystemNode(const GBAMPFileSystemNode *node) {
//TODO: not implemented?
}
@@ -319,7 +319,7 @@
if ( ((entryType == TYPE_DIR) && ((mode == Common::FSNode::kListDirectoriesOnly) || (mode == Common::FSNode::kListAll)))
|| ((entryType == TYPE_FILE) && ((mode == Common::FSNode::kListFilesOnly) || (mode == Common::FSNode::kListAll))) ) {
- GBAMPFileSystemNode* dsfsn;
+ GBAMPFileSystemNode *dsfsn;
//consolePrintf("Fname: %s\n", fname);
@@ -348,7 +348,7 @@
return true;
}
-AbstractFSNode* GBAMPFileSystemNode::getParent() const {
+AbstractFSNode *GBAMPFileSystemNode::getParent() const {
// consolePrintf("parent\n");
GBAMPFileSystemNode *p;
@@ -489,7 +489,7 @@
static bool inited = false;
static DS::fileHandle s_handle[MAX_FILE_HANDLES];
-FILE* std_fopen(const char* name, const char* mode) {
+FILE *std_fopen(const char *name, const char *mode) {
if (!inited) {
for (int r = 0; r < MAX_FILE_HANDLES; r++) {
s_handle[r].used = false;
@@ -498,7 +498,7 @@
currentDir[0] = '\0';
}
- char* realName = (char *) name;
+ char *realName = (char *) name;
// Remove file system prefix
if ((name[0] == 'd') && (name[1] == 's') && (name[2] == ':') && (name[3] == '/')) {
@@ -516,13 +516,13 @@
FAT_chdir("/");
// Turn all back slashes into forward slashes for gba_nds_fat
- char* p = realName;
+ char *p = realName;
while (*p) {
if (*p == '\\') *p = '/';
p++;
}
- FAT_FILE* result = FAT_fopen(realName, mode);
+ FAT_FILE *result = FAT_fopen(realName, mode);
if (result == 0) {
// consolePrintf("Error code %d\n", result);
@@ -565,9 +565,9 @@
// consolePrintf("Not in SRAM!");
- char* data;
+ char *data;
- ZipFile* zip = DSFileSystemNode::getZip();
+ ZipFile *zip = DSFileSystemNode::getZip();
if (!zip) {
// consolePrintf("No zip yet!");
return NULL;
@@ -609,7 +609,7 @@
}
}
-void std_fclose(FILE* handle) {
+void std_fclose(FILE *handle) {
if (DS::isGBAMPAvailable()) {
FAT_fclose((FAT_FILE *) handle);
@@ -623,7 +623,7 @@
}
}
-size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
+size_t std_fread(const void *ptr, size_t size, size_t numItems, FILE *handle) {
// consolePrintf("fread %d,%d %d ", size, numItems, ptr);
if (DS::isGBAMPAvailable()) {
@@ -668,7 +668,7 @@
return numItems;
}
-size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle) {
+size_t std_fwrite(const void *ptr, size_t size, size_t numItems, FILE *handle) {
if ((handle == stdin)) return 0;
if ((handle == stderr) || (handle == stdout)) {
@@ -704,7 +704,7 @@
}
}
-bool std_feof(FILE* handle) {
+bool std_feof(FILE *handle) {
// consolePrintf("feof ");
if (DS::isGBAMPAvailable()) {
@@ -719,13 +719,13 @@
return handle->pos >= handle->size;
}
-int std_fflush(FILE* handle) {
+int std_fflush(FILE *handle) {
//FIXME: not implemented?
// consolePrintf("fflush ");
return 0;
}
-long int std_ftell(FILE* handle) {
+long int std_ftell(FILE *handle) {
if (DS::isGBAMPAvailable()) {
return FAT_ftell((FAT_FILE *) handle);
}
@@ -733,7 +733,7 @@
return handle->pos;
}
-int std_fseek(FILE* handle, long int offset, int whence) {
+int std_fseek(FILE *handle, long int offset, int whence) {
// consolePrintf("fseek %d %d ", offset, whence);
if (DS::isGBAMPAvailable()) {
@@ -758,14 +758,14 @@
return 0;
}
-int std_ferror(FILE* handle) {
+int std_ferror(FILE *handle) {
//FIXME: not implemented?
// consolePrintf("ferror ");
return readPastEndOfFile;
}
-void std_clearerr(FILE* handle) {
+void std_clearerr(FILE *handle) {
//FIXME: not implemented?
readPastEndOfFile = false;
// consolePrintf("clearerr ");
Modified: scummvm/trunk/backends/fs/ds/ds-fs.h
===================================================================
--- scummvm/trunk/backends/fs/ds/ds-fs.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/fs/ds/ds-fs.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -40,7 +40,7 @@
*/
class DSFileSystemNode : public AbstractFSNode {
protected:
- static ZipFile* _zipFile;
+ static ZipFile *_zipFile;
Common::String _displayName;
Common::String _path;
@@ -96,7 +96,7 @@
* Returns the zip file this node points to.
* TODO: check this documentation.
*/
- static ZipFile* getZip() { return _zipFile; }
+ static ZipFile *getZip() { return _zipFile; }
};
/**
@@ -161,10 +161,10 @@
struct fileHandle {
int pos;
bool used;
- char* data;
+ char *data;
int size;
- DSSaveFile* sramFile;
+ DSSaveFile *sramFile;
};
@@ -213,16 +213,16 @@
#define FILE DS::fileHandle
// Please do not remove any of these prototypes that appear not to be required.
-FILE* std_fopen(const char* name, const char* mode);
-void std_fclose(FILE* handle);
-size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle);
-size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle);
-bool std_feof(FILE* handle);
-long int std_ftell(FILE* handle);
-int std_fseek(FILE* handle, long int offset, int whence);
-void std_clearerr(FILE* handle);
-int std_fflush(FILE* handle);
-int std_ferror(FILE* handle);
+FILE* std_fopen(const char *name, const char *mode);
+void std_fclose(FILE *handle);
+size_t std_fread(const void *ptr, size_t size, size_t numItems, FILE *handle);
+size_t std_fwrite(const void *ptr, size_t size, size_t numItems, FILE *handle);
+bool std_feof(FILE *handle);
+long int std_ftell(FILE *handle);
+int std_fseek(FILE *handle, long int offset, int whence);
+void std_clearerr(FILE *handle);
+int std_fflush(FILE *handle);
+int std_ferror(FILE *handle);
} //namespace DS
Modified: scummvm/trunk/backends/platform/ds/arm7/source/main.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm7/source/main.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm7/source/main.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -58,10 +58,10 @@
s32 TOUCH_OFFSET_X = ( ((SCREEN_WIDTH -60) * TOUCH_CAL_X1) / TOUCH_WIDTH ) - 28;
s32 TOUCH_OFFSET_Y = ( ((SCREEN_HEIGHT-60) * TOUCH_CAL_Y1) / TOUCH_HEIGHT ) - 28;
-vu8* soundData;
+vu8 *soundData;
-vu8* soundBuffer;
-vu8* arm9Buffer;
+vu8 *soundBuffer;
+vu8 *arm9Buffer;
bool soundFilled[4];
int playingSection;
@@ -81,7 +81,7 @@
//////////////////////////////////////////////////////////////////////
/*
-void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8 vol=0x7F, u8 pan=63, u8 format=0) {
+void startSound(int sampleRate, const void *data, uint32 bytes, u8 channel=0, u8 vol=0x7F, u8 pan=63, u8 format=0) {
SCHANNEL_TIMER(channel) = SOUND_FREQ(sampleRate);
SCHANNEL_SOURCE(channel) = (uint32)data;
SCHANNEL_LENGTH(channel) = bytes;
@@ -106,7 +106,7 @@
return -1;
}
-void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8 vol=0x7F, u8 pan=63, u8 format=0) {
+void startSound(int sampleRate, const void *data, uint32 bytes, u8 channel=0, u8 vol=0x7F, u8 pan=63, u8 format=0) {
// REG_IME = IME_DISABLE;
channel = getFreeSoundChannel();
@@ -177,7 +177,7 @@
- soundData = (vu8* ) data;
+ soundData = (vu8 *) data;
SCHANNEL_CR(channel) = flags;
SCHANNEL_CR(channel + 2) = flags;
@@ -386,7 +386,7 @@
//if ((!soundFilled[r]) && (!IPC->fillNeeded[playingSection])) {
memcpy((void *) (soundBuffer + (r * 1024)), (void *) (arm9Buffer + (r * 1024)), 1024);
- vu16* p = (vu16 *) (soundBuffer);
+ vu16 *p = (vu16 *) (soundBuffer);
//for (int t = 0; t < 2048; t++) {
// *(p + t) = (t & 1)? 0xF000: 0x0000;
//}
Modified: scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/blitters.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -27,7 +27,7 @@
namespace DS {
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void asmDrawStripToScreen(int height, int width, byte const *text, byte const *src, byte *dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch) {
@@ -111,7 +111,7 @@
-void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height) {
+void asmCopy8Col(byte *dst, int dstPitch, const byte *src, int height) {
asm("ands r0, %3, #1\n"
"addne %3, %3, #1\n"
"bne roll2\n"
@@ -155,7 +155,7 @@
#ifdef PERFECT_5_TO_4_RESCALING
static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3, u16 s4,
- u16* dest)
+ u16 *dest)
{
u32 bs0 = s0 & 0x1F;
u32 bs1 = s1 & 0x1F;
@@ -230,7 +230,7 @@
}
#else
static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3, u16 s4,
- u16* dest)
+ u16 *dest)
{
static const u32 MASK = 0x03E07C1F;
@@ -279,7 +279,7 @@
#endif
static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3, u32 s4,
- u16* dest)
+ u16 *dest)
{
u32 d0 = 4*s0 + s1;
u32 d1 = 2*s1 + s1 + 2*s2;
@@ -317,7 +317,7 @@
// Can't work in place
#ifdef PERFECT_5_TO_4_RESCALING
-static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const u8* src, const u32* palette)
+static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16 *dest, const u8 *src, const u32 *palette)
{
ComputeDivBy5TableIFN();
@@ -333,7 +333,7 @@
}
}
#else
-static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const u8* src, const u16* palette)
+static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16 *dest, const u8 *src, const u16 *palette)
{
for (size_t i=0; i<64; ++i)
{
@@ -350,7 +350,7 @@
// Can work in place, because it's a contraction
-static inline void Rescale_320x1555Scanline_To_256x1555Scanline(u16* dest, const u16* src)
+static inline void Rescale_320x1555Scanline_To_256x1555Scanline(u16 *dest, const u16 *src)
{
ComputeDivBy5TableIFN();
@@ -367,7 +367,7 @@
}
#ifdef PERFECT_5_TO_4_RESCALING
-void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette)
+void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette)
{
u32 fastRam[768];
@@ -388,7 +388,7 @@
}
}
#else
-void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette)
+void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette)
{
u16 fastRam[256];
for (size_t i=0; i<128; ++i)
@@ -401,7 +401,7 @@
}
#endif
-void Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride)
+void Rescale_320x256x1555_To_256x256x1555(u16 *dest, const u16 *src, int destStride, int srcStride)
{
for (size_t i=0; i<200; ++i)
{
Modified: scummvm/trunk/backends/platform/ds/arm9/source/blitters.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/blitters.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/blitters.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -29,11 +29,11 @@
namespace DS {
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void asmDrawStripToScreen(int height, int width, byte const *text, byte const *src, byte *dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
-void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height);
-void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette);
-void Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride);
+void asmCopy8Col(byte *dst, int dstPitch, const byte *src, int height);
+void Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette);
+void Rescale_320x256x1555_To_256x256x1555(u16 *dest, const u16 *src, int destStride, int srcStride);
}
@@ -41,11 +41,11 @@
extern "C" {
-void ITCM_CODE asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void ITCM_CODE asmDrawStripToScreen(int height, int width, byte const *text, byte const *src, byte *dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
-void ITCM_CODE asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height);
-void ITCM_CODE Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette, u32 numLines);
-void ITCM_CODE Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride);
+void ITCM_CODE asmCopy8Col(byte *dst, int dstPitch, const byte *src, int height);
+void ITCM_CODE Rescale_320x256xPAL8_To_256x256x1555(u16 *dest, const u8 *src, int destStride, int srcStride, const u16 *palette, u32 numLines);
+void ITCM_CODE Rescale_320x256x1555_To_256x256x1555(u16 *dest, const u16 *src, int destStride, int srcStride);
}
Modified: scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/cdaudio.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -74,13 +74,13 @@
bool active = false;
WaveHeader waveHeader;
Header blockHeader;
-FILE* file;
+FILE *file;
int fillPos;
bool isPlayingFlag = false;
-s16* audioBuffer;
+s16 *audioBuffer;
u32 sampleNum;
-s16* decompressionBuffer;
+s16 *decompressionBuffer;
int numLoops;
int blockCount;
int dataChunkStart;
@@ -495,7 +495,7 @@
}
consolePrintf("Looking for %s...", path.c_str());
- FILE* file;
+ FILE *file;
if ((file = DS::std_fopen(path.c_str(), "r"))) {
consolePrintf("Success!\n");
setActive(true);
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -119,7 +119,7 @@
#ifdef WRAP_MALLOC
-extern "C" void* __real_malloc(size_t size);
+extern "C" void *__real_malloc(size_t size);
static int s_total_malloc = 0;
@@ -158,7 +158,7 @@
consolePrintf("0 size malloc (%d)", zeroSize++);
}
- void* res = __real_malloc(size);
+ void *res = __real_malloc(size);
if (res) {
if (size > 50 * 1024) {
consolePrintf("Allocated %d (%x)\n", size, poo);
@@ -219,7 +219,7 @@
// Sound
static int bufferSize;
-static s16* soundBuffer;
+static s16 *soundBuffer;
static int bufferFrame;
static int bufferRate;
static int bufferSamples;
@@ -431,7 +431,7 @@
//plays an 8 bit mono sample at 11025Hz
-void playSound(const void* data, u32 length, bool loop, bool adpcm, int rate) {
+void playSound(const void *data, u32 length, bool loop, bool adpcm, int rate) {
if (!IPC->soundData) {
soundControl.count = 0;
@@ -784,7 +784,7 @@
mouseCursorVisible = enable;
}
-void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY) {
+void setCursorIcon(const u8 *icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY) {
int off;
@@ -965,7 +965,7 @@
consolePrintf("Flip %s...", displayModeIs8Bit ? "8bpp" : "16bpp");
#endif
if (!displayModeIs8Bit) {
- u16* back = get16BitBackBuffer();
+ u16 *back = get16BitBackBuffer();
// highBuffer = !highBuffer;
// BG3_CR = BG_BMP16_512x256 | BG_BMP_RAM(highBuffer? 1: 0);
@@ -984,8 +984,8 @@
TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1024;
u16 t0 = TIMER1_DATA;
#endif
- const u8* back = (const u8*)get8BitBackBuffer();
- u16* base = BG_GFX + 0x10000;
+ const u8 *back = (const u8*)get8BitBackBuffer();
+ u16 *base = BG_GFX + 0x10000;
Rescale_320x256xPAL8_To_256x256x1555(
base,
back,
@@ -1033,11 +1033,11 @@
}
}
-u16* getScalerBuffer() {
+u16 *getScalerBuffer() {
return (u16 *) scalerBackBuffer;
}
-u16* get8BitBackBuffer() {
+u16 *get8BitBackBuffer() {
if (isCpuScalerEnabled())
return (u16 *) scalerBackBuffer;
else
@@ -1107,7 +1107,7 @@
void memoryReport() {
int r = 0;
- int* p;
+ int *p;
do {
p = (int *) malloc(r * 8192);
free(p);
@@ -1115,7 +1115,7 @@
} while ((p) && (r < 512));
int t = -1;
- void* block[1024];
+ void *block[1024];
do {
t++;
block[t] = (int *) malloc(4096);
@@ -1130,7 +1130,7 @@
void addIndyFightingKeys() {
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
Common::Event event;
event.type = Common::EVENT_KEYDOWN;
@@ -1230,7 +1230,7 @@
void setKeyboardEnable(bool en) {
if (en == keyboardEnable) return;
keyboardEnable = en;
- u16* backupBank = (u16 *) 0x6040000;
+ u16 *backupBank = (u16 *) 0x6040000;
if (keyboardEnable) {
@@ -1266,7 +1266,7 @@
if (displayModeIs8Bit) {
// Copy the sub screen VRAM from the top screen - they should always be
// the same.
- u16* buffer = get8BitBackBuffer();
+ u16 *buffer = get8BitBackBuffer();
s32 stride = get8BitBackBufferStride();
for (int y = 0; y < gameHeight; y++) {
@@ -1302,7 +1302,7 @@
return displayModeIs8Bit;
}
-void doScreenTapMode(OSystem_DS* system) {
+void doScreenTapMode(OSystem_DS *system) {
Common::Event event;
static bool left = false, right = false;
@@ -1368,7 +1368,7 @@
system->addEvent(event);
}
-void doButtonSelectMode(OSystem_DS* system)
+void doButtonSelectMode(OSystem_DS *system)
{
Common::Event event;
@@ -1492,7 +1492,7 @@
#ifdef HEAVY_LOGGING
consolePrintf("addEventsToQueue\n");
#endif
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
Common::Event event;
#ifdef USE_PROFILER
@@ -2358,7 +2358,7 @@
vramSetBankE(VRAM_E_MAIN_SPRITE);
// Convert texture from 24bit 888 to 16bit 1555, remembering to set top bit!
- const u8* srcTex = (const u8 *) ::icons_raw;
+ const u8 *srcTex = (const u8 *) ::icons_raw;
for (int r = 32 * 256 ; r >= 0; r--) {
SPRITE_GFX_SUB[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10);
SPRITE_GFX[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10);
@@ -2831,11 +2831,11 @@
///////////////////
#define FAST_RAM_SIZE (24000)
-u8* fastRamPointer;
+u8 *fastRamPointer;
u8 fastRamData[FAST_RAM_SIZE] ITCM_DATA;
-void* fastRamAlloc(int size) {
- void* result = (void *) fastRamPointer;
+void *fastRamAlloc(int size) {
+ void *result = (void *) fastRamPointer;
fastRamPointer += size;
if(fastRamPointer > fastRamData + FAST_RAM_SIZE) {
consolePrintf("FastRam (ITCM) allocation failed!\n");
@@ -2892,7 +2892,7 @@
// Ensure the function is processed with C linkage
-extern "C" void debug_print_stub(char* string);
+extern "C" void debug_print_stub(char *string);
void debug_print_stub(char *string) {
consolePrintf(string);
@@ -3252,7 +3252,7 @@
*/
// Create a file system node to force search for a zip file in GBA rom space
- DSFileSystemNode* node = new DSFileSystemNode();
+ DSFileSystemNode *node = new DSFileSystemNode();
if (!node->getZip() || (!node->getZip()->isReady())) {
// If not found, init CF/SD driver
initGBAMP(mode);
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -76,8 +76,8 @@
void displayMode16BitFlipBuffer();
// Get address of current back buffer
-u16* get16BitBackBuffer();
-u16* get8BitBackBuffer();
+u16 * get16BitBackBuffer();
+u16 * get8BitBackBuffer();
s32 get8BitBackBufferStride();
u16* getScalerBuffer();
@@ -96,7 +96,7 @@
void doSoundCallback();
void startSound(int freq, int buffer); // Start sound hardware
// Call function if sound buffers need more data
-void playSound(const void* data, u32 length, bool loop, bool adpcm = false, int rate = 22050); // Start a sound
+void playSound(const void *data, u32 length, bool loop, bool adpcm = false, int rate = 22050); // Start a sound
void stopSound(int channel);
int getSoundFrequency();
@@ -106,7 +106,7 @@
// Sam and Max Stuff
void setGameID(int id);
-void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY);
+void setCursorIcon(const u8 *icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY);
void setShowCursor(bool enable);
void setMouseCursorVisible(bool visible);
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -366,7 +366,7 @@
DS::displayMode16Bit();
- DSOptionsDialog* d = new DSOptionsDialog();
+ DSOptionsDialog *d = new DSOptionsDialog();
d->runModal();
delete d;
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -46,30 +46,30 @@
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
void updateConfigManager();
- GUI::TabWidget* _tab;
+ GUI::TabWidget *_tab;
- GUI::StaticTextWidget* _sensitivityLabel;
+ GUI::StaticTextWidget *_sensitivityLabel;
- GUI::SliderWidget* _touchX;
- GUI::SliderWidget* _touchY;
- GUI::SliderWidget* _sensitivity;
- GUI::SliderWidget* _gammaCorrection;
- GUI::CheckboxWidget* _leftHandedCheckbox;
- GUI::CheckboxWidget* _unscaledCheckbox;
- GUI::CheckboxWidget* _100PercentCheckbox;
- GUI::CheckboxWidget* _150PercentCheckbox;
- GUI::CheckboxWidget* _200PercentCheckbox;
- GUI::CheckboxWidget* _indyFightCheckbox;
- GUI::CheckboxWidget* _highQualityAudioCheckbox;
- GUI::CheckboxWidget* _disablePowerOff;
- GUI::CheckboxWidget* _showCursorCheckbox;
- GUI::CheckboxWidget* _snapToBorderCheckbox;
+ GUI::SliderWidget *_touchX;
+ GUI::SliderWidget *_touchY;
+ GUI::SliderWidget *_sensitivity;
+ GUI::SliderWidget *_gammaCorrection;
+ GUI::CheckboxWidget *_leftHandedCheckbox;
+ GUI::CheckboxWidget *_unscaledCheckbox;
+ GUI::CheckboxWidget *_100PercentCheckbox;
+ GUI::CheckboxWidget *_150PercentCheckbox;
+ GUI::CheckboxWidget *_200PercentCheckbox;
+ GUI::CheckboxWidget *_indyFightCheckbox;
+ GUI::CheckboxWidget *_highQualityAudioCheckbox;
+ GUI::CheckboxWidget *_disablePowerOff;
+ GUI::CheckboxWidget *_showCursorCheckbox;
+ GUI::CheckboxWidget *_snapToBorderCheckbox;
- GUI::CheckboxWidget* _hardScaler;
- GUI::CheckboxWidget* _cpuScaler;
+ GUI::CheckboxWidget *_hardScaler;
+ GUI::CheckboxWidget *_cpuScaler;
- GUI::CheckboxWidget* _touchPadStyle;
- GUI::CheckboxWidget* _screenTaps;
+ GUI::CheckboxWidget *_touchPadStyle;
+ GUI::CheckboxWidget *_screenTaps;
bool _radioButtonMode;
Modified: scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -29,7 +29,7 @@
// GBAMP Save File
/////////////////////////
-GBAMPSaveFile::GBAMPSaveFile(char* name, bool saveOrLoad) {
+GBAMPSaveFile::GBAMPSaveFile(char *name, bool saveOrLoad) {
handle = DS::std_fopen(name, saveOrLoad? "w": "r");
// consolePrintf("%s handle is %d\n", name, handle);
// consolePrintf("Created %s\n", name);
@@ -196,7 +196,7 @@
// consolePrintf("Real cwd:%d\n", realName);
- char* p = realName;
+ char *p = realName;
while (*p) {
if (*p == '\\') *p = '/';
p++;
Modified: scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/gbampsave.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -29,14 +29,14 @@
#define SAVE_BUFFER_SIZE 100000
class GBAMPSaveFile : public Common::InSaveFile, public Common::OutSaveFile {
- DS::fileHandle* handle;
+ DS::fileHandle *handle;
char buffer[SAVE_BUFFER_SIZE];
int bufferPos;
int saveSize;
int flushed;
public:
- GBAMPSaveFile(char* name, bool saveOrLoad);
+ GBAMPSaveFile(char *name, bool saveOrLoad);
virtual ~GBAMPSaveFile();
virtual uint32 read(void *buf, uint32 size);
@@ -62,12 +62,12 @@
GBAMPSaveFileManager();
~GBAMPSaveFileManager();
-// static GBAMPSaveFileManager* instance() { return instancePtr; }
+// static GBAMPSaveFileManager *instance() { return instancePtr; }
GBAMPSaveFile *openSavefile(const char *filename, bool saveOrLoad);
- virtual Common::OutSaveFile* openForSaving(const Common::String &filename) { return openSavefile(filename.c_str(), true); }
- virtual Common::InSaveFile* openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); }
+ virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { return openSavefile(filename.c_str(), true); }
+ virtual Common::InSaveFile *openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); }
virtual bool removeSavefile(const Common::String &filename) { return false; } // TODO: Implement this
virtual Common::StringArray listSavefiles(const Common::String &pattern);
Modified: scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -73,7 +73,7 @@
#define DEFAULT_CONFIG_FILE "scummvm.ini"
#endif
-OSystem_DS* OSystem_DS::_instance = NULL;
+OSystem_DS *OSystem_DS::_instance = NULL;
OSystem_DS::OSystem_DS()
: eventNum(0), lastPenFrame(0), queuePos(0), _mixer(NULL), _timer(NULL), _frameBufferExists(false),
@@ -133,7 +133,7 @@
return false;
}
-const OSystem::GraphicsMode* OSystem_DS::getSupportedGraphicsModes() const {
+const OSystem::GraphicsMode *OSystem_DS::getSupportedGraphicsModes() const {
return s_supportedGraphicsModes;
}
@@ -243,13 +243,13 @@
refreshCursor();
}
-bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) {
+bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) {
surf->create(DS::getGameWidth(), DS::getGameHeight(), 1);
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
- const u16* image = (const u16 *) DS::get8BitBackBuffer();
+ const u16 *image = (const u16 *) DS::get8BitBackBuffer();
for (int y = 0; y < DS::getGameHeight(); y++) {
DC_FlushRange(image + (y << 8), DS::getGameWidth());
for (int x = 0; x < DS::getGameWidth() >> 1; x++) {
@@ -282,9 +282,9 @@
// consolePrintf("CopyRectToScreen %d\n", w * h);
- u16* bg;
+ u16 *bg;
s32 stride;
- u16* bgSub = (u16 *)BG_GFX_SUB;
+ u16 *bgSub = (u16 *)BG_GFX_SUB;
// The DS video RAM doesn't support 8-bit writes because Nintendo wanted
// to save a few pennies/euro cents on the hardware.
@@ -309,8 +309,8 @@
// the keyboard image uses the same VRAM addresses.
for (int dy = y; dy < y + h; dy++) {
- u8* dest = ((u8 *) (bg)) + (dy * stride) + x;
- const u8* src = (const u8 *) buf + (pitch * by);
+ u8 *dest = ((u8 *) (bg)) + (dy * stride) + x;
+ const u8 *src = (const u8 *) buf + (pitch * by);
u32 dx;
@@ -331,7 +331,7 @@
}
// We can now assume dest is aligned
- u16* dest16 = (u16 *) dest;
+ u16 *dest16 = (u16 *) dest;
for (dx = 0; dx < pixelsLeft; dx+=2) {
u16 mix;
@@ -360,9 +360,9 @@
// When they keyboard is not on screen, update both vram copies
for (int dy = y; dy < y + h; dy++) {
- u8* dest = ((u8 *) (bg)) + (dy * stride) + x;
- u8* destSub = ((u8 *) (bgSub)) + (dy * 512) + x;
- const u8* src = (const u8 *) buf + (pitch * by);
+ u8 *dest = ((u8 *) (bg)) + (dy * stride) + x;
+ u8 *destSub = ((u8 *) (bgSub)) + (dy * 512) + x;
+ const u8 *src = (const u8 *) buf + (pitch * by);
u32 dx;
@@ -385,8 +385,8 @@
}
// We can now assume dest is aligned
- u16* dest16 = (u16 *) dest;
- u16* destSub16 = (u16 *) destSub;
+ u16 *dest16 = (u16 *) dest;
+ u16 *destSub16 = (u16 *) destSub;
for (dx = 0; dx < pixelsLeft; dx+=2) {
u16 mix;
@@ -422,12 +422,12 @@
// Stuff is aligned to 16-bit boundaries, so it's safe to do DMA.
- u16* src = (u16 *) buf;
+ u16 *src = (u16 *) buf;
if (DS::getKeyboardEnable()) {
for (int dy = y; dy < y + h; dy++) {
- u16* dest = bg + (dy * (stride >> 1)) + (x >> 1);
+ u16 *dest = bg + (dy * (stride >> 1)) + (x >> 1);
DC_FlushRange(src, w << 1);
DC_FlushRange(dest, w << 1);
@@ -440,8 +440,8 @@
} else {
for (int dy = y; dy < y + h; dy++) {
- u16* dest1 = bg + (dy * (stride >> 1)) + (x >> 1);
- u16* dest2 = bgSub + (dy << 8) + (x >> 1);
+ u16 *dest1 = bg + (dy * (stride >> 1)) + (x >> 1);
+ u16 *dest2 = bgSub + (dy << 8) + (x >> 1);
DC_FlushRange(src, w << 1);
DC_FlushRange(dest1, w << 1);
@@ -503,13 +503,13 @@
// consolePrintf("clearovl\n");
}
-void OSystem_DS::grabOverlay(OverlayColor* buf, int pitch) {
+void OSystem_DS::grabOverlay(OverlayColor *buf, int pitch) {
// consolePrintf("grabovl\n")
- u16* start = DS::get16BitBackBuffer();
+ u16 *start = DS::get16BitBackBuffer();
for (int y = 0; y < 200; y++) {
- u16* src = start + (y * 320);
- u16* dest = ((u16 *) (buf)) + (y * pitch);
+ u16 *src = start + (y * 320);
+ u16 *dest = ((u16 *) (buf)) + (y * pitch);
for (int x = 0; x < 320; x++) {
*dest++ = *src++;
@@ -519,8 +519,8 @@
}
void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
- u16* bg = (u16 *) DS::get16BitBackBuffer();
- const u16* src = (const u16 *) buf;
+ u16 *bg = (u16 *) DS::get16BitBackBuffer();
+ const u16 *src = (const u16 *) buf;
// if (x + w > 256) w = 256 - x;
//if (x + h > 256) h = 256 - y;
@@ -729,7 +729,7 @@
swiSoftReset();*/
}
-Common::SaveFileManager* OSystem_DS::getSavefileManager() {
+Common::SaveFileManager *OSystem_DS::getSavefileManager() {
bool forceSram;
if (ConfMan.hasKey("forcesramsave", "ds")) {
@@ -753,7 +753,7 @@
}
-Graphics::Surface* OSystem_DS::createTempFrameBuffer() {
+Graphics::Surface *OSystem_DS::createTempFrameBuffer() {
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
@@ -778,13 +778,13 @@
s32 width = DS::getGameWidth();
s32 stride = DS::get8BitBackBufferStride();
- u16* src = DS::get8BitBackBuffer();
- u16* dest = DS::getScalerBuffer();
+ u16 *src = DS::get8BitBackBuffer();
+ u16 *dest = DS::getScalerBuffer();
for (int y = 0; y < height; y++) {
- u16* destLine = dest + (y * (width / 2));
- u16* srcLine = src + (y * (stride / 2));
+ u16 *destLine = dest + (y * (width / 2));
+ u16 *srcLine = src + (y * (stride / 2));
DC_FlushRange(srcLine, width);
@@ -805,7 +805,7 @@
size_t imageStrideInBytes = DS::get8BitBackBufferStride();
size_t imageStrideInWords = imageStrideInBytes / 2;
- u16* image = (u16 *) DS::get8BitBackBuffer();
+ u16 *image = (u16 *) DS::get8BitBackBuffer();
for (int y = 0; y < DS::getGameHeight(); y++) {
DC_FlushRange(image + (y * imageStrideInWords), DS::getGameWidth());
for (int x = 0; x < DS::getGameWidth() >> 1; x++) {
@@ -851,13 +851,13 @@
DS::setCharactersEntered(count);
}
-Common::SeekableReadStream* OSystem_DS::createConfigReadStream() {
+Common::SeekableReadStream *OSystem_DS::createConfigReadStream() {
Common::FSNode file(DEFAULT_CONFIG_FILE);
// consolePrintf("R %s", DEFAULT_CONFIG_FILE);
return file.createReadStream();
}
-Common::WriteStream* OSystem_DS::createConfigWriteStream() {
+Common::WriteStream *OSystem_DS::createConfigWriteStream() {
Common::FSNode file(DEFAULT_CONFIG_FILE);
// consolePrintf("W %s", DEFAULT_CONFIG_FILE);
return file.createWriteStream();
Modified: scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/osystem_ds.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -48,13 +48,13 @@
DSSaveFileManager saveManager;
#endif
GBAMPSaveFileManager mpSaveManager;
- Audio::MixerImpl* _mixer;
- DefaultTimerManager* _timer;
+ Audio::MixerImpl *_mixer;
+ DefaultTimerManager *_timer;
Graphics::Surface _framebuffer;
bool _frameBufferExists;
bool _graphicsEnable;
- static OSystem_DS* _instance;
+ static OSystem_DS *_instance;
u16 _palette[256];
u16 _cursorPalette[256];
@@ -68,7 +68,7 @@
int _cursorScale;
- Graphics::Surface* createTempFrameBuffer();
+ Graphics::Surface *createTempFrameBuffer();
bool _disableCursorPalette;
int _gammaValue;
@@ -94,7 +94,7 @@
virtual int16 getHeight();
virtual int16 getWidth();
virtual void setPalette(const byte *colors, uint start, uint num);
- virtual void grabPalette(unsigned char* colors, uint start, uint num);
+ virtual void grabPalette(unsigned char *colors, uint start, uint num);
void restoreHardwarePalette();
virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
@@ -139,7 +139,7 @@
void addEvent(const Common::Event& e);
bool isEventQueueEmpty() const { return queuePos == 0; }
- virtual bool grabRawScreen(Graphics::Surface* surf);
+ virtual bool grabRawScreen(Graphics::Surface *surf);
virtual void setFocusRectangle(const Common::Rect& rect);
@@ -150,10 +150,10 @@
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
- virtual Audio::Mixer* getMixer() { return _mixer; }
- Audio::MixerImpl* getMixerImpl() { return _mixer; }
+ virtual Audio::Mixer *getMixer() { return _mixer; }
+ Audio::MixerImpl *getMixerImpl() { return _mixer; }
- virtual Common::TimerManager* getTimerManager() { return _timer; }
+ virtual Common::TimerManager *getTimerManager() { return _timer; }
static int timerHandler(int t);
@@ -172,8 +172,8 @@
void refreshCursor();
- Common::WriteStream* createConfigWriteStream();
- Common::SeekableReadStream* createConfigReadStream();
+ Common::WriteStream *createConfigWriteStream();
+ Common::SeekableReadStream *createConfigReadStream();
u16 applyGamma(u16 colour);
void setGammaValue(int gamma) { _gammaValue = gamma; }
Modified: scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/portdefs.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -25,7 +25,7 @@
#include "osystem_ds.h"
/*
-extern "C" time_t __wrap_time(time_t* t) {
+extern "C" time_t __wrap_time(time_t *t) {
if (t) {
*t = OSystem_DS::instance()->getMillis() / 1000;
}
Modified: scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -38,7 +38,7 @@
isTempFile = false;
}
-DSSaveFile::DSSaveFile(SCUMMSave* s, bool compressed, u8* data) {
+DSSaveFile::DSSaveFile(SCUMMSave *s, bool compressed, u8 *data) {
save = *s;
saveData = data;
ptr = 0;
@@ -46,7 +46,7 @@
isOpenFlag = true;
if (saveCompressed) {
- u8* uncompressed = new unsigned char[save.size];
+ u8 *uncompressed = new unsigned char[save.size];
if (!uncompressed) consolePrintf("Out of memory allocating %d!\n", save.size);
LZ_Uncompress(saveData, uncompressed, save.compressedSize);
saveData = uncompressed;
@@ -79,7 +79,7 @@
}
}
-bool DSSaveFile::loadFromSaveRAM(vu8* address) {
+bool DSSaveFile::loadFromSaveRAM(vu8 *address) {
SCUMMSave newSave;
@@ -113,7 +113,7 @@
void DSSaveFile::compress() {
if (!saveCompressed) {
- unsigned char* compBuffer = new unsigned char[(save.size * 110) / 100];
+ unsigned char *compBuffer = new unsigned char[(save.size * 110) / 100];
int compSize = LZ_Compress((u8 *) saveData, compBuffer, save.size);
save.compressedSize = compSize;
@@ -127,9 +127,9 @@
}
}
-int DSSaveFile::saveToSaveRAM(vu8* address) {
+int DSSaveFile::saveToSaveRAM(vu8 *address) {
- unsigned char* compBuffer;
+ unsigned char *compBuffer;
bool failed;
@@ -356,7 +356,7 @@
consolePrintf("SRAM free: %d bytes\n", getBytesFree());
}
-DSSaveFileManager* DSSaveFileManager::instancePtr = NULL;
+DSSaveFileManager *DSSaveFileManager::instancePtr = NULL;
DSSaveFile *DSSaveFileManager::openSavefile(const char *filename, bool saveOrLoad) {
for (int r = 0; r < 8; r++) {
@@ -379,12 +379,12 @@
-DSSaveFile* DSSaveFile::clone() {
+DSSaveFile *DSSaveFile::clone() {
// consolePrintf("Clone %s %d\n", save.name, save.size);
return new DSSaveFile(&save, saveCompressed, saveData);
}
-void DSSaveFileManager::deleteFile(const char* name) {
+void DSSaveFileManager::deleteFile(const char *name) {
// consolePrintf("Deleting %s", name);
for (int r = 0; r < 8; r++) {
if (gbaSave[r].isValid() && (gbaSave[r].matches(name))) {
@@ -506,7 +506,7 @@
// Offset of extra data is 31. This overlaps the padding and reserved bytes of the first save entry.
// which have not been used up until now. So it should be safe.
- vu8* sram = CART_RAM + 31;
+ vu8 *sram = CART_RAM + 31;
*(sram + 0) = 0xF0; // This is an identifier to check
*(sram + 1) = 0x0D; // that extra data is present.
@@ -518,14 +518,14 @@
}
bool DSSaveFileManager::isExtraDataPresent() {
- vu8* sram = CART_RAM + 31;
+ vu8 *sram = CART_RAM + 31;
// Check for the identifier
return ((*(sram + 0) == 0xF0) && (*(sram + 1) == 0x0D));
}
int DSSaveFileManager::getExtraData() {
- vu8* sram = CART_RAM + 31;
+ vu8 *sram = CART_RAM + 31;
if (isExtraDataPresent()) {
int value = (*(sram + 2) << 24) | (*(sram + 3) << 16) | (*(sram + 4) << 8) | (*(sram + 5));
Modified: scummvm/trunk/backends/platform/ds/arm9/source/ramsave.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/ramsave.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/ramsave.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -48,15 +48,15 @@
} __attribute__ ((packed));
SCUMMSave save;
- u8* saveData;
- SCUMMSave* origHeader;
+ u8 *saveData;
+ SCUMMSave *origHeader;
bool isOpenFlag;
bool isTempFile;
bool eosReached;
public:
DSSaveFile();
- DSSaveFile(SCUMMSave* s, bool saveCompressed, u8* data);
+ DSSaveFile(SCUMMSave *s, bool saveCompressed, u8 *data);
~DSSaveFile();
void reset();
@@ -74,7 +74,7 @@
uint32 write(const void *buf, uint32 size);
void setName(char *name);
- char* getName() { return save.name; }
+ char *getName() { return save.name; }
bool isValid() { return save.isValid; }
bool isTemp() { return isTempFile; }
@@ -85,14 +85,14 @@
void compress();
int getRamUsage() { return sizeof(save) + save.compressedSize; }
- char* getRamImage() { return (char *) &save; }
+ char *getRamImage() { return (char *) &save; }
int getSize() { return save.size; }
- DSSaveFile* clone();
+ DSSaveFile *clone();
- bool loadFromSaveRAM(vu8* address);
- int saveToSaveRAM(vu8* address);
+ bool loadFromSaveRAM(vu8 *address);
+ int saveToSaveRAM(vu8 *address);
@@ -111,19 +111,19 @@
class DSSaveFileManager : public Common::SaveFileManager {
DSSaveFile gbaSave[8];
- static DSSaveFileManager* instancePtr;
+ static DSSaveFileManager *instancePtr;
int sramBytesFree;
public:
DSSaveFileManager();
~DSSaveFileManager();
- static DSSaveFileManager* instance() { return instancePtr; }
+ static DSSaveFileManager *instance() { return instancePtr; }
DSSaveFile *openSavefile(const char *filename, bool saveOrLoad);
- virtual Common::OutSaveFile* openForSaving(const Common::String &filename) { return openSavefile(filename.c_str(), true); }
- virtual Common::InSaveFile* openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); }
+ virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { return openSavefile(filename.c_str(), true); }
+ virtual Common::InSaveFile *openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); }
virtual bool removeSavefile(const Common::String &filename);
virtual Common::StringArray listSavefiles(const Common::String &pattern);
@@ -133,7 +133,7 @@
void addBytesFree(int size) { sramBytesFree += size; }
int getBytesFree() { return sramBytesFree; }
- void deleteFile(char* name);
+ void deleteFile(char *name);
void listFiles();
void formatSram();
Modified: scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -142,7 +142,7 @@
static int s_mapBase;
static int s_tileBase;
-u16* baseAddress;
+u16 *baseAddress;
bool shiftState;
bool capsLockState;
@@ -181,7 +181,7 @@
-void restoreVRAM(int tileBase, int mapBase, u16* saveSpace) {
+void restoreVRAM(int tileBase, int mapBase, u16 *saveSpace) {
/* for (int r = 0; r < 32 * 32; r++) {
((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r] = *saveSpace++;
}
@@ -191,7 +191,7 @@
}*/
}
-void drawKeyboard(int tileBase, int mapBase, u16* saveSpace) {
+void drawKeyboard(int tileBase, int mapBase, u16 *saveSpace) {
/* int keyboardDataSize = 4736 * 2; */
for (int r = 0; r < 32 * 32; r++) {
@@ -211,8 +211,8 @@
// this is the font
for (int tile = 0; tile < 94; tile++) {
- u16* tileAddr = (u16 *) (CHAR_BASE_BLOCK_SUB(tileBase) + ((KEYBOARD_DATA_SIZE) + (tile * 32)));
- const u8* src = ((const u8 *) (::_8x8font_tga_raw)) + 18 + tile * 8;
+ u16 *tileAddr = (u16 *) (CHAR_BASE_BLOCK_SUB(tileBase) + ((KEYBOARD_DATA_SIZE) + (tile * 32)));
+ const u8 *src = ((const u8 *) (::_8x8font_tga_raw)) + 18 + tile * 8;
for (int y = 0 ; y < 8; y++) {
for (int x = 0; x < 2; x++) {
@@ -256,7 +256,7 @@
int x = keyboardX;
int y = keyboardY;
- u16* base = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase));
+ u16 *base = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase));
baseAddress = base;
for (int r = 0; r < DS_NUM_KEYS; r++) {
@@ -314,7 +314,7 @@
}
void setKeyHighlight(int key, bool highlight) {
- u16* base = ((u16 *) SCREEN_BASE_BLOCK_SUB(DS::s_mapBase));
+ u16 *base = ((u16 *) SCREEN_BASE_BLOCK_SUB(DS::s_mapBase));
if (highlight) {
base[(keyboardY + keys[key].y) * 32 + keyboardX + keys[key].x] |= 0x1000;
@@ -329,7 +329,7 @@
}
}
-void addAutoComplete(const char* word) {
+void addAutoComplete(const char *word) {
if (autoCompleteCount == NUM_WORDS) return;
strcpy(&autoCompleteWord[autoCompleteCount++][0], word);
drawAutoComplete();
@@ -353,7 +353,7 @@
void typeCompletion(int current) {
Common::Event event;
- /* OSystem_DS* system = OSystem_DS::instance(); */
+ /* OSystem_DS *system = OSystem_DS::instance(); */
strcat(autoCompleteBuffer, &autoCompleteWord[current][charactersEntered]);
strcat(autoCompleteBuffer, " ");
@@ -384,7 +384,7 @@
void updateTypeEvents() {
if (autoCompleteBuffer[0] != '\0') {
Common::Event event;
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
event.kbd.keycode = (Common::KeyCode) autoCompleteBuffer[0];
event.kbd.ascii = autoCompleteBuffer[0];
@@ -443,7 +443,7 @@
if (keys[r].pressed) {
DS::setKeyHighlight(r, false);
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
Common::Event event;
createKeyEvent(r, event);
@@ -502,7 +502,7 @@
for (int r = 0; r < DS_NUM_KEYS; r++) {
if (( (tx >= keys[r].x) && (tx <= keys[r].x + 1)) &&
(ty >= keys[r].y) && (ty <= keys[r].y + 1)) {
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
Common::Event event;
// consolePrintf("Key: %d\n", r);
@@ -551,7 +551,7 @@
if (keys[r].pressed) {
DS::setKeyHighlight(r, false);
- OSystem_DS* system = OSystem_DS::instance();
+ OSystem_DS *system = OSystem_DS::instance();
Common::Event event;
if ((keys[r].character == Common::KEYCODE_INVALID)) {
Modified: scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/touchkeyboard.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -35,13 +35,13 @@
void createKeyEvent(int keyNum, Common::Event& event);
-void drawKeyboard(int tileBase, int mapBase, u16* saveSpace);
-void restoreVRAM(int tileBase, int mapBase, u16* saveSpace);
+void drawKeyboard(int tileBase, int mapBase, u16 *saveSpace);
+void restoreVRAM(int tileBase, int mapBase, u16 *saveSpace);
void addKeyboardEvents();
bool getKeyboardClosed();
bool isInsideKeyboard(int x, int y);
-void addAutoComplete(const char* word);
+void addAutoComplete(const char *word);
void clearAutoComplete();
void setCharactersEntered(int count);
void releaseAllKeys();
Modified: scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/wordcompletion.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -14,7 +14,7 @@
char wordBuffer[WORD_BUFFER_SIZE];
int wordBufferPos = 0;
-char* wordBufferPtr[MAX_WORD_COUNT];
+char *wordBufferPtr[MAX_WORD_COUNT];
int wordBufferPtrPos = 0;
void addAutoCompleteLine(const char *line) {
@@ -53,7 +53,7 @@
}
}
-int stringCompare(const void* a, const void* b) {
+int stringCompare(const void *a, const void *b) {
const char** as = (const char **) a;
const char** bs = (const char **) b;
@@ -71,7 +71,7 @@
}
// Sends the current available words to the virtual keyboard code for display
-bool findWordCompletions(const char* input) {
+bool findWordCompletions(const char *input) {
int min = 0;
int max = wordBufferPtrPos - 1;
char *word;
@@ -82,7 +82,7 @@
if (wordBufferPtrPos == 0)
return false;
- OSystem_DS* system = (OSystem_DS *) g_system;
+ OSystem_DS *system = (OSystem_DS *) g_system;
system->clearAutoComplete();
int start = 0;
Modified: scummvm/trunk/backends/platform/ds/arm9/source/zipreader.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/zipreader.cpp 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/zipreader.cpp 2010-07-05 16:10:22 UTC (rev 50688)
@@ -28,7 +28,7 @@
// consolePrintf("ZIP file check...");
- char* p = (char *) ZF_SEARCH_START;
+ char *p = (char *) ZF_SEARCH_START;
bool found = false;
_zipFile = NULL;
@@ -112,7 +112,7 @@
return false;
}
-void ZipFile::getFileName(char* name) {
+void ZipFile::getFileName(char *name) {
strncpy(name, (char *) (_currentFile + 1), _currentFile->nameLength);
for (int r = 0; name[r] != 0; r++) {
@@ -207,7 +207,7 @@
_directory[0] = 0;
}
-void ZipFile::changeDirectory(const char* dir) {
+void ZipFile::changeDirectory(const char *dir) {
// consolePrintf("Current dir now '%s'\n", dir);
assert(dir && *dir);
Modified: scummvm/trunk/backends/platform/ds/arm9/source/zipreader.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/zipreader.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/arm9/source/zipreader.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -43,12 +43,12 @@
u16 extraLength; // Length of any extra data
} __attribute__ ((packed));
- char* _zipFile;
+ char *_zipFile;
char _directory[128];
bool _allFilesVisible;
- FileHeader* _currentFile;
+ FileHeader *_currentFile;
public:
ZipFile();
@@ -61,13 +61,13 @@
bool findFile(const char *search);
// These return the file's data and information
- char* getFile();
+ char *getFile();
int getFileSize();
- void getFileName(char* name);
+ void getFileName(char *name);
bool isDirectory();
// These set the current directory
- void changeDirectory(const char* name);
+ void changeDirectory(const char *name);
void changeToRoot();
void setAllFilesVisible(bool state) { _allFilesVisible = state; }
Modified: scummvm/trunk/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
===================================================================
--- scummvm/trunk/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h 2010-07-05 16:09:27 UTC (rev 50687)
+++ scummvm/trunk/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h 2010-07-05 16:10:22 UTC (rev 50688)
@@ -58,9 +58,9 @@
typedef struct _adpcmBuffer {
- u8* buffer[8];
+ u8 *buffer[8];
bool filled[8];
- u8* arm7Buffer[8];
+ u8 *arm7Buffer[8];
bool arm7Dirty[8];
bool semaphore;
} adpcmBuffer;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list