Rendering on Y-Axis crashes PSP #6

Open
opened 2025-06-05 10:15:48 +02:00 by Wiener234 · 0 comments
Owner

The actual rendering logic

for(int i = 0; i< renderableCount; i++){
    if (renderables[i].type == RENDERABLE_ENTITY){
        Entity* e = (Entity*)renderables[i].data;
        DrawTexturePro(sprite_sheet, e->frameRec, (Rectangle){e->position.x, e->position.y, e->size.x * scale, e->size.y * scale}, (Vector2){0,0}, 0, WHITE);
    } else if (renderables[i].type == RENDERABLE_SPRITE){
        Sprite* s = (Sprite*)renderables[i].data;
        DrawTexturePro(sprite_sheet, s->frameRec, s->dest, (Vector2){0,0}, 0, WHITE);
    }
}

crashes the game and shutsdown the psp sometimes.

The actual rendering logic ```c for(int i = 0; i< renderableCount; i++){ if (renderables[i].type == RENDERABLE_ENTITY){ Entity* e = (Entity*)renderables[i].data; DrawTexturePro(sprite_sheet, e->frameRec, (Rectangle){e->position.x, e->position.y, e->size.x * scale, e->size.y * scale}, (Vector2){0,0}, 0, WHITE); } else if (renderables[i].type == RENDERABLE_SPRITE){ Sprite* s = (Sprite*)renderables[i].data; DrawTexturePro(sprite_sheet, s->frameRec, s->dest, (Vector2){0,0}, 0, WHITE); } } ``` crashes the game and shutsdown the psp sometimes.
Wiener234 added this to the Renderer project 2025-06-05 10:15:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Wiener234/game#6
No description provided.