diff --git a/src/samples/gu/beginobject/beginobject.c b/src/samples/gu/beginobject/beginobject.c index 27d4bc8b..a18e08bf 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 @@ -126,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 3731b66d..435b3b17 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 @@ -118,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/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..2f48cbf0 100644 --- a/src/samples/gu/envmap/envmap.c +++ b/src/samples/gu/envmap/envmap.c @@ -35,8 +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 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..071e9963 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; @@ -189,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 9bc4090f..7c4e226e 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) @@ -112,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 a8db0c33..d9ac0da4 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) @@ -89,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 ebe51c2b..fa3e125d 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[]) { @@ -118,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/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..94892088 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) @@ -223,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 570fa62c..ff600769 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) @@ -82,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 9cb85759..f3df4d1f 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; @@ -154,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 b29768a4..1e9dd397 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(); @@ -153,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/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..4fd7433c 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 @@ -142,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 f0128cda..a32d751d 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() { @@ -131,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 06082dd6..d19a1c8d 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() { @@ -129,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 db429236..89e8f585 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() { @@ -136,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 94b20b99..4a00f17f 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) @@ -56,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);