From 3c93bc03dc5e4a2bb59290f1d8ea874ccce11008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Blondon?= Date: Sun, 4 May 2025 13:29:59 +0200 Subject: [PATCH 1/2] clean: remove unused macros --- src/samples/gu/beginobject/beginobject.c | 1 - src/samples/gu/celshading/celshading.c | 1 - src/samples/gu/clut/clut.c | 1 - src/samples/gu/envmap/envmap.c | 1 - src/samples/gu/integerdrawing/integerdrawing.c | 1 - src/samples/gu/morph/morph.c | 1 - src/samples/gu/morphskin/morphskin.c | 1 - src/samples/gu/reflection/reflection.c | 1 - src/samples/gu/rendertarget/rendertarget.c | 1 - src/samples/gu/shadowprojection/shadowprojection.c | 1 - src/samples/gu/signals/signals.c | 1 - src/samples/gu/skinning/skinning.c | 1 - src/samples/gu/spharm/cube.c | 1 - src/samples/gu/text/main.c | 1 - src/samples/gu/timing/timing.c | 1 - src/samples/savedata/utility/main.c | 1 - src/samples/utility/gamesharing/main.c | 1 - src/samples/utility/msgdialog/main.c | 1 - src/samples/utility/netdialog/main.c | 1 - src/samples/utility/osk/main.c | 1 - 20 files changed, 20 deletions(-) diff --git a/src/samples/gu/beginobject/beginobject.c b/src/samples/gu/beginobject/beginobject.c index 27d4bc8b..922aa15e 100644 --- a/src/samples/gu/beginobject/beginobject.c +++ b/src/samples/gu/beginobject/beginobject.c @@ -37,7 +37,6 @@ typedef struct VERT { #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define TORUS_SLICES 24 // numc #define TORUS_ROWS 24 // numt diff --git a/src/samples/gu/celshading/celshading.c b/src/samples/gu/celshading/celshading.c index 3731b66d..2ccd157e 100644 --- a/src/samples/gu/celshading/celshading.c +++ b/src/samples/gu/celshading/celshading.c @@ -45,7 +45,6 @@ typedef struct Vx_v32f { #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define TORUS_SLICES 48 // numc #define TORUS_ROWS 48 // numt diff --git a/src/samples/gu/clut/clut.c b/src/samples/gu/clut/clut.c index bacaf0a6..daaeb5f1 100644 --- a/src/samples/gu/clut/clut.c +++ b/src/samples/gu/clut/clut.c @@ -36,7 +36,6 @@ int SetupCallbacks(); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ unsigned int colors[8] = { diff --git a/src/samples/gu/envmap/envmap.c b/src/samples/gu/envmap/envmap.c index 2caf7e47..a1d1058d 100644 --- a/src/samples/gu/envmap/envmap.c +++ b/src/samples/gu/envmap/envmap.c @@ -36,7 +36,6 @@ extern unsigned char env0_start[]; #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define TORUS_SLICES 48 // numc #define TORUS_ROWS 48 // numt diff --git a/src/samples/gu/integerdrawing/integerdrawing.c b/src/samples/gu/integerdrawing/integerdrawing.c index 373c72f4..cc78b0fc 100644 --- a/src/samples/gu/integerdrawing/integerdrawing.c +++ b/src/samples/gu/integerdrawing/integerdrawing.c @@ -96,7 +96,6 @@ static const unsigned int __attribute__((aligned(16))) texture[256] = { #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ typedef struct { float s, t; diff --git a/src/samples/gu/morph/morph.c b/src/samples/gu/morph/morph.c index 9bc4090f..2dc2b22f 100644 --- a/src/samples/gu/morph/morph.c +++ b/src/samples/gu/morph/morph.c @@ -48,7 +48,6 @@ int SetupCallbacks(); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define ROWS (64) #define COLS (64) diff --git a/src/samples/gu/morphskin/morphskin.c b/src/samples/gu/morphskin/morphskin.c index a8db0c33..7a55acaf 100644 --- a/src/samples/gu/morphskin/morphskin.c +++ b/src/samples/gu/morphskin/morphskin.c @@ -67,7 +67,6 @@ void genSkinnedMonsterCylinder( unsigned slices, unsigned rows, float length, fl #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define HIERARCHY_SIZE (WEIGHTS_PER_VERTEX) diff --git a/src/samples/gu/reflection/reflection.c b/src/samples/gu/reflection/reflection.c index ebe51c2b..7c8e2042 100644 --- a/src/samples/gu/reflection/reflection.c +++ b/src/samples/gu/reflection/reflection.c @@ -106,7 +106,6 @@ int SetupCallbacks(); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ int main(int argc, char* argv[]) { diff --git a/src/samples/gu/rendertarget/rendertarget.c b/src/samples/gu/rendertarget/rendertarget.c index 7cb019aa..60e866e9 100644 --- a/src/samples/gu/rendertarget/rendertarget.c +++ b/src/samples/gu/rendertarget/rendertarget.c @@ -126,7 +126,6 @@ void genTorus( unsigned slices, unsigned rows, float radius, float thickness, #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ void drawCube( Texture* texture, int val ) { diff --git a/src/samples/gu/shadowprojection/shadowprojection.c b/src/samples/gu/shadowprojection/shadowprojection.c index 5f0a6d6f..14cf8ab9 100644 --- a/src/samples/gu/shadowprojection/shadowprojection.c +++ b/src/samples/gu/shadowprojection/shadowprojection.c @@ -78,7 +78,6 @@ void genTorus( unsigned slices, unsigned rows, float radius, float thickness, #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ typedef struct Geometry { diff --git a/src/samples/gu/signals/signals.c b/src/samples/gu/signals/signals.c index e53f4378..46bbdd24 100644 --- a/src/samples/gu/signals/signals.c +++ b/src/samples/gu/signals/signals.c @@ -123,7 +123,6 @@ void myFinishHandler(int id); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define NUM_SLICES (128) #define NUM_ROWS (128*4) diff --git a/src/samples/gu/skinning/skinning.c b/src/samples/gu/skinning/skinning.c index 570fa62c..fcb55f50 100644 --- a/src/samples/gu/skinning/skinning.c +++ b/src/samples/gu/skinning/skinning.c @@ -60,7 +60,6 @@ void genSkinnedCylinder( unsigned slices, unsigned rows, float length, float rad #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define HIERARCHY_SIZE (WEIGHTS_PER_VERTEX) diff --git a/src/samples/gu/spharm/cube.c b/src/samples/gu/spharm/cube.c index 9cb85759..3b7f8f08 100644 --- a/src/samples/gu/spharm/cube.c +++ b/src/samples/gu/spharm/cube.c @@ -120,7 +120,6 @@ extern unsigned char logo_start[]; #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ unsigned char *logo_temp2; diff --git a/src/samples/gu/text/main.c b/src/samples/gu/text/main.c index b29768a4..e90c1f38 100644 --- a/src/samples/gu/text/main.c +++ b/src/samples/gu/text/main.c @@ -72,7 +72,6 @@ static int fontwidthtab[128] = { #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) int exit_callback(int arg1, int arg2, void *common) { sceKernelExitGame(); diff --git a/src/samples/gu/timing/timing.c b/src/samples/gu/timing/timing.c index 8ab395bb..de60975d 100644 --- a/src/samples/gu/timing/timing.c +++ b/src/samples/gu/timing/timing.c @@ -55,7 +55,6 @@ int SetupCallbacks(); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ void buildIndexedTorus() { const float thickness = TORUS_ORADIUS - TORUS_IRADIUS; diff --git a/src/samples/savedata/utility/main.c b/src/samples/savedata/utility/main.c index 4765dfe7..9caf369e 100644 --- a/src/samples/savedata/utility/main.c +++ b/src/samples/savedata/utility/main.c @@ -37,7 +37,6 @@ PSP_HEAP_SIZE_KB(20480); #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ #define DATABUFFLEN 0x20 diff --git a/src/samples/utility/gamesharing/main.c b/src/samples/utility/gamesharing/main.c index f0128cda..2afbc7c8 100644 --- a/src/samples/utility/gamesharing/main.c +++ b/src/samples/utility/gamesharing/main.c @@ -123,7 +123,6 @@ struct Vertex __attribute__((aligned(16))) vertices[12*3] = #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) static void setupGu() { diff --git a/src/samples/utility/msgdialog/main.c b/src/samples/utility/msgdialog/main.c index 06082dd6..42c8bfae 100644 --- a/src/samples/utility/msgdialog/main.c +++ b/src/samples/utility/msgdialog/main.c @@ -121,7 +121,6 @@ struct Vertex __attribute__((aligned(16))) vertices[12*3] = #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) /* zbuffer seems to be 16-bit? */ static void SetupGu() { diff --git a/src/samples/utility/netdialog/main.c b/src/samples/utility/netdialog/main.c index db429236..004b5dd6 100644 --- a/src/samples/utility/netdialog/main.c +++ b/src/samples/utility/netdialog/main.c @@ -128,7 +128,6 @@ struct Vertex __attribute__((aligned(16))) vertices[12*3] = #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) static void setupGu() { diff --git a/src/samples/utility/osk/main.c b/src/samples/utility/osk/main.c index 94b20b99..030d24ad 100644 --- a/src/samples/utility/osk/main.c +++ b/src/samples/utility/osk/main.c @@ -44,7 +44,6 @@ static unsigned int __attribute__((aligned(16))) list[262144]; #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) #define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) -#define ZBUF_SIZE (BUF_WIDTH SCR_HEIGHT * 2) #define NUM_INPUT_FIELDS (3) #define TEXT_LENGTH (128) From 79ac3b7d71767dab9fe0d9281006bb8d0aa993dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Blondon?= Date: Sun, 4 May 2025 18:48:31 +0200 Subject: [PATCH 2/2] refacto: replace magical values Hexadecimal constants are replaced by the same value, defined by the FRAME_SIZE macro. These changes are based on the same replacement already done in clut.c. --- src/samples/gu/beginobject/beginobject.c | 4 ++-- src/samples/gu/celshading/celshading.c | 4 ++-- src/samples/gu/envmap/envmap.c | 1 - src/samples/gu/integerdrawing/integerdrawing.c | 4 ++-- src/samples/gu/morph/morph.c | 4 ++-- src/samples/gu/morphskin/morphskin.c | 4 ++-- src/samples/gu/reflection/reflection.c | 4 ++-- src/samples/gu/signals/signals.c | 4 ++-- src/samples/gu/skinning/skinning.c | 4 ++-- src/samples/gu/spharm/cube.c | 4 ++-- src/samples/gu/text/main.c | 4 ++-- src/samples/savedata/utility/main.c | 4 ++-- src/samples/utility/gamesharing/main.c | 4 ++-- src/samples/utility/msgdialog/main.c | 4 ++-- src/samples/utility/netdialog/main.c | 4 ++-- src/samples/utility/osk/main.c | 4 ++-- 16 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/samples/gu/beginobject/beginobject.c b/src/samples/gu/beginobject/beginobject.c index 922aa15e..a18e08bf 100644 --- a/src/samples/gu/beginobject/beginobject.c +++ b/src/samples/gu/beginobject/beginobject.c @@ -125,8 +125,8 @@ int main(int argc, char* argv[]) { sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/celshading/celshading.c b/src/samples/gu/celshading/celshading.c index 2ccd157e..435b3b17 100644 --- a/src/samples/gu/celshading/celshading.c +++ b/src/samples/gu/celshading/celshading.c @@ -117,8 +117,8 @@ int main(int argc, char* argv[]) { sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/envmap/envmap.c b/src/samples/gu/envmap/envmap.c index a1d1058d..2f48cbf0 100644 --- a/src/samples/gu/envmap/envmap.c +++ b/src/samples/gu/envmap/envmap.c @@ -35,7 +35,6 @@ extern unsigned char env0_start[]; #define SCR_WIDTH (480) #define SCR_HEIGHT (272) #define PIXEL_SIZE (4) /* change this if you change to another screenmode */ -#define FRAME_SIZE (BUF_WIDTH * SCR_HEIGHT * PIXEL_SIZE) #define TORUS_SLICES 48 // numc #define TORUS_ROWS 48 // numt diff --git a/src/samples/gu/integerdrawing/integerdrawing.c b/src/samples/gu/integerdrawing/integerdrawing.c index cc78b0fc..071e9963 100644 --- a/src/samples/gu/integerdrawing/integerdrawing.c +++ b/src/samples/gu/integerdrawing/integerdrawing.c @@ -188,8 +188,8 @@ int main(int argc, char* argv[]) { sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/morph/morph.c b/src/samples/gu/morph/morph.c index 2dc2b22f..7c4e226e 100644 --- a/src/samples/gu/morph/morph.c +++ b/src/samples/gu/morph/morph.c @@ -111,8 +111,8 @@ int main(int argc, char* argv[]) sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/morphskin/morphskin.c b/src/samples/gu/morphskin/morphskin.c index 7a55acaf..d9ac0da4 100644 --- a/src/samples/gu/morphskin/morphskin.c +++ b/src/samples/gu/morphskin/morphskin.c @@ -88,8 +88,8 @@ int main(int argc, char* argv[]) sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/reflection/reflection.c b/src/samples/gu/reflection/reflection.c index 7c8e2042..fa3e125d 100644 --- a/src/samples/gu/reflection/reflection.c +++ b/src/samples/gu/reflection/reflection.c @@ -117,8 +117,8 @@ int main(int argc, char* argv[]) sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/signals/signals.c b/src/samples/gu/signals/signals.c index 46bbdd24..94892088 100644 --- a/src/samples/gu/signals/signals.c +++ b/src/samples/gu/signals/signals.c @@ -222,8 +222,8 @@ int main(int argc, char* argv[]) // setup GU sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/skinning/skinning.c b/src/samples/gu/skinning/skinning.c index fcb55f50..ff600769 100644 --- a/src/samples/gu/skinning/skinning.c +++ b/src/samples/gu/skinning/skinning.c @@ -81,8 +81,8 @@ int main(int argc, char* argv[]) sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/gu/spharm/cube.c b/src/samples/gu/spharm/cube.c index 3b7f8f08..f3df4d1f 100644 --- a/src/samples/gu/spharm/cube.c +++ b/src/samples/gu/spharm/cube.c @@ -153,8 +153,8 @@ int main(int argc, char* argv[]) // setup sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710);//0xc350=50000 0x2710=10000 diff --git a/src/samples/gu/text/main.c b/src/samples/gu/text/main.c index e90c1f38..1e9dd397 100644 --- a/src/samples/gu/text/main.c +++ b/src/samples/gu/text/main.c @@ -152,8 +152,8 @@ int main(int argc, char** argv) { sceGuInit(); sceGuStart(GU_DIRECT, list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/savedata/utility/main.c b/src/samples/savedata/utility/main.c index 9caf369e..4fd7433c 100644 --- a/src/samples/savedata/utility/main.c +++ b/src/samples/savedata/utility/main.c @@ -141,8 +141,8 @@ static void SetupGu() sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/utility/gamesharing/main.c b/src/samples/utility/gamesharing/main.c index 2afbc7c8..a32d751d 100644 --- a/src/samples/utility/gamesharing/main.c +++ b/src/samples/utility/gamesharing/main.c @@ -130,8 +130,8 @@ static void setupGu() sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/utility/msgdialog/main.c b/src/samples/utility/msgdialog/main.c index 42c8bfae..d19a1c8d 100644 --- a/src/samples/utility/msgdialog/main.c +++ b/src/samples/utility/msgdialog/main.c @@ -128,8 +128,8 @@ static void SetupGu() sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/utility/netdialog/main.c b/src/samples/utility/netdialog/main.c index 004b5dd6..89e8f585 100644 --- a/src/samples/utility/netdialog/main.c +++ b/src/samples/utility/netdialog/main.c @@ -135,8 +135,8 @@ static void setupGu() sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710); diff --git a/src/samples/utility/osk/main.c b/src/samples/utility/osk/main.c index 030d24ad..4a00f17f 100644 --- a/src/samples/utility/osk/main.c +++ b/src/samples/utility/osk/main.c @@ -55,8 +55,8 @@ int main(int argc, char* argv[]) sceGuInit(); sceGuStart(GU_DIRECT,list); sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH); - sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)0x88000,BUF_WIDTH); - sceGuDepthBuffer((void*)0x110000,BUF_WIDTH); + sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH); + sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH); sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2)); sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT); sceGuDepthRange(0xc350,0x2710);