diff --git a/.github/workflows/build_ps3.yml b/.github/workflows/build_ps3.yml new file mode 100644 index 000000000..9cd280932 --- /dev/null +++ b/.github/workflows/build_ps3.yml @@ -0,0 +1,34 @@ +name: Build latest (PS3) +on: [push] + +concurrency: + group: ${{ github.ref }}-ps3 + cancel-in-progress: true + +jobs: + build-PS3: + if: github.ref_name == github.event.repository.default_branch + runs-on: ubuntu-latest + container: + image: akusiroyo/ps3sdk:latest + steps: + - uses: actions/checkout@v3 + - name: Compile PS3 build + id: compile + run: | + pacman -S make --noconfirm + export PSL1GHT=/usr/local/ps3dev + export PS3DEV=/usr/local/ps3dev + make ps3 + + - uses: ./.github/actions/notify_failure + if: ${{ always() && steps.compile.outcome == 'failure' }} + with: + NOTIFY_MESSAGE: 'Failed to compile PS3 build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' + + - uses: ./.github/actions/upload_build + if: ${{ always() && steps.compile.outcome == 'success' }} + with: + SOURCE_FILE: 'ClassiCube-ps3.self' + DEST_NAME: 'ClassiCube-ps3.self' \ No newline at end of file diff --git a/src/Graphics_PS3.c b/src/Graphics_PS3.c index cc74d0030..ca6cfd688 100644 --- a/src/Graphics_PS3.c +++ b/src/Graphics_PS3.c @@ -346,6 +346,7 @@ void Gfx_DepthOnlyRendering(cc_bool depthOnly) { *#########################################################################################################################*/ void Gfx_CalcOrthoMatrix(struct Matrix* matrix, float width, float height, float zNear, float zFar) { // Same as Direct3D9 + // TODO: should it be like OpenGL? ??? *matrix = Matrix_Identity; matrix->row1.X = 2.0f / width; @@ -363,6 +364,7 @@ void Gfx_CalcPerspectiveMatrix(struct Matrix* matrix, float fov, float aspect, f float c = (float)Cotangent(0.5f * fov); // Same as Direct3D9 + // TODO: should it be like OpenGL? ??? *matrix = Matrix_Identity; matrix->row1.X = c / aspect; @@ -401,10 +403,12 @@ static void ResetFrameState(void) { rsxSetBlendEquation(context, GCM_FUNC_ADD, GCM_FUNC_ADD); rsxSetColorMaskMrt(context, 0); - rsxSetDepthFunc(context, GCM_LEQUAL); - rsxSetClearColor(context, clearColor); + rsxSetClearColor(context, clearColor); rsxSetClearDepthStencil(context, 0xFFFFFFFF); - rsxSetFrontFace(context, GCM_FRONTFACE_CCW); + + rsxSetDepthFunc(context, GCM_LEQUAL); + rsxSetDepthWriteEnable(context, true); + rsxSetDepthTestEnable(context, true); rsxSetUserClipPlaneControl(context, GCM_USER_CLIP_PLANE_DISABLE, GCM_USER_CLIP_PLANE_DISABLE,