mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Wii U: Try to fix water renderering
This commit is contained in:
parent
a2c7ad85fb
commit
4f10d814c6
@ -1416,11 +1416,15 @@ void Audio_FreeChunks(struct AudioChunk* chunks, int numChunks) {
|
||||
*-------------------------------------------------------Wii U backend-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include <sndcore2/core.h>
|
||||
static cc_bool ax_inited;
|
||||
|
||||
struct AudioContext { int count; };
|
||||
#define AUDIO_COMMON_ALLOC
|
||||
|
||||
cc_bool AudioBackend_Init(void) {
|
||||
if (ax_inited) return true;
|
||||
ax_inited = true;
|
||||
|
||||
AXInit();
|
||||
return true;
|
||||
}
|
||||
|
@ -211,9 +211,20 @@ void Gfx_SetDepthWrite(cc_bool enabled) {
|
||||
}
|
||||
|
||||
static void SetColorWrite(cc_bool r, cc_bool g, cc_bool b, cc_bool a) {
|
||||
GX2ChannelMask mask = 0;
|
||||
if (r) mask |= GX2_CHANNEL_MASK_R;
|
||||
if (g) mask |= GX2_CHANNEL_MASK_G;
|
||||
if (b) mask |= GX2_CHANNEL_MASK_B;
|
||||
if (a) mask |= GX2_CHANNEL_MASK_A;
|
||||
|
||||
// TODO: use GX2SetColorControl to disable all writing ???
|
||||
GX2SetTargetChannelMasks(mask, 0,0,0, 0,0,0,0);
|
||||
}
|
||||
|
||||
void Gfx_DepthOnlyRendering(cc_bool depthOnly) {
|
||||
cc_bool enabled = !depthOnly;
|
||||
SetColorWrite(enabled & gfx_colorMask[0], enabled & gfx_colorMask[1],
|
||||
enabled & gfx_colorMask[2], enabled & gfx_colorMask[3]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "Utils.h"
|
||||
#include "Errors.h"
|
||||
#include "PackedCol.h"
|
||||
#include "Audio.h"
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
@ -454,6 +455,9 @@ cc_bool Platform_DescribeError(cc_result res, cc_string* dst) {
|
||||
|
||||
void Platform_Init(void) {
|
||||
WHBProcInit();
|
||||
// Otherwise loading sound gets stuck endlessly repeating
|
||||
AudioBackend_Init();
|
||||
|
||||
mkdir("ClassiCube", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user