Fixed many casting issues.
This commit is contained in:
@ -66,7 +66,6 @@ void queueDispose(queue_t *queue) {
|
||||
}
|
||||
|
||||
void queueRestack(queue_t *queue) {
|
||||
queueaction_t *action;
|
||||
uint8_t i;
|
||||
queueaction_t items[ANIMATION_QUEUE_ITEM_MAX];
|
||||
|
||||
|
@ -73,7 +73,7 @@ void fontTextInit(font_t *font, primitive_t *primitive, fonttextinfo_t *info) {
|
||||
void fontTextClamp(font_t *font, fonttextinfo_t *info, char *text,
|
||||
float maxWidth, float fontSize
|
||||
) {
|
||||
int32_t i, j, wordIndex;
|
||||
int32_t i, j;
|
||||
char c;
|
||||
float x, y, wordX, scale;
|
||||
stbtt_aligned_quad *quad;
|
||||
|
@ -25,7 +25,7 @@ void skywallInit(primitive_t *primitive) {
|
||||
if(SKYWALL_SLICE_COUNT == i) {
|
||||
r = 0;
|
||||
} else {
|
||||
r = p * (float)M_PI * 2;// Convert % to radians
|
||||
r = p * MATH_PI * 2.0f;// Convert % to radians
|
||||
}
|
||||
|
||||
// Determine the X/Z for the given radian
|
||||
|
@ -29,7 +29,7 @@ void renderFrameStart(render_t *render) {
|
||||
void renderDispose() {
|
||||
}
|
||||
|
||||
void renderSetResolution(render_t *render, int32_t width, int32_t height) {
|
||||
void renderSetResolution(render_t *render, float width, float height) {
|
||||
render->width = width;
|
||||
render->height = height;
|
||||
}
|
@ -31,4 +31,4 @@ void renderDispose();
|
||||
* @param width Width of the display (in pixels).
|
||||
* @param height Height of the display (in pixels).
|
||||
*/
|
||||
void renderSetResolution(render_t *render, int32_t width, int32_t height);
|
||||
void renderSetResolution(render_t *render, float width, float height);
|
@ -23,8 +23,12 @@ void tilesetInit(tileset_t *tileset,
|
||||
tileset->rows = rows;
|
||||
|
||||
// Calculate division sizes (pixels)
|
||||
tileset->divX = (width - (borderX * 2) - (gapX * (columns - 1))) / columns;
|
||||
tileset->divY = (height - (borderY * 2) - (gapY * (rows - 1))) / rows;
|
||||
tileset->divX = (
|
||||
(float)width - ((float)borderX * 2.0f) - ((float)gapX * ((float)columns-1))
|
||||
) / columns;
|
||||
tileset->divY = (
|
||||
(float)height - ((float)borderY * 2.0f) - ((float)gapY * ((float)rows - 1))
|
||||
) / rows;
|
||||
|
||||
// Calculate the division sizes (units)
|
||||
tdivX = tileset->divX / width;
|
||||
|
Reference in New Issue
Block a user