diff options
Diffstat (limited to 'backends/platform/ds/arm9/source')
24 files changed, 25 insertions, 84 deletions
diff --git a/backends/platform/ds/arm9/source/adpcm_arm.s b/backends/platform/ds/arm9/source/adpcm_arm.s index 56ffc360e8..4715346cb9 100644 --- a/backends/platform/ds/arm9/source/adpcm_arm.s +++ b/backends/platform/ds/arm9/source/adpcm_arm.s @@ -18,9 +18,6 @@  @ along with this program@ if not, write to the Free Software  @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  @ -@ $URL$ -@ $Id$ -@  @ @author Robin Watts (robin@wss.co.uk)  	.global	ARM_adpcm diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp index 5d29672ef6..0076b302fd 100644 --- a/backends/platform/ds/arm9/source/blitters.cpp +++ b/backends/platform/ds/arm9/source/blitters.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #include "blitters.h" diff --git a/backends/platform/ds/arm9/source/blitters.h b/backends/platform/ds/arm9/source/blitters.h index 88506a4405..7700b4d68d 100644 --- a/backends/platform/ds/arm9/source/blitters.h +++ b/backends/platform/ds/arm9/source/blitters.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */   #ifndef _BLITTERS_H_ diff --git a/backends/platform/ds/arm9/source/blitters_arm.s b/backends/platform/ds/arm9/source/blitters_arm.s index aac39cc329..a5e071f7dd 100644 --- a/backends/platform/ds/arm9/source/blitters_arm.s +++ b/backends/platform/ds/arm9/source/blitters_arm.s @@ -18,9 +18,6 @@  @ along with this program@ if not, write to the Free Software  @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  @ -@ $URL$ -@ $Id$ -@  @ @author Robin Watts (robin@wss.co.uk)  @	.global timerTickHandler diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp index a69aedc91d..6612e0f2da 100644 --- a/backends/platform/ds/arm9/source/cdaudio.cpp +++ b/backends/platform/ds/arm9/source/cdaudio.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  // Disable symbol overrides for FILE as that is used in FLAC headers diff --git a/backends/platform/ds/arm9/source/cdaudio.h b/backends/platform/ds/arm9/source/cdaudio.h index 7a85c97dbd..fc16f2f220 100644 --- a/backends/platform/ds/arm9/source/cdaudio.h +++ b/backends/platform/ds/arm9/source/cdaudio.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _CDAUDIO_H_ diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 303e504873..b3146cc16f 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */ @@ -71,8 +68,7 @@  // - Try discworld? -// Disable symbol overrides for FILE -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE +#define FORBIDDEN_SYMBOL_ALLOW_ALL diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h index bd627fa620..9c0d326292 100644 --- a/backends/platform/ds/arm9/source/dsmain.h +++ b/backends/platform/ds/arm9/source/dsmain.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _DSMAIN_H diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp index a693d2aee3..263ca58705 100644 --- a/backends/platform/ds/arm9/source/dsoptions.cpp +++ b/backends/platform/ds/arm9/source/dsoptions.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #include "dsoptions.h" diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h index 8ba8e6e4da..9148060f4b 100644 --- a/backends/platform/ds/arm9/source/dsoptions.h +++ b/backends/platform/ds/arm9/source/dsoptions.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _DSOPTIONS_H_ diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c index 7f0757ef53..76508a1664 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c @@ -18,6 +18,9 @@  //---------------------------------------------------------------  // Includes +// Allow use of stuff in <time.h> +#define FORBIDDEN_SYMBOL_EXCEPTION_time_h +  #include "gba_nds_fat.h"  #include "disc_io.h"  #include <string.h> @@ -1007,7 +1010,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)  	dir.name[0] = FILE_FREE; // default to no file found  	dir.attrib = 0x00; -	// Check if fat has been initialised +	// Check if fat has been initialized  	if (filesysBytePerSec == 0)  	{  		return (dir); diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index 462138d335..db9b1c2609 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  // Disable symbol overrides for FILE diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index caac0c0b28..492054dc52 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _GBAMPSAVE_H_ diff --git a/backends/platform/ds/arm9/source/keys.h b/backends/platform/ds/arm9/source/keys.h index 8d08014232..71c770dcd5 100644 --- a/backends/platform/ds/arm9/source/keys.h +++ b/backends/platform/ds/arm9/source/keys.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */ diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 3ad92b4355..462990cb32 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -20,6 +20,9 @@   */ +// Allow use of stuff in <time.h> +#define FORBIDDEN_SYMBOL_EXCEPTION_time_h +  #include "common/scummsys.h"  #include "common/system.h" @@ -243,7 +246,7 @@ void OSystem_DS::setCursorPalette(const byte *colors, uint start, uint num) {  }  bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) { -	surf->create(DS::getGameWidth(), DS::getGameHeight(), 1); +	surf->create(DS::getGameWidth(), DS::getGameHeight(), Graphics::PixelFormat::createFormatCLUT8());  	// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing @@ -259,13 +262,13 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) {  	return true;  } -void OSystem_DS::grabPalette(unsigned char *colours, uint start, uint num) { +void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {  //	consolePrintf("Grabpalette");  	for (unsigned int r = start; r < start + num; r++) { -		*colours++ = (BG_PALETTE[r] & 0x001F) << 3; -		*colours++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3; -		*colours++ = (BG_PALETTE[r] & 0x7C00) >> 10 << 3; +		*colors++ = (BG_PALETTE[r] & 0x001F) << 3; +		*colors++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3; +		*colors++ = (BG_PALETTE[r] & 0x7C00) >> 10 << 3;  	}  } @@ -756,7 +759,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() {  		_framebuffer.w = DS::getGameWidth();  		_framebuffer.h = DS::getGameHeight();  		_framebuffer.pitch = DS::getGameWidth(); -		_framebuffer.bytesPerPixel = 1; +		_framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();  	} else { @@ -781,7 +784,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() {  		_framebuffer.w = width;  		_framebuffer.h = height;  		_framebuffer.pitch = width; -		_framebuffer.bytesPerPixel = 1; +		_framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();  	} @@ -849,16 +852,16 @@ Common::WriteStream *OSystem_DS::createConfigWriteStream() {  	return file.createWriteStream();  } -u16 OSystem_DS::applyGamma(u16 colour) { +u16 OSystem_DS::applyGamma(u16 color) {  	// Attempt to do gamma correction (or something like it) to palette entries  	// to improve the contrast of the image on the original DS screen. -	// Split the colour into it's component channels -	int r = colour & 0x001F; -	int g = (colour & 0x03E0) >> 5; -	int b = (colour & 0x7C00) >> 10; +	// Split the color into it's component channels +	int r = color & 0x001F; +	int g = (color & 0x03E0) >> 5; +	int b = (color & 0x7C00) >> 10; -	// Caluclate the scaling factor for this colour based on it's brightness +	// Caluclate the scaling factor for this color based on it's brightness  	int scale = ((23 - ((r + g + b) >> 2)) * _gammaValue) >> 3;  	// Scale the three components by the scaling factor, with clamping @@ -871,7 +874,7 @@ u16 OSystem_DS::applyGamma(u16 colour) {  	b = b + ((b * scale) >> 4);  	if (b > 31) b = 31; -	// Stick them back together into a 555 colour value +	// Stick them back together into a 555 color value  	return 0x8000 | r | (g << 5) | (b << 10);  } diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 7feed7541f..4ab2e36322 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */ @@ -36,6 +33,7 @@  #include "audio/mixer_intern.h"  #include "graphics/surface.h"  #include "graphics/colormasks.h" +#include "graphics/palette.h"  class OSystem_DS : public BaseBackend, public PaletteManager {  protected: @@ -183,7 +181,7 @@ public:  	Common::WriteStream *createConfigWriteStream();  	Common::SeekableReadStream *createConfigReadStream(); -	u16 applyGamma(u16 colour); +	u16 applyGamma(u16 color);  	void setGammaValue(int gamma) { _gammaValue = gamma; }  	void engineDone(); diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index ad36503e83..580eb680eb 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _PORTDEFS_H_ diff --git a/backends/platform/ds/arm9/source/scummhelp.cpp b/backends/platform/ds/arm9/source/scummhelp.cpp index f1e8ba4fb2..670b46a3b9 100644 --- a/backends/platform/ds/arm9/source/scummhelp.cpp +++ b/backends/platform/ds/arm9/source/scummhelp.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #include "scummhelp.h" diff --git a/backends/platform/ds/arm9/source/scummhelp.h b/backends/platform/ds/arm9/source/scummhelp.h index 4be28dca6a..79103b35ed 100644 --- a/backends/platform/ds/arm9/source/scummhelp.h +++ b/backends/platform/ds/arm9/source/scummhelp.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _SCUMMHELP_H_ diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h index 7644e48bff..ae056e84da 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.h +++ b/backends/platform/ds/arm9/source/touchkeyboard.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _TOUCHKEYBOARD_H_ diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index a4fc2aed77..5f3b80c474 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #include "wordcompletion.h" diff --git a/backends/platform/ds/arm9/source/wordcompletion.h b/backends/platform/ds/arm9/source/wordcompletion.h index 55a0bc8b5a..3d352f657a 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.h +++ b/backends/platform/ds/arm9/source/wordcompletion.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  namespace DS { diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp index d4f055ee82..49552a86b2 100644 --- a/backends/platform/ds/arm9/source/zipreader.cpp +++ b/backends/platform/ds/arm9/source/zipreader.cpp @@ -18,11 +18,9 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL  #include "common/scummsys.h"  #include "zipreader.h" diff --git a/backends/platform/ds/arm9/source/zipreader.h b/backends/platform/ds/arm9/source/zipreader.h index 5429954088..70f000eb4b 100644 --- a/backends/platform/ds/arm9/source/zipreader.h +++ b/backends/platform/ds/arm9/source/zipreader.h @@ -18,9 +18,6 @@   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   * - * $URL$ - * $Id$ - *   */  #ifndef _ZIPREADER_H_  | 
