* Add PigModel and PigRenderer

This commit is contained in:
iProgramInCpp
2023-12-05 20:07:20 +02:00
parent 166bcf708e
commit ca295740dd
48 changed files with 156 additions and 15 deletions

View File

View File

View File

View File

View File

View File

View File

@@ -12,6 +12,7 @@ Model::Model(int width, int height)
{
field_4 = 0.0f;
field_8 = false;
m_bIsBaby = true; // @HUH: Why is this true?
m_textureWidth = width;
m_textureHeight = height;
}

View File

@@ -30,4 +30,5 @@ public:
int m_textureWidth;
int m_textureHeight;
std::vector<ModelPart*> m_parts;
bool m_bIsBaby;
};

View File

@@ -0,0 +1,20 @@
/********************************************************************
Minecraft: Pocket Edition - Decompilation Project
Copyright (C) 2023 iProgramInCpp
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
********************************************************************/
#include "PigModel.hpp"
PigModel::PigModel(float f) :
QuadrupedModel(6, f)
{
m_head.texOffs(16, 16);
m_head.addBox(-2, 0, -9, 4, 3, 1, f);
field_28C = 4.0f;
}
PigModel::~PigModel()
{
}

View File

@@ -0,0 +1,17 @@
/********************************************************************
Minecraft: Pocket Edition - Decompilation Project
Copyright (C) 2023 iProgramInCpp
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
********************************************************************/
#pragma once
#include "QuadrupedModel.hpp"
class PigModel : public QuadrupedModel
{
public:
PigModel(float);
~PigModel();
};

View File

@@ -10,7 +10,6 @@
QuadrupedModel::QuadrupedModel(int i, float f) :
Model(64, 32),
m_bIsBaby(true), // @HUH: Why is this true?
m_head(0, 0),
m_unknown(0, 0),
m_body(28, 8),

View File

@@ -5,7 +5,7 @@
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
********************************************************************/
#pragma off
#pragma once
#include "Model.hpp"
@@ -18,8 +18,8 @@ public:
void render(float, float, float, float, float, float) override;
void setupAnim(float, float, float, float, float, float) override;
private:
bool m_bIsBaby;
protected:
friend class PigModel;
ModelPart m_head;
ModelPart m_unknown;
ModelPart m_body;

View File

View File

View File

View File

View File

View File

View File

View File