Skip to content

Commit

Permalink
Merge pull request #83 from Wolf3s/remove-tif-config.h
Browse files Browse the repository at this point in the history
Remove tif-config.h and his helper function.
  • Loading branch information
fjtrujy authored Sep 3, 2024
2 parents bd3a1ed + a0e397c commit 9ef2892
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ find_library(LIBTIFF_LIBRARY NAMES tiff)
find_path(LIBTIFF_INCLUDE_DIR NAMES tiff.h)

if(LIBTIFF_LIBRARY)
list(APPEND GSKIT_EXTERNAL_LIBS ${LIBTIFF_LIBRARY})
list(APPEND GSKIT_EXTERNAL_LIBS lzma ${LIBTIFF_LIBRARY})
include_directories(${LIBTIFF_INCLUDE_DIR})
add_definitions(-DHAVE_LIBTIFF)
endif()
Expand Down
3 changes: 1 addition & 2 deletions ee/toolkit/src/gsToolkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#endif

#ifdef HAVE_LIBTIFF
#include <tif_config.h>
#include <tiffio.h>
#endif

Expand Down Expand Up @@ -762,7 +761,7 @@ int gsKit_texture_tiff(GSGLOBAL *gsGlobal, GSTEXTURE *Texture, char *Path)

Texture->Mem = memalign(128,TextureSize);

if (!TIFFReadPS2Image(tif, Texture->Width, Texture->Height, (u32 *)Texture->Mem, 0))
if (!TIFFReadRGBAImage(tif, Texture->Width, Texture->Height, (uint32_t *)Texture->Mem, 0))
{
printf("Error Reading TIFF Data\n");
TIFFClose(tif);
Expand Down
7 changes: 4 additions & 3 deletions examples/alpha/alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ int main(int argc, char *argv[])
gsKit_set_test(gsGlobal, GS_ATEST_OFF);
#ifdef HAVE_LIBTIFF
gsKit_TexManager_bind(gsGlobal, &Sprite);
gsKit_prim_sprite_texture(gsGlobal, &Sprite, 310.0f, // X1
50.0f, // Y2
gsKit_prim_sprite_texture(gsGlobal, &Sprite,
100.0f, // X1
+400.0f, // Y2
0.0f, // U1
0.0f, // V1
Sprite.Width + 310.0f, // X2
Sprite.Height + 50.0f, // Y2
Sprite.Height - 250.0f, // Y2
Sprite.Width, // U2
Sprite.Height, // V2
3,
Expand Down

0 comments on commit 9ef2892

Please sign in to comment.