wip_feat(PS3): Implement SPU variants for a portion of TU19's blocks

crashes at a stack overflow, cant be assed to fix it atm
This commit is contained in:
2026-07-14 19:52:30 +03:00
parent 976f55c46d
commit 2dfad97503
41 changed files with 574 additions and 308 deletions
@@ -1,10 +1,10 @@
#pragma once
#include "Tile_SPU.h"
#include "RotatedPillarTile_SPU.h"
class Player;
class TreeTile_SPU : public Tile_SPU
class TreeTile_SPU : public RotatedPillarTile_SPU
{
public:
static const int DARK_TRUNK = 1;
@@ -19,29 +19,14 @@ public:
static const int TREE_NAMES_LENGTH = 4;
TreeTile_SPU(int id) : Tile_SPU(id) {}
int getRenderShape() { return Tile_SPU::SHAPE_TREE; }
TreeTile_SPU(int id) : RotatedPillarTile_SPU(id) {}
public:
Icon_SPU *getTexture(int face, int data)
{
int dir = data & MASK_FACING;
int type = data & MASK_TYPE;
if (dir == FACING_Y && (face == Facing::UP || face == Facing::DOWN))
{
return &ms_pTileData->treeTile_icons_top[type];
}
else if (dir == FACING_X && (face == Facing::EAST || face == Facing::WEST))
{
return &ms_pTileData->treeTile_icons_top[type];
}
else if (dir == FACING_Z && (face == Facing::NORTH || face == Facing::SOUTH))
{
return &ms_pTileData->treeTile_icons_top[type];
}
Icon_SPU *getTypeTexture(int type) {
return &ms_pTileData->treeTile_icons_side[type];
}
};
Icon_SPU *getTopTexture(int type) {
return &ms_pTileData->treeTile_icons_top[type];
};
};