diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-02-16 18:08:19 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-02-16 18:08:19 +0200 |
commit | e38467ef3affef25b83daf0c0c3b8a61f04e8a65 (patch) | |
tree | 3628aed1314f21147e7a46f3095fa341088d8044 /src/fakerw | |
parent | 78f4e8fdcab597e2fadfa605c351486663f96a14 (diff) | |
parent | b451be6c7f354c5faef204085402ee19a5dd4d44 (diff) |
Merge remote-tracking branch 'origin/miami' into lcs
# Conflicts:
# .github/workflows/reLCS_msvc_amd64.yml
# .github/workflows/reLCS_msvc_x86.yml
# README.md
# gamefiles/TEXT/american.gxt
# gamefiles/TEXT/french.gxt
# gamefiles/TEXT/german.gxt
# gamefiles/TEXT/italian.gxt
# gamefiles/TEXT/spanish.gxt
# premake5.lua
# src/animation/AnimManager.cpp
# src/animation/AnimationId.h
# src/audio/MusicManager.cpp
# src/audio/audio_enums.h
# src/control/Script7.cpp
# src/core/FileLoader.cpp
# src/core/re3.cpp
# src/extras/custompipes_d3d9.cpp
# src/extras/custompipes_gl.cpp
# src/extras/postfx.cpp
# src/extras/shaders/colourfilterVC.frag
# src/extras/shaders/colourfilterVC_PS.hlsl
# src/extras/shaders/make_hlsl.cmd
# src/extras/shaders/obj/colourfilterVC_PS.cso
# src/extras/shaders/obj/colourfilterVC_PS.inc
# src/extras/shaders/obj/colourfilterVC_frag.inc
# src/peds/PedFight.cpp
# src/render/Font.cpp
# src/render/Hud.cpp
# src/render/Particle.cpp
# src/render/WaterCannon.cpp
# src/skel/win/gtavc.ico
# src/vehicles/Automobile.cpp
# utils/gxt/american.txt
# utils/gxt/french.txt
# utils/gxt/german.txt
# utils/gxt/italian.txt
# utils/gxt/spanish.txt
Diffstat (limited to 'src/fakerw')
-rw-r--r-- | src/fakerw/fake.cpp | 37 | ||||
-rw-r--r-- | src/fakerw/rtpng.h | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 3d513bbd..dde7d03d 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -950,6 +950,43 @@ RtBMPImageRead(const RwChar *imageName) #endif } + +RwImage * +RtPNGImageWrite(RwImage *image, const RwChar *imageName) +{ +#ifndef _WIN32 + char *r = casepath(imageName); + if (r) { + rw::writePNG(image, r); + free(r); + } else { + rw::writePNG(image, imageName); + } + +#else + rw::writePNG(image, imageName); +#endif + return image; +} +RwImage * +RtPNGImageRead(const RwChar *imageName) +{ +#ifndef _WIN32 + RwImage *image; + char *r = casepath(imageName); + if (r) { + image = rw::readPNG(r); + free(r); + } else { + image = rw::readPNG(imageName); + } + return image; + +#else + return rw::readPNG(imageName); +#endif +} + #include "rtquat.h" RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return (RtQuat*)((rw::Quat*)quat)->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); } diff --git a/src/fakerw/rtpng.h b/src/fakerw/rtpng.h new file mode 100644 index 00000000..80f29020 --- /dev/null +++ b/src/fakerw/rtpng.h @@ -0,0 +1,4 @@ +#pragma once + +RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName); +RwImage *RtPNGImageRead(const RwChar * imageName); |