Skip to content

Commit

Permalink
deploy: 61d4789
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Dec 23, 2024
1 parent 895de76 commit 438b3a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/advanced/RSGL_rsoft.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void RSGL_renderBatch(RSGL_RENDER_INFO* info) {
cIndex += 8;
}
break;
case RSGL_TRIANGLE_FAN:
case RSGL_TRIANGLE_FAN: {
size_t start = vIndex + 3;
for (j = info->batches[i].start; j < info->batches[i].len; j += 3) {
// info->texCoords[tIndex], info->texCoords[tIndex + 1]
Expand All @@ -116,6 +116,7 @@ void RSGL_renderBatch(RSGL_RENDER_INFO* info) {
cIndex += 12;
}
break;
}
default: break;
}
}
Expand Down
6 changes: 3 additions & 3 deletions examples/advanced/RSoft.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ void RSoft_drawPolygonF(u8* buffer, RSoft_rectF r, size_t angles, u8 color[4]) {

RSoft_vector p1 = RSOFT_VECTOR2D(r.x - (RSoft_cos(delta) * r.w), r.y + (RSoft_sin(delta) * r.h));
RSoft_vector p2 = RSOFT_VECTOR2D(r.x - (RSoft_cos(delta2) * r.w), r.y + (RSoft_sin(delta2) * r.h));
RSoft_point texPoint = RSOFT_POINT(abs((p1.x - (r.x - rect.w))), abs((p2.y - (r.y - rect.h))));
RSoft_point texPoint = RSOFT_POINT(fabsf((p1.x - (r.x - rect.w))), fabsf((p2.y - (r.y - rect.h))));


u32 texColor = RSoft_textureGetColor(RSOFT_POINT(abs((p1.x - (r.x - (rect.w / 2)))),
abs((p1.y - (r.y - (rect.h / 4))))), color);
u32 texColor = RSoft_textureGetColor(RSOFT_POINT(fabs((p1.x - (r.x - (rect.w / 2)))),
fabs((p1.y - (r.y - (rect.h / 4))))), color);

//u32 texColor = RSoft_textureGetColor(texPoint, info.texRect, info.texture, info.textureArea, color);
RSoft_drawLineF(buffer, p1, p2, (u8*)&texColor);
Expand Down

0 comments on commit 438b3a4

Please sign in to comment.