Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Update tga.c
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinAlavik authored Feb 24, 2024
1 parent 857543a commit 5a26d2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/corelib/tga.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <vga.h>
#include "tga.h"

unsigned int *tga_parse(unsigned char *ptr, int size) {
unsigned int *tga_parse(char *ptr, int size) {
unsigned int *data;
int i, j, k, x, y, w = (ptr[13] << 8) + ptr[12], h = (ptr[15] << 8) + ptr[14], o = (ptr[11] << 8) + ptr[10];
int m = ((ptr[1]? (ptr[7]>>3)*ptr[5] : 0) + 18);
Expand Down Expand Up @@ -105,7 +105,7 @@ void draw_targa_image(char *image, int size, int x, int y) {
unsigned char blue = pixel & 0xFF;
unsigned char alpha = (pixel >> 24) & 0xFF;

put_pixel_rgba(x + i, y + j, red, green, blue, alpha)(
put_pixel_rgba(x + i, y + j, red, green, blue, alpha);
}
}

Expand Down

0 comments on commit 5a26d2b

Please sign in to comment.