From: notaz <notasas@gmail.com>
Date: Mon, 31 Mar 2008 20:19:45 +0000 (+0000)
Subject: sprite limit
X-Git-Tag: v1.85~525
X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95dc5c5e5e053ae616754c1205e480822a730ed2;p=picodrive.git

sprite limit

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@406 be3aeb3a-fb24-0410-a615-afba39da0efa
---

diff --git a/Pico/Draw.c b/Pico/Draw.c
index 49019386..edb4a026 100644
--- a/Pico/Draw.c
+++ b/Pico/Draw.c
@@ -1110,7 +1110,7 @@ static void DrawAllSprites(int *hcache, int maxwidth, int prio, int sh)
 
     // sprite limit
     ntiles += pack>>28;
-    if(ntiles > 40) break;
+    if(!(PicoOpt&0x40000) && ntiles > 40) break;
 
     if(pack & 0x00800000) continue;
 
diff --git a/Pico/Pico.h b/Pico/Pico.h
index 946d98ef..71edbd80 100644
--- a/Pico/Pico.h
+++ b/Pico/Pico.h
@@ -34,7 +34,7 @@ void mp3_update(int *buffer, int length, int stereo);
 // 00 00x0 alt_renderer, 6button_gamepad, accurate_timing, accurate_sprites,
 // 00 0x00 draw_no_32col_border, external_ym2612, enable_cd_pcm, enable_cd_cdda
 // 00 x000 enable_cd_gfx, cd_perfect_sync, soft_32col_scaling, enable_cd_ramcart
-// 0x 0000 disable_vdp_fifo, no_svp_dynarec
+// 0x 0000 disable_vdp_fifo, no_svp_dynarec, no_sprite_limit
 extern int PicoOpt;
 extern int PicoVer;
 extern int PicoSkipFrame; // skip rendering frame, but still do sound (if enabled) and emulation stuff
diff --git a/platform/common/menu.h b/platform/common/menu.h
index 1a4ded2e..432a31e9 100644
--- a/platform/common/menu.h
+++ b/platform/common/menu.h
@@ -65,6 +65,7 @@ typedef enum
 	MA_OPT2_STATUS_LINE,	/* psp */
 	MA_OPT2_NO_FRAME_LIMIT,	/* psp */
 	MA_OPT2_SVP_DYNAREC,
+	MA_OPT2_NO_SPRITE_LIM,
 	MA_OPT2_DONE,
 	MA_OPT3_SCALE,		/* psp (all OPT3) */
 	MA_OPT3_HSCALE32,
diff --git a/platform/gp2x/menu.c b/platform/gp2x/menu.c
index 55995b9e..06c0afb9 100644
--- a/platform/gp2x/menu.c
+++ b/platform/gp2x/menu.c
@@ -1062,6 +1062,7 @@ menu_entry opt2_entries[] =
 	{ "Emulate Z80",               MB_ONOFF, MA_OPT2_ENABLE_Z80,    &PicoOpt, 0x00004, 0, 0, 1, 1 },
 	{ "Emulate YM2612 (FM)",       MB_ONOFF, MA_OPT2_ENABLE_YM2612, &PicoOpt, 0x00001, 0, 0, 1, 1 },
 	{ "Emulate SN76496 (PSG)",     MB_ONOFF, MA_OPT2_ENABLE_SN76496,&PicoOpt, 0x00002, 0, 0, 1, 1 },
+	{ "Disable sprite limit",      MB_ONOFF, MA_OPT2_NO_SPRITE_LIM, &PicoOpt, 0x40000, 0, 0, 1, 1 },
 	{ "gzip savestates",           MB_ONOFF, MA_OPT2_GZIP_STATES,   &currentConfig.EmuOpt, 0x0008, 0, 0, 1, 1 },
 	{ "Don't save last used ROM",  MB_ONOFF, MA_OPT2_NO_LAST_ROM,   &currentConfig.EmuOpt, 0x0020, 0, 0, 1, 1 },
 	{ "needs restart:",            MB_NONE,  MA_NONE,               NULL, 0, 0, 0, 1, 0 },
diff --git a/platform/gp2x/version.h b/platform/gp2x/version.h
index 405cb9c5..9b9d909d 100644
--- a/platform/gp2x/version.h
+++ b/platform/gp2x/version.h
@@ -1,2 +1,2 @@
-#define VERSION "1.40a"
+#define VERSION "1.40b"
 
diff --git a/platform/psp/version.h b/platform/psp/version.h
index 54692214..95717b1c 100644
--- a/platform/psp/version.h
+++ b/platform/psp/version.h
@@ -1,2 +1,2 @@
-#define VERSION "1.35b"
+#define VERSION "1.40"