mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
Fix rotateZ (#1253)
This commit is contained in:
parent
21409df5a1
commit
34558a2906
@ -312,7 +312,7 @@ pub fn model(block: Block) ModelIndex {
|
||||
return .{.index = blocks.meshes.modelIndexStart(block).index + (block.data & 63)};
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
@setEvalBranchQuota(65_536);
|
||||
|
||||
comptime var rotationTable: [4][16]u8 = undefined;
|
||||
|
@ -28,7 +28,7 @@ const CarpetData = packed struct(u6) {
|
||||
posZ: bool,
|
||||
};
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
comptime var rotationTable: [4][64]u8 = undefined;
|
||||
comptime for(0..64) |i| {
|
||||
rotationTable[0][i] = @intCast(i);
|
||||
|
@ -34,7 +34,7 @@ pub fn reset() void {
|
||||
fenceModels.clearRetainingCapacity();
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
comptime var rotationTable: [4][16]u8 = undefined;
|
||||
comptime for(0..16) |i| {
|
||||
rotationTable[0][i] = @intCast(i);
|
||||
|
@ -47,7 +47,7 @@ pub fn model(block: Block) ModelIndex {
|
||||
return .{.index = blocks.meshes.modelIndexStart(block).index + @min(block.data, 5)};
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
comptime var rotationTable: [4][6]u8 = undefined;
|
||||
comptime for(0..6) |i| {
|
||||
rotationTable[0][i] = i;
|
||||
|
@ -45,7 +45,7 @@ pub fn model(block: Block) ModelIndex {
|
||||
return .{.index = blocks.meshes.modelIndexStart(block).index + @min(block.data, 3)};
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
comptime var rotationTable: [4][4]u8 = undefined;
|
||||
comptime for(0..4) |i| {
|
||||
rotationTable[0][i] = i;
|
||||
|
@ -25,7 +25,7 @@ fn hasSubBlock(stairData: u8, x: u1, y: u1, z: u1) bool {
|
||||
return stairData & subBlockMask(x, y, z) == 0;
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
@setEvalBranchQuota(65_536);
|
||||
|
||||
comptime var rotationTable: [4][256]u8 = undefined;
|
||||
|
@ -97,7 +97,7 @@ pub fn model(block: Block) ModelIndex {
|
||||
return .{.index = blocks.meshes.modelIndexStart(block).index + (@as(u5, @truncate(block.data)) -| 1)};
|
||||
}
|
||||
|
||||
fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
pub fn rotateZ(data: u16, angle: Degrees) u16 {
|
||||
comptime var rotationTable: [4][32]u8 = undefined;
|
||||
comptime for(0..32) |i| {
|
||||
rotationTable[0][i] = @intCast(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user