├── .gitattributes ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Math.cpp ├── Math.h ├── Osiris.sln ├── Osiris ├── CSGOUtils.h ├── Config.cpp ├── Config.h ├── ConfigStructs.h ├── EventListener.cpp ├── EventListener.h ├── GUI.cpp ├── GUI.h ├── GameData.cpp ├── GameData.h ├── Hacks │ ├── AimbotFunctions.cpp │ ├── AimbotFunctions.h │ ├── AnimationFix.cpp │ ├── Animations.cpp │ ├── Animations.h │ ├── AntiAim.cpp │ ├── AntiAim.h │ ├── Backtrack.cpp │ ├── Backtrack.h │ ├── Chams.cpp │ ├── Chams.h │ ├── EnginePrediction.cpp │ ├── EnginePrediction.h │ ├── Fakelag.cpp │ ├── Fakelag.h │ ├── Glow.cpp │ ├── Glow.h │ ├── GrenadePrediction.cpp │ ├── GrenadePrediction.h │ ├── Knifebot.cpp │ ├── Knifebot.h │ ├── Legitbot.cpp │ ├── Legitbot.h │ ├── LocalAnimationFix.cpp │ ├── Misc.cpp │ ├── Misc.h │ ├── Ragebot.cpp │ ├── Ragebot.h │ ├── Resolver.cpp │ ├── Resolver.h │ ├── SkinChanger.cpp │ ├── SkinChanger.h │ ├── Sound.cpp │ ├── Sound.h │ ├── StreamProofESP.cpp │ ├── StreamProofESP.h │ ├── Tickbase.cpp │ ├── Tickbase.h │ ├── Triggerbot.cpp │ ├── Triggerbot.h │ ├── Visuals.cpp │ ├── Visuals.h │ ├── hitscan.cpp │ └── hitscan.h ├── Helpers.cpp ├── Helpers.h ├── Hooks.cpp ├── Hooks.h ├── Hooks │ ├── MinHook.cpp │ ├── MinHook.h │ ├── VmtHook.cpp │ ├── VmtHook.h │ ├── VmtSwap.cpp │ └── VmtSwap.h ├── InputUtil.cpp ├── InputUtil.h ├── Interfaces.h ├── Localize.h ├── Logger.cpp ├── Logger.h ├── Math.cpp ├── Math.h ├── Memory.cpp ├── Memory.h ├── MinHook │ ├── MinHook.h │ ├── buffer.c │ ├── buffer.h │ ├── hde │ │ ├── hde32.c │ │ ├── hde32.h │ │ ├── hde64.c │ │ ├── hde64.h │ │ ├── pstdint.h │ │ ├── table32.h │ │ └── table64.h │ ├── hook.c │ ├── trampoline.c │ └── trampoline.h ├── Netvars.cpp ├── Netvars.h ├── Osiris.cpp ├── Osiris.vcxproj ├── Osiris.vcxproj.filters ├── Resources │ ├── Resource.h │ ├── avatar_ct.h │ ├── avatar_tt.h │ └── skillgroups.h ├── SDK │ ├── Angle.h │ ├── AnimState.cpp │ ├── AnimState.h │ ├── BitBuffer.cpp │ ├── BitBuffer.h │ ├── CStudioHdr.h │ ├── CUtlVector.hpp │ ├── ClassId.h │ ├── Client.h │ ├── ClientClass.h │ ├── ClientMode.h │ ├── ClientState.h │ ├── CommandContext.h │ ├── ConVar.h │ ├── Cvar.h │ ├── Datamap.h │ ├── DebugOverlay.h │ ├── Engine.h │ ├── EngineTrace.cpp │ ├── EngineTrace.h │ ├── Entity.cpp │ ├── Entity.h │ ├── EntityList.h │ ├── FileSystem.h │ ├── FrameStage.h │ ├── GameEvent.h │ ├── GameMovement.h │ ├── GameUI.h │ ├── GlobalVars.cpp │ ├── GlobalVars.h │ ├── GlowObjectManager.h │ ├── Input.h │ ├── InputSystem.h │ ├── ItemSchema.h │ ├── KeyValues.cpp │ ├── KeyValues.h │ ├── LocalPlayer.h │ ├── Localize.h │ ├── MDLCache.h │ ├── Material.h │ ├── MaterialSystem.h │ ├── MemAlloc.h │ ├── ModelInfo.h │ ├── ModelRender.h │ ├── MoveHelper.h │ ├── NetworkChannel.h │ ├── NetworkMessage.h │ ├── NetworkStringTable.h │ ├── Pad.h │ ├── Panel.h │ ├── Panorama.h │ ├── ParticleCollection.h │ ├── PhysicsSurfaceProps.h │ ├── Platform.h │ ├── PlayerResource.h │ ├── Prediction.h │ ├── PredictionCopy.cpp │ ├── PredictionCopy.h │ ├── Recv.h │ ├── RenderContext.h │ ├── RenderView.h │ ├── Server.h │ ├── Sound.h │ ├── SoundEmitter.h │ ├── SoundInfo.h │ ├── Steam.h │ ├── StudioRender.h │ ├── Surface.h │ ├── UserCmd.h │ ├── Utils.cpp │ ├── Utils.h │ ├── UtlVector.h │ ├── VarMapping.h │ ├── Vector.h │ ├── ViewRenderBeams.h │ ├── ViewSetup.h │ ├── VirtualMethod.h │ ├── WeaponData.h │ ├── WeaponId.h │ ├── WeaponSystem.h │ ├── checksum_crc.cpp │ ├── checksum_crc.h │ └── matrix3x4.h ├── Texture.cpp ├── Texture.h ├── Threading.h ├── Vector2D.cpp ├── Vector2D.hpp ├── Vertex.hpp ├── fnv.h ├── fontbyte.h ├── freetype │ ├── freetype │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ ├── ftstdlib.h │ │ │ ├── integer-types.h │ │ │ ├── mac-support.h │ │ │ └── public-macros.h │ │ ├── freetype.h │ │ ├── ftadvanc.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── ftcolor.h │ │ ├── ftdriver.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftfntfmt.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftparams.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── cffotypes.h │ │ │ ├── cfftypes.h │ │ │ ├── compiler-macros.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdrv.h │ │ │ ├── ftgloadr.h │ │ │ ├── fthash.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftpsprop.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── ftvalid.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── services │ │ │ │ ├── svbdf.h │ │ │ │ ├── svcfftl.h │ │ │ │ ├── svcid.h │ │ │ │ ├── svfntfmt.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svgxval.h │ │ │ │ ├── svkern.h │ │ │ │ ├── svmetric.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svotval.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svprop.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svtteng.h │ │ │ │ ├── svttglyf.h │ │ │ │ └── svwinfnt.h │ │ │ ├── sfnt.h │ │ │ ├── t1types.h │ │ │ ├── tttypes.h │ │ │ └── wofftypes.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ └── tttags.h │ ├── ft2build.h │ └── src │ │ ├── autofit │ │ ├── afangles.c │ │ ├── afangles.h │ │ ├── afblue.c │ │ ├── afblue.h │ │ ├── afcjk.c │ │ ├── afcjk.h │ │ ├── afcover.h │ │ ├── afdummy.c │ │ ├── afdummy.h │ │ ├── aferrors.h │ │ ├── afglobal.c │ │ ├── afglobal.h │ │ ├── afhints.c │ │ ├── afhints.h │ │ ├── afindic.c │ │ ├── afindic.h │ │ ├── aflatin.c │ │ ├── aflatin.h │ │ ├── aflatin2.c │ │ ├── aflatin2.h │ │ ├── afloader.c │ │ ├── afloader.h │ │ ├── afmodule.c │ │ ├── afmodule.h │ │ ├── afranges.c │ │ ├── afranges.h │ │ ├── afscript.h │ │ ├── afshaper.c │ │ ├── afshaper.h │ │ ├── afstyles.h │ │ ├── aftypes.h │ │ ├── afwarp.c │ │ ├── afwarp.h │ │ ├── afwrtsys.h │ │ └── autofit.c │ │ ├── base │ │ ├── ftadvanc.c │ │ ├── ftbase.c │ │ ├── ftbase.h │ │ ├── ftbbox.c │ │ ├── ftbdf.c │ │ ├── ftbitmap.c │ │ ├── ftcalc.c │ │ ├── ftcid.c │ │ ├── ftcolor.c │ │ ├── ftdbgmem.c │ │ ├── ftdebug.c │ │ ├── fterrors.c │ │ ├── ftfntfmt.c │ │ ├── ftfstype.c │ │ ├── ftgasp.c │ │ ├── ftgloadr.c │ │ ├── ftglyph.c │ │ ├── ftgxval.c │ │ ├── fthash.c │ │ ├── ftinit.c │ │ ├── ftlcdfil.c │ │ ├── ftmac.c │ │ ├── ftmm.c │ │ ├── ftobjs.c │ │ ├── ftotval.c │ │ ├── ftoutln.c │ │ ├── ftpatent.c │ │ ├── ftpfr.c │ │ ├── ftpsprop.c │ │ ├── ftrfork.c │ │ ├── ftsnames.c │ │ ├── ftstream.c │ │ ├── ftstroke.c │ │ ├── ftsynth.c │ │ ├── ftsystem.c │ │ ├── fttrigon.c │ │ ├── fttype1.c │ │ ├── ftutil.c │ │ ├── ftwinfnt.c │ │ ├── md5.c │ │ └── md5.h │ │ ├── cff │ │ ├── cff.c │ │ ├── cffcmap.c │ │ ├── cffcmap.h │ │ ├── cffdrivr.c │ │ ├── cffdrivr.h │ │ ├── cfferrs.h │ │ ├── cffgload.c │ │ ├── cffgload.h │ │ ├── cffload.c │ │ ├── cffload.h │ │ ├── cffobjs.c │ │ ├── cffobjs.h │ │ ├── cffparse.c │ │ ├── cffparse.h │ │ └── cfftoken.h │ │ ├── psaux │ │ ├── afmparse.c │ │ ├── afmparse.h │ │ ├── cffdecode.c │ │ ├── cffdecode.h │ │ ├── psarrst.c │ │ ├── psarrst.h │ │ ├── psaux.c │ │ ├── psauxerr.h │ │ ├── psauxmod.c │ │ ├── psauxmod.h │ │ ├── psblues.c │ │ ├── psblues.h │ │ ├── psconv.c │ │ ├── psconv.h │ │ ├── pserror.c │ │ ├── pserror.h │ │ ├── psfixed.h │ │ ├── psfont.c │ │ ├── psfont.h │ │ ├── psft.c │ │ ├── psft.h │ │ ├── psglue.h │ │ ├── pshints.c │ │ ├── pshints.h │ │ ├── psintrp.c │ │ ├── psintrp.h │ │ ├── psobjs.c │ │ ├── psobjs.h │ │ ├── psread.c │ │ ├── psread.h │ │ ├── psstack.c │ │ ├── psstack.h │ │ ├── pstypes.h │ │ ├── t1cmap.c │ │ ├── t1cmap.h │ │ ├── t1decode.c │ │ └── t1decode.h │ │ ├── pshinter │ │ ├── pshalgo.c │ │ ├── pshalgo.h │ │ ├── pshglob.c │ │ ├── pshglob.h │ │ ├── pshinter.c │ │ ├── pshmod.c │ │ ├── pshmod.h │ │ ├── pshnterr.h │ │ ├── pshrec.c │ │ └── pshrec.h │ │ ├── psnames │ │ ├── psmodule.c │ │ ├── psmodule.h │ │ ├── psnamerr.h │ │ ├── psnames.c │ │ └── pstables.h │ │ ├── raster │ │ ├── ftmisc.h │ │ ├── ftraster.c │ │ ├── ftraster.h │ │ ├── ftrend1.c │ │ ├── ftrend1.h │ │ ├── raster.c │ │ └── rasterrs.h │ │ ├── sfnt │ │ ├── pngshim.c │ │ ├── pngshim.h │ │ ├── sfdriver.c │ │ ├── sfdriver.h │ │ ├── sferrors.h │ │ ├── sfnt.c │ │ ├── sfobjs.c │ │ ├── sfobjs.h │ │ ├── sfwoff.c │ │ ├── sfwoff.h │ │ ├── sfwoff2.c │ │ ├── sfwoff2.h │ │ ├── ttbdf.c │ │ ├── ttbdf.h │ │ ├── ttcmap.c │ │ ├── ttcmap.h │ │ ├── ttcmapc.h │ │ ├── ttcolr.c │ │ ├── ttcolr.h │ │ ├── ttcpal.c │ │ ├── ttcpal.h │ │ ├── ttkern.c │ │ ├── ttkern.h │ │ ├── ttload.c │ │ ├── ttload.h │ │ ├── ttmtx.c │ │ ├── ttmtx.h │ │ ├── ttpost.c │ │ ├── ttpost.h │ │ ├── ttsbit.c │ │ ├── ttsbit.h │ │ ├── woff2tags.c │ │ └── woff2tags.h │ │ ├── smooth │ │ ├── ftgrays.c │ │ ├── ftgrays.h │ │ ├── ftsmerrs.h │ │ ├── ftsmooth.c │ │ ├── ftsmooth.h │ │ └── smooth.c │ │ └── truetype │ │ ├── truetype.c │ │ ├── ttdriver.c │ │ ├── ttdriver.h │ │ ├── tterrors.h │ │ ├── ttgload.c │ │ ├── ttgload.h │ │ ├── ttgxvar.c │ │ ├── ttgxvar.h │ │ ├── ttinterp.c │ │ ├── ttinterp.h │ │ ├── ttobjs.c │ │ ├── ttobjs.h │ │ ├── ttpload.c │ │ ├── ttpload.h │ │ ├── ttsubpix.c │ │ └── ttsubpix.h ├── imgui │ ├── GL │ │ ├── gl3w.c │ │ ├── gl3w.h │ │ └── glcorearb.h │ ├── LICENSE.txt │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_freetype.cpp │ ├── imgui_freetype.h │ ├── imgui_impl_dx9.cpp │ ├── imgui_impl_dx9.h │ ├── imgui_impl_opengl3.cpp │ ├── imgui_impl_opengl3.h │ ├── imgui_impl_sdl.cpp │ ├── imgui_impl_sdl.h │ ├── imgui_impl_win32.cpp │ ├── imgui_impl_win32.h │ ├── imgui_internal.h │ ├── imgui_stdlib.cpp │ ├── imgui_stdlib.h │ ├── imgui_tables.cpp │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ └── imstb_truetype.h ├── imguiCustom.cpp ├── imguiCustom.h ├── includes.hpp ├── nlohmann │ └── json.hpp └── stb_image.h ├── README.md ├── ogsolver.txt └── z.images └── Untitled.png /.gitattributes: -------------------------------------------------------------------------------- 1 | *.h linguist-language=C++ -------------------------------------------------------------------------------- /Math.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../SDK/matrix3x4.h" 4 | #include 5 | #include 6 | #include 7 | 8 | #define RAD2DEG(x) DirectX::XMConvertToDegrees(x) 9 | #define DEG2RAD(x) DirectX::XMConvertToRadians(x) 10 | 11 | namespace Math { 12 | 13 | void normalize_angles(Vector& angles); 14 | extern float NormilizeYaw(float value); 15 | int RandomInt(int min, int max); 16 | void angle_vectors(const Vector& angles, Vector& forward); 17 | void angle_vectors(const Vector& angles, Vector* forward, Vector* right, Vector* up); 18 | Vector calculate_angle(const Vector& src, const Vector& dst); 19 | 20 | 21 | 22 | 23 | } -------------------------------------------------------------------------------- /Osiris.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Osiris", "Osiris\Osiris.vcxproj", "{81D9D7BB-A927-4EB6-9743-F73E6A1DEE48}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {81D9D7BB-A927-4EB6-9743-F73E6A1DEE48}.Debug|x86.ActiveCfg = Debug|Win32 15 | {81D9D7BB-A927-4EB6-9743-F73E6A1DEE48}.Debug|x86.Build.0 = Debug|Win32 16 | {81D9D7BB-A927-4EB6-9743-F73E6A1DEE48}.Release|x86.ActiveCfg = Release|Win32 17 | {81D9D7BB-A927-4EB6-9743-F73E6A1DEE48}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5D19EC35-7F55-4342-9454-22163FADE56D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Osiris/CSGOUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class ClientState; 4 | 5 | namespace CSGOUtils 6 | { 7 | ClientState* getClientState() noexcept; 8 | } -------------------------------------------------------------------------------- /Osiris/EventListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "SDK/GameEvent.h" 6 | 7 | class EventListener : public GameEventListener { 8 | public: 9 | EventListener() noexcept; 10 | void remove() noexcept; 11 | void fireGameEvent(GameEvent* event); 12 | }; 13 | 14 | inline std::unique_ptr eventListener; 15 | -------------------------------------------------------------------------------- /Osiris/GUI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | struct ImFont; 7 | 8 | class GUI { 9 | public: 10 | GUI() noexcept; 11 | void render() noexcept; 12 | ImFont* getTahoma28Font() const noexcept; 13 | ImFont* getUnicodeFont() const noexcept; 14 | void handleToggle() noexcept; 15 | bool isOpen() noexcept { return open; } 16 | private: 17 | bool open = true; 18 | 19 | void renderGuiStyle() noexcept; 20 | void renderLegitbotWindow() noexcept; 21 | void renderRagebotWindow() noexcept; 22 | void renderTriggerbotWindow() noexcept; 23 | void renderFakelagWindow() noexcept; 24 | void renderLegitAntiAimWindow() noexcept; 25 | void renderRageAntiAimWindow() noexcept; 26 | void renderFakeAngleWindow() noexcept; 27 | void renderBacktrackWindow() noexcept; 28 | void renderChamsWindow() noexcept; 29 | void renderGlowWindow() noexcept; 30 | void renderStreamProofESPWindow() noexcept; 31 | void renderVisualsWindow() noexcept; 32 | void renderSkinChangerWindow() noexcept; 33 | void renderMiscWindow() noexcept; 34 | void renderConfigWindow() noexcept; 35 | 36 | struct { 37 | ImFont* normal15px = nullptr; 38 | ImFont* tahoma28 = nullptr; 39 | ImFont* tahoma34 = nullptr; 40 | ImFont* unicodeFont = nullptr; 41 | } fonts; 42 | 43 | float timeToNextConfigRefresh = 0.1f; 44 | }; 45 | 46 | inline std::unique_ptr gui; 47 | -------------------------------------------------------------------------------- /Osiris/Hacks/AimbotFunctions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../SDK/Entity.h" 4 | #include "../SDK/Vector.h" 5 | #include "../SDK/EngineTrace.h" 6 | 7 | struct UserCmd; 8 | struct Vector; 9 | struct SurfaceData; 10 | struct StudioBbox; 11 | struct StudioHitboxSet; 12 | 13 | namespace AimbotFunction 14 | { 15 | Vector calculateRelativeAngle(const Vector& source, const Vector& destination, const Vector& viewAngles) noexcept; 16 | 17 | void calculateArmorDamage(float armorRatio, int armorValue, bool hasHeavyArmor, float& damage) noexcept; 18 | 19 | bool canScan(Entity* entity, const Vector& destination, const WeaponInfo* weaponData, int minDamage, bool allowFriendlyFire) noexcept; 20 | float getScanDamage(Entity* entity, const Vector& destination, const WeaponInfo* weaponData, int minDamage, bool allowFriendlyFire) noexcept; 21 | 22 | bool hitboxIntersection(const matrix3x4 matrix[MAXSTUDIOBONES], int iHitbox, StudioHitboxSet* set, const Vector& start, const Vector& end) noexcept; 23 | 24 | std::vector multiPoint(Entity* entity, const matrix3x4 matrix[MAXSTUDIOBONES], StudioBbox* hitbox, Vector localEyePos, int _hitbox, int _multiPoint); 25 | 26 | bool hitChance(Entity* localPlayer, Entity* entity, StudioHitboxSet*, const matrix3x4 matrix[MAXSTUDIOBONES], Entity* activeWeapon, const Vector& destination, const UserCmd* cmd, const int hitChance) noexcept; 27 | } 28 | -------------------------------------------------------------------------------- /Osiris/Hacks/AnimationFix.cpp: -------------------------------------------------------------------------------- 1 | //#include "AnimationFix.h" 2 | 3 | #include "../Memory.h" 4 | #include "../Interfaces.h" 5 | 6 | #include "Backtrack.h" 7 | #include "EnginePrediction.h" 8 | #include "Resolver.h" 9 | 10 | #include "../SDK/LocalPlayer.h" 11 | #include "../SDK/Cvar.h" 12 | #include "../SDK/GlobalVars.h" 13 | #include "../SDK/Entity.h" 14 | #include "../SDK/UserCmd.h" 15 | #include "../SDK/ConVar.h" 16 | #include "../SDK/MemAlloc.h" 17 | #include "../SDK/Input.h" 18 | #include "../SDK/Vector.h" -------------------------------------------------------------------------------- /Osiris/Hacks/AntiAim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../ConfigStructs.h" 4 | 5 | struct UserCmd; 6 | struct Vector; 7 | 8 | namespace AntiAim 9 | { 10 | float breakLC(bool& sendPacket) noexcept; 11 | float getLBYUpdate() noexcept; 12 | float getYawAtTargets( const Vector& viewangles) noexcept; 13 | float freestand(UserCmd* cmd) noexcept; 14 | 15 | void rage(UserCmd* cmd, const Vector& previousViewAngles, const Vector& currentViewAngles, bool& sendPacket) noexcept; 16 | void legit(UserCmd* cmd, const Vector& previousViewAngles, const Vector& currentViewAngles, bool& sendPacket) noexcept; 17 | 18 | void run(UserCmd* cmd, const Vector& previousViewAngles, const Vector& currentViewAngles, bool& sendPacket) noexcept; 19 | void updateInput() noexcept; 20 | bool canRun(UserCmd* cmd) noexcept; 21 | } 22 | -------------------------------------------------------------------------------- /Osiris/Hacks/Backtrack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "../ConfigStructs.h" 7 | 8 | #include "../SDK/NetworkChannel.h" 9 | #include "../SDK/matrix3x4.h" 10 | #include "../SDK/ModelInfo.h" 11 | #include "../SDK/Vector.h" 12 | 13 | enum class FrameStage; 14 | struct UserCmd; 15 | 16 | namespace Backtrack 17 | { 18 | void run(UserCmd*) noexcept; 19 | 20 | void addLatencyToNetwork(NetworkChannel*, float) noexcept; 21 | void updateIncomingSequences() noexcept; 22 | 23 | float getLerp() noexcept; 24 | 25 | struct incomingSequence { 26 | int inreliablestate; 27 | int sequencenr; 28 | float servertime; 29 | }; 30 | 31 | bool valid(float simtime) noexcept; 32 | void init() noexcept; 33 | float getMaxUnlag() noexcept; 34 | } 35 | -------------------------------------------------------------------------------- /Osiris/Hacks/Chams.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "../Config.h" 6 | 7 | class Entity; 8 | struct ModelRenderInfo; 9 | class matrix3x4; 10 | class Material; 11 | 12 | class Chams { 13 | public: 14 | bool render(void*, void*, const ModelRenderInfo&, matrix3x4*) noexcept; 15 | static void updateInput() noexcept; 16 | private: 17 | void renderPlayer(Entity* player) noexcept; 18 | void renderFakelag(int health) noexcept; 19 | void renderDesync(int health) noexcept; 20 | void renderWeapons() noexcept; 21 | void renderHands() noexcept; 22 | void renderSleeves() noexcept; 23 | 24 | bool appliedChams; 25 | void* ctx; 26 | void* state; 27 | const ModelRenderInfo* info; 28 | matrix3x4* customBoneToWorld; 29 | 30 | void applyChams(const std::array& chams, int health = 0, const matrix3x4* customMatrix = nullptr) noexcept; 31 | }; 32 | -------------------------------------------------------------------------------- /Osiris/Hacks/EnginePrediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../SDK/FrameStage.h" 4 | #include "../SDK/Vector.h" 5 | 6 | #include 7 | 8 | struct UserCmd; 9 | struct Vector; 10 | 11 | namespace EnginePrediction 12 | { 13 | void reset() noexcept; 14 | 15 | void update() noexcept; 16 | void run(UserCmd* cmd) noexcept; 17 | 18 | void store() noexcept; 19 | void apply(FrameStage) noexcept; 20 | 21 | int getFlags() noexcept; 22 | Vector getVelocity() noexcept; 23 | bool isInPrediction() noexcept; 24 | 25 | struct NetvarData 26 | { 27 | int tickbase = -1; 28 | 29 | Vector aimPunchAngle{ }; 30 | Vector aimPunchAngleVelocity{ }; 31 | Vector baseVelocity{ }; 32 | float duckAmount{ -1.f }; 33 | float duckSpeed{ -1.f }; 34 | float fallVelocity{ -1.f }; 35 | float thirdPersonRecoil{ -1.f }; 36 | Vector velocity{ }; 37 | float velocityModifier{ -1.f }; 38 | Vector viewPunchAngle{ }; 39 | Vector viewOffset{ }; 40 | Vector origin{ }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /Osiris/Hacks/Fakelag.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Fakelag 4 | { 5 | void run(bool& sendPacket) noexcept; 6 | } -------------------------------------------------------------------------------- /Osiris/Hacks/Glow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../ConfigStructs.h" 4 | 5 | namespace Glow 6 | { 7 | void render() noexcept; 8 | void clearCustomObjects() noexcept; 9 | void updateInput() noexcept; 10 | 11 | // Config 12 | void resetConfig() noexcept; 13 | } 14 | -------------------------------------------------------------------------------- /Osiris/Hacks/GrenadePrediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "../imgui/imgui.h" 5 | 6 | #include "../SDK/EngineTrace.h" 7 | #include "../SDK/UserCmd.h" 8 | #include "../SDK/Vector.h" 9 | 10 | namespace GrenadePrediction 11 | { 12 | void run(UserCmd* cmd) noexcept; 13 | void draw() noexcept; 14 | }; -------------------------------------------------------------------------------- /Osiris/Hacks/Knifebot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserCmd; 4 | 5 | namespace Knifebot 6 | { 7 | void run(UserCmd*) noexcept; 8 | } -------------------------------------------------------------------------------- /Osiris/Hacks/Legitbot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserCmd; 4 | 5 | namespace Legitbot 6 | { 7 | void run(UserCmd*) noexcept; 8 | void updateInput() noexcept; 9 | } -------------------------------------------------------------------------------- /Osiris/Hacks/LocalAnimationFix.cpp: -------------------------------------------------------------------------------- 1 | //#include "AnimationFix.h" 2 | 3 | #include "../Memory.h" 4 | #include "../Interfaces.h" 5 | 6 | #include "Backtrack.h" 7 | #include "EnginePrediction.h" 8 | #include "Resolver.h" 9 | 10 | #include "../SDK/LocalPlayer.h" 11 | #include "../SDK/Cvar.h" 12 | #include "../SDK/GlobalVars.h" 13 | #include "../SDK/Entity.h" 14 | #include "../SDK/UserCmd.h" 15 | #include "../SDK/ConVar.h" 16 | #include "../SDK/MemAlloc.h" 17 | #include "../SDK/Input.h" 18 | #include "../SDK/Vector.h" 19 | 20 | -------------------------------------------------------------------------------- /Osiris/Hacks/Ragebot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserCmd; 4 | 5 | namespace Ragebot 6 | { 7 | void run(UserCmd*) noexcept; 8 | void updateInput() noexcept; 9 | 10 | struct Enemies { 11 | int id; 12 | int health; 13 | float distance; 14 | float fov; 15 | 16 | bool operator<(const Enemies& enemy) const noexcept { 17 | if (health != enemy.health) 18 | return health < enemy.health; 19 | if (fov != enemy.fov) 20 | return fov < enemy.fov; 21 | return distance < enemy.distance; 22 | } 23 | 24 | Enemies(int id, int health, float distance, float fov) noexcept : id(id), health(health), distance(distance), fov(fov) { } 25 | }; 26 | 27 | struct { 28 | bool operator()(Enemies a, Enemies b) const 29 | { 30 | return a.health < b.health; 31 | } 32 | } healthSort; 33 | struct { 34 | bool operator()(Enemies a, Enemies b) const 35 | { 36 | return a.distance < b.distance; 37 | } 38 | } distanceSort; 39 | struct { 40 | bool operator()(Enemies a, Enemies b) const 41 | { 42 | return a.fov < b.fov; 43 | } 44 | } fovSort; 45 | } -------------------------------------------------------------------------------- /Osiris/Hacks/Sound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "../ConfigStructs.h" 6 | 7 | #define OSIRIS_SOUND() true 8 | 9 | namespace Sound 10 | { 11 | void modulateSound(std::string_view name, int entityIndex, float& volume) noexcept; 12 | 13 | // GUI 14 | void drawGUI() noexcept; 15 | 16 | // Config 17 | json toJson() noexcept; 18 | void fromJson(const json& j) noexcept; 19 | void resetConfig() noexcept; 20 | } 21 | -------------------------------------------------------------------------------- /Osiris/Hacks/StreamProofESP.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace StreamProofESP 4 | { 5 | void render() noexcept; 6 | void updateInput() noexcept; 7 | } 8 | -------------------------------------------------------------------------------- /Osiris/Hacks/Tickbase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserCmd; 4 | 5 | namespace Tickbase 6 | { 7 | void start(UserCmd* cmd) noexcept; 8 | void end(UserCmd* cmd) noexcept; 9 | bool shift(UserCmd* cmd, int shiftAmount, bool forceShift = false) noexcept; 10 | bool canRun() noexcept; 11 | bool shiftOffensive(UserCmd* cmd, int amount, bool forceShift = false) noexcept; 12 | bool shiftDefensive(UserCmd* cmd, int amount, bool forceShift = false) noexcept; 13 | bool canShift(int shiftAmount, bool forceShift = false) noexcept; 14 | int getCorrectTickbase(int commandNumber) noexcept; 15 | int& pausedTicks() noexcept; 16 | int getTargetTickShift() noexcept; 17 | int getTickshift() noexcept; 18 | void resetTickshift() noexcept; 19 | bool& isFinalTick() noexcept; 20 | bool& isShifting() noexcept; 21 | void updateInput() noexcept; 22 | void reset() noexcept; 23 | void storePlayerHistory() noexcept; 24 | bool applyLagCompensation(UserCmd* cmd) noexcept; 25 | void breakLagCompensation(UserCmd* cmd) noexcept; 26 | } 27 | -------------------------------------------------------------------------------- /Osiris/Hacks/Triggerbot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct UserCmd; 4 | 5 | namespace Triggerbot 6 | { 7 | void run(UserCmd*) noexcept; 8 | void updateInput() noexcept; 9 | } 10 | -------------------------------------------------------------------------------- /Osiris/Hacks/hitscan.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../SDK/Entity.h" 4 | #include "../SDK/Vector.h" 5 | #include "../SDK/EngineTrace.h" 6 | 7 | struct UserCmd; 8 | struct Vector; 9 | struct SurfaceData; 10 | struct StudioBbox; 11 | struct StudioHitboxSet; 12 | 13 | namespace hitscan 14 | { 15 | Vector calculateRelativeAngle(const Vector& source, const Vector& destination, const Vector& viewAngles) noexcept; 16 | 17 | void calculateArmorDamage(float armorRatio, int armorValue, bool hasHeavyArmor, float& damage) noexcept; 18 | 19 | bool canScan(Entity* entity, const Vector& destination, const WeaponInfo* weaponData, int minDamage, bool allowFriendlyFire) noexcept; 20 | float getScanDamage(Entity* entity, const Vector& destination, const WeaponInfo* weaponData, int minDamage, bool allowFriendlyFire) noexcept; 21 | 22 | bool hitboxIntersection(const matrix3x4 matrix[MAXSTUDIOBONES], int iHitbox, StudioHitboxSet* set, const Vector& start, const Vector& end) noexcept; 23 | 24 | Vector getCenterOfHitbox(const matrix3x4 matrix[MAXSTUDIOBONES], StudioBbox* hitbox) noexcept; 25 | 26 | std::vector multiPoint(Entity* entity, const matrix3x4 matrix[MAXSTUDIOBONES], StudioBbox* hitbox, Vector localEyePos, int _hitbox, int _multiPoint); 27 | 28 | bool hitChance(Entity* localPlayer, Entity* entity, StudioHitboxSet*, const matrix3x4 matrix[MAXSTUDIOBONES], Entity* activeWeapon, const Vector& destination, const UserCmd* cmd, const int hitChance) noexcept; 29 | } 30 | -------------------------------------------------------------------------------- /Osiris/Hooks/MinHook.cpp: -------------------------------------------------------------------------------- 1 | #include "MinHook.h" 2 | #include "../MinHook/MinHook.h" 3 | 4 | static auto calculateVmtLength(uintptr_t* vmt) noexcept 5 | { 6 | std::size_t length = 0; 7 | MEMORY_BASIC_INFORMATION memoryInfo; 8 | while (VirtualQuery(LPCVOID(vmt[length]), &memoryInfo, sizeof(memoryInfo)) && memoryInfo.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) 9 | length++; 10 | return length; 11 | } 12 | 13 | void MinHook::init(void* base) noexcept 14 | { 15 | this->base = base; 16 | originals = std::make_unique(calculateVmtLength(*reinterpret_cast(base))); 17 | } 18 | 19 | void MinHook::detour(uintptr_t base, void* fun) noexcept 20 | { 21 | this->base = (LPVOID)base; 22 | MH_CreateHook((LPVOID)base, fun, reinterpret_cast(&original)); 23 | } 24 | 25 | void MinHook::hookAt(std::size_t index, void* fun) noexcept 26 | { 27 | void* orig; 28 | MH_CreateHook((*reinterpret_cast(base))[index], fun, &orig); 29 | originals[index] = uintptr_t(orig); 30 | } 31 | 32 | void MinHook::enable(std::size_t index) noexcept 33 | { 34 | MH_EnableHook((*reinterpret_cast(base))[index]); 35 | } -------------------------------------------------------------------------------- /Osiris/Hooks/MinHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "../SDK/Platform.h" 7 | 8 | class MinHook { 9 | public: 10 | void init(void* base) noexcept; 11 | void detour(uintptr_t base, void* fun) noexcept; 12 | void restore() noexcept {} 13 | void hookAt(std::size_t index, void* fun) noexcept; 14 | void enable(std::size_t index) noexcept; 15 | 16 | template 17 | constexpr auto getOriginal(Args... args) const noexcept 18 | { 19 | if (!Idx) 20 | return reinterpret_cast(original); 21 | return reinterpret_cast(originals[Idx]); 22 | } 23 | 24 | template 25 | constexpr auto callOriginal(Args... args) const noexcept 26 | { 27 | return getOriginal(args...)(base, args...); 28 | } 29 | 30 | auto getDetour() noexcept 31 | { 32 | return original; 33 | } 34 | 35 | private: 36 | void* base; 37 | std::unique_ptr originals; 38 | uintptr_t original; 39 | }; 40 | -------------------------------------------------------------------------------- /Osiris/Hooks/VmtHook.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "VmtHook.h" 5 | 6 | static auto calculateVmtLength(std::uintptr_t* vmt) noexcept 7 | { 8 | std::size_t length = 0; 9 | MEMORY_BASIC_INFORMATION memoryInfo; 10 | while (VirtualQuery(LPCVOID(vmt[length]), &memoryInfo, sizeof(memoryInfo)) && memoryInfo.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) 11 | length++; 12 | return length; 13 | } 14 | 15 | void VmtHook::init(void* base) noexcept 16 | { 17 | this->base = base; 18 | auto vmt = *reinterpret_cast(base); 19 | length = calculateVmtLength(vmt); 20 | oldVmt = std::make_unique(length); 21 | std::copy(vmt, vmt + length, oldVmt.get()); 22 | } 23 | 24 | void VmtHook::restore() const noexcept 25 | { 26 | if (!base) 27 | return; 28 | auto vmt = *reinterpret_cast(base); 29 | if (DWORD oldProtection; VirtualProtect(vmt, length, PAGE_EXECUTE_READWRITE, &oldProtection)) { 30 | std::copy(oldVmt.get(), oldVmt.get() + length, vmt); 31 | VirtualProtect(vmt, length, oldProtection, nullptr); 32 | } 33 | } 34 | 35 | void VmtHook::hookAt(std::size_t index, void* fun) const noexcept 36 | { 37 | auto address = *reinterpret_cast(base) + index; 38 | if (DWORD oldProtection; VirtualProtect(address, sizeof(address), PAGE_EXECUTE_READWRITE, &oldProtection)) { 39 | *address = std::uintptr_t(fun); 40 | VirtualProtect(address, sizeof(address), oldProtection, nullptr); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Osiris/Hooks/VmtHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "../SDK/Platform.h" 8 | 9 | class VmtHook { 10 | public: 11 | void init(void* base) noexcept; 12 | void restore() const noexcept; 13 | void hookAt(std::size_t index, void* fun) const noexcept; 14 | 15 | template 16 | constexpr auto getOriginal(Args... args) const noexcept 17 | { 18 | return reinterpret_cast(oldVmt[Idx]); 19 | } 20 | 21 | template 22 | constexpr auto callOriginal(Args... args) const noexcept 23 | { 24 | return getOriginal(args...)(base, args...); 25 | } 26 | 27 | private: 28 | void* base; 29 | std::size_t length; 30 | std::unique_ptr oldVmt; 31 | }; 32 | -------------------------------------------------------------------------------- /Osiris/Hooks/VmtSwap.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "VmtSwap.h" 5 | 6 | static auto calculateVmtLength(std::uintptr_t* vmt) noexcept 7 | { 8 | std::size_t length = 0; 9 | MEMORY_BASIC_INFORMATION memoryInfo; 10 | while (VirtualQuery(LPCVOID(vmt[length]), &memoryInfo, sizeof(memoryInfo)) && memoryInfo.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) 11 | length++; 12 | return length; 13 | } 14 | 15 | void VmtSwap::init(void* base) noexcept 16 | { 17 | this->base = base; 18 | oldVmt = *reinterpret_cast(base); 19 | std::size_t length = calculateVmtLength(oldVmt) + dynamicCastInfoLength; 20 | newVmt = std::make_unique(length); 21 | std::copy(oldVmt - dynamicCastInfoLength, oldVmt - dynamicCastInfoLength + length, newVmt.get()); 22 | *reinterpret_cast(base) = newVmt.get() + dynamicCastInfoLength; 23 | } 24 | -------------------------------------------------------------------------------- /Osiris/Hooks/VmtSwap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "../SDK/Platform.h" 8 | 9 | class VmtSwap { 10 | public: 11 | void init(void* base) noexcept; 12 | void restore() noexcept 13 | { 14 | if(newVmt) 15 | *reinterpret_cast(base) = oldVmt; 16 | } 17 | 18 | template 19 | void hookAt(std::size_t index, T fun) const noexcept 20 | { 21 | newVmt[index + dynamicCastInfoLength] = reinterpret_cast(fun); 22 | } 23 | 24 | template 25 | constexpr auto getOriginal(Args... args) const noexcept 26 | { 27 | return reinterpret_cast(oldVmt[Idx]); 28 | } 29 | 30 | template 31 | constexpr auto callOriginal(Args... args) const noexcept 32 | { 33 | return getOriginal(args...)(base, args...); 34 | } 35 | 36 | private: 37 | static constexpr auto dynamicCastInfoLength = 1; 38 | 39 | void* base = nullptr; 40 | std::uintptr_t* oldVmt = nullptr; 41 | std::unique_ptr newVmt; 42 | std::size_t length = 0; 43 | }; 44 | -------------------------------------------------------------------------------- /Osiris/Localize.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "SDK/VirtualMethod.h" 6 | 7 | class Localize { 8 | public: 9 | VIRTUAL_METHOD(const wchar_t*, find, 11, (const char* tokenName), (this, tokenName)) 10 | VIRTUAL_METHOD(const wchar_t*, findSafe, 12, (const char* tokenName), (this, tokenName)) 11 | VIRTUAL_METHOD(int, convertAnsiToUnicode, 15, (const char* ansi, wchar_t* unicode, int unicodeBufferSizeInBytes), (this, ansi, unicode, unicodeBufferSizeInBytes)) 12 | VIRTUAL_METHOD(int, convertUnicodeToAnsi, 16, (const wchar_t* unicode, char* ansi, int ansiBufferSize), (this, unicode, ansi, ansiBufferSize)) 13 | VIRTUAL_METHOD(const char*, findAsUTF8, 47, (const char* tokenName), (this, tokenName)) 14 | 15 | std::string convertUnicodeToAnsi(const wchar_t* unicode) noexcept 16 | { 17 | char buffer[4096]; 18 | convertUnicodeToAnsi(unicode, buffer, sizeof(buffer)); 19 | return buffer; 20 | } 21 | }; -------------------------------------------------------------------------------- /Osiris/Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "imgui/imgui.h" 8 | 9 | class GameEvent; 10 | 11 | namespace Logger 12 | { 13 | /* 14 | Options 15 | Log on console and on event log 16 | Color + decayTime 17 | 18 | Damage dealt (done) 19 | Damage received (done) 20 | 21 | Spread misses (todo) 22 | Misc (lagcomp, occlusion) misses (todo) 23 | Resolver misses (todo) 24 | 25 | Hostage taken (done) 26 | Bomb plants (done) 27 | */ 28 | 29 | 30 | struct Log 31 | { 32 | float time{ 0.0f }; 33 | float alpha{ 255.0f }; 34 | std::string text{ "" }; 35 | }; 36 | 37 | void reset() noexcept; 38 | 39 | void addLog(std::string log) noexcept; 40 | void getEvent(GameEvent* event) noexcept; 41 | void process(ImDrawList* drawList) noexcept; 42 | void console() noexcept; 43 | void render(ImDrawList* drawList) noexcept; 44 | 45 | enum 46 | { 47 | Console, 48 | EventLog 49 | }; 50 | 51 | enum 52 | { 53 | DamageDealt, 54 | DamageReceived, 55 | HostageTaken, 56 | BombPlants 57 | }; 58 | 59 | static std::deque logs; 60 | static std::deque renderLogs; 61 | } -------------------------------------------------------------------------------- /Osiris/Math.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finutz/my-custom-osiris/5819a4395c3c986b9da176a47f2ce74480dc496e/Osiris/Math.cpp -------------------------------------------------------------------------------- /Osiris/Math.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /Osiris/MinHook/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 20 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #pragma once 30 | 31 | // Size of each memory slot. 32 | #if defined(_M_X64) || defined(__x86_64__) 33 | #define MEMORY_SLOT_SIZE 64 34 | #else 35 | #define MEMORY_SLOT_SIZE 32 36 | #endif 37 | 38 | VOID InitializeBuffer(VOID); 39 | VOID UninitializeBuffer(VOID); 40 | LPVOID AllocateBuffer(LPVOID pOrigin); 41 | VOID FreeBuffer(LPVOID pBuffer); 42 | BOOL IsExecutableAddress(LPVOID pAddress); 43 | -------------------------------------------------------------------------------- /Osiris/MinHook/hde/pstdint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include 30 | 31 | // Integer types for HDE. 32 | typedef INT8 int8_t; 33 | typedef INT16 int16_t; 34 | typedef INT32 int32_t; 35 | typedef INT64 int64_t; 36 | typedef UINT8 uint8_t; 37 | typedef UINT16 uint16_t; 38 | typedef UINT32 uint32_t; 39 | typedef UINT64 uint64_t; 40 | -------------------------------------------------------------------------------- /Osiris/Netvars.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "fnv.h" 7 | 8 | namespace Netvars 9 | { 10 | void init() noexcept; 11 | void restore() noexcept; 12 | std::uint32_t get(std::uint32_t hash) noexcept; 13 | } 14 | 15 | #define PNETVAR_OFFSET(funcname, class_name, var_name, offset, type) \ 16 | [[nodiscard]] auto funcname() noexcept \ 17 | { \ 18 | static const auto netvarOffset = Netvars::get(fnv::hash(class_name "->" var_name)); \ 19 | return reinterpret_cast>(std::uintptr_t(this) + netvarOffset + offset); \ 20 | } 21 | 22 | #define PNETVAR(funcname, class_name, var_name, type) \ 23 | PNETVAR_OFFSET(funcname, class_name, var_name, 0, type) 24 | 25 | #define NETVAR_OFFSET(funcname, class_name, var_name, offset, type) \ 26 | [[nodiscard]] std::add_lvalue_reference_t funcname() noexcept \ 27 | { \ 28 | static const auto netvarOffset = Netvars::get(fnv::hash(class_name "->" var_name)); \ 29 | return *reinterpret_cast>(std::uintptr_t(this) + netvarOffset + offset); \ 30 | } 31 | 32 | #define NETVAR(funcname, class_name, var_name, type) \ 33 | NETVAR_OFFSET(funcname, class_name, var_name, 0, type) 34 | -------------------------------------------------------------------------------- /Osiris/Osiris.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "Hooks.h" 6 | 7 | extern "C" BOOL WINAPI _CRT_INIT(HMODULE moduleHandle, DWORD reason, LPVOID reserved); 8 | 9 | BOOL APIENTRY DllEntryPoint(HMODULE moduleHandle, DWORD reason, LPVOID reserved) 10 | { 11 | if (!_CRT_INIT(moduleHandle, reason, reserved)) 12 | return FALSE; 13 | 14 | if (reason == DLL_PROCESS_ATTACH) { 15 | std::setlocale(LC_CTYPE, ".utf8"); 16 | hooks = std::make_unique(moduleHandle); 17 | } 18 | return TRUE; 19 | } 20 | -------------------------------------------------------------------------------- /Osiris/Resources/Resource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace Resource 7 | { 8 | template 9 | constexpr auto decodeBase85(const char(&input)[N]) noexcept 10 | { 11 | std::array out{}; 12 | 13 | constexpr auto decode85Byte = [](char c) constexpr -> unsigned int { return c >= '\\' ? c - 36 : c - 35; }; 14 | 15 | for (std::size_t i = 0, j = 0; i < N - 1; i += 5, j += 4) { 16 | unsigned int tmp = decode85Byte(input[i]) + 85 * (decode85Byte(input[i + 1]) + 85 * (decode85Byte(input[i + 2]) + 85 * (decode85Byte(input[i + 3]) + 85 * decode85Byte(input[i + 4])))); 17 | out[j] = ((tmp >> 0) & 0xFF); out[j + 1] = ((tmp >> 8) & 0xFF); out[j + 2] = ((tmp >> 16) & 0xFF); out[j + 3] = ((tmp >> 24) & 0xFF); 18 | } 19 | 20 | return out; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Osiris/Resources/avatar_ct.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Resource.h" 4 | 5 | namespace Resource 6 | { 7 | 8 | // File: 'avatar_ct.png' (957 bytes) 9 | // Exported using binary_to_compressed_c.cpp 10 | inline constexpr auto avatar_ct = decodeBase85( 11 | "=pxq9_8v7&0C/2'K(HH=CD4;-CD4;-.,###AYPRO?%###6/s*>][t4:201b,LT3&5W.Sr860c*,LV0/PW8f79+r0BHM%N#64>ld=_BVfFqbZfjWUL02R'?[YE%.J-ic3" 12 | "gF0>`*bkX:+1R)>Tr$b>Y%pX/cY,?6eht=UGH`j4O)sL;=s=H=l0h$RhD_lXjQDCS_Eo]BGVvDH//W_IA]$s:-uqc=:9&KLu-E#vp/&&K))AMca#4i6ZCv&;'>e8_;JUvmZ]<`F,#b2mou" 14 | "@oo)AnqTf'pJKbF%N'JqXGXEfbk[5P%1W3H1#,TuEiKaZ(VUM*T?$Pf:86X-=&]uKI;?b0OehN^flb$tP3#SVjNpGDZQS6hG[CK5q3&" 15 | "+8G7BnU@2J,%q,_s[]0T%KgU1xxM$/,xNGXJ83di3eD,ba5eh^?1pq30P?Q<%w,3(U:w^>cm3ENE$iW5BoM'p$MSH-n:cC;+[6e1EO_(`^+?k#ZMKJP" 16 | "+_9BilQECUOC/Qd]Kb$j^lpPi^e$M_*m`d&o.sR2-k<:b->5(?e;)(2K/1v&[8+k)iOcD+d5+k:M)`HkImIVB$W3wB#:3.,,TXG&j'nsA0tQd:AJk'?-(HxvS&v@B`7t'Ao" 17 | "l(')(98au8j'O4h`@4.*?&5UQcr5>k+bF]lPSG[_L2M-JGT]@P9jrLrljmWga8-iolx4lZ%o8$kxHpj5:eoB`+ki?*'e)0$9CX:@'w$/#Hen7t7;G:F49@:(#%to0qHsIUQjin@bAZS6" 18 | "KEUmEN6c8(VcRl_5i/)P&)(`pP64cDg`bZek8?IM,XW0LQ=n^UC`h#Duk[9qLaWB,:]tQKlJ4,[jQIaw:HL-NqKc$.ZRe#'kE$a8l4t^w#55L9RC3tan#m7YYg:&/9j/0M,S:vxa" 19 | "oVY5LcuWEt]'=KK=ClX,nqrZ`e:XkH=[[cRYPjeA=8B=WPw:Da0fIT9rcw85e%###Ub90 hdrCache; 23 | int numFrameUnlockCounter; 24 | int* frameUnlockCounter; 25 | PAD(8); 26 | UtlVector boneFlags; 27 | UtlVector boneParent; 28 | void* activityToSequence; 29 | 30 | StudioSeqdesc seqdesc(int sequence) noexcept 31 | { 32 | return *reinterpret_cast(memory->seqdesc(this, sequence)); 33 | } 34 | }; -------------------------------------------------------------------------------- /Osiris/SDK/ClassId.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Server.h" 4 | 5 | enum class ClassId { 6 | BaseCSGrenadeProjectile = 9, 7 | BreachChargeProjectile = 29, 8 | BumpMineProjectile = 33, 9 | C4, 10 | Chicken = 36, 11 | CSPlayer = 40, 12 | CSPlayerResource, 13 | CSRagdoll = 42, 14 | Deagle = 46, 15 | DecoyProjectile = 48, 16 | Drone, 17 | Dronegun, 18 | DynamicProp = 52, 19 | EconEntity = 53, 20 | EconWearable, 21 | Hostage = 97, 22 | Inferno = 100, 23 | Healthshot = 104, 24 | Cash, 25 | Knife = 107, 26 | KnifeGG, 27 | MolotovProjectile = 114, 28 | AmmoBox = 125, 29 | LootCrate, 30 | RadarJammer, 31 | WeaponUpgrade, 32 | PlantedC4, 33 | PropDoorRotating = 143, 34 | SensorGrenadeProjectile = 153, 35 | SmokeGrenadeProjectile = 157, 36 | SnowballPile = 160, 37 | SnowballProjectile, 38 | Tablet = 172, 39 | Aug = 232, 40 | Awp, 41 | Elite = 239, 42 | FiveSeven = 241, 43 | G3sg1, 44 | Glock = 245, 45 | P2000, 46 | P250 = 258, 47 | Scar20 = 261, 48 | Sg553 = 265, 49 | Ssg08 = 267, 50 | Tec9 = 269 51 | }; 52 | 53 | class ClassIdManager 54 | { 55 | private: 56 | int getClassID(const char* classname) noexcept 57 | { 58 | ServerClass* serverclass = interfaces->server->getAllServerClasses(); 59 | int id = 0; 60 | while (serverclass) 61 | { 62 | if (!strcmp(serverclass->networkName, classname)) 63 | return id; 64 | serverclass = serverclass->next, id++; 65 | } 66 | return -1; 67 | } 68 | public: 69 | ClassIdManager() noexcept 70 | { 71 | fogController = getClassID("CFogController"); 72 | } 73 | 74 | int fogController; 75 | }; 76 | 77 | inline std::unique_ptr dynamicClassId; -------------------------------------------------------------------------------- /Osiris/SDK/Client.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | #include "BitBuffer.h" 5 | 6 | struct ClientClass; 7 | 8 | class Client { 9 | public: 10 | VIRTUAL_METHOD(ClientClass*, getAllClasses, 8, (), (this)) 11 | VIRTUAL_METHOD(bool, writeUsercmdDeltaToBuffer, 24, (int slot, bufferWrite* buf, int from, int to, bool isnewcommand), (this, slot, buf, from, to, isnewcommand)) 12 | VIRTUAL_METHOD(bool, dispatchUserMessage, 38, (int messageType, int arg, int arg1, void* data), (this, messageType, arg, arg1, data)) 13 | }; 14 | -------------------------------------------------------------------------------- /Osiris/SDK/ClientClass.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "ClassId.h" 6 | #include "Platform.h" 7 | 8 | class Entity; 9 | struct RecvTable; 10 | 11 | struct ClientClass { 12 | std::add_pointer_t createFunction; 13 | void* createEventFunction; 14 | char* networkName; 15 | RecvTable* recvTable; 16 | ClientClass* next; 17 | ClassId classId; 18 | }; 19 | -------------------------------------------------------------------------------- /Osiris/SDK/ClientMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Platform.h" 6 | 7 | class HudChat { 8 | public: 9 | template 10 | void printf(int filter, const char* fmt, Args... args) noexcept 11 | { 12 | (*reinterpret_cast(this))[26](this, filter, fmt, args...); 13 | } 14 | }; 15 | 16 | class ClientMode { 17 | public: 18 | auto getHudChat() noexcept 19 | { 20 | return *reinterpret_cast(std::uintptr_t(this) + 28); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /Osiris/SDK/CommandContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "UserCmd.h" 3 | 4 | class CommandContext 5 | { 6 | public: 7 | bool needsProcessing; 8 | UserCmd cmd; 9 | int commandNumber; 10 | }; -------------------------------------------------------------------------------- /Osiris/SDK/ConVar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Platform.h" 6 | #include "UtlVector.h" 7 | #include "Pad.h" 8 | #include "VirtualMethod.h" 9 | 10 | enum CvarFlags 11 | { 12 | NONE = 0, 13 | UNREGISTERED = (1 << 0), 14 | DEVELOPMENTONLY = (1 << 1), 15 | GAMEDLL = (1 << 2), 16 | CLIENTDLL = (1 << 3), 17 | HIDDEN = (1 << 4), 18 | PROTECTED = (1 << 5), 19 | SPONLY = (1 << 6), 20 | ARCHIVE = (1 << 7), 21 | NOTIFY = (1 << 8), 22 | USERINFO = (1 << 9), 23 | CHEAT = (1 << 14), 24 | PRINTABLEONLY = (1 << 10), 25 | UNLOGGED = (1 << 11), 26 | NEVER_AS_STRING = (1 << 12), 27 | REPLICATED = (1 << 13), 28 | DEMO = (1 << 16), 29 | DONTRECORD = (1 << 17), 30 | NOT_CONNECTED = (1 << 22), 31 | ARCHIVE_XBOX = (1 << 24), 32 | SERVER_CAN_EXECUTE = (1 << 28), 33 | SERVER_CANNOT_QUERY = (1 << 29), 34 | CLIENTCMD_CAN_EXECUTE = (1 << 30) 35 | }; 36 | 37 | struct ConVar { 38 | VIRTUAL_METHOD(float, getFloat, 12, (), (this)) 39 | VIRTUAL_METHOD(int, getInt, 13, (), (this)) 40 | VIRTUAL_METHOD(void, setValue, 14, (const char* value), (this, value)) 41 | VIRTUAL_METHOD(void, setValue, 15, (float value), (this, value)) 42 | VIRTUAL_METHOD(void, setValue, 16, (int value), (this, value)) 43 | 44 | PAD(24) 45 | std::add_pointer_t changeCallback; 46 | ConVar* parent; 47 | const char* defaultValue; 48 | char* string; 49 | PAD(44) 50 | UtlVector onChangeCallbacks; 51 | }; 52 | -------------------------------------------------------------------------------- /Osiris/SDK/Cvar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | struct ConVar; 6 | 7 | class Cvar { 8 | public: 9 | VIRTUAL_METHOD(ConVar*, findVar, 15, (const char* name), (this, name)) 10 | }; 11 | 12 | class conCommandBase 13 | { 14 | public: 15 | void* vmt; 16 | conCommandBase* next; 17 | bool registered; 18 | const char* name; 19 | const char* helpString; 20 | int flags; 21 | conCommandBase* conCommandBases; 22 | void* accessor; 23 | }; -------------------------------------------------------------------------------- /Osiris/SDK/EngineTrace.cpp: -------------------------------------------------------------------------------- 1 | #include "EngineTrace.h" 2 | 3 | float HitGroup::getDamageMultiplier(int hitGroup, const WeaponInfo* weaponData, bool hasHeavyArmor, int teamNumber) noexcept 4 | { 5 | static auto mp_damage_scale_ct_head = interfaces->cvar->findVar("mp_damage_scale_ct_head"); 6 | static auto mp_damage_scale_t_head = interfaces->cvar->findVar("mp_damage_scale_t_head"); 7 | 8 | static auto mp_damage_scale_ct_body = interfaces->cvar->findVar("mp_damage_scale_ct_body"); 9 | static auto mp_damage_scale_t_body = interfaces->cvar->findVar("mp_damage_scale_t_body"); 10 | 11 | auto headScale = teamNumber == 3 ? mp_damage_scale_ct_head->getFloat() : mp_damage_scale_t_head->getFloat(); 12 | const auto bodyScale = teamNumber == 3 ? mp_damage_scale_ct_body->getFloat() : mp_damage_scale_t_body->getFloat(); 13 | 14 | if (hasHeavyArmor) 15 | headScale *= 0.5f; 16 | 17 | switch (hitGroup) { 18 | case Head: 19 | return weaponData->headshotMultiplier * headScale; 20 | case Stomach: 21 | return 1.25f * bodyScale; 22 | case LeftLeg: 23 | case RightLeg: 24 | return 0.75f * bodyScale; 25 | default: 26 | return bodyScale; 27 | } 28 | } 29 | 30 | bool HitGroup::isArmored(int hitGroup, bool helmet, int armorValue, bool hasHeavyArmor) noexcept 31 | { 32 | if (armorValue <= 0) 33 | return false; 34 | 35 | switch (hitGroup) { 36 | case Head: 37 | return helmet || hasHeavyArmor; 38 | 39 | case Chest: 40 | case Stomach: 41 | case LeftArm: 42 | case RightArm: 43 | return true; 44 | default: 45 | return hasHeavyArmor; 46 | } 47 | } -------------------------------------------------------------------------------- /Osiris/SDK/EntityList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class Entity; 6 | 7 | class EntityList { 8 | public: 9 | VIRTUAL_METHOD(Entity*, getEntity, 3, (int index), (this, index)) 10 | VIRTUAL_METHOD(Entity*, getEntityFromHandle, 4, (int handle), (this, handle)) 11 | VIRTUAL_METHOD(int, getHighestEntityIndex, 6, (), (this)) 12 | }; 13 | -------------------------------------------------------------------------------- /Osiris/SDK/FileSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class BaseFileSystem { 6 | public: 7 | VIRTUAL_METHOD(int, read, 0, (void* output, int size, void* handle), (this, output, size, handle)) 8 | VIRTUAL_METHOD(void*, open, 2, (const char* fileName, const char* options, const char* pathID), (this, fileName, options, pathID)) 9 | VIRTUAL_METHOD(void, close, 3, (void* handle), (this, handle)) 10 | VIRTUAL_METHOD(unsigned int, size, 7, (void* handle), (this, handle)) 11 | }; 12 | -------------------------------------------------------------------------------- /Osiris/SDK/FrameStage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class FrameStage { 4 | UNDEFINED = -1, 5 | START, 6 | NET_UPDATE_START, 7 | NET_UPDATE_POSTDATAUPDATE_START, 8 | NET_UPDATE_POSTDATAUPDATE_END, 9 | NET_UPDATE_END, 10 | RENDER_START, 11 | RENDER_END 12 | }; 13 | -------------------------------------------------------------------------------- /Osiris/SDK/GameEvent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UtlVector.h" 4 | #include "VirtualMethod.h" 5 | 6 | class GameEvent { 7 | public: 8 | VIRTUAL_METHOD_V(const char*, getName, 1, (), (this)) 9 | VIRTUAL_METHOD_V(int, getInt, 6, (const char* keyName, int defaultValue = 0), (this, keyName, defaultValue)) 10 | VIRTUAL_METHOD_V(float, getFloat, 8, (const char* keyName, float defaultValue = 0.0f), (this, keyName, defaultValue)) 11 | VIRTUAL_METHOD_V(const char*, getString, 9, (const char* keyName, const char* defaultValue = ""), (this, keyName, defaultValue)) 12 | VIRTUAL_METHOD_V(void, setInt, 13, (const char* keyName, int value), (this, keyName, value)) 13 | VIRTUAL_METHOD_V(void, setString, 16, (const char* keyName, const char* value), (this, keyName, value)) 14 | }; 15 | 16 | class GameEventListener { 17 | public: 18 | virtual ~GameEventListener() {} 19 | virtual void fireGameEvent(GameEvent* event) = 0; 20 | virtual int getEventDebugId() { return 42; } 21 | }; 22 | 23 | class KeyValues; 24 | 25 | class GameEventDescriptor { 26 | public: 27 | int eventid; 28 | int elementIndex; 29 | KeyValues* keys; 30 | UtlVector listeners; 31 | }; 32 | 33 | class GameEventManager { 34 | public: 35 | VIRTUAL_METHOD_V(bool, addListener, 3, (GameEventListener* listener, const char* name), (this, listener, name, false)) 36 | VIRTUAL_METHOD_V(void, removeListener, 5, (GameEventListener* listener), (this, listener)) 37 | }; 38 | -------------------------------------------------------------------------------- /Osiris/SDK/GameMovement.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class Entity; 6 | class MoveData 7 | { 8 | public: 9 | bool firstRunOfFunctions; 10 | bool gameCodeMovedPlayer; 11 | int playerHandle; 12 | int impulseCommand; 13 | Vector viewAngles; 14 | Vector absViewAngles; 15 | int buttons; 16 | int oldButtons; 17 | float forwardMove; 18 | float sideMove; 19 | float upMove; 20 | float maxSpeed; 21 | float clientMaxSpeed; 22 | Vector velocity; 23 | Vector angles; 24 | Vector oldAngles; 25 | float outStepHeight; 26 | Vector outWishVel; 27 | Vector outJumpVel; 28 | Vector constraintCenter; 29 | float constraintRadius; 30 | float constraintWidth; 31 | float constraintSpeedFactor; 32 | PAD(20) 33 | Vector absOrigin; 34 | }; 35 | 36 | class GameMovement { 37 | public: 38 | VIRTUAL_METHOD_V(void, processMovement, 1, (Entity* localPlayer, MoveData* moveData), (this, localPlayer, moveData)) 39 | VIRTUAL_METHOD(void, reset, 2, (), (this)) 40 | VIRTUAL_METHOD(void, startTrackPredictionErrors, 3, (Entity* localPlayer), (this, localPlayer)) 41 | VIRTUAL_METHOD(void, finishTrackPredictionErrors, 4, (Entity* localPlayer), (this, localPlayer)) 42 | VIRTUAL_METHOD(Vector&, getPlayerViewOffset, 8, (bool ducked), (this, ducked)) 43 | 44 | PAD(4) 45 | Entity* player; 46 | MoveData* moveData; 47 | int oldWaterLevel; 48 | float waterEntryTime; 49 | int onLadder; 50 | Vector vecForward; 51 | Vector vecRight; 52 | Vector vecUp; 53 | int cachedGetPointContents[64][3]; 54 | Vector cachedGetPointContentsPoint[64][3]; 55 | int speedCropped; 56 | bool processingMovement; 57 | bool inStuckTest; 58 | float stuckCheckTime[64 + 1][2]; 59 | void* traceListData; 60 | int traceCount; 61 | }; 62 | -------------------------------------------------------------------------------- /Osiris/SDK/GameUI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class GameUI { 6 | public: 7 | VIRTUAL_METHOD(void, createCommandMsgBox, 19, (const char* title, const char* message, bool showOk = true, bool showCancel = false, const char* okCommand = nullptr, const char* cancelCommand = nullptr, const char* closedCommand = nullptr, const char* legend = nullptr, const char* unknown = nullptr), (this, title, message, showOk, showCancel, okCommand, cancelCommand, closedCommand, legend, unknown)) 8 | }; 9 | -------------------------------------------------------------------------------- /Osiris/SDK/GlobalVars.cpp: -------------------------------------------------------------------------------- 1 | #include "../Interfaces.h" 2 | 3 | #include "GlobalVars.h" 4 | #include "UserCmd.h" 5 | #include "Engine.h" 6 | #include "Entity.h" 7 | #include "EntityList.h" 8 | 9 | float GlobalVars::serverTime(UserCmd* cmd) const noexcept 10 | { 11 | static int tick; 12 | static UserCmd* lastCmd; 13 | 14 | if (cmd) { 15 | if (localPlayer && (!lastCmd || lastCmd->hasbeenpredicted)) 16 | tick = localPlayer->tickBase(); 17 | else 18 | tick++; 19 | lastCmd = cmd; 20 | } 21 | return tick * intervalPerTick; 22 | } 23 | -------------------------------------------------------------------------------- /Osiris/SDK/GlobalVars.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Pad.h" 6 | 7 | struct UserCmd; 8 | 9 | struct GlobalVars { 10 | const float realtime; 11 | int framecount; 12 | const float absoluteFrameTime; 13 | PAD(4); 14 | float currenttime; 15 | float frametime; 16 | const int maxClients; 17 | int tickCount; 18 | const float intervalPerTick; 19 | 20 | float serverTime(UserCmd* = nullptr) const noexcept; 21 | }; 22 | -------------------------------------------------------------------------------- /Osiris/SDK/InputSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class InputSystem { 6 | public: 7 | VIRTUAL_METHOD(void, enableInput, 11, (bool enable), (this, enable)) 8 | VIRTUAL_METHOD(void, resetInputState, 39, (), (this)) 9 | }; 10 | -------------------------------------------------------------------------------- /Osiris/SDK/KeyValues.cpp: -------------------------------------------------------------------------------- 1 | #include "../Memory.h" 2 | 3 | #include "KeyValues.h" 4 | 5 | KeyValues* KeyValues::fromString(const char* name, const char* value) noexcept 6 | { 7 | const auto keyValuesFromString = memory->keyValuesFromString; 8 | KeyValues* keyValues; 9 | __asm { 10 | push 0 11 | mov edx, value 12 | mov ecx, name 13 | call keyValuesFromString 14 | add esp, 4 15 | mov keyValues, eax 16 | } 17 | return keyValues; 18 | } 19 | 20 | KeyValues* KeyValues::findKey(const char* keyName, bool create) noexcept 21 | { 22 | return memory->keyValuesFindKey(this, keyName, create); 23 | } 24 | 25 | void KeyValues::setString(const char* keyName, const char* value) noexcept 26 | { 27 | if (const auto key = findKey(keyName, true)) 28 | memory->keyValuesSetString(key, value); 29 | } 30 | -------------------------------------------------------------------------------- /Osiris/SDK/KeyValues.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KeyValues { 4 | public: 5 | static KeyValues* fromString(const char* name, const char* value) noexcept; 6 | KeyValues* findKey(const char* keyName, bool create) noexcept; 7 | void setString(const char* keyName, const char* value) noexcept; 8 | }; 9 | -------------------------------------------------------------------------------- /Osiris/SDK/LocalPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class Entity; 6 | 7 | class LocalPlayer { 8 | public: 9 | void init(Entity** entity) noexcept 10 | { 11 | assert(!localEntity); 12 | localEntity = entity; 13 | } 14 | 15 | constexpr operator bool() noexcept 16 | { 17 | assert(localEntity); 18 | return *localEntity != nullptr; 19 | } 20 | 21 | constexpr auto operator->() noexcept 22 | { 23 | assert(localEntity && *localEntity); 24 | return *localEntity; 25 | } 26 | 27 | constexpr auto get() noexcept 28 | { 29 | assert(localEntity && *localEntity); 30 | return *localEntity; 31 | } 32 | private: 33 | Entity** localEntity = nullptr; 34 | }; 35 | 36 | inline LocalPlayer localPlayer; 37 | -------------------------------------------------------------------------------- /Osiris/SDK/Localize.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "VirtualMethod.h" 6 | 7 | class Localize { 8 | public: 9 | VIRTUAL_METHOD(const wchar_t*, find, 11, (const char* tokenName), (this, tokenName)) 10 | VIRTUAL_METHOD(const wchar_t*, findSafe, 12, (const char* tokenName), (this, tokenName)) 11 | VIRTUAL_METHOD(int, convertAnsiToUnicode, 15, (const char* ansi, wchar_t* unicode, int unicodeBufferSizeInBytes), (this, ansi, unicode, unicodeBufferSizeInBytes)) 12 | VIRTUAL_METHOD(int, convertUnicodeToAnsi, 16, (const wchar_t* unicode, char* ansi, int ansiBufferSize), (this, unicode, ansi, ansiBufferSize)) 13 | VIRTUAL_METHOD(const char*, findAsUTF8, 47, (const char* tokenName), (this, tokenName)) 14 | 15 | std::string convertUnicodeToAnsi(const wchar_t* unicode) noexcept 16 | { 17 | char buffer[4096]; 18 | convertUnicodeToAnsi(unicode, buffer, sizeof(buffer)); 19 | return buffer; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /Osiris/SDK/MDLCache.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class MDLCache 6 | { 7 | public: 8 | VIRTUAL_METHOD(void, beginLock, 33, (), (this)) 9 | VIRTUAL_METHOD(void, endLock, 34, (), (this)) 10 | }; -------------------------------------------------------------------------------- /Osiris/SDK/Material.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "VirtualMethod.h" 6 | 7 | class MaterialVar { 8 | public: 9 | VIRTUAL_METHOD(void, setValue, 4, (float value), (this, value)) 10 | VIRTUAL_METHOD(void, setVectorValue, 11, (float x, float y, float z), (this, x, y, z)) 11 | VIRTUAL_METHOD(void, setVecComponentValue, 26, (float value, int component), (this, value, component)) 12 | }; 13 | 14 | enum class MaterialVarFlag { 15 | NO_DRAW = 1 << 2, 16 | IGNOREZ = 1 << 15, 17 | WIREFRAME = 1 << 28 18 | }; 19 | 20 | class Material { 21 | public: 22 | VIRTUAL_METHOD(const char*, getName, 0, (), (this)) 23 | VIRTUAL_METHOD(const char*, getTextureGroupName, 1, (), (this)) 24 | VIRTUAL_METHOD(MaterialVar*, findVar, 11, (const char* name, bool* found = nullptr, bool complain = true), (this, name, found, complain)) 25 | VIRTUAL_METHOD(void, incrementReferenceCount, 12, (), (this)) 26 | VIRTUAL_METHOD(void, decrementReferenceCount, 13, (), (this)) 27 | VIRTUAL_METHOD(void, alphaModulate, 27, (float alpha), (this, alpha)) 28 | VIRTUAL_METHOD(void, colorModulate, 28, (const std::array& color), (this, color[0], color[1], color[2])) 29 | VIRTUAL_METHOD(void, colorModulate, 28, (float r, float g, float b), (this, r, g, b)) 30 | VIRTUAL_METHOD(void, colorModulate, 28, (const std::tuple& color), (this, std::get<0>(color), std::get<1>(color), std::get<2>(color))) 31 | VIRTUAL_METHOD(void, setMaterialVarFlag, 29, (MaterialVarFlag flag, bool on), (this, flag, on)) 32 | VIRTUAL_METHOD(bool, isErrorMaterial, 42, (), (this)) 33 | VIRTUAL_METHOD(void, getColorModulation, 45, (float* r, float* g, float* b), (this, r, g, b)) 34 | VIRTUAL_METHOD(int, getReferenceCount, 56, (), (this)) 35 | VIRTUAL_METHOD(bool, isPrecached, 70, (), (this)) 36 | }; 37 | -------------------------------------------------------------------------------- /Osiris/SDK/MaterialSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class KeyValues; 6 | class Material; 7 | class RenderContext; 8 | 9 | class MaterialSystem { 10 | public: 11 | VIRTUAL_METHOD(Material*, createMaterial, 83, (const char* materialName, KeyValues* keyValues), (this, materialName, keyValues)) 12 | VIRTUAL_METHOD(Material*, findMaterial, 84, (const char* materialName, const char* textureGroupName = nullptr, bool complain = true, const char* complainPrefix = nullptr), (this, materialName, textureGroupName, complain, complainPrefix)) 13 | VIRTUAL_METHOD(short, firstMaterial, 86, (), (this)) 14 | VIRTUAL_METHOD(short, nextMaterial, 87, (short handle), (this, handle)) 15 | VIRTUAL_METHOD(short, invalidMaterial, 88, (), (this)) 16 | VIRTUAL_METHOD(Material*, getMaterial, 89, (short handle), (this, handle)) 17 | VIRTUAL_METHOD(RenderContext*, getRenderContext, 115, (), (this)) 18 | }; 19 | -------------------------------------------------------------------------------- /Osiris/SDK/ModelRender.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils.h" 4 | #include "Vector.h" 5 | 6 | class matrix3x4; 7 | 8 | struct Model { 9 | void* handle; 10 | char name[260]; 11 | int loadFlags; 12 | int serverCount; 13 | int type; 14 | int flags; 15 | Vector mins, maxs; 16 | }; 17 | 18 | struct ModelRenderInfo { 19 | Vector origin; 20 | Vector angles; 21 | char pad[4]; 22 | void* renderable; 23 | const Model* model; 24 | const matrix3x4* modelToWorld; 25 | const matrix3x4* lightingOffset; 26 | const Vector* lightingOrigin; 27 | int flags; 28 | int entityIndex; 29 | }; 30 | -------------------------------------------------------------------------------- /Osiris/SDK/MoveHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class Entity; 6 | 7 | class MoveHelper { 8 | public: 9 | VIRTUAL_METHOD(void, setHost, 1, (Entity* host), (this, host)) 10 | VIRTUAL_METHOD(void, processImpacts, 4, (), (this)) 11 | }; 12 | -------------------------------------------------------------------------------- /Osiris/SDK/NetworkMessage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class NetworkMessage 6 | { 7 | public: 8 | VIRTUAL_METHOD(int, getType, 7, (), (this)) 9 | }; 10 | -------------------------------------------------------------------------------- /Osiris/SDK/NetworkStringTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class NetworkStringTable { 6 | public: 7 | VIRTUAL_METHOD_V(int, addString, 8, (bool isServer, const char* value, int length = -1, const void* userdata = nullptr), (this, isServer, value, length, userdata)) 8 | }; 9 | 10 | class NetworkStringTableContainer { 11 | public: 12 | VIRTUAL_METHOD_V(NetworkStringTable*, findTable, 3, (const char* name), (this, name)) 13 | }; 14 | -------------------------------------------------------------------------------- /Osiris/SDK/Pad.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define CONCAT(a, b) a##b 6 | #define PAD_NAME(n) CONCAT(pad, n) 7 | 8 | #define PAD(size) \ 9 | private: \ 10 | std::byte PAD_NAME(__COUNTER__) [size]; \ 11 | public: 12 | -------------------------------------------------------------------------------- /Osiris/SDK/Panel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "VirtualMethod.h" 5 | 6 | class Panel { 7 | public: 8 | constexpr auto getName(unsigned int panel) noexcept 9 | { 10 | return std::string_view{ VirtualMethod::call(this, panel) }; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /Osiris/SDK/Panorama.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class UIPanel { 6 | public: 7 | VIRTUAL_METHOD_V(int, getChildCount, 48, (), (this)) 8 | VIRTUAL_METHOD_V(UIPanel*, getChild, 49, (int n), (this, n)) 9 | VIRTUAL_METHOD(bool, hasClass, 139, (const char* name), (this, name)) 10 | VIRTUAL_METHOD(void, setHasClass, 145, (const char* name, bool hasClass), (this, name, hasClass)) 11 | VIRTUAL_METHOD(float, getAttributeFloat, 278, (const char* name, float defaultValue), (this, name, defaultValue)) 12 | VIRTUAL_METHOD(void, setAttributeFloat, 288, (const char* name, float value), (this, name, value)) 13 | }; 14 | 15 | struct PanoramaEventRegistration { 16 | int numberOfArgs; 17 | PAD(4) 18 | void* (__cdecl* makeEvent)(void*); 19 | void* (__cdecl* createEventFromString)(void*, const char* args, const char** result); 20 | PAD(24) 21 | }; 22 | 23 | class UIEngine { 24 | public: 25 | VIRTUAL_METHOD_V(void, dispatchEvent, 52, (void* eventPtr), (this, eventPtr)) 26 | }; 27 | 28 | class PanoramaUIEngine { 29 | public: 30 | VIRTUAL_METHOD(UIEngine*, accessUIEngine, 11, (), (this)) 31 | }; 32 | -------------------------------------------------------------------------------- /Osiris/SDK/ParticleCollection.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | 5 | template struct UtlReference { 6 | UtlReference* next; 7 | UtlReference* prev; 8 | T* object; 9 | }; 10 | 11 | enum AttributeDataType { 12 | ATTRDATATYPE_NONE = -1, 13 | ATTRDATATYPE_FLOAT = 0, 14 | ATTRDATATYPE_4V, 15 | ATTRDATATYPE_INT, 16 | ATTRDATATYPE_POINTER, 17 | 18 | ATTRDATATYPE_COUNT, 19 | }; 20 | 21 | #define MAX_PARTICLE_ATTRIBUTES 24 22 | 23 | #define DEFPARTICLE_ATTRIBUTE( name, bit, datatype ) \ 24 | const int PARTICLE_ATTRIBUTE_##name##_MASK = (1 << bit); \ 25 | const int PARTICLE_ATTRIBUTE_##name = bit; \ 26 | const AttributeDataType PARTICLE_ATTRIBUTE_##name##_DATATYPE = datatype; 27 | 28 | DEFPARTICLE_ATTRIBUTE(TINT_RGB, 6, ATTRDATATYPE_4V); 29 | 30 | DEFPARTICLE_ATTRIBUTE(ALPHA, 7, ATTRDATATYPE_FLOAT); 31 | 32 | struct ParticleAttributeAddressTable { 33 | float* attributes[MAX_PARTICLE_ATTRIBUTES]; 34 | size_t floatStrides[MAX_PARTICLE_ATTRIBUTES]; 35 | 36 | FORCEINLINE float* FloatAttributePtr(int attribute, int particleNumber) const { 37 | int block_ofs = particleNumber / 4; 38 | return attributes[attribute] + 39 | floatStrides[attribute] * block_ofs + 40 | (particleNumber & 3); 41 | } 42 | 43 | }; 44 | 45 | struct UtlStringSimple { 46 | char* buffer; 47 | int capacity; 48 | int growSize; 49 | int length; 50 | }; 51 | 52 | class ParticleSystemDefinition { 53 | PAD(308) 54 | UtlStringSimple name; 55 | }; 56 | 57 | class ParticleCollection { 58 | PAD(48) 59 | int activeParticles; 60 | PAD(12) 61 | UtlReference def; 62 | PAD(60) 63 | ParticleCollection* parent; 64 | PAD(84) 65 | ParticleAttributeAddressTable particleAttributes; 66 | }; -------------------------------------------------------------------------------- /Osiris/SDK/PhysicsSurfaceProps.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | #include "VirtualMethod.h" 5 | 6 | struct SurfaceData { 7 | PAD(80) 8 | float maxspeedfactor; 9 | float jumpfactor; 10 | float penetrationmodifier; 11 | float damagemodifier; 12 | short material; 13 | bool climbable; 14 | }; 15 | 16 | class PhysicsSurfaceProps { 17 | public: 18 | VIRTUAL_METHOD_V(SurfaceData*, getSurfaceData, 5, (int index), (this, index)) 19 | }; 20 | -------------------------------------------------------------------------------- /Osiris/SDK/Platform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define LINUX_ARGS(...) 4 | #define RETURN_ADDRESS() std::uintptr_t(_ReturnAddress()) 5 | #define FRAME_ADDRESS() (std::uintptr_t(_AddressOfReturnAddress()) - sizeof(std::uintptr_t)) 6 | #define IS_WIN32() true 7 | #define WIN32_LINUX(win32, linux) win32 8 | 9 | constexpr auto CLIENT_DLL = "client"; 10 | constexpr auto SERVER_DLL = "server"; 11 | constexpr auto ENGINE_DLL = "engine"; 12 | constexpr auto FILESYSTEM_DLL = "filesystem_stdio"; 13 | constexpr auto INPUTSYSTEM_DLL = "inputsystem"; 14 | constexpr auto LOCALIZE_DLL = "localize"; 15 | constexpr auto MATERIALSYSTEM_DLL = "materialsystem"; 16 | constexpr auto PANORAMA_DLL = "panorama"; 17 | constexpr auto SOUNDEMITTERSYSTEM_DLL = "soundemittersystem"; 18 | constexpr auto STEAMNETWORKINGSOCKETS_DLL = "steamnetworkingsockets"; 19 | constexpr auto STUDIORENDER_DLL = "studiorender"; 20 | constexpr auto TIER0_DLL = "tier0"; 21 | constexpr auto DATACACHE_DLL = "datacache"; 22 | constexpr auto VGUI2_DLL = "vgui2"; 23 | constexpr auto VGUIMATSURFACE_DLL = "vguimatsurface"; 24 | constexpr auto VPHYSICS_DLL = "vphysics"; 25 | constexpr auto VSTDLIB_DLL = "vstdlib"; 26 | -------------------------------------------------------------------------------- /Osiris/SDK/PlayerResource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "../Netvars.h" 5 | #include "VirtualMethod.h" 6 | 7 | struct Vector; 8 | 9 | class IPlayerResource { 10 | public: 11 | VIRTUAL_METHOD_V(bool, isAlive, 5, (int index), (this, index)) 12 | VIRTUAL_METHOD_V(const char*, getPlayerName, 8, (int index), (this, index)) 13 | VIRTUAL_METHOD_V(int, getPlayerHealth, 14, (int index), (this, index)) 14 | }; 15 | 16 | class PlayerResource { 17 | public: 18 | auto getIPlayerResource() noexcept 19 | { 20 | return reinterpret_cast(uintptr_t(this) + 0x9D8); 21 | } 22 | 23 | NETVAR(bombsiteCenterA, "CCSPlayerResource", "m_bombsiteCenterA", Vector) 24 | NETVAR(bombsiteCenterB, "CCSPlayerResource", "m_bombsiteCenterB", Vector) 25 | NETVAR(armor, "CCSPlayerResource", "m_iArmor", int[65]) 26 | NETVAR(competitiveRanking, "CCSPlayerResource", "m_iCompetitiveRanking", int[65]) 27 | NETVAR(competitiveWins, "CCSPlayerResource", "m_iCompetitiveWins", int[65]) 28 | NETVAR(kills, "CCSPlayerResource", "m_iKills", int[65]) 29 | NETVAR(assists, "CCSPlayerResource", "m_iAssists", int[65]) 30 | NETVAR(deaths, "CCSPlayerResource", "m_iDeaths", int[65]) 31 | NETVAR(ping, "CCSPlayerResource", "m_iPing", int[65]) 32 | NETVAR(playerC4Index, "CCSPlayerResource", "m_iPlayerC4", int) 33 | 34 | const char* getClan(int idx) noexcept 35 | { 36 | if (!this) 37 | return nullptr; 38 | static auto m_szClan = Netvars::get(fnv::hash("CCSPlayerResource->m_szClan")); 39 | return reinterpret_cast(reinterpret_cast(this) + m_szClan + (idx * 16)); 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /Osiris/SDK/Prediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | #include "VirtualMethod.h" 5 | 6 | class Entity; 7 | class MoveData; 8 | class MoveHelper; 9 | struct UserCmd; 10 | 11 | class Prediction { 12 | public: 13 | PAD(4); 14 | std::uintptr_t lastGround; 15 | bool inPrediction; 16 | bool oldCLPredictValue; 17 | bool isFirstTimePredicted; 18 | bool enginePaused; 19 | int previousStartFrame; 20 | int incomingPacketNumber; 21 | float lastServerWorldTimeStamp; 22 | 23 | struct Split 24 | { 25 | bool isFirstTimePredicted; 26 | PAD(3) 27 | int commandsPredicted; 28 | int serverCommandsAcknowledged; 29 | int previousAckHadErrors; 30 | float idealPitch; 31 | int lastCommandAcknowledged; 32 | bool previousAckErrorTriggersFullLatchReset; 33 | UtlVector vecEntitiesWithPredictionErrorsInLastAck; 34 | bool performedTickShift; 35 | }; 36 | 37 | Split split[1]; 38 | 39 | VIRTUAL_METHOD_V(void, update, 3, (int startFrame, bool validFrame, int incAck, int outCmd), (this, startFrame, validFrame, incAck, outCmd)) 40 | VIRTUAL_METHOD_V(void, checkMovingGround, 18, (Entity* localPlayer, double frameTime), (this, localPlayer, frameTime)) 41 | VIRTUAL_METHOD_V(void, setupMove, 20, (Entity* localPlayer, UserCmd* cmd, MoveHelper* moveHelper, MoveData* moveData), (this, localPlayer, cmd, moveHelper, moveData)) 42 | VIRTUAL_METHOD_V(void, finishMove, 21, (Entity* localPlayer, UserCmd* cmd, MoveData* moveData), (this, localPlayer, cmd, moveData)) 43 | }; 44 | -------------------------------------------------------------------------------- /Osiris/SDK/PredictionCopy.cpp: -------------------------------------------------------------------------------- 1 | #include "../Memory.h" 2 | 3 | #include "PredictionCopy.h" 4 | 5 | PredictionCopy::PredictionCopy(int type, byte* dest, bool dest_packed, const byte* src, bool src_packed, optype_t opType, FN_FIELD_COMPARE func) noexcept 6 | { 7 | this->opType = opType; 8 | this->type = type; 9 | this->dest = dest; 10 | this->src = src; 11 | destOffsetIndex = dest_packed ? TD_OFFSET_PACKED : TD_OFFSET_NORMAL; 12 | srcOffsetIndex = src_packed ? TD_OFFSET_PACKED : TD_OFFSET_NORMAL; 13 | 14 | errorCount = 0; 15 | entIndex = -1; 16 | 17 | watchField = NULL; 18 | fieldCompareFunc = func; 19 | } 20 | 21 | int PredictionCopy::transferData(const char* operation, int entindex, datamap* dmap) noexcept 22 | { 23 | return memory->transferData(this, operation, entindex, dmap); 24 | } -------------------------------------------------------------------------------- /Osiris/SDK/PredictionCopy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "Datamap.h" 5 | 6 | typedef unsigned char byte; 7 | 8 | typedef void (*FN_FIELD_COMPARE)(const char* classname, const char* fieldname, const char* fieldtype, 9 | bool networked, bool noterrorchecked, bool differs, bool withintolerance, const char* value); 10 | 11 | enum 12 | { 13 | SLOT_ORIGINALDATA = -1, 14 | }; 15 | 16 | class PredictionCopy 17 | { 18 | public: 19 | typedef enum 20 | { 21 | DIFFERS = 0, 22 | IDENTICAL, 23 | WITHINTOLERANCE, 24 | } difftype_t; 25 | 26 | typedef enum 27 | { 28 | TRANSFERDATA_COPYONLY = 0, // Data copying only (uses runs) 29 | TRANSFERDATA_ERRORCHECK_NOSPEW, // Checks for errors, returns after first error found 30 | TRANSFERDATA_ERRORCHECK_SPEW, // checks for errors, reports all errors to console 31 | TRANSFERDATA_ERRORCHECK_DESCRIBE, // used by hud_pdump, dumps values, etc, for all fields 32 | } optype_t; 33 | 34 | PredictionCopy(int type, byte* dest, bool dest_packed, const byte* src, bool src_packed, 35 | optype_t opType, FN_FIELD_COMPARE func = NULL) noexcept; 36 | 37 | int transferData(const char* operation, int entindex, datamap* dmap) noexcept; 38 | private: 39 | optype_t opType; 40 | int type; 41 | void* dest; 42 | const void* src; 43 | int destOffsetIndex; 44 | int srcOffsetIndex; 45 | int errorCount; 46 | int entIndex; 47 | 48 | FN_FIELD_COMPARE fieldCompareFunc; 49 | 50 | const typedescription_t* watchField; 51 | char const* operation; 52 | 53 | std::stack< const typedescription_t* > fieldStack; 54 | }; -------------------------------------------------------------------------------- /Osiris/SDK/Recv.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "Platform.h" 7 | #include "Vector.h" 8 | 9 | struct RecvProp; 10 | 11 | struct recvProxyData { 12 | const RecvProp* recvProp; 13 | union { 14 | float _float; 15 | long _int; 16 | char* _string; 17 | void* data; 18 | Vector vector; 19 | int64_t int64; 20 | } value; 21 | }; 22 | 23 | using recvProxy = std::add_pointer_t; 24 | 25 | struct RecvProp { 26 | char* name; 27 | int type; 28 | int flags; 29 | int stringBufferSize; 30 | int insideArray; 31 | const void* extraData; 32 | RecvProp* arrayProp; 33 | void* arrayLengthProxy; 34 | recvProxy proxy; 35 | void* dataTableProxy; 36 | struct RecvTable* dataTable; 37 | int offset; 38 | int elementStride; 39 | int elementCount; 40 | const char* parentArrayPropName; 41 | }; 42 | 43 | struct RecvTable { 44 | RecvProp* props; 45 | int propCount; 46 | void* decoder; 47 | char* netTableName; 48 | bool isInitialized; 49 | bool isInMainList; 50 | }; 51 | -------------------------------------------------------------------------------- /Osiris/SDK/RenderContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "VirtualMethod.h" 6 | 7 | class RenderContext { 8 | public: 9 | VIRTUAL_METHOD(void, release, 1, (), (this)) 10 | VIRTUAL_METHOD(void, beginRender, 2, (), (this)) 11 | VIRTUAL_METHOD(void, endRender, 3, (), (this)) 12 | VIRTUAL_METHOD(void, getViewport, 41, (int& x, int& y, int& width, int& height), (this, std::ref(x), std::ref(y), std::ref(width), std::ref(height))) 13 | }; 14 | -------------------------------------------------------------------------------- /Osiris/SDK/RenderView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class RenderView { 6 | public: 7 | 8 | VIRTUAL_METHOD(void, setBlend, 4, (float alpha), (this, alpha)) 9 | VIRTUAL_METHOD(void, setColorModulation, 6, (const float* colors), (this, colors)) 10 | 11 | void setColorModulation(float r, float g, float b) noexcept 12 | { 13 | float color[3]{ r, g, b }; 14 | setColorModulation(color); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /Osiris/SDK/Server.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | struct ServerClass 6 | { 7 | public: 8 | const char* networkName; 9 | void** table; 10 | ServerClass* next; 11 | int classID; 12 | int instanceBaselineIndex; 13 | }; 14 | 15 | class Server 16 | { 17 | public: 18 | VIRTUAL_METHOD(ServerClass*, getAllServerClasses, 10, (), (this)) 19 | }; 20 | -------------------------------------------------------------------------------- /Osiris/SDK/Sound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | #include "Vector.h" 5 | 6 | struct ActiveChannels { 7 | int count; 8 | short list[128]; 9 | }; 10 | 11 | struct Channel { 12 | PAD(244) 13 | int soundSource; 14 | PAD(56) 15 | Vector origin; 16 | Vector direction; 17 | PAD(80) 18 | }; 19 | -------------------------------------------------------------------------------- /Osiris/SDK/SoundEmitter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | class SoundEmitter { 6 | public: 7 | VIRTUAL_METHOD(const char*, getSoundName, 46, (int index), (this, index)) 8 | }; 9 | -------------------------------------------------------------------------------- /Osiris/SDK/SoundInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | #include "Platform.h" 5 | 6 | struct SoundInfo { 7 | PAD(40) 8 | float volume; 9 | PAD(12) 10 | int entityIndex; 11 | int channel; 12 | int pitch; 13 | int flags; 14 | int soundIndex; 15 | }; 16 | -------------------------------------------------------------------------------- /Osiris/SDK/Steam.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "VirtualMethod.h" 6 | 7 | class SteamFriends { 8 | public: 9 | VIRTUAL_METHOD(int, getSmallFriendAvatar, 34, (std::uint64_t steamID), (this, steamID)) 10 | }; 11 | 12 | class SteamUtils { 13 | public: 14 | VIRTUAL_METHOD(bool, getImageRGBA, 6, (int image, std::uint8_t* buff, int buffSize), (this, image, buff, buffSize)) 15 | }; 16 | 17 | struct SteamAPIContext { 18 | void* steamClient; 19 | void* steamUser; 20 | SteamFriends* steamFriends; 21 | SteamUtils* steamUtils; 22 | }; 23 | -------------------------------------------------------------------------------- /Osiris/SDK/StudioRender.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "Material.h" 7 | #include "VirtualMethod.h" 8 | 9 | enum class OverrideType { 10 | Normal = 0, 11 | BuildShadows, 12 | DepthWrite, 13 | CustomMaterial, // weapon skins 14 | SsaoDepthWrite 15 | }; 16 | 17 | class StudioRender { 18 | std::byte pad_0[592]; 19 | Material* materialOverride; 20 | std::byte pad_1[12]; 21 | OverrideType overrideType; 22 | public: 23 | VIRTUAL_METHOD(void, forcedMaterialOverride, 33, (Material* material, OverrideType type = OverrideType::Normal, int index = -1), (this, material, type, index)) 24 | 25 | bool isForcedMaterialOverride() noexcept 26 | { 27 | if (!materialOverride) 28 | return overrideType == OverrideType::DepthWrite || overrideType == OverrideType::SsaoDepthWrite; // see CStudioRenderContext::IsForcedMaterialOverride 29 | return std::string_view{ materialOverride->getName() }.starts_with("dev/glow"); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /Osiris/SDK/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "../SDK/GlobalVars.h" 7 | 8 | #include "../Memory.h" 9 | 10 | class matrix3x4; 11 | 12 | static auto timeToTicks(float time) noexcept { return static_cast(0.5f + time / memory->globalVars->intervalPerTick); } 13 | static auto ticksToTime(int ticks) noexcept { return static_cast(ticks * memory->globalVars->intervalPerTick); } 14 | 15 | std::tuple rainbowColor(float speed) noexcept; 16 | 17 | void resetMatrix(Entity* entity, matrix3x4* boneCacheData, Vector origin, Vector absAngle, Vector mins, Vector maxs) noexcept; 18 | 19 | int getMaxUserCmdProcessTicks() noexcept; 20 | 21 | enum class GameMode 22 | { 23 | None, 24 | Casual, 25 | Competitive, 26 | Wingman, 27 | WeaponsExpert, 28 | ArmsRace, 29 | Demolition, 30 | Deathmatch, 31 | Training, 32 | Custom, 33 | Guardian, 34 | CoopStrike, 35 | WarGames, 36 | DangerZone 37 | }; 38 | 39 | 40 | GameMode getGameMode() noexcept; 41 | 42 | #define maxUserCmdProcessTicks getMaxUserCmdProcessTicks() -------------------------------------------------------------------------------- /Osiris/SDK/UtlVector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | template 4 | class UtlVector { 5 | public: 6 | constexpr T& operator[](int i) noexcept { return memory[i]; } 7 | constexpr const T& operator[](int i) const noexcept { return memory[i]; } 8 | 9 | T* memory; 10 | int allocationCount; 11 | int growSize; 12 | int size; 13 | T* elements; 14 | }; -------------------------------------------------------------------------------- /Osiris/SDK/VarMapping.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UtlVector.h" 4 | 5 | struct VarEntry { 6 | unsigned short type; 7 | unsigned short needsToInterpolate; 8 | std::byte pad[8]; 9 | }; 10 | 11 | struct VarMap { 12 | UtlVector entries; 13 | int interpolatedEntries; 14 | }; 15 | -------------------------------------------------------------------------------- /Osiris/SDK/ViewSetup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Vector.h" 4 | #include "Pad.h" 5 | 6 | struct ViewSetup { 7 | PAD(172); 8 | void* csm; 9 | float fov; 10 | PAD(4); 11 | Vector origin; 12 | Vector angles; 13 | PAD(4); 14 | float farZ; 15 | PAD(8) 16 | float aspectRatio; 17 | }; 18 | -------------------------------------------------------------------------------- /Osiris/SDK/VirtualMethod.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Platform.h" 6 | 7 | namespace VirtualMethod 8 | { 9 | template 10 | constexpr T call(void* classBase, Args... args) noexcept 11 | { 12 | return (*reinterpret_cast(classBase))[Idx](classBase, args...); 13 | } 14 | } 15 | 16 | #define VIRTUAL_METHOD(returnType, name, idx, args, argsRaw) \ 17 | returnType name args noexcept \ 18 | { \ 19 | return VirtualMethod::callargsRaw; \ 20 | } 21 | 22 | #define VIRTUAL_METHOD_V(returnType, name, idx, args, argsRaw) VIRTUAL_METHOD(returnType, name, idx, args, argsRaw) 23 | -------------------------------------------------------------------------------- /Osiris/SDK/WeaponData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Pad.h" 4 | 5 | enum class WeaponType { 6 | Knife = 0, 7 | Pistol, 8 | SubMachinegun, 9 | Rifle, 10 | Shotgun, 11 | SniperRifle, 12 | Machinegun, 13 | C4, 14 | Placeholder, 15 | Grenade, 16 | Unknown, 17 | StackableItem, 18 | Fists, 19 | BreachCharge, 20 | BumpMine, 21 | Tablet, 22 | Melee 23 | }; 24 | 25 | struct WeaponInfo { 26 | PAD(20) 27 | int maxClip; 28 | PAD(112) 29 | const char* name; 30 | PAD(60) 31 | WeaponType type; 32 | PAD(4) 33 | int price; 34 | PAD(8) 35 | float cycletime; 36 | PAD(12) 37 | bool fullAuto; 38 | PAD(3) 39 | int damage; 40 | float headshotMultiplier; 41 | float armorRatio; 42 | int bullets; 43 | float penetration; 44 | PAD(8) 45 | float range; 46 | float rangeModifier; 47 | PAD(16) 48 | bool silencer; 49 | PAD(15) 50 | float maxSpeed; 51 | float maxSpeedAlt; 52 | PAD(100) 53 | float recoilMagnitude; 54 | float recoilMagnitudeAlt; 55 | PAD(16) 56 | float recoveryTimeStand; 57 | }; 58 | -------------------------------------------------------------------------------- /Osiris/SDK/WeaponSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "VirtualMethod.h" 4 | 5 | enum class WeaponId : short; 6 | struct WeaponInfo; 7 | 8 | class WeaponSystem { 9 | public: 10 | VIRTUAL_METHOD(WeaponInfo*, getWeaponInfo, 2, (WeaponId weaponId), (this, weaponId)) 11 | }; 12 | -------------------------------------------------------------------------------- /Osiris/SDK/checksum_crc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef unsigned long CRC32_t; 4 | 5 | void CRC32_Init( CRC32_t* pulCRC ); 6 | 7 | void CRC32_ProcessBuffer( CRC32_t* pulCRC, const void* p, int len ); 8 | 9 | void CRC32_Final( CRC32_t* pulCRC ); 10 | 11 | CRC32_t CRC32_GetTableEntry( unsigned int slot ); 12 | 13 | inline CRC32_t CRC32_ProcessSingleBuffer( const void* p, int len ) 14 | { 15 | CRC32_t crc; 16 | 17 | CRC32_Init( &crc ); 18 | CRC32_ProcessBuffer( &crc, p, len ); 19 | CRC32_Final( &crc ); 20 | 21 | return crc; 22 | } 23 | -------------------------------------------------------------------------------- /Osiris/SDK/matrix3x4.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct Vector; 4 | 5 | class matrix3x4 { 6 | float mat[3][4]; 7 | public: 8 | constexpr auto operator[](int i) const noexcept { return mat[i]; } 9 | auto operator[](int i) noexcept { return mat[i]; } 10 | constexpr auto origin() const noexcept; 11 | }; 12 | 13 | #include "Vector.h" 14 | 15 | constexpr auto matrix3x4::origin() const noexcept 16 | { 17 | return Vector{ mat[0][3], mat[1][3], mat[2][3] }; 18 | } 19 | -------------------------------------------------------------------------------- /Osiris/Texture.cpp: -------------------------------------------------------------------------------- 1 | #include "Texture.h" 2 | 3 | #include "imgui/imgui_impl_dx9.h" 4 | 5 | void Texture::init(int width, int height, const std::uint8_t* data) noexcept 6 | { 7 | texture = ImGui_CreateTextureRGBA(width, height, data); 8 | } 9 | 10 | void Texture::clear() noexcept 11 | { 12 | if (texture) 13 | ImGui_DestroyTexture(texture); 14 | texture = nullptr; 15 | } 16 | -------------------------------------------------------------------------------- /Osiris/Texture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using ImTextureID = void*; 6 | 7 | class Texture { 8 | ImTextureID texture = nullptr; 9 | public: 10 | Texture() = default; 11 | ~Texture() { clear(); } 12 | Texture(const Texture&) = delete; 13 | Texture& operator=(const Texture&) = delete; 14 | Texture(Texture&& other) noexcept : texture{ other.texture } { other.texture = nullptr; } 15 | Texture& operator=(Texture&& other) noexcept { clear(); texture = other.texture; other.texture = nullptr; return *this; } 16 | 17 | void init(int width, int height, const std::uint8_t* data) noexcept; 18 | void clear() noexcept; 19 | ImTextureID get() noexcept { return texture; } 20 | }; 21 | -------------------------------------------------------------------------------- /Osiris/Threading.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "Memory.h" 6 | 7 | /* 8 | The function must be __cdecl otherwise it could crash or return garbage 9 | Example of creating a thread 10 | threadObject.createThread(&function, arguments); 11 | Example of usage: 12 | Thread funtionTest; 13 | funtionTest.createThread(&function, (char*)"b"); 14 | funtionTest.releaseThread(); 15 | */ 16 | 17 | class Thread 18 | { 19 | public: 20 | Thread() noexcept { } 21 | 22 | template 23 | void createThread(void* function, Args... args) noexcept 24 | { 25 | currentThread = memory->createSimpleThread(function, args..., 0U); 26 | } 27 | 28 | void releaseThread() noexcept 29 | { 30 | if (currentThread) 31 | memory->releaseThreadHandle(currentThread); 32 | } 33 | 34 | void* getThreadHandle() noexcept 35 | { 36 | return currentThread; 37 | } 38 | 39 | private: 40 | void* currentThread = nullptr; 41 | }; -------------------------------------------------------------------------------- /Osiris/Vertex.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "includes.hpp" 3 | #include "Vector2D.hpp" 4 | struct Vertex_t { 5 | //Vertex_t() { }; 6 | 7 | Vector2D m_Position; 8 | Vector2D m_TexCoord; 9 | void Vertex_t1(const Vector2D pos, const Vector2D& coord = Vector2D(0, 0)) { //-V818 10 | m_Position = pos; 11 | m_TexCoord = coord; 12 | }; 13 | void Init(const Vector2D pos, const Vector2D& coord = Vector2D(0, 0)) { 14 | m_Position = pos; 15 | m_TexCoord = coord; 16 | }; 17 | }; -------------------------------------------------------------------------------- /Osiris/fnv.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MIT License 4 | 5 | Copyright (c) 2019 Daniel Krupiński 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | */ 26 | 27 | #pragma once 28 | 29 | #include 30 | 31 | namespace fnv { 32 | constexpr uint32_t offsetBasis = 0x811c9dc5; 33 | constexpr uint32_t prime = 0x1000193; 34 | 35 | constexpr uint32_t hash(const char* str, const uint32_t value = offsetBasis) noexcept 36 | { 37 | return *str ? hash(str + 1, (value ^ *str) * static_cast(prime)) : value; 38 | } 39 | 40 | constexpr uint32_t hashRuntime(const char* str) noexcept 41 | { 42 | auto value = offsetBasis; 43 | 44 | while (*str) { 45 | value ^= *str++; 46 | value *= prime; 47 | } 48 | return value; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/config/ftconfig.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftconfig.h 4 | * 5 | * ANSI-specific configuration file (specification only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This header file contains a number of macro definitions that are used by 22 | * the rest of the engine. Most of the macros here are automatically 23 | * determined at compile time, and you should not need to change it to port 24 | * FreeType, except to compile the library with a non-ANSI compiler. 25 | * 26 | * Note however that if some specific modifications are needed, we advise 27 | * you to place a modified copy in your build directory. 28 | * 29 | * The build directory is usually `builds/`, and contains 30 | * system-specific files that are always included first when building the 31 | * library. 32 | * 33 | * This ANSI version should stay in `include/config/`. 34 | * 35 | */ 36 | 37 | #ifndef FTCONFIG_H_ 38 | #define FTCONFIG_H_ 39 | 40 | #include 41 | #include FT_CONFIG_OPTIONS_H 42 | #include FT_CONFIG_STANDARD_LIBRARY_H 43 | 44 | #include 45 | #include 46 | #include 47 | 48 | #endif /* FTCONFIG_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/`) based on information 6 | * from `/modules.cfg`. 7 | * 8 | * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | //FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 29 | 30 | /* EOF */ 31 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/config/mac-support.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/mac-support.h 4 | * 5 | * Mac/OS X support configuration header. 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | #ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_ 18 | #define FREETYPE_CONFIG_MAC_SUPPORT_H_ 19 | 20 | /************************************************************************** 21 | * 22 | * Mac support 23 | * 24 | * This is the only necessary change, so it is defined here instead 25 | * providing a new configuration file. 26 | */ 27 | #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) 28 | /* No Carbon frameworks for 64bit 10.4.x. */ 29 | /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ 30 | /* so guess the system version by maximum errno before inclusion. */ 31 | #include 32 | #ifdef ECANCELED /* defined since 10.2 */ 33 | #include "AvailabilityMacros.h" 34 | #endif 35 | #if defined( __LP64__ ) && \ 36 | ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) 37 | #undef FT_MACINTOSH 38 | #endif 39 | 40 | #elif defined( __SC__ ) || defined( __MRC__ ) 41 | /* Classic MacOS compilers */ 42 | #include "ConditionalMacros.h" 43 | #if TARGET_OS_MAC 44 | #define FT_MACINTOSH 1 45 | #endif 46 | 47 | #endif /* Mac support */ 48 | 49 | #endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */ 50 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/ftpsprop.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftpsprop.h 4 | * 5 | * Get and set properties of PostScript drivers (specification). 6 | * 7 | * Copyright (C) 2017-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTPSPROP_H_ 20 | #define FTPSPROP_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_BASE_CALLBACK( FT_Error ) 30 | ps_property_set( FT_Module module, /* PS_Driver */ 31 | const char* property_name, 32 | const void* value, 33 | FT_Bool value_is_string ); 34 | 35 | FT_BASE_CALLBACK( FT_Error ) 36 | ps_property_get( FT_Module module, /* PS_Driver */ 37 | const char* property_name, 38 | void* value ); 39 | 40 | 41 | FT_END_HEADER 42 | 43 | 44 | #endif /* FTPSPROP_H_ */ 45 | 46 | 47 | /* END */ 48 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svbdf.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svbdf.h 4 | * 5 | * The FreeType BDF services (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVBDF_H_ 20 | #define SVBDF_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_BDF "bdf" 30 | 31 | typedef FT_Error 32 | (*FT_BDF_GetCharsetIdFunc)( FT_Face face, 33 | const char* *acharset_encoding, 34 | const char* *acharset_registry ); 35 | 36 | typedef FT_Error 37 | (*FT_BDF_GetPropertyFunc)( FT_Face face, 38 | const char* prop_name, 39 | BDF_PropertyRec *aproperty ); 40 | 41 | 42 | FT_DEFINE_SERVICE( BDF ) 43 | { 44 | FT_BDF_GetCharsetIdFunc get_charset_id; 45 | FT_BDF_GetPropertyFunc get_property; 46 | }; 47 | 48 | 49 | #define FT_DEFINE_SERVICE_BDFRec( class_, \ 50 | get_charset_id_, \ 51 | get_property_ ) \ 52 | static const FT_Service_BDFRec class_ = \ 53 | { \ 54 | get_charset_id_, get_property_ \ 55 | }; 56 | 57 | /* */ 58 | 59 | 60 | FT_END_HEADER 61 | 62 | 63 | #endif /* SVBDF_H_ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svfntfmt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svfntfmt.h 4 | * 5 | * The FreeType font format service (specification only). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVFNTFMT_H_ 20 | #define SVFNTFMT_H_ 21 | 22 | #include 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data is a 31 | * simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_FONT_FORMAT "font-format" 35 | 36 | #define FT_FONT_FORMAT_TRUETYPE "TrueType" 37 | #define FT_FONT_FORMAT_TYPE_1 "Type 1" 38 | #define FT_FONT_FORMAT_BDF "BDF" 39 | #define FT_FONT_FORMAT_PCF "PCF" 40 | #define FT_FONT_FORMAT_TYPE_42 "Type 42" 41 | #define FT_FONT_FORMAT_CID "CID Type 1" 42 | #define FT_FONT_FORMAT_CFF "CFF" 43 | #define FT_FONT_FORMAT_PFR "PFR" 44 | #define FT_FONT_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* SVFNTFMT_H_ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svgldict.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svgldict.h 4 | * 5 | * The FreeType glyph dictionary services (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVGLDICT_H_ 20 | #define SVGLDICT_H_ 21 | 22 | #include 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A service used to retrieve glyph names, as well as to find the index of 30 | * a given glyph name in a font. 31 | * 32 | */ 33 | 34 | #define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 35 | 36 | 37 | typedef FT_Error 38 | (*FT_GlyphDict_GetNameFunc)( FT_Face face, 39 | FT_UInt glyph_index, 40 | FT_Pointer buffer, 41 | FT_UInt buffer_max ); 42 | 43 | typedef FT_UInt 44 | (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 45 | const FT_String* glyph_name ); 46 | 47 | 48 | FT_DEFINE_SERVICE( GlyphDict ) 49 | { 50 | FT_GlyphDict_GetNameFunc get_name; 51 | FT_GlyphDict_NameIndexFunc name_index; /* optional */ 52 | }; 53 | 54 | 55 | #define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ 56 | get_name_, \ 57 | name_index_ ) \ 58 | static const FT_Service_GlyphDictRec class_ = \ 59 | { \ 60 | get_name_, name_index_ \ 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* SVGLDICT_H_ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svgxval.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svgxval.h 4 | * 5 | * FreeType API for validating TrueTypeGX/AAT tables (specification). 6 | * 7 | * Copyright (C) 2004-2020 by 8 | * Masatake YAMATO, Red Hat K.K., 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | /**************************************************************************** 20 | * 21 | * gxvalid is derived from both gxlayout module and otvalid module. 22 | * Development of gxlayout is supported by the Information-technology 23 | * Promotion Agency(IPA), Japan. 24 | * 25 | */ 26 | 27 | 28 | #ifndef SVGXVAL_H_ 29 | #define SVGXVAL_H_ 30 | 31 | #include 32 | #include 33 | 34 | FT_BEGIN_HEADER 35 | 36 | 37 | #define FT_SERVICE_ID_GX_VALIDATE "truetypegx-validate" 38 | #define FT_SERVICE_ID_CLASSICKERN_VALIDATE "classickern-validate" 39 | 40 | typedef FT_Error 41 | (*gxv_validate_func)( FT_Face face, 42 | FT_UInt gx_flags, 43 | FT_Bytes tables[FT_VALIDATE_GX_LENGTH], 44 | FT_UInt table_length ); 45 | 46 | 47 | typedef FT_Error 48 | (*ckern_validate_func)( FT_Face face, 49 | FT_UInt ckern_flags, 50 | FT_Bytes *ckern_table ); 51 | 52 | 53 | FT_DEFINE_SERVICE( GXvalidate ) 54 | { 55 | gxv_validate_func validate; 56 | }; 57 | 58 | FT_DEFINE_SERVICE( CKERNvalidate ) 59 | { 60 | ckern_validate_func validate; 61 | }; 62 | 63 | /* */ 64 | 65 | 66 | FT_END_HEADER 67 | 68 | 69 | #endif /* SVGXVAL_H_ */ 70 | 71 | 72 | /* END */ 73 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svkern.h 4 | * 5 | * The FreeType Kerning service (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVKERN_H_ 20 | #define SVKERN_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* SVKERN_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svotval.h 4 | * 5 | * The FreeType OpenType validation service (specification). 6 | * 7 | * Copyright (C) 2004-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVOTVAL_H_ 20 | #define SVOTVAL_H_ 21 | 22 | #include 23 | #include 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* SVOTVAL_H_ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svpfr.h 4 | * 5 | * Internal PFR service functions (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVPFR_H_ 20 | #define SVPFR_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | 60 | FT_END_HEADER 61 | 62 | #endif /* SVPFR_H_ */ 63 | 64 | 65 | /* END */ 66 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svpostnm.h 4 | * 5 | * The FreeType PostScript name services (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVPOSTNM_H_ 20 | #define SVPOSTNM_H_ 21 | 22 | #include 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given font 29 | * when available. The `get_name' field should never be `NULL`. 30 | * 31 | * The corresponding function can return `NULL` to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | 50 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ 51 | static const FT_Service_PsFontNameRec class_ = \ 52 | { \ 53 | get_ps_font_name_ \ 54 | }; 55 | 56 | /* */ 57 | 58 | 59 | FT_END_HEADER 60 | 61 | 62 | #endif /* SVPOSTNM_H_ */ 63 | 64 | 65 | /* END */ 66 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svprop.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svprop.h 4 | * 5 | * The FreeType property service (specification). 6 | * 7 | * Copyright (C) 2012-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVPROP_H_ 20 | #define SVPROP_H_ 21 | 22 | 23 | FT_BEGIN_HEADER 24 | 25 | 26 | #define FT_SERVICE_ID_PROPERTIES "properties" 27 | 28 | 29 | typedef FT_Error 30 | (*FT_Properties_SetFunc)( FT_Module module, 31 | const char* property_name, 32 | const void* value, 33 | FT_Bool value_is_string ); 34 | 35 | typedef FT_Error 36 | (*FT_Properties_GetFunc)( FT_Module module, 37 | const char* property_name, 38 | void* value ); 39 | 40 | 41 | FT_DEFINE_SERVICE( Properties ) 42 | { 43 | FT_Properties_SetFunc set_property; 44 | FT_Properties_GetFunc get_property; 45 | }; 46 | 47 | 48 | #define FT_DEFINE_SERVICE_PROPERTIESREC( class_, \ 49 | set_property_, \ 50 | get_property_ ) \ 51 | static const FT_Service_PropertiesRec class_ = \ 52 | { \ 53 | set_property_, \ 54 | get_property_ \ 55 | }; 56 | 57 | /* */ 58 | 59 | 60 | FT_END_HEADER 61 | 62 | 63 | #endif /* SVPROP_H_ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svtteng.h 4 | * 5 | * The FreeType TrueType engine query service (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVTTENG_H_ 20 | #define SVTTENG_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* SVTTENG_H_ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svttglyf.h 4 | * 5 | * The FreeType TrueType glyph service. 6 | * 7 | * Copyright (C) 2007-2020 by 8 | * David Turner. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | #ifndef SVTTGLYF_H_ 19 | #define SVTTGLYF_H_ 20 | 21 | #include 22 | #include 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 29 | 30 | 31 | typedef FT_ULong 32 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 33 | FT_UInt gindex, 34 | FT_ULong *psize ); 35 | 36 | FT_DEFINE_SERVICE( TTGlyf ) 37 | { 38 | TT_Glyf_GetLocationFunc get_location; 39 | }; 40 | 41 | 42 | #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ 43 | static const FT_Service_TTGlyfRec class_ = \ 44 | { \ 45 | get_location_ \ 46 | }; 47 | 48 | /* */ 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* SVTTGLYF_H_ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /Osiris/freetype/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svwinfnt.h 4 | * 5 | * The FreeType Windows FNT/FONT service (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVWINFNT_H_ 20 | #define SVWINFNT_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* SVWINFNT_H_ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /Osiris/freetype/ft2build.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ft2build.h 4 | * 5 | * FreeType 2 build and setup macros. 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This is the 'entry point' for FreeType header file inclusions, to be 22 | * loaded before all other header files. 23 | * 24 | * A typical example is 25 | * 26 | * ``` 27 | * #include 28 | * #include 29 | * ``` 30 | * 31 | */ 32 | 33 | 34 | #ifndef FT2BUILD_H_ 35 | #define FT2BUILD_H_ 36 | 37 | #include 38 | 39 | #endif /* FT2BUILD_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afangles.h: -------------------------------------------------------------------------------- 1 | /* 2 | * afangles.h 3 | * 4 | * This is a dummy file, used to please the build system. It is never 5 | * included by the auto-fitter sources. 6 | * 7 | */ 8 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afdummy.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afdummy.h 4 | * 5 | * Auto-fitter dummy routines to be used if no hinting should be 6 | * performed (specification). 7 | * 8 | * Copyright (C) 2003-2020 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | #ifndef AFDUMMY_H_ 21 | #define AFDUMMY_H_ 22 | 23 | #include "aftypes.h" 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | /* A dummy writing system used when no hinting should be performed. */ 29 | 30 | AF_DECLARE_WRITING_SYSTEM_CLASS( af_dummy_writing_system_class ) 31 | 32 | /* */ 33 | 34 | FT_END_HEADER 35 | 36 | 37 | #endif /* AFDUMMY_H_ */ 38 | 39 | 40 | /* END */ 41 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/aferrors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * aferrors.h 4 | * 5 | * Autofitter error codes (specification only). 6 | * 7 | * Copyright (C) 2005-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the Autofitter error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef AFERRORS_H_ 27 | #define AFERRORS_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX AF_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_Autofit 36 | 37 | #include 38 | 39 | #endif /* AFERRORS_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afindic.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afindic.h 4 | * 5 | * Auto-fitter hinting routines for Indic writing system 6 | * (specification). 7 | * 8 | * Copyright (C) 2007-2020 by 9 | * Rahul Bhalerao , . 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | #ifndef AFINDIC_H_ 21 | #define AFINDIC_H_ 22 | 23 | #include "afhints.h" 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* the `indic' writing system */ 30 | 31 | AF_DECLARE_WRITING_SYSTEM_CLASS( af_indic_writing_system_class ) 32 | 33 | 34 | /* */ 35 | 36 | FT_END_HEADER 37 | 38 | #endif /* AFINDIC_H_ */ 39 | 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/aflatin2.h: -------------------------------------------------------------------------------- 1 | /* ATTENTION: This file doesn't compile. It is only here as a reference */ 2 | /* of an alternative latin hinting algorithm that was always */ 3 | /* marked as experimental. */ 4 | 5 | 6 | /**************************************************************************** 7 | * 8 | * aflatin2.h 9 | * 10 | * Auto-fitter hinting routines for latin writing system 11 | * (specification). 12 | * 13 | * Copyright (C) 2003-2020 by 14 | * David Turner, Robert Wilhelm, and Werner Lemberg. 15 | * 16 | * This file is part of the FreeType project, and may only be used, 17 | * modified, and distributed under the terms of the FreeType project 18 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 19 | * this file you indicate that you have read the license and 20 | * understand and accept it fully. 21 | * 22 | */ 23 | 24 | 25 | #ifndef AFLATIN2_H_ 26 | #define AFLATIN2_H_ 27 | 28 | #include "afhints.h" 29 | 30 | 31 | FT_BEGIN_HEADER 32 | 33 | 34 | /* the `latin' writing system */ 35 | 36 | AF_DECLARE_WRITING_SYSTEM_CLASS( af_latin2_writing_system_class ) 37 | 38 | 39 | /* */ 40 | 41 | FT_END_HEADER 42 | 43 | #endif /* AFLATIN_H_ */ 44 | 45 | 46 | /* END */ 47 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afmodule.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afmodule.h 4 | * 5 | * Auto-fitter module implementation (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFMODULE_H_ 20 | #define AFMODULE_H_ 21 | 22 | #include 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * This is the `extended' FT_Module structure that holds the 31 | * autofitter's global data. 32 | */ 33 | 34 | typedef struct AF_ModuleRec_ 35 | { 36 | FT_ModuleRec root; 37 | 38 | FT_UInt fallback_style; 39 | FT_UInt default_script; 40 | #ifdef AF_CONFIG_OPTION_USE_WARPER 41 | FT_Bool warping; 42 | #endif 43 | FT_Bool no_stem_darkening; 44 | FT_Int darken_params[8]; 45 | 46 | } AF_ModuleRec, *AF_Module; 47 | 48 | 49 | FT_DECLARE_AUTOHINTER_INTERFACE( af_autofitter_interface ) 50 | FT_DECLARE_MODULE( autofit_module_class ) 51 | 52 | 53 | FT_END_HEADER 54 | 55 | #endif /* AFMODULE_H_ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afranges.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afranges.h 4 | * 5 | * Auto-fitter Unicode script ranges (specification). 6 | * 7 | * Copyright (C) 2013-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFRANGES_H_ 20 | #define AFRANGES_H_ 21 | 22 | 23 | #include "aftypes.h" 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #undef SCRIPT 29 | #define SCRIPT( s, S, d, h, H, ss ) \ 30 | extern const AF_Script_UniRangeRec af_ ## s ## _uniranges[]; 31 | 32 | #include "afscript.h" 33 | 34 | #undef SCRIPT 35 | #define SCRIPT( s, S, d, h, H, ss ) \ 36 | extern const AF_Script_UniRangeRec af_ ## s ## _nonbase_uniranges[]; 37 | 38 | #include "afscript.h" 39 | 40 | /* */ 41 | 42 | FT_END_HEADER 43 | 44 | #endif /* AFRANGES_H_ */ 45 | 46 | 47 | /* END */ 48 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afshaper.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afshaper.h 4 | * 5 | * HarfBuzz interface for accessing OpenType features (specification). 6 | * 7 | * Copyright (C) 2013-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFSHAPER_H_ 20 | #define AFSHAPER_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | FT_Error 38 | af_shaper_get_coverage( AF_FaceGlobals globals, 39 | AF_StyleClass style_class, 40 | FT_UShort* gstyles, 41 | FT_Bool default_script ); 42 | 43 | 44 | void* 45 | af_shaper_buf_create( FT_Face face ); 46 | 47 | void 48 | af_shaper_buf_destroy( FT_Face face, 49 | void* buf ); 50 | 51 | const char* 52 | af_shaper_get_cluster( const char* p, 53 | AF_StyleMetrics metrics, 54 | void* buf_, 55 | unsigned int* count ); 56 | 57 | FT_ULong 58 | af_shaper_get_elem( AF_StyleMetrics metrics, 59 | void* buf_, 60 | unsigned int idx, 61 | FT_Long* x_advance, 62 | FT_Long* y_offset ); 63 | 64 | /* */ 65 | 66 | FT_END_HEADER 67 | 68 | #endif /* AFSHAPER_H_ */ 69 | 70 | 71 | /* END */ 72 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afwarp.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afwarp.h 4 | * 5 | * Auto-fitter warping algorithm (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFWARP_H_ 20 | #define AFWARP_H_ 21 | 22 | #include "afhints.h" 23 | 24 | FT_BEGIN_HEADER 25 | 26 | #define AF_WARPER_SCALE 27 | 28 | #define AF_WARPER_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 ) 29 | #define AF_WARPER_CEIL( x ) AF_WARPER_FLOOR( (x) + 63 ) 30 | 31 | 32 | typedef FT_Int32 AF_WarpScore; 33 | 34 | typedef struct AF_WarperRec_ 35 | { 36 | FT_Pos x1, x2; 37 | FT_Pos t1, t2; 38 | FT_Pos x1min, x1max; 39 | FT_Pos x2min, x2max; 40 | FT_Pos w0, wmin, wmax; 41 | 42 | FT_Fixed best_scale; 43 | FT_Pos best_delta; 44 | AF_WarpScore best_score; 45 | AF_WarpScore best_distort; 46 | 47 | } AF_WarperRec, *AF_Warper; 48 | 49 | 50 | #ifdef AF_CONFIG_OPTION_USE_WARPER 51 | FT_LOCAL( void ) 52 | af_warper_compute( AF_Warper warper, 53 | AF_GlyphHints hints, 54 | AF_Dimension dim, 55 | FT_Fixed *a_scale, 56 | FT_Pos *a_delta ); 57 | #endif 58 | 59 | 60 | FT_END_HEADER 61 | 62 | 63 | #endif /* AFWARP_H_ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/afwrtsys.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afwrtsys.h 4 | * 5 | * Auto-fitter writing systems (specification only). 6 | * 7 | * Copyright (C) 2013-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFWRTSYS_H_ 20 | #define AFWRTSYS_H_ 21 | 22 | /* Since preprocessor directives can't create other preprocessor */ 23 | /* directives, we have to include the header files manually. */ 24 | 25 | #include "afdummy.h" 26 | #include "aflatin.h" 27 | #include "afcjk.h" 28 | #include "afindic.h" 29 | #ifdef FT_OPTION_AUTOFIT2 30 | #include "aflatin2.h" 31 | #endif 32 | 33 | #endif /* AFWRTSYS_H_ */ 34 | 35 | 36 | /* The following part can be included multiple times. */ 37 | /* Define `WRITING_SYSTEM' as needed. */ 38 | 39 | 40 | /* Add new writing systems here. The arguments are the writing system */ 41 | /* name in lowercase and uppercase, respectively. */ 42 | 43 | WRITING_SYSTEM( dummy, DUMMY ) 44 | WRITING_SYSTEM( latin, LATIN ) 45 | WRITING_SYSTEM( cjk, CJK ) 46 | WRITING_SYSTEM( indic, INDIC ) 47 | #ifdef FT_OPTION_AUTOFIT2 48 | WRITING_SYSTEM( latin2, LATIN2 ) 49 | #endif 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /Osiris/freetype/src/autofit/autofit.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * autofit.c 4 | * 5 | * Auto-fitter module (body). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "afangles.c" 22 | #include "afblue.c" 23 | #include "afcjk.c" 24 | #include "afdummy.c" 25 | #include "afglobal.c" 26 | #include "afhints.c" 27 | #include "afindic.c" 28 | #include "aflatin.c" 29 | #include "aflatin2.c" 30 | #include "afloader.c" 31 | #include "afmodule.c" 32 | #include "afranges.c" 33 | #include "afshaper.c" 34 | #include "afwarp.c" 35 | 36 | 37 | /* END */ 38 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftbase.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftbase.c 4 | * 5 | * Single object library component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "ftadvanc.c" 22 | #include "ftcalc.c" 23 | #include "ftcolor.c" 24 | #include "ftdbgmem.c" 25 | #include "fterrors.c" 26 | #include "ftfntfmt.c" 27 | #include "ftgloadr.c" 28 | #include "fthash.c" 29 | #include "ftlcdfil.c" 30 | #include "ftmac.c" 31 | #include "ftobjs.c" 32 | #include "ftoutln.c" 33 | #include "ftpsprop.c" 34 | #include "ftrfork.c" 35 | #include "ftsnames.c" 36 | #include "ftstream.c" 37 | #include "fttrigon.c" 38 | #include "ftutil.c" 39 | 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/fterrors.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * fterrors.c 4 | * 5 | * FreeType API for error code handling. 6 | * 7 | * Copyright (C) 2018-2020 by 8 | * Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | 22 | 23 | /* documentation is in fterrors.h */ 24 | 25 | FT_EXPORT_DEF( const char* ) 26 | FT_Error_String( FT_Error error_code ) 27 | { 28 | if ( error_code < 0 || 29 | error_code >= FT_ERR_CAT( FT_ERR_PREFIX, Max ) ) 30 | return NULL; 31 | 32 | #if defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || \ 33 | defined( FT_DEBUG_LEVEL_ERROR ) 34 | 35 | #undef FTERRORS_H_ 36 | #define FT_ERROR_START_LIST switch ( FT_ERROR_BASE( error_code ) ) { 37 | #define FT_ERRORDEF( e, v, s ) case v: return s; 38 | #define FT_ERROR_END_LIST } 39 | 40 | #include 41 | 42 | #endif /* defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || ... */ 43 | 44 | return NULL; 45 | } 46 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftfntfmt.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftfntfmt.c 4 | * 5 | * FreeType utility file for font formats (body). 6 | * 7 | * Copyright (C) 2002-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | /* documentation is in ftfntfmt.h */ 25 | 26 | FT_EXPORT_DEF( const char* ) 27 | FT_Get_Font_Format( FT_Face face ) 28 | { 29 | const char* result = NULL; 30 | 31 | 32 | if ( face ) 33 | FT_FACE_FIND_SERVICE( face, result, FONT_FORMAT ); 34 | 35 | return result; 36 | } 37 | 38 | 39 | /* deprecated function name; retained for ABI compatibility */ 40 | 41 | FT_EXPORT_DEF( const char* ) 42 | FT_Get_X11_Font_Format( FT_Face face ) 43 | { 44 | const char* result = NULL; 45 | 46 | 47 | if ( face ) 48 | FT_FACE_FIND_SERVICE( face, result, FONT_FORMAT ); 49 | 50 | return result; 51 | } 52 | 53 | 54 | /* END */ 55 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftfstype.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftfstype.c 4 | * 5 | * FreeType utility file to access FSType data (body). 6 | * 7 | * Copyright (C) 2008-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | /* documentation is in freetype.h */ 25 | 26 | FT_EXPORT_DEF( FT_UShort ) 27 | FT_Get_FSType_Flags( FT_Face face ) 28 | { 29 | TT_OS2* os2; 30 | 31 | 32 | /* first, try to get the fs_type directly from the font */ 33 | if ( face ) 34 | { 35 | FT_Service_PsInfo service = NULL; 36 | 37 | 38 | FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO ); 39 | 40 | if ( service && service->ps_get_font_extra ) 41 | { 42 | PS_FontExtraRec extra; 43 | 44 | 45 | if ( !service->ps_get_font_extra( face, &extra ) && 46 | extra.fs_type != 0 ) 47 | return extra.fs_type; 48 | } 49 | } 50 | 51 | /* look at FSType before fsType for Type42 */ 52 | 53 | if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL && 54 | os2->version != 0xFFFFU ) 55 | return os2->fsType; 56 | 57 | return 0; 58 | } 59 | 60 | 61 | /* END */ 62 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftgasp.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftgasp.c 4 | * 5 | * Access of TrueType's `gasp' table (body). 6 | * 7 | * Copyright (C) 2007-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | 22 | 23 | FT_EXPORT_DEF( FT_Int ) 24 | FT_Get_Gasp( FT_Face face, 25 | FT_UInt ppem ) 26 | { 27 | FT_Int result = FT_GASP_NO_TABLE; 28 | 29 | 30 | if ( face && FT_IS_SFNT( face ) ) 31 | { 32 | TT_Face ttface = (TT_Face)face; 33 | 34 | 35 | if ( ttface->gasp.numRanges > 0 ) 36 | { 37 | TT_GaspRange range = ttface->gasp.gaspRanges; 38 | TT_GaspRange range_end = range + ttface->gasp.numRanges; 39 | 40 | 41 | while ( ppem > range->maxPPEM ) 42 | { 43 | range++; 44 | if ( range >= range_end ) 45 | goto Exit; 46 | } 47 | 48 | result = range->gaspFlag; 49 | 50 | /* ensure that we don't have spurious bits */ 51 | if ( ttface->gasp.version == 0 ) 52 | result &= 3; 53 | } 54 | } 55 | Exit: 56 | return result; 57 | } 58 | 59 | 60 | /* END */ 61 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftpatent.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftpatent.c 4 | * 5 | * FreeType API for checking patented TrueType bytecode instructions 6 | * (body). Obsolete, retained for backward compatibility. 7 | * 8 | * Copyright (C) 2007-2020 by 9 | * David Turner. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | 27 | /* documentation is in freetype.h */ 28 | 29 | FT_EXPORT_DEF( FT_Bool ) 30 | FT_Face_CheckTrueTypePatents( FT_Face face ) 31 | { 32 | FT_UNUSED( face ); 33 | 34 | return FALSE; 35 | } 36 | 37 | 38 | /* documentation is in freetype.h */ 39 | 40 | FT_EXPORT_DEF( FT_Bool ) 41 | FT_Face_SetUnpatentedHinting( FT_Face face, 42 | FT_Bool value ) 43 | { 44 | FT_UNUSED( face ); 45 | FT_UNUSED( value ); 46 | 47 | return FALSE; 48 | } 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/ftwinfnt.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftwinfnt.c 4 | * 5 | * FreeType API for accessing Windows FNT specific info (body). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | /* documentation is in ftwinfnt.h */ 26 | 27 | FT_EXPORT_DEF( FT_Error ) 28 | FT_Get_WinFNT_Header( FT_Face face, 29 | FT_WinFNT_HeaderRec *header ) 30 | { 31 | FT_Service_WinFnt service; 32 | FT_Error error; 33 | 34 | 35 | if ( !face ) 36 | return FT_THROW( Invalid_Face_Handle ); 37 | 38 | if ( !header ) 39 | return FT_THROW( Invalid_Argument ); 40 | 41 | FT_FACE_LOOKUP_SERVICE( face, service, WINFNT ); 42 | 43 | if ( service ) 44 | error = service->get_header( face, header ); 45 | else 46 | error = FT_THROW( Invalid_Argument ); 47 | 48 | return error; 49 | } 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /Osiris/freetype/src/base/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. 3 | * MD5 Message-Digest Algorithm (RFC 1321). 4 | * 5 | * Homepage: 6 | * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 7 | * 8 | * Author: 9 | * Alexander Peslyak, better known as Solar Designer 10 | * 11 | * This software was written by Alexander Peslyak in 2001. No copyright is 12 | * claimed, and the software is hereby placed in the public domain. 13 | * In case this attempt to disclaim copyright and place the software in the 14 | * public domain is deemed null and void, then the software is 15 | * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the 16 | * general public under the following terms: 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted. 20 | * 21 | * There's ABSOLUTELY NO WARRANTY, express or implied. 22 | * 23 | * See md5.c for more information. 24 | */ 25 | 26 | #ifdef HAVE_OPENSSL 27 | #include 28 | #elif !defined(_MD5_H) 29 | #define _MD5_H 30 | 31 | /* Any 32-bit or wider unsigned integer data type will do */ 32 | typedef unsigned int MD5_u32plus; 33 | 34 | typedef struct { 35 | MD5_u32plus lo, hi; 36 | MD5_u32plus a, b, c, d; 37 | unsigned char buffer[64]; 38 | MD5_u32plus block[16]; 39 | } MD5_CTX; 40 | 41 | extern void MD5_Init(MD5_CTX *ctx); 42 | extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); 43 | extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Osiris/freetype/src/cff/cff.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cff.c 4 | * 5 | * FreeType OpenType driver component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "cffcmap.c" 22 | #include "cffdrivr.c" 23 | #include "cffgload.c" 24 | #include "cffparse.c" 25 | #include "cffload.c" 26 | #include "cffobjs.c" 27 | 28 | /* END */ 29 | -------------------------------------------------------------------------------- /Osiris/freetype/src/cff/cffdrivr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cffdrivr.h 4 | * 5 | * High-level OpenType driver interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef CFFDRIVER_H_ 20 | #define CFFDRIVER_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | FT_DECLARE_DRIVER( cff_driver_class ) 29 | 30 | FT_END_HEADER 31 | 32 | #endif /* CFFDRIVER_H_ */ 33 | 34 | 35 | /* END */ 36 | -------------------------------------------------------------------------------- /Osiris/freetype/src/cff/cfferrs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cfferrs.h 4 | * 5 | * CFF error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the CFF error enumeration constants. 22 | * 23 | */ 24 | 25 | #ifndef CFFERRS_H_ 26 | #define CFFERRS_H_ 27 | 28 | #include 29 | 30 | #undef FTERRORS_H_ 31 | 32 | #undef FT_ERR_PREFIX 33 | #define FT_ERR_PREFIX CFF_Err_ 34 | #define FT_ERR_BASE FT_Mod_Err_CFF 35 | 36 | 37 | #include 38 | 39 | #endif /* CFFERRS_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/cff/cffgload.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cffgload.h 4 | * 5 | * OpenType Glyph Loader (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef CFFGLOAD_H_ 20 | #define CFFGLOAD_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | FT_LOCAL( FT_Error ) 30 | cff_get_glyph_data( TT_Face face, 31 | FT_UInt glyph_index, 32 | FT_Byte** pointer, 33 | FT_ULong* length ); 34 | FT_LOCAL( void ) 35 | cff_free_glyph_data( TT_Face face, 36 | FT_Byte** pointer, 37 | FT_ULong length ); 38 | 39 | 40 | #if 0 /* unused until we support pure CFF fonts */ 41 | 42 | /* Compute the maximum advance width of a font through quick parsing */ 43 | FT_LOCAL( FT_Error ) 44 | cff_compute_max_advance( TT_Face face, 45 | FT_Int* max_advance ); 46 | 47 | #endif /* 0 */ 48 | 49 | 50 | FT_LOCAL( FT_Error ) 51 | cff_slot_load( CFF_GlyphSlot glyph, 52 | CFF_Size size, 53 | FT_UInt glyph_index, 54 | FT_Int32 load_flags ); 55 | 56 | 57 | FT_END_HEADER 58 | 59 | #endif /* CFFGLOAD_H_ */ 60 | 61 | 62 | /* END */ 63 | -------------------------------------------------------------------------------- /Osiris/freetype/src/cff/cffobjs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cffobjs.h 4 | * 5 | * OpenType objects manager (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef CFFOBJS_H_ 20 | #define CFFOBJS_H_ 21 | 22 | 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | FT_LOCAL( FT_Error ) 29 | cff_size_init( FT_Size size ); /* CFF_Size */ 30 | 31 | FT_LOCAL( void ) 32 | cff_size_done( FT_Size size ); /* CFF_Size */ 33 | 34 | FT_LOCAL( FT_Error ) 35 | cff_size_request( FT_Size size, 36 | FT_Size_Request req ); 37 | 38 | #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 39 | 40 | FT_LOCAL( FT_Error ) 41 | cff_size_select( FT_Size size, 42 | FT_ULong strike_index ); 43 | 44 | #endif 45 | 46 | FT_LOCAL( void ) 47 | cff_slot_done( FT_GlyphSlot slot ); 48 | 49 | FT_LOCAL( FT_Error ) 50 | cff_slot_init( FT_GlyphSlot slot ); 51 | 52 | 53 | /************************************************************************** 54 | * 55 | * Face functions 56 | */ 57 | FT_LOCAL( FT_Error ) 58 | cff_face_init( FT_Stream stream, 59 | FT_Face face, /* CFF_Face */ 60 | FT_Int face_index, 61 | FT_Int num_params, 62 | FT_Parameter* params ); 63 | 64 | FT_LOCAL( void ) 65 | cff_face_done( FT_Face face ); /* CFF_Face */ 66 | 67 | 68 | /************************************************************************** 69 | * 70 | * Driver functions 71 | */ 72 | FT_LOCAL( FT_Error ) 73 | cff_driver_init( FT_Module module ); /* PS_Driver */ 74 | 75 | FT_LOCAL( void ) 76 | cff_driver_done( FT_Module module ); /* PS_Driver */ 77 | 78 | 79 | FT_END_HEADER 80 | 81 | #endif /* CFFOBJS_H_ */ 82 | 83 | 84 | /* END */ 85 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/afmparse.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * afmparse.h 4 | * 5 | * AFM parser (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef AFMPARSE_H_ 20 | #define AFMPARSE_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_LOCAL( FT_Error ) 30 | afm_parser_init( AFM_Parser parser, 31 | FT_Memory memory, 32 | FT_Byte* base, 33 | FT_Byte* limit ); 34 | 35 | 36 | FT_LOCAL( void ) 37 | afm_parser_done( AFM_Parser parser ); 38 | 39 | 40 | FT_LOCAL( FT_Error ) 41 | afm_parser_parse( AFM_Parser parser ); 42 | 43 | 44 | enum AFM_ValueType_ 45 | { 46 | AFM_VALUE_TYPE_STRING, 47 | AFM_VALUE_TYPE_NAME, 48 | AFM_VALUE_TYPE_FIXED, /* real number */ 49 | AFM_VALUE_TYPE_INTEGER, 50 | AFM_VALUE_TYPE_BOOL, 51 | AFM_VALUE_TYPE_INDEX /* glyph index */ 52 | }; 53 | 54 | 55 | typedef struct AFM_ValueRec_ 56 | { 57 | enum AFM_ValueType_ type; 58 | union 59 | { 60 | char* s; 61 | FT_Fixed f; 62 | FT_Int i; 63 | FT_UInt u; 64 | FT_Bool b; 65 | 66 | } u; 67 | 68 | } AFM_ValueRec, *AFM_Value; 69 | 70 | #define AFM_MAX_ARGUMENTS 5 71 | 72 | FT_LOCAL( FT_Int ) 73 | afm_parser_read_vals( AFM_Parser parser, 74 | AFM_Value vals, 75 | FT_Int n ); 76 | 77 | /* read the next key from the next line or column */ 78 | FT_LOCAL( char* ) 79 | afm_parser_next_key( AFM_Parser parser, 80 | FT_Bool line, 81 | FT_Offset* len ); 82 | 83 | FT_END_HEADER 84 | 85 | #endif /* AFMPARSE_H_ */ 86 | 87 | 88 | /* END */ 89 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/cffdecode.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * cffdecode.h 4 | * 5 | * PostScript CFF (Type 2) decoding routines (specification). 6 | * 7 | * Copyright (C) 2017-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef CFFDECODE_H_ 20 | #define CFFDECODE_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | FT_LOCAL( void ) 29 | cff_decoder_init( CFF_Decoder* decoder, 30 | TT_Face face, 31 | CFF_Size size, 32 | CFF_GlyphSlot slot, 33 | FT_Bool hinting, 34 | FT_Render_Mode hint_mode, 35 | CFF_Decoder_Get_Glyph_Callback get_callback, 36 | CFF_Decoder_Free_Glyph_Callback free_callback ); 37 | 38 | FT_LOCAL( FT_Error ) 39 | cff_decoder_prepare( CFF_Decoder* decoder, 40 | CFF_Size size, 41 | FT_UInt glyph_index ); 42 | 43 | 44 | FT_LOCAL( FT_Int ) 45 | cff_lookup_glyph_by_stdcharcode( CFF_Font cff, 46 | FT_Int charcode ); 47 | 48 | 49 | #ifdef CFF_CONFIG_OPTION_OLD_ENGINE 50 | FT_LOCAL( FT_Error ) 51 | cff_decoder_parse_charstrings( CFF_Decoder* decoder, 52 | FT_Byte* charstring_base, 53 | FT_ULong charstring_len, 54 | FT_Bool in_dict ); 55 | #endif 56 | 57 | 58 | FT_END_HEADER 59 | 60 | #endif 61 | 62 | 63 | /* END */ 64 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/psaux.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psaux.c 4 | * 5 | * FreeType auxiliary PostScript driver component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "afmparse.c" 22 | #include "psauxmod.c" 23 | #include "psconv.c" 24 | #include "psobjs.c" 25 | #include "t1cmap.c" 26 | #include "t1decode.c" 27 | #include "cffdecode.c" 28 | 29 | #include "psarrst.c" 30 | #include "psblues.c" 31 | #include "pserror.c" 32 | #include "psfont.c" 33 | #include "psft.c" 34 | #include "pshints.c" 35 | #include "psintrp.c" 36 | #include "psread.c" 37 | #include "psstack.c" 38 | 39 | 40 | /* END */ 41 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/psauxerr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psauxerr.h 4 | * 5 | * PS auxiliary module error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the PS auxiliary module error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef PSAUXERR_H_ 27 | #define PSAUXERR_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX PSaux_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_PSaux 36 | 37 | #include 38 | 39 | #endif /* PSAUXERR_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/psauxmod.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psauxmod.h 4 | * 5 | * FreeType auxiliary PostScript module implementation (specification). 6 | * 7 | * Copyright (C) 2000-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef PSAUXMOD_H_ 20 | #define PSAUXMOD_H_ 21 | 22 | 23 | #include 24 | 25 | #include 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_CALLBACK_TABLE 32 | const CFF_Builder_FuncsRec cff_builder_funcs; 33 | 34 | FT_CALLBACK_TABLE 35 | const PS_Builder_FuncsRec ps_builder_funcs; 36 | 37 | #ifndef T1_CONFIG_OPTION_NO_AFM 38 | FT_CALLBACK_TABLE 39 | const AFM_Parser_FuncsRec afm_parser_funcs; 40 | #endif 41 | 42 | FT_CALLBACK_TABLE 43 | const T1_CMap_ClassesRec t1_cmap_classes; 44 | 45 | FT_CALLBACK_TABLE 46 | const CFF_Decoder_FuncsRec cff_decoder_funcs; 47 | 48 | 49 | FT_EXPORT_VAR( const FT_Module_Class ) psaux_driver_class; 50 | 51 | 52 | FT_DECLARE_MODULE( psaux_module_class ) 53 | 54 | 55 | FT_END_HEADER 56 | 57 | #endif /* PSAUXMOD_H_ */ 58 | 59 | 60 | /* END */ 61 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/psconv.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psconv.h 4 | * 5 | * Some convenience conversions (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef PSCONV_H_ 20 | #define PSCONV_H_ 21 | 22 | 23 | #include 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | FT_LOCAL( FT_Long ) 29 | PS_Conv_Strtol( FT_Byte** cursor, 30 | FT_Byte* limit, 31 | FT_Long base ); 32 | 33 | 34 | FT_LOCAL( FT_Long ) 35 | PS_Conv_ToInt( FT_Byte** cursor, 36 | FT_Byte* limit ); 37 | 38 | FT_LOCAL( FT_Fixed ) 39 | PS_Conv_ToFixed( FT_Byte** cursor, 40 | FT_Byte* limit, 41 | FT_Long power_ten ); 42 | 43 | #if 0 44 | FT_LOCAL( FT_UInt ) 45 | PS_Conv_StringDecode( FT_Byte** cursor, 46 | FT_Byte* limit, 47 | FT_Byte* buffer, 48 | FT_Offset n ); 49 | #endif 50 | 51 | FT_LOCAL( FT_UInt ) 52 | PS_Conv_ASCIIHexDecode( FT_Byte** cursor, 53 | FT_Byte* limit, 54 | FT_Byte* buffer, 55 | FT_Offset n ); 56 | 57 | FT_LOCAL( FT_UInt ) 58 | PS_Conv_EexecDecode( FT_Byte** cursor, 59 | FT_Byte* limit, 60 | FT_Byte* buffer, 61 | FT_Offset n, 62 | FT_UShort* seed ); 63 | 64 | 65 | FT_END_HEADER 66 | 67 | #endif /* PSCONV_H_ */ 68 | 69 | 70 | /* END */ 71 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/pserror.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * pserror.c 4 | * 5 | * Adobe's code for error handling (body). 6 | * 7 | * Copyright 2006-2013 Adobe Systems Incorporated. 8 | * 9 | * This software, and all works of authorship, whether in source or 10 | * object code form as indicated by the copyright notice(s) included 11 | * herein (collectively, the "Work") is made available, and may only be 12 | * used, modified, and distributed under the FreeType Project License, 13 | * LICENSE.TXT. Additionally, subject to the terms and conditions of the 14 | * FreeType Project License, each contributor to the Work hereby grants 15 | * to any individual or legal entity exercising permissions granted by 16 | * the FreeType Project License and this section (hereafter, "You" or 17 | * "Your") a perpetual, worldwide, non-exclusive, no-charge, 18 | * royalty-free, irrevocable (except as stated in this section) patent 19 | * license to make, have made, use, offer to sell, sell, import, and 20 | * otherwise transfer the Work, where such license applies only to those 21 | * patent claims licensable by such contributor that are necessarily 22 | * infringed by their contribution(s) alone or by combination of their 23 | * contribution(s) with the Work to which such contribution(s) was 24 | * submitted. If You institute patent litigation against any entity 25 | * (including a cross-claim or counterclaim in a lawsuit) alleging that 26 | * the Work or a contribution incorporated within the Work constitutes 27 | * direct or contributory patent infringement, then any patent licenses 28 | * granted to You under this License for that Work shall terminate as of 29 | * the date such litigation is filed. 30 | * 31 | * By using, modifying, or distributing the Work you indicate that you 32 | * have read and understood the terms and conditions of the 33 | * FreeType Project License as well as those provided in this section, 34 | * and you accept them fully. 35 | * 36 | */ 37 | 38 | 39 | #include "psft.h" 40 | #include "pserror.h" 41 | 42 | 43 | FT_LOCAL_DEF( void ) 44 | cf2_setError( FT_Error* error, 45 | FT_Error value ) 46 | { 47 | if ( error && !*error ) 48 | *error = value; 49 | } 50 | 51 | 52 | /* END */ 53 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psaux/t1decode.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * t1decode.h 4 | * 5 | * PostScript Type 1 decoding routines (specification). 6 | * 7 | * Copyright (C) 2000-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef T1DECODE_H_ 20 | #define T1DECODE_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_CALLBACK_TABLE 31 | const T1_Decoder_FuncsRec t1_decoder_funcs; 32 | 33 | FT_LOCAL( FT_Int ) 34 | t1_lookup_glyph_by_stdcharcode_ps( PS_Decoder* decoder, 35 | FT_Int charcode ); 36 | 37 | #ifdef T1_CONFIG_OPTION_OLD_ENGINE 38 | FT_LOCAL( FT_Error ) 39 | t1_decoder_parse_glyph( T1_Decoder decoder, 40 | FT_UInt glyph_index ); 41 | 42 | FT_LOCAL( FT_Error ) 43 | t1_decoder_parse_charstrings( T1_Decoder decoder, 44 | FT_Byte* base, 45 | FT_UInt len ); 46 | #else 47 | FT_LOCAL( FT_Error ) 48 | t1_decoder_parse_metrics( T1_Decoder decoder, 49 | FT_Byte* charstring_base, 50 | FT_UInt charstring_len ); 51 | #endif 52 | 53 | FT_LOCAL( FT_Error ) 54 | t1_decoder_init( T1_Decoder decoder, 55 | FT_Face face, 56 | FT_Size size, 57 | FT_GlyphSlot slot, 58 | FT_Byte** glyph_names, 59 | PS_Blend blend, 60 | FT_Bool hinting, 61 | FT_Render_Mode hint_mode, 62 | T1_Decoder_Callback parse_glyph ); 63 | 64 | FT_LOCAL( void ) 65 | t1_decoder_done( T1_Decoder decoder ); 66 | 67 | 68 | FT_END_HEADER 69 | 70 | #endif /* T1DECODE_H_ */ 71 | 72 | 73 | /* END */ 74 | -------------------------------------------------------------------------------- /Osiris/freetype/src/pshinter/pshinter.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * pshinter.c 4 | * 5 | * FreeType PostScript Hinting module 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "pshalgo.c" 22 | #include "pshglob.c" 23 | #include "pshmod.c" 24 | #include "pshrec.c" 25 | 26 | 27 | /* END */ 28 | -------------------------------------------------------------------------------- /Osiris/freetype/src/pshinter/pshmod.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * pshmod.h 4 | * 5 | * PostScript hinter module interface (specification). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef PSHMOD_H_ 20 | #define PSHMOD_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_DECLARE_MODULE( pshinter_module_class ) 30 | 31 | 32 | FT_END_HEADER 33 | 34 | 35 | #endif /* PSHMOD_H_ */ 36 | 37 | 38 | /* END */ 39 | -------------------------------------------------------------------------------- /Osiris/freetype/src/pshinter/pshnterr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * pshnterr.h 4 | * 5 | * PS Hinter error codes (specification only). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the PSHinter error enumeration constants. 22 | * 23 | */ 24 | 25 | #ifndef PSHNTERR_H_ 26 | #define PSHNTERR_H_ 27 | 28 | #include 29 | 30 | #undef FTERRORS_H_ 31 | 32 | #undef FT_ERR_PREFIX 33 | #define FT_ERR_PREFIX PSH_Err_ 34 | #define FT_ERR_BASE FT_Mod_Err_PShinter 35 | 36 | #include 37 | 38 | #endif /* PSHNTERR_H_ */ 39 | 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psnames/psmodule.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psmodule.h 4 | * 5 | * High-level psnames module interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef PSMODULE_H_ 20 | #define PSMODULE_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_DECLARE_MODULE( psnames_module_class ) 30 | 31 | 32 | FT_END_HEADER 33 | 34 | #endif /* PSMODULE_H_ */ 35 | 36 | 37 | /* END */ 38 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psnames/psnamerr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psnamerr.h 4 | * 5 | * PS names module error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the PS names module error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef PSNAMERR_H_ 27 | #define PSNAMERR_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX PSnames_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_PSnames 36 | 37 | #include 38 | 39 | #endif /* PSNAMERR_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/psnames/psnames.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * psnames.c 4 | * 5 | * FreeType psnames module component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "psmodule.c" 22 | 23 | 24 | /* END */ 25 | -------------------------------------------------------------------------------- /Osiris/freetype/src/raster/ftraster.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftraster.h 4 | * 5 | * The FreeType glyph rasterizer (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used 11 | * modified and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTRASTER_H_ 20 | #define FTRASTER_H_ 21 | 22 | 23 | #include 24 | #include FT_CONFIG_CONFIG_H 25 | #include 26 | 27 | #include 28 | 29 | FT_BEGIN_HEADER 30 | 31 | 32 | /************************************************************************** 33 | * 34 | * Uncomment the following line if you are using ftraster.c as a 35 | * standalone module, fully independent of FreeType. 36 | */ 37 | /* #define STANDALONE_ */ 38 | 39 | FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_standard_raster; 40 | 41 | 42 | FT_END_HEADER 43 | 44 | #endif /* FTRASTER_H_ */ 45 | 46 | 47 | /* END */ 48 | -------------------------------------------------------------------------------- /Osiris/freetype/src/raster/ftrend1.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftrend1.h 4 | * 5 | * The FreeType glyph rasterizer interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTREND1_H_ 20 | #define FTREND1_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_DECLARE_RENDERER( ft_raster1_renderer_class ) 30 | 31 | 32 | FT_END_HEADER 33 | 34 | #endif /* FTREND1_H_ */ 35 | 36 | 37 | /* END */ 38 | -------------------------------------------------------------------------------- /Osiris/freetype/src/raster/raster.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * raster.c 4 | * 5 | * FreeType monochrome rasterer module component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "ftraster.c" 22 | #include "ftrend1.c" 23 | 24 | 25 | /* END */ 26 | -------------------------------------------------------------------------------- /Osiris/freetype/src/raster/rasterrs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * rasterrs.h 4 | * 5 | * monochrome renderer error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the monochrome renderer error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef RASTERRS_H_ 27 | #define RASTERRS_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX Raster_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_Raster 36 | 37 | #include 38 | 39 | #endif /* RASTERRS_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/pngshim.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * pngshim.h 4 | * 5 | * PNG Bitmap glyph support. 6 | * 7 | * Copyright (C) 2013-2020 by 8 | * Google, Inc. 9 | * Written by Stuart Gill and Behdad Esfahbod. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | #ifndef PNGSHIM_H_ 21 | #define PNGSHIM_H_ 22 | 23 | 24 | #include "ttload.h" 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | #ifdef FT_CONFIG_OPTION_USE_PNG 30 | 31 | FT_LOCAL( FT_Error ) 32 | Load_SBit_Png( FT_GlyphSlot slot, 33 | FT_Int x_offset, 34 | FT_Int y_offset, 35 | FT_Int pix_bits, 36 | TT_SBit_Metrics metrics, 37 | FT_Memory memory, 38 | FT_Byte* data, 39 | FT_UInt png_len, 40 | FT_Bool populate_map_and_metrics, 41 | FT_Bool metrics_only ); 42 | 43 | #endif 44 | 45 | FT_END_HEADER 46 | 47 | #endif /* PNGSHIM_H_ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sfdriver.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sfdriver.h 4 | * 5 | * High-level SFNT driver interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SFDRIVER_H_ 20 | #define SFDRIVER_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | FT_DECLARE_MODULE( sfnt_module_class ) 29 | 30 | FT_END_HEADER 31 | 32 | #endif /* SFDRIVER_H_ */ 33 | 34 | 35 | /* END */ 36 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sferrors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sferrors.h 4 | * 5 | * SFNT error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the SFNT error enumeration constants. 22 | * 23 | */ 24 | 25 | #ifndef SFERRORS_H_ 26 | #define SFERRORS_H_ 27 | 28 | #include 29 | 30 | #undef FTERRORS_H_ 31 | 32 | #undef FT_ERR_PREFIX 33 | #define FT_ERR_PREFIX SFNT_Err_ 34 | #define FT_ERR_BASE FT_Mod_Err_SFNT 35 | 36 | #include 37 | 38 | #endif /* SFERRORS_H_ */ 39 | 40 | 41 | /* END */ 42 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sfnt.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sfnt.c 4 | * 5 | * Single object library component. 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "pngshim.c" 22 | #include "sfdriver.c" 23 | #include "sfobjs.c" 24 | #include "sfwoff.c" 25 | #include "sfwoff2.c" 26 | #include "ttbdf.c" 27 | #include "ttcmap.c" 28 | #include "ttcolr.c" 29 | #include "ttcpal.c" 30 | 31 | #include "ttkern.c" 32 | #include "ttload.c" 33 | #include "ttmtx.c" 34 | #include "ttpost.c" 35 | #include "ttsbit.c" 36 | #include "woff2tags.c" 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sfobjs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sfobjs.h 4 | * 5 | * SFNT object management (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SFOBJS_H_ 20 | #define SFOBJS_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_Error ) 31 | sfnt_init_face( FT_Stream stream, 32 | TT_Face face, 33 | FT_Int face_instance_index, 34 | FT_Int num_params, 35 | FT_Parameter* params ); 36 | 37 | FT_LOCAL( FT_Error ) 38 | sfnt_load_face( FT_Stream stream, 39 | TT_Face face, 40 | FT_Int face_instance_index, 41 | FT_Int num_params, 42 | FT_Parameter* params ); 43 | 44 | FT_LOCAL( void ) 45 | sfnt_done_face( TT_Face face ); 46 | 47 | FT_LOCAL( FT_Error ) 48 | tt_face_get_name( TT_Face face, 49 | FT_UShort nameid, 50 | FT_String** name ); 51 | 52 | 53 | FT_END_HEADER 54 | 55 | #endif /* SFOBJS_H_ */ 56 | 57 | 58 | /* END */ 59 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sfwoff.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sfwoff.h 4 | * 5 | * WOFFF format management (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SFWOFF_H_ 20 | #define SFWOFF_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_Error ) 31 | woff_open_font( FT_Stream stream, 32 | TT_Face face ); 33 | 34 | 35 | FT_END_HEADER 36 | 37 | #endif /* SFWOFF_H_ */ 38 | 39 | 40 | /* END */ 41 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/sfwoff2.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * sfwoff2.h 4 | * 5 | * WOFFF2 format management (specification). 6 | * 7 | * Copyright (C) 2019-2020 by 8 | * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SFWOFF2_H_ 20 | #define SFWOFF2_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | /* Leave the first byte open to store `flag_byte'. */ 31 | #define WOFF2_FLAGS_TRANSFORM 1 << 8 32 | 33 | #define WOFF2_SFNT_HEADER_SIZE 12 34 | #define WOFF2_SFNT_ENTRY_SIZE 16 35 | 36 | /* Suggested maximum size for output. */ 37 | #define WOFF2_DEFAULT_MAX_SIZE 30 * 1024 * 1024 38 | 39 | /* 98% of Google Fonts have no glyph above 5k bytes. */ 40 | #define WOFF2_DEFAULT_GLYPH_BUF 5120 41 | 42 | /* Composite glyph flags. */ 43 | /* See `CompositeGlyph.java' in `sfntly' for full definitions. */ 44 | #define FLAG_ARG_1_AND_2_ARE_WORDS 1 << 0 45 | #define FLAG_WE_HAVE_A_SCALE 1 << 3 46 | #define FLAG_MORE_COMPONENTS 1 << 5 47 | #define FLAG_WE_HAVE_AN_X_AND_Y_SCALE 1 << 6 48 | #define FLAG_WE_HAVE_A_TWO_BY_TWO 1 << 7 49 | #define FLAG_WE_HAVE_INSTRUCTIONS 1 << 8 50 | 51 | /* Simple glyph flags */ 52 | #define GLYF_ON_CURVE 1 << 0 53 | #define GLYF_X_SHORT 1 << 1 54 | #define GLYF_Y_SHORT 1 << 2 55 | #define GLYF_REPEAT 1 << 3 56 | #define GLYF_THIS_X_IS_SAME 1 << 4 57 | #define GLYF_THIS_Y_IS_SAME 1 << 5 58 | 59 | /* Other constants */ 60 | #define CONTOUR_OFFSET_END_POINT 10 61 | 62 | 63 | FT_LOCAL( FT_Error ) 64 | woff2_open_font( FT_Stream stream, 65 | TT_Face face, 66 | FT_Int* face_index, 67 | FT_Long* num_faces ); 68 | 69 | 70 | FT_END_HEADER 71 | 72 | #endif /* SFWOFF2_H_ */ 73 | 74 | 75 | /* END */ 76 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttbdf.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttbdf.h 4 | * 5 | * TrueType and OpenType embedded BDF properties (specification). 6 | * 7 | * Copyright (C) 2005-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTBDF_H_ 20 | #define TTBDF_H_ 21 | 22 | 23 | #include "ttload.h" 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | #ifdef TT_CONFIG_OPTION_BDF 31 | 32 | FT_LOCAL( void ) 33 | tt_face_free_bdf_props( TT_Face face ); 34 | 35 | 36 | FT_LOCAL( FT_Error ) 37 | tt_face_find_bdf_prop( TT_Face face, 38 | const char* property_name, 39 | BDF_PropertyRec *aprop ); 40 | 41 | #endif /* TT_CONFIG_OPTION_BDF */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | #endif /* TTBDF_H_ */ 47 | 48 | 49 | /* END */ 50 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttcmapc.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttcmapc.h 4 | * 5 | * TT CMAP classes definitions (specification only). 6 | * 7 | * Copyright (C) 2009-2020 by 8 | * Oran Agra and Mickey Gabel. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifdef TT_CONFIG_CMAP_FORMAT_0 20 | TTCMAPCITEM( tt_cmap0_class_rec ) 21 | #endif 22 | 23 | #ifdef TT_CONFIG_CMAP_FORMAT_2 24 | TTCMAPCITEM( tt_cmap2_class_rec ) 25 | #endif 26 | 27 | #ifdef TT_CONFIG_CMAP_FORMAT_4 28 | TTCMAPCITEM( tt_cmap4_class_rec ) 29 | #endif 30 | 31 | #ifdef TT_CONFIG_CMAP_FORMAT_6 32 | TTCMAPCITEM( tt_cmap6_class_rec ) 33 | #endif 34 | 35 | #ifdef TT_CONFIG_CMAP_FORMAT_8 36 | TTCMAPCITEM( tt_cmap8_class_rec ) 37 | #endif 38 | 39 | #ifdef TT_CONFIG_CMAP_FORMAT_10 40 | TTCMAPCITEM( tt_cmap10_class_rec ) 41 | #endif 42 | 43 | #ifdef TT_CONFIG_CMAP_FORMAT_12 44 | TTCMAPCITEM( tt_cmap12_class_rec ) 45 | #endif 46 | 47 | #ifdef TT_CONFIG_CMAP_FORMAT_13 48 | TTCMAPCITEM( tt_cmap13_class_rec ) 49 | #endif 50 | 51 | #ifdef TT_CONFIG_CMAP_FORMAT_14 52 | TTCMAPCITEM( tt_cmap14_class_rec ) 53 | #endif 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttcolr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttcolr.h 4 | * 5 | * TrueType and OpenType colored glyph layer support (specification). 6 | * 7 | * Copyright (C) 2018-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * Originally written by Shao Yu Zhang . 11 | * 12 | * This file is part of the FreeType project, and may only be used, 13 | * modified, and distributed under the terms of the FreeType project 14 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 15 | * this file you indicate that you have read the license and 16 | * understand and accept it fully. 17 | * 18 | */ 19 | 20 | 21 | #ifndef __TTCOLR_H__ 22 | #define __TTCOLR_H__ 23 | 24 | 25 | #include "ttload.h" 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( FT_Error ) 32 | tt_face_load_colr( TT_Face face, 33 | FT_Stream stream ); 34 | 35 | FT_LOCAL( void ) 36 | tt_face_free_colr( TT_Face face ); 37 | 38 | FT_LOCAL( FT_Bool ) 39 | tt_face_get_colr_layer( TT_Face face, 40 | FT_UInt base_glyph, 41 | FT_UInt *aglyph_index, 42 | FT_UInt *acolor_index, 43 | FT_LayerIterator* iterator ); 44 | 45 | FT_LOCAL( FT_Error ) 46 | tt_face_colr_blend_layer( TT_Face face, 47 | FT_UInt color_index, 48 | FT_GlyphSlot dstSlot, 49 | FT_GlyphSlot srcSlot ); 50 | 51 | 52 | FT_END_HEADER 53 | 54 | 55 | #endif /* __TTCOLR_H__ */ 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttcpal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttcpal.h 4 | * 5 | * TrueType and OpenType color palette support (specification). 6 | * 7 | * Copyright (C) 2018-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * Originally written by Shao Yu Zhang . 11 | * 12 | * This file is part of the FreeType project, and may only be used, 13 | * modified, and distributed under the terms of the FreeType project 14 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 15 | * this file you indicate that you have read the license and 16 | * understand and accept it fully. 17 | * 18 | */ 19 | 20 | 21 | #ifndef __TTCPAL_H__ 22 | #define __TTCPAL_H__ 23 | 24 | 25 | #include "ttload.h" 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( FT_Error ) 32 | tt_face_load_cpal( TT_Face face, 33 | FT_Stream stream ); 34 | 35 | FT_LOCAL( void ) 36 | tt_face_free_cpal( TT_Face face ); 37 | 38 | FT_LOCAL( FT_Error ) 39 | tt_face_palette_set( TT_Face face, 40 | FT_UInt palette_index ); 41 | 42 | 43 | FT_END_HEADER 44 | 45 | 46 | #endif /* __TTCPAL_H__ */ 47 | 48 | /* END */ 49 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttkern.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttkern.h 4 | * 5 | * Load the basic TrueType kerning table. This doesn't handle 6 | * kerning data within the GPOS table at the moment. 7 | * 8 | * Copyright (C) 1996-2020 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | #ifndef TTKERN_H_ 21 | #define TTKERN_H_ 22 | 23 | 24 | #include 25 | #include 26 | 27 | 28 | FT_BEGIN_HEADER 29 | 30 | 31 | FT_LOCAL( FT_Error ) 32 | tt_face_load_kern( TT_Face face, 33 | FT_Stream stream ); 34 | 35 | FT_LOCAL( void ) 36 | tt_face_done_kern( TT_Face face ); 37 | 38 | FT_LOCAL( FT_Int ) 39 | tt_face_get_kerning( TT_Face face, 40 | FT_UInt left_glyph, 41 | FT_UInt right_glyph ); 42 | 43 | #define TT_FACE_HAS_KERNING( face ) ( (face)->kern_avail_bits != 0 ) 44 | 45 | 46 | FT_END_HEADER 47 | 48 | #endif /* TTKERN_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttmtx.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttmtx.h 4 | * 5 | * Load the metrics tables common to TTF and OTF fonts (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTMTX_H_ 20 | #define TTMTX_H_ 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_Error ) 31 | tt_face_load_hhea( TT_Face face, 32 | FT_Stream stream, 33 | FT_Bool vertical ); 34 | 35 | 36 | FT_LOCAL( FT_Error ) 37 | tt_face_load_hmtx( TT_Face face, 38 | FT_Stream stream, 39 | FT_Bool vertical ); 40 | 41 | 42 | FT_LOCAL( void ) 43 | tt_face_get_metrics( TT_Face face, 44 | FT_Bool vertical, 45 | FT_UInt gindex, 46 | FT_Short* abearing, 47 | FT_UShort* aadvance ); 48 | 49 | FT_END_HEADER 50 | 51 | #endif /* TTMTX_H_ */ 52 | 53 | 54 | /* END */ 55 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttpost.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttpost.h 4 | * 5 | * PostScript name table processing for TrueType and OpenType fonts 6 | * (specification). 7 | * 8 | * Copyright (C) 1996-2020 by 9 | * David Turner, Robert Wilhelm, and Werner Lemberg. 10 | * 11 | * This file is part of the FreeType project, and may only be used, 12 | * modified, and distributed under the terms of the FreeType project 13 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 14 | * this file you indicate that you have read the license and 15 | * understand and accept it fully. 16 | * 17 | */ 18 | 19 | 20 | #ifndef TTPOST_H_ 21 | #define TTPOST_H_ 22 | 23 | 24 | #include 25 | #include FT_CONFIG_CONFIG_H 26 | #include 27 | 28 | 29 | FT_BEGIN_HEADER 30 | 31 | 32 | FT_LOCAL( FT_Error ) 33 | tt_face_get_ps_name( TT_Face face, 34 | FT_UInt idx, 35 | FT_String** PSname ); 36 | 37 | FT_LOCAL( void ) 38 | tt_face_free_ps_names( TT_Face face ); 39 | 40 | 41 | FT_END_HEADER 42 | 43 | #endif /* TTPOST_H_ */ 44 | 45 | 46 | /* END */ 47 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/ttsbit.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttsbit.h 4 | * 5 | * TrueType and OpenType embedded bitmap support (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTSBIT_H_ 20 | #define TTSBIT_H_ 21 | 22 | 23 | #include "ttload.h" 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_LOCAL( FT_Error ) 30 | tt_face_load_sbit( TT_Face face, 31 | FT_Stream stream ); 32 | 33 | FT_LOCAL( void ) 34 | tt_face_free_sbit( TT_Face face ); 35 | 36 | 37 | FT_LOCAL( FT_Error ) 38 | tt_face_set_sbit_strike( TT_Face face, 39 | FT_Size_Request req, 40 | FT_ULong* astrike_index ); 41 | 42 | FT_LOCAL( FT_Error ) 43 | tt_face_load_strike_metrics( TT_Face face, 44 | FT_ULong strike_index, 45 | FT_Size_Metrics* metrics ); 46 | 47 | FT_LOCAL( FT_Error ) 48 | tt_face_load_sbit_image( TT_Face face, 49 | FT_ULong strike_index, 50 | FT_UInt glyph_index, 51 | FT_UInt load_flags, 52 | FT_Stream stream, 53 | FT_Bitmap *map, 54 | TT_SBit_MetricsRec *metrics ); 55 | 56 | 57 | FT_END_HEADER 58 | 59 | #endif /* TTSBIT_H_ */ 60 | 61 | 62 | /* END */ 63 | -------------------------------------------------------------------------------- /Osiris/freetype/src/sfnt/woff2tags.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * woff2tags.h 4 | * 5 | * WOFFF2 Font table tags (specification). 6 | * 7 | * Copyright (C) 2019-2020 by 8 | * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef WOFF2TAGS_H 20 | #define WOFF2TAGS_H 21 | 22 | 23 | #include 24 | #include 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_LOCAL( FT_ULong ) 31 | woff2_known_tags( FT_Byte index ); 32 | 33 | 34 | FT_END_HEADER 35 | 36 | #endif /* WOFF2TAGS_H */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /Osiris/freetype/src/smooth/ftgrays.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftgrays.h 4 | * 5 | * FreeType smooth renderer declaration 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTGRAYS_H_ 20 | #define FTGRAYS_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | 27 | #ifdef STANDALONE_ 28 | #include "ftimage.h" 29 | #else 30 | #include 31 | #include 32 | #endif 33 | 34 | 35 | /************************************************************************** 36 | * 37 | * To make ftgrays.h independent from configuration files we check 38 | * whether FT_EXPORT_VAR has been defined already. 39 | * 40 | * On some systems and compilers (Win32 mostly), an extra keyword is 41 | * necessary to compile the library as a DLL. 42 | */ 43 | #ifndef FT_EXPORT_VAR 44 | #define FT_EXPORT_VAR( x ) extern x 45 | #endif 46 | 47 | FT_EXPORT_VAR( const FT_Raster_Funcs ) ft_grays_raster; 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif /* FTGRAYS_H_ */ 55 | 56 | 57 | /* END */ 58 | -------------------------------------------------------------------------------- /Osiris/freetype/src/smooth/ftsmerrs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsmerrs.h 4 | * 5 | * smooth renderer error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the smooth renderer error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef FTSMERRS_H_ 27 | #define FTSMERRS_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX Smooth_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_Smooth 36 | 37 | #include 38 | 39 | #endif /* FTSMERRS_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/smooth/ftsmooth.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftsmooth.h 4 | * 5 | * Anti-aliasing renderer interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTSMOOTH_H_ 20 | #define FTSMOOTH_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_DECLARE_RENDERER( ft_smooth_renderer_class ) 30 | 31 | 32 | FT_END_HEADER 33 | 34 | #endif /* FTSMOOTH_H_ */ 35 | 36 | 37 | /* END */ 38 | -------------------------------------------------------------------------------- /Osiris/freetype/src/smooth/smooth.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * smooth.c 4 | * 5 | * FreeType anti-aliasing rasterer module component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "ftgrays.c" 22 | #include "ftsmooth.c" 23 | 24 | 25 | /* END */ 26 | -------------------------------------------------------------------------------- /Osiris/freetype/src/truetype/truetype.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * truetype.c 4 | * 5 | * FreeType TrueType driver component (body only). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #define FT_MAKE_OPTION_SINGLE_OBJECT 20 | 21 | #include "ttdriver.c" /* driver interface */ 22 | #include "ttgload.c" /* glyph loader */ 23 | #include "ttgxvar.c" /* gx distortable font */ 24 | #include "ttinterp.c" 25 | #include "ttobjs.c" /* object manager */ 26 | #include "ttpload.c" /* tables loader */ 27 | #include "ttsubpix.c" 28 | 29 | 30 | /* END */ 31 | -------------------------------------------------------------------------------- /Osiris/freetype/src/truetype/ttdriver.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttdriver.h 4 | * 5 | * High-level TrueType driver interface (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTDRIVER_H_ 20 | #define TTDRIVER_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | FT_DECLARE_DRIVER( tt_driver_class ) 29 | 30 | FT_END_HEADER 31 | 32 | #endif /* TTDRIVER_H_ */ 33 | 34 | 35 | /* END */ 36 | -------------------------------------------------------------------------------- /Osiris/freetype/src/truetype/tterrors.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * tterrors.h 4 | * 5 | * TrueType error codes (specification only). 6 | * 7 | * Copyright (C) 2001-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This file is used to define the TrueType error enumeration 22 | * constants. 23 | * 24 | */ 25 | 26 | #ifndef TTERRORS_H_ 27 | #define TTERRORS_H_ 28 | 29 | #include 30 | 31 | #undef FTERRORS_H_ 32 | 33 | #undef FT_ERR_PREFIX 34 | #define FT_ERR_PREFIX TT_Err_ 35 | #define FT_ERR_BASE FT_Mod_Err_TrueType 36 | 37 | #include 38 | 39 | #endif /* TTERRORS_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /Osiris/freetype/src/truetype/ttgload.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttgload.h 4 | * 5 | * TrueType Glyph Loader (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTGLOAD_H_ 20 | #define TTGLOAD_H_ 21 | 22 | 23 | #include "ttobjs.h" 24 | 25 | #ifdef TT_USE_BYTECODE_INTERPRETER 26 | #include "ttinterp.h" 27 | #endif 28 | 29 | 30 | FT_BEGIN_HEADER 31 | 32 | 33 | FT_LOCAL( void ) 34 | TT_Init_Glyph_Loading( TT_Face face ); 35 | 36 | FT_LOCAL( void ) 37 | TT_Get_HMetrics( TT_Face face, 38 | FT_UInt idx, 39 | FT_Short* lsb, 40 | FT_UShort* aw ); 41 | 42 | FT_LOCAL( void ) 43 | TT_Get_VMetrics( TT_Face face, 44 | FT_UInt idx, 45 | FT_Pos yMax, 46 | FT_Short* tsb, 47 | FT_UShort* ah ); 48 | 49 | FT_LOCAL( FT_Error ) 50 | TT_Load_Glyph( TT_Size size, 51 | TT_GlyphSlot glyph, 52 | FT_UInt glyph_index, 53 | FT_Int32 load_flags ); 54 | 55 | 56 | FT_END_HEADER 57 | 58 | #endif /* TTGLOAD_H_ */ 59 | 60 | 61 | /* END */ 62 | -------------------------------------------------------------------------------- /Osiris/freetype/src/truetype/ttpload.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ttpload.h 4 | * 5 | * TrueType-specific tables loader (specification). 6 | * 7 | * Copyright (C) 1996-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef TTPLOAD_H_ 20 | #define TTPLOAD_H_ 21 | 22 | 23 | #include 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | FT_LOCAL( FT_Error ) 30 | tt_face_load_loca( TT_Face face, 31 | FT_Stream stream ); 32 | 33 | FT_LOCAL( FT_ULong ) 34 | tt_face_get_location( TT_Face face, 35 | FT_UInt gindex, 36 | FT_UInt *asize ); 37 | 38 | FT_LOCAL( void ) 39 | tt_face_done_loca( TT_Face face ); 40 | 41 | FT_LOCAL( FT_Error ) 42 | tt_face_load_cvt( TT_Face face, 43 | FT_Stream stream ); 44 | 45 | FT_LOCAL( FT_Error ) 46 | tt_face_load_fpgm( TT_Face face, 47 | FT_Stream stream ); 48 | 49 | 50 | FT_LOCAL( FT_Error ) 51 | tt_face_load_prep( TT_Face face, 52 | FT_Stream stream ); 53 | 54 | 55 | FT_LOCAL( FT_Error ) 56 | tt_face_load_hdmx( TT_Face face, 57 | FT_Stream stream ); 58 | 59 | 60 | FT_LOCAL( void ) 61 | tt_face_free_hdmx( TT_Face face ); 62 | 63 | 64 | FT_LOCAL( FT_Byte* ) 65 | tt_face_get_device_metrics( TT_Face face, 66 | FT_UInt ppem, 67 | FT_UInt gindex ); 68 | 69 | FT_END_HEADER 70 | 71 | #endif /* TTPLOAD_H_ */ 72 | 73 | 74 | /* END */ 75 | -------------------------------------------------------------------------------- /Osiris/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Osiris/imgui/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX9 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bits indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct IDirect3DDevice9; 15 | struct ImDrawData; 16 | 17 | bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 18 | void ImGui_ImplDX9_Shutdown(); 19 | void ImGui_ImplDX9_NewFrame(); 20 | void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 21 | 22 | void ImGui_ImplDX9_DestroyFontsTexture(); 23 | 24 | // Use if you want to reset your rendering device without losing ImGui state. 25 | bool ImGui_ImplDX9_CreateDeviceObjects(); 26 | void ImGui_ImplDX9_InvalidateDeviceObjects(); 27 | 28 | void* ImGui_CreateTextureRGBA(int width, int height, const unsigned char* data); 29 | void ImGui_DestroyTexture(void* texture); 30 | -------------------------------------------------------------------------------- /Osiris/imgui/imgui_impl_sdl.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for SDL2 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: Clipboard support. 8 | // [X] Platform: Keyboard arrays indexed using SDL_SCANCODE_* codes, e.g. ImGui::IsKeyPressed(SDL_SCANCODE_SPACE). 9 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 10 | // Missing features: 11 | // [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME. 12 | 13 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 14 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 15 | // https://github.com/ocornut/imgui 16 | 17 | #pragma once 18 | #include "imgui.h" // IMGUI_IMPL_API 19 | 20 | struct SDL_Window; 21 | typedef union SDL_Event SDL_Event; 22 | 23 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); 24 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); 25 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window); 26 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window); 27 | IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); 28 | IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window); 29 | IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); 30 | -------------------------------------------------------------------------------- /Osiris/imgui/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // imgui_stdlib.h 2 | // Wrappers for C++ standard library (STL) types (std::string, etc.) 3 | // This is also an example of how you may wrap your own similar types. 4 | 5 | // Compatibility: 6 | // - std::string support is only guaranteed to work from C++11. 7 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 8 | 9 | // Changelog: 10 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 11 | 12 | #pragma once 13 | 14 | #include 15 | 16 | namespace ImGui 17 | { 18 | // ImGui::InputText() with std::string 19 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 20 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 21 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 22 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 23 | } 24 | -------------------------------------------------------------------------------- /z.images/Untitled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finutz/my-custom-osiris/5819a4395c3c986b9da176a47f2ce74480dc496e/z.images/Untitled.png --------------------------------------------------------------------------------