remove some unused code

This commit is contained in:
UnknownShadow200 2020-04-30 17:59:09 +10:00
parent 6cf37ea07c
commit ce99219bd9
3 changed files with 3 additions and 15 deletions

View File

@ -562,11 +562,6 @@ static int MeasureBitmappedWidth(const struct DrawTextArgs* args) {
} }
void Drawer2D_DrawText(Bitmap* bmp, struct DrawTextArgs* args, int x, int y) { void Drawer2D_DrawText(Bitmap* bmp, struct DrawTextArgs* args, int x, int y) {
BitmapCol col, backCol;
String value = args->text;
char colCode, nextCol = 'f';
int i, partWidth;
if (Drawer2D_IsEmptyText(&args->text)) return; if (Drawer2D_IsEmptyText(&args->text)) return;
if (Drawer2D_BitmappedText) { DrawBitmappedText(bmp, args, x, y); return; } if (Drawer2D_BitmappedText) { DrawBitmappedText(bmp, args, x, y); return; }

View File

@ -1592,10 +1592,8 @@ static void BlockModel_DrawParts(void) {
Gfx_SetDynamicVbData(Models.Vb, Models.Vertices, bModel_index * 4); Gfx_SetDynamicVbData(Models.Vb, Models.Vertices, bModel_index * 4);
lastTexIndex = bModel_texIndices[0]; lastTexIndex = bModel_texIndices[0];
for (i = 0; i < bModel_index; i++) { for (i = 0; i < bModel_index; i++, count += 4) {
if (bModel_texIndices[i] == lastTexIndex) { if (bModel_texIndices[i] == lastTexIndex) continue;
count += 4; continue;
}
/* Different 1D flush texture, flush current vertices */ /* Different 1D flush texture, flush current vertices */
Gfx_BindTexture(Atlas1D.TexIds[lastTexIndex]); Gfx_BindTexture(Atlas1D.TexIds[lastTexIndex]);
@ -1603,7 +1601,7 @@ static void BlockModel_DrawParts(void) {
lastTexIndex = bModel_texIndices[i]; lastTexIndex = bModel_texIndices[i];
offset += count; offset += count;
count = 4; count = 0;
} }
/* Leftover vertices */ /* Leftover vertices */

View File

@ -40,11 +40,6 @@ void Particle_DoRender(const Vec2* size, const Vec3* pos, const TextureRec* rec,
v->X = centre.X + aX - bX; v->Y = centre.Y + aY - bY; v->Z = centre.Z + aZ - bZ; v->Col = col; v->U = rec->U2; v->V = rec->V2; v++; v->X = centre.X + aX - bX; v->Y = centre.Y + aY - bY; v->Z = centre.Z + aZ - bZ; v->Col = col; v->U = rec->U2; v->V = rec->V2; v++;
} }
static cc_bool Particle_CanPass(BlockID block, cc_bool throughLiquids) {
cc_uint8 draw = Blocks.Draw[block];
return draw == DRAW_GAS || draw == DRAW_SPRITE || (throughLiquids && Blocks.IsLiquid[block]);
}
static cc_bool Particle_CollideHor(Vec3* nextPos, BlockID block) { static cc_bool Particle_CollideHor(Vec3* nextPos, BlockID block) {
Vec3 horPos = Vec3_Create3((float)Math_Floor(nextPos->X), 0.0f, (float)Math_Floor(nextPos->Z)); Vec3 horPos = Vec3_Create3((float)Math_Floor(nextPos->X), 0.0f, (float)Math_Floor(nextPos->Z));
Vec3 min, max; Vec3 min, max;