code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ClCompile Include="..\..\source\sw\rsrc\game_icon.c">
      <Filter>Resource Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\actor.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\ai.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\anim.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\bldscript.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\border.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\break.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\brooms.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\bunny.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\cache.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\cheats.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\colormap.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\common.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\config.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\console.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\coolg.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\coolie.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\copysect.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\demo.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\draw.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\eel.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\game.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\girlninj.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\goro.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\grpscan.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\hornet.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\interp.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\interpsh.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\interpso.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\inv.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\jbhlp.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\jplayer.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\jsector.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\jweapon.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\lava.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\light.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\mclip.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\mdastr.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\menus.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\miscactr.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\morph.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\network.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\ninja.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\panel.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\player.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\predict.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\quake.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\ripper.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\ripper2.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\rooms.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\rotator.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\rts.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\save.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\saveable.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\scrip2.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\sector.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\serp.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\setup.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\skel.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\skull.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\slidor.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\sounds.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\spike.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\sprite.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\startgtk.game.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\startwin.game.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\sumo.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\swconfig.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\sync.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\text.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\track.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\vator.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\vis.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\wallmove.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\warp.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\weapon.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\zilla.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\zombie.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\sw\src\jnstub.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <Filter Include="Header Files">
      <UniqueIdentifier>{099c8183-5e54-495e-9a7e-20e481135367}</UniqueIdentifier>
    </Filter>
    <Filter Include="Resource Files">
      <UniqueIdentifier>{a00d853b-669e-4fa4-8ee8-94ccc3830730}</UniqueIdentifier>
    </Filter>
    <Filter Include="Source Files">
      <UniqueIdentifier>{25e7723e-9a9a-4c51-89a8-e8c20c20ff12}</UniqueIdentifier>
    </Filter>
    <Filter Include="Header Files\midi">
      <UniqueIdentifier>{e969efff-b36b-455e-a639-b0d7bfbdd2a0}</UniqueIdentifier>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="..\..\source\sw\rsrc\gameres.rc">
      <Filter>Resource Files</Filter>
    </ResourceCompile>
  </ItemGroup>
  <ItemGroup>
    <Manifest Include="voidsw.exe.manifest">
      <Filter>Resource Files</Filter>
    </Manifest>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\source\sw\src\_config.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\_functio.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\_rts.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\actor.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\ai.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\ambient.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\anim.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\bots.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\break.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\cache.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\colormap.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\common_game.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\config.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\conpic.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\damage.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\demo.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\digi.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\function.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\game.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\gamedefs.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\GameListSource.game.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\GrpFile.game.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\grpscan.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\interp.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\interpso.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\inv.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\jnames.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\jsector.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\jtags.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\keys.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\light.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\lists.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\mclip.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\menus.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\mfile.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\mytypes.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\names.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\names2.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\net.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\ninja.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\pal.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\panel.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\parent.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\parse.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\player.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\quake.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\reserve.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\rts.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\saveable.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\savedef.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\sector.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\settings.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\slidor.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\sounds.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\sprite.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\stag.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\startwin.game.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\sw_strs.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\tags.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\text.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\track.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\trigger.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\vis.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\warp.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\sw\src\weapon.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\duke3d\src\midi.h">
      <Filter>Header Files\midi</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\duke3d\src\mpu401.h">
      <Filter>Header Files\midi</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\audiolib\include\music.h">
      <Filter>Header Files\midi</Filter>
    </ClInclude>
  </ItemGroup>
</Project>


code:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|ARM64">
      <Configuration>Debug</Configuration>
      <Platform>ARM64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|ARM64">
      <Configuration>Release</Configuration>
      <Platform>ARM64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\..\source\voidwrap\src\dllmain.cpp" />
    <ClCompile Include="..\..\source\voidwrap\src\voidwrap_steam.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\source\voidwrap\include\voidwrap.h" />
    <ClInclude Include="..\..\source\voidwrap\include\voidwrap_steam.h" />
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamapplist.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamapps.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamappticket.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamclient.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamcontroller.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamfriends.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgamecoordinator.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgameserver.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgameserverstats.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamhtmlsurface.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamhttp.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteaminput.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteaminventory.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammasterserverupdater.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammatchmaking.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammusic.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammusicremote.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworking.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworkingsockets.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworkingutils.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamparentalsettings.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamps3overlayrenderer.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamremotestorage.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamscreenshots.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamugc.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamuser.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamuserstats.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamutils.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamvideo.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\matchmakingtypes.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamclientpublic.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamdatagram_ticketgen.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamdatagram_tickets.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamencryptedappticket.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamhttpenums.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamnetworkingtypes.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamps3params.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamtypes.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamuniverse.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_common.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_flat.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_internal.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_gameserver.h">
      <ExcludedFromBuild>true</ExcludedFromBuild>
    </ClInclude>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>15.0</VCProjectVersion>
    <ProjectGuid>{01230AD2-3746-418F-84D8-189E7CBC16C9}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>VoidWrap</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin;$(LibraryPath)</LibraryPath>
    <OutDir>$(SolutionDir)..\..\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin/win64;$(LibraryPath)</LibraryPath>
    <OutDir>$(SolutionDir)..\..\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin/win64;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin;$(LibraryPath)</LibraryPath>
    <OutDir>$(SolutionDir)..\..\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin/win64;$(LibraryPath)</LibraryPath>
    <OutDir>$(SolutionDir)..\..\</OutDir>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>../../source/voidwrap/sdk/public/steam;../../source/voidwrap/include;../../source/build/include;$(IncludePath)</IncludePath>
    <TargetName>$(ProjectName)_steam_$(PlatformShortName)</TargetName>
    <LibraryPath>../../source/voidwrap/sdk/redistributable_bin/win64;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\steam_api.dll ..\..\</Command>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\win64\steam_api64.dll ..\..\</Command>
    </PostBuildEvent>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\win64\steam_api64.dll ..\..\</Command>
    </PostBuildEvent>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\steam_api.dll ..\..\</Command>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\win64\steam_api64.dll ..\..\</Command>
    </PostBuildEvent>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
    <ClCompile>
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;VOIDWRAP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
      <DiagnosticsFormat>Caret</DiagnosticsFormat>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>steam_api64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Command>copy /Y ..\..\source\voidwrap\sdk\redistributable_bin\win64\steam_api64.dll ..\..\</Command>
    </PostBuildEvent>
    <PostBuildEvent>
      <Message>Copy Steam API DLL into root folder.</Message>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>

repo_name: orochi/nblood

license: mit


code:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="Source Files">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="Header Files">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
    </Filter>
    <Filter Include="Resource Files">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
    <Filter Include="Header Files\Steam API">
      <UniqueIdentifier>{c18fad30-843f-4b48-a0a9-7b5e9f025aef}</UniqueIdentifier>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\..\source\voidwrap\src\dllmain.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\source\voidwrap\src\voidwrap_steam.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\source\voidwrap\include\voidwrap.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\include\voidwrap_steam.h">
      <Filter>Header Files</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamapplist.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamapps.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamappticket.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamclient.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamcontroller.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamfriends.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgamecoordinator.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgameserver.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamgameserverstats.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamhtmlsurface.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamhttp.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteaminput.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteaminventory.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammasterserverupdater.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammatchmaking.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammusic.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteammusicremote.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworking.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworkingsockets.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamnetworkingutils.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamparentalsettings.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamps3overlayrenderer.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamremotestorage.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamscreenshots.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamugc.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamuser.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamuserstats.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamutils.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\isteamvideo.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\matchmakingtypes.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_common.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_flat.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_api_internal.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steam_gameserver.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamclientpublic.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamdatagram_ticketgen.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamdatagram_tickets.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamencryptedappticket.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamhttpenums.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamnetworkingtypes.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamps3params.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamtypes.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
    <ClInclude Include="..\..\source\voidwrap\sdk\public\steam\steamuniverse.h">
      <Filter>Header Files\Steam API</Filter>
    </ClInclude>
  </ItemGroup>
</Project>


code:
#!/bin/bash

# build debug/release x86/x86_64/ppc versions of mapster32 and eduke32 on OS X

cd ..

# Variable presets:
buildppc=1
build86=1
build64=1
buildmain=1
buildtools=0
installtools=0
builddebug=0
buildrelease=1
pack=1
iamhelix=0
dummy=0
doclean=0
package=package
lastrevision=

# Enforce OS:
if [ `uname -s` != Darwin ]; then
    echo This script is for OS X only.
    exit 1
fi

# Detect and account for OS X version:
darwinversion=`uname -r | cut -d . -f 1`

if [ `expr $darwinversion \< 9` == 1 ]; then
    echo OS X 10.5 is the minimum requirement for building.
    exit 1
fi
if [ `expr $darwinversion \< 10` == 1 ]; then
    build64=0
    # x86_64 is disabled by default on Leopard to avoid the additional hassles of getting libvpx installed into a PowerPC environment.
fi
if [ `expr $darwinversion \> 9` == 1 ]; then
    buildppc=0
    # PPC is disabled by default on Snow Leopard for ease of installation.
fi
# All defaults can be overridden with the command-line parameters.

# Parse arguments:
for i in $*; do
    case $i in
        # onlyzip, helix: For Helixhorned's convenience.
        onlyzip)
            buildmain=0
            buildtools=0
            pack=1
        ;;
        helix)
            iamhelix=1
            buildppc=0
            build86=1
            build64=1
            buildmain=1
            buildtools=1
            builddebug=0
            pack=1
        ;;
        debughelix)
            iamhelix=1
            buildppc=0
            build86=0
            build64=1
            buildmain=1
            buildtools=0
            builddebug=1
            buildrelease=0
            pack=1
        ;;
        dummyhelix)
            iamhelix=1
            buildppc=0
            build86=0
            build64=0
            buildmain=0
            buildtools=0
            builddebug=0
            buildrelease=0
            pack=0
            dummy=1
        ;;
        clean)
            buildppc=0
            build86=0
            build64=0
            buildmain=0
            buildtools=0
            builddebug=0
            buildrelease=0
            pack=0
            doclean=1
        ;;
        # For the convenience of universal distributors:
        dist)
            buildppc=1
            build86=1
            build64=1
            buildmain=1
            buildtools=0
            builddebug=1
            pack=1
        ;;
        disttools)
            buildppc=1
            build86=1
            build64=1
            buildmain=0
            buildtools=1
            builddebug=1
            pack=0
        ;;
        full)
            buildppc=1
            build86=1
            build64=1
            buildmain=1
            buildtools=1
            builddebug=1
            pack=1
        ;;

        # misc.
        installtools)
            buildppc=0
            build86=0
            build64=0
            buildmain=0
            buildtools=0
            builddebug=0
            pack=0
            installtools=1
        ;;

        --buildppc=*)
            buildppc=${i#*=}
        ;;
        --build86=*)
            build86=${i#*=}
        ;;
        --build64=*)
            build64=${i#*=}
        ;;

        --main=*)
            buildmain=${i#*=}
        ;;
        --tools=*)
            buildtools=${i#*=}
        ;;

        --debug=*)
        builddebug=${i#*=}
        ;;

        --pack=*)
            pack=${i#*=}
        ;;

        --lastrev=*)
            lastrevision=${i#*=}
        ;;

        *)
            echo "usage: ./osxbuild.sh [options]"
            echo "options:"
            echo "    [--buildppc=<0|1>] [--build86=<0|1>] [--build64=<0|1>]"
            echo "    [--debug=<0|1>]"
            echo "    [--main=<0|1>] [--tools=<0|1>]"
            echo "    [--pack=<0|1>]"
            echo "presets:"
            echo "    [onlyzip] [dist] [disttools] [full] [installtools]"
            exit 1
        ;;
    esac
done

# Mandatory disabled settings enforced:
if [ `expr $darwinversion \< 9` == 1 ]; then
    build64=0
    # x86_64 support did not exist before Leopard.
fi
if [ `expr $darwinversion \> 10` == 1 ]; then
    buildppc=0
    # PPC is disabled on Lion and up because support has been removed from the SDKs.
fi

# Detect versioning systems and pull the revision number:
export VC_REV=$(svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
vc=svn
if [ -z "$VC_REV" ]; then
    vc=git
    export VC_REV=$(git svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
fi

if [ -z "$VC_REV" ]; then
    export VC_REV=Unknown
    vc=none
fi

function dobuildtools ()
{
    make veryclean
    local cmdline="$2"
    eval $cmdline
    if [ $? ]; then
        echo buildtools: "$1" build succeeded.
    else
        echo buildtools: "$1" build failed.
        exit 1
    fi
}

function dobuildem()  # build EDuke32 and Mapster32
{
    make veryclean
    local cmdline="$2"
    eval $cmdline
    if [ $? ]; then
        echo $1 build succeeded.
        cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.$1
        cp "EDuke32.app/Contents/MacOS/eduke32" eduke32.$1
    else
        echo $1 build failed.
        exit 1
    fi
}

# A little factoring:
commonargs="WITHOUT_GTK=1"
if [ $buildppc == 1 ] || [ `expr $darwinversion = 9` == 1 ]; then
    commonargs="$commonargs DARWIN9=1"
fi
if [ `expr $darwinversion = 10` == 1 ]; then
    commonargs="$commonargs DARWIN10=1"
fi

if [ $doclean == 1 ]; then
    cd build
    rm -f *{.x86,.x64,.ppc}
    cd ..
fi

# Building the buildtools:
if [ $buildtools$installtools != 00 ] && [ -d "build" ]; then

    makecmd="make -k"

    if [ $buildtools == 1 ]; then
        rm -f *{.x86,.x64,.ppc}
        make veryclean
        EXESUFFIX_OVERRIDE=.debug make veryclean

        if [ $build64 == 1 ]; then
            if [ $builddebug == 1 ]; then
                dobuildtools "x86_64 debug" \
                    "ARCH=x86_64 EXESUFFIX_OVERRIDE=.debug.x64 $commonargs RELEASE=0 USE_LIBVPX=1 $makecmd utils"
            fi

            dobuildtools "x86_64 release" \
                "ARCH=x86_64 EXESUFFIX_OVERRIDE=.x64 $commonargs RELEASE=1 USE_LIBVPX=1 $makecmd utils"
        fi

        if [ $build86 == 1 ]; then
            if [ $builddebug == 1 ]; then
                dobuildtools "x86 debug" \
                    "ARCH=i386 EXESUFFIX_OVERRIDE=.debug.x86 $commonargs RELEASE=0 USE_LIBVPX=0 $makecmd utils"
            fi

            dobuildtools "x86 release" \
                "ARCH=i386 EXESUFFIX_OVERRIDE=.x86 $commonargs RELEASE=1 USE_LIBVPX=0 $makecmd utils"
        fi

        if [ $buildppc == 1 ]; then
            if [ $builddebug == 1 ]; then
                dobuildtools "PowerPC debug" \
                    "ARCH=ppc EXESUFFIX_OVERRIDE=.debug.ppc $commonargs RELEASE=0 USE_LIBVPX=0 $makecmd utils"
            fi

            dobuildtools "PowerPC release" \
                "ARCH=ppc EXESUFFIX_OVERRIDE=.ppc $commonargs RELEASE=1 USE_LIBVPX=0 $makecmd utils"
        fi

        mkdir -p tools

        echo buildtools: Creating fat binaries.
        utils=`make printutils && EXESUFFIX_OVERRIDE=.debug make printutils`
        for i in $utils; do
            binaries=
            for j in ${i}.{x86,x64,ppc}; do
                if [ -f "$j" ]; then
                    binaries="$binaries $j"
                fi
            done
            if [ -n "$binaries" ]; then
                lipo -create $binaries -output $i || exit 1
#                ln -f -s $i tools/$i || exit 1
                cp -f $i tools/$i || exit 1
            fi
        done
    fi

    if [ $installtools == 1 ]; then
        if [ -d "/opt/local/bin" ]; then
            echo buildtools: Installing to MacPorts search path.
            for i in $utils; do
                if [ -f "$i" ]; then
                    cp -f "$i" "/opt/local/bin/" || exit 1
                fi
            done
        fi

        if [ -d "/usr/local/bin" ]; then
            echo buildtools: Installing to Homebrew search path.
            for i in $utils; do
                if [ -f "$i" ]; then
                    cp -f "$i" "/usr/local/bin/" || exit 1
                fi
            done
        fi
    fi

    cd ..
fi

if [ $doclean == 1 ] || [ $buildmain == 1 ]; then
    rm -f {eduke32,mapster32}{.debug,}{.x86,.x64,.ppc,}
    rm -rf {$package/,}{EDuke32,Mapster32}{.debug,}.app
fi

# The build process itself:
if [ $buildmain == 1 ]; then
    if [ $iamhelix == 1 ]; then
        makecmd="make -j 2"
    else
        makecmd="make"
    fi

    if [ $build64 == 1 ]; then
        if [ $builddebug == 1 ]; then
            dobuildem debug.x64 "ARCH=x86_64 $commonargs RELEASE=0 $makecmd"
        fi

        if [ $buildrelease == 1 ]; then
            dobuildem x64 "ARCH=x86_64 $commonargs RELEASE=1 $makecmd"
        fi
    fi

    if [ $build86 == 1 ]; then
        if [ $builddebug == 1 ]; then
            dobuildem debug.x86 "ARCH=i386 $commonargs RELEASE=0 USE_LIBPNG=0 USE_LIBVPX=0 $makecmd"
        fi

        dobuildem x86 "ARCH=i386 $commonargs RELEASE=1 USE_LIBPNG=0 USE_LIBVPX=0 $makecmd"
    fi

    if [ $buildppc == 1 ]; then
        if [ $builddebug == 1 ]; then
            dobuildem debug.ppc "ARCH=ppc $commonargs RELEASE=0 USE_LIBPNG=0 USE_LIBVPX=0 $makecmd"
        fi

        dobuildem ppc "ARCH=ppc $commonargs RELEASE=1 USE_LIBPNG=0 USE_LIBVPX=0 $makecmd"
    fi
fi

# Duplicating .app bundles for debug build:
if [ $builddebug == 1 ] || [ $pack == 1 ]; then
    for i in Mapster32 EDuke32; do
        if [ -d "$i.app" ]; then
            cp -RP "$i.app" "$i.debug.app"
        fi
    done
fi

# Begin assembling archive contents:
echo Creating fat binaries.

success=$dummy
if [ $dummy == 0 ]; then
    for i in {eduke32,mapster32}{.debug,}; do
        binaries=
        for j in ${i}.{x86,x64,ppc}; do
            if [ -f "$j" ]; then
                binaries="$binaries $j"
                success=1
            fi
        done

        if [ -n "$binaries" ]; then
            lipo -create $binaries -output $i
            app=${i//eduke32/EDuke32}
            app=${app//mapster32/Mapster32}.app
            cp -f $i "$app/Contents/MacOS/${i%.debug}"
            mv -f "$app" "$package/"
        fi
    done
fi

# Almost done...
if [ $success == 1 ]; then
    cd $package

    echo "Generating README.OSX and Changelog.txt"

    # Output README.OSX:
    let "darwinversion -= 4"
    echo "This archive was produced from revision ${VC_REV} by the osxbuild.sh script." > README.OSX
    echo "Built on: Mac OS X 10.$darwinversion" >> README.OSX
    echo "EDuke32 home: http://www.eduke32.com" >> README.OSX
    echo "OS X build discussion on Duke4.net: http://forums.duke4.net/topic/4242-building-eduke-on-mac-os-x/" >> README.OSX
    echo "The 64-bit build in this archive has LibVPX (http://www.webmproject.org/code/)" >> README.OSX
    echo "from MacPorts (http://www.macports.org/) and" >> README.OSX
    echo "LibPNG from Fink (http://www.finkproject.org/) statically linked into it." >> README.OSX

    # Generate Changelog:
    if [ -z $lastrevision ]; then
        lastrevision=$(ls -A1 eduke32-osx* | tail -n1 | cut -d- -f3 | cut -d. -f1)

        if [ -z $lastrevision ]; then
            let lastrevision=VC_REV-1
        elif [ $lastrevision -lt $VC_REV ]; then
            let lastrevision+=1
        else
            let lastrevision=VC_REV-1
        fi
    fi

    echo "Using r$lastrevision as last revision for change log"

    if [ "$vc" == "svn" ]; then
        svn log -r $VC_REV:$lastrevision > Changelog.txt
    elif [ "$vc" == "git" ]; then
        commitid=$(git log --grep="git-svn-id: .*@$lastrevision" -n 1 | grep -E '^commit ' | head -n 1 | awk '{print $2}')
        # Get the commit messages and strip the email addresses
        git log $commitid..HEAD | sed 's/<.*@.*>//g' > Changelog.txt
    fi

    # Package
    if [ $pack == 1 ]; then
        arfilename="eduke32-osx-${VC_REV}.zip"
        echo "Packing distribution into $arfilename"
        rm -f "$arfilename"
        zip -r -y "$arfilename" * -x "*.svn*" "*.git*" "*.dll"
    fi
    cd ..
fi


code:
#!/bin/bash

get_abs_path()
{
    echo "$(cd "$1" && pwd)"
}

get_num_logical_cpus()
{
    getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1
}

targets=( eduke32 mapster32 )
extensions=( ".dol" )

# Change directory to the eduke32 root:

sourcedir="$(dirname "${BASH_SOURCE[0]}")"
sourcedir="$(get_abs_path "$sourcedir/..")"

pushd "${sourcedir}" >/dev/null

# Set up PATH

p=${DEVKITPPC}/bin:${PATH}

pathstoremove=( "/mingw64/bin" )

for i in "${pathstoremove[@]}"; do
    p=${p/:${i}/}
done

export PATH=${p}

# Detect versioning systems and pull the revision number:

export VC_REV=$(svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
vc=svn
if [ -z "$VC_REV" ]; then
    vc=git
    export VC_REV=$(git svn info 2> /dev/null | grep Revision | awk '{ print $2 }')
fi
if [ -z "$VC_REV" ]; then
    export VC_REV=Unknown
    vc=none
fi

date=$(date +%Y%m%d)

# Build:

make=( make PLATFORM=WII $* STRIP="" )

echo "${make[@]}"
"${make[@]}"

for i in "${targets[@]}"; do
    for j in "${extensions[@]}"; do
        if [ ! -f "$i$j" ]; then
            exit 1
        fi
    done
done

# Package data:

mkdir -p apps

for i in "${targets[@]}"; do
    cp -R "platform/Wii/apps/$i" "apps/"
    for j in "${extensions[@]}"; do
        mv -f "$i$j" "apps/${i}/boot${j}"
    done
    for j in ".elf.map"; do
        rm -f "$i$j"
    done
    echo -e "    <version>r${VC_REV}</version>\n    <release_date>${date}</release_date>" | cat "platform/Wii/${i}_meta_1.xml" - "platform/Wii/${i}_meta_2.xml" >"apps/${i}/meta.xml"
done

if [ -d "apps/eduke32" ]; then
    cp -R package/common/* apps/eduke32/
    rm -f apps/eduke32/*.dll
fi

if [ -d "apps/mapster32" ]; then
    cp -R package/common/* apps/mapster32/
    cp -R package/sdk/* apps/mapster32/
    rm -f apps/mapster32/*.dll
fi

ls -l -R apps

cpus=$(get_num_logical_cpus)

rm -f "eduke32-wii-r${VC_REV}-debug-elf.7z"
rm -f "eduke32-wii-r${VC_REV}.7z"
7zr a -mx9 -ms=on -t7z -m0=lzma2 -mmt${cpus} "eduke32-wii-r${VC_REV}-debug-elf.7z" *.elf -xr!*.svn*
7zr a -mx9 -ms=on -t7z -m0=lzma2 -mmt${cpus} "eduke32-wii-r${VC_REV}.7z" apps -xr!*.svn*

# Clean up:

popd >/dev/null


code:
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


code:
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
#ifndef __AL_MIDI_H
#define __AL_MIDI_H

#include "opl3.h"

extern int AL_Stereo;
extern int AL_AdditiveMode;
extern float AL_PostAmp;

typedef struct
{
    uint8_t SAVEK[2];
    uint8_t Level[2];
    uint8_t Env1[2];
    uint8_t Env2[2];
    uint8_t Wave[2];
    uint8_t Feedback;
    int8_t  Transpose;
    int8_t  Velocity;
} AdLibTimbre;

extern AdLibTimbre ADLIB_TimbreBank[256];

void AL_RegisterTimbreBank(uint8_t *timbres);
void AL_SetStereo(int const stereo);

#endif


code:
#pragma once
#ifndef driver_sf2_h__
#define driver_sf2_h__

#include "compat.h"
#include "midifuncs.h"

enum
{
    SF2_Error     = -1,
    SF2_Ok        = 0,
    SF2_BankError = 1,
};

int         SF2Drv_GetError(void);
const char *SF2Drv_ErrorString(int ErrorNumber);

int  SF2Drv_MIDI_Init(midifuncs *);
void SF2Drv_MIDI_Shutdown(void);
int  SF2Drv_MIDI_StartPlayback(void);
void SF2Drv_MIDI_HaltPlayback(void);
void SF2Drv_MIDI_SetTempo(int tempo, int division);
void SF2Drv_MIDI_Service(void);
#endif // driver_sf2_h__


code:
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/
/**********************************************************************
   module: FX_MAN.H

   author: James R. Dose
   date:   March 17, 1994

   Public header for FX_MAN.C

   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
**********************************************************************/

#ifndef FX_MAN_H_
#define FX_MAN_H_

#include <inttypes.h>
#include "sndcards.h"
#include "limits.h"
#include "multivoc.h"

#ifdef __cplusplus
extern "C" {
#endif

enum FX_ERRORS
{
    FX_Warning = -2,
    FX_Error = -1,
    FX_Ok = 0,
    FX_InvalidCard,
    FX_MultiVocError,
};

enum FX_LOOP_HOW
{
    FX_ONESHOT = -1,
    FX_LOOP = 0,
};

#define FX_MUSIC_PRIORITY	INT_MAX

const char *FX_ErrorString(int ErrorNumber);
int FX_Init(int numvoices, int numchannels, int mixrate, void *initdata);
void FX_InitCvars(void);
int FX_Shutdown(void);
int FX_GetDevice(void);

/* returns true only after program startup */
static FORCE_INLINE int FX_WarmedUp(void)
{
    return ASS_PCMSoundDriver != ASS_AutoDetect;
}

int FX_Play(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitchoffset,
                      int vol, int left, int right, int priority, fix16_t volume, intptr_t callbackval);
int FX_Play3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int angle,
                  int distance, int priority, fix16_t volume, intptr_t callbackval);
int FX_PlayRaw(char *ptr, uint32_t ptrlength, int rate, int pitchoffset, int vol,
    int left, int right, int priority, fix16_t volume, intptr_t callbackval);
int FX_PlayLoopedRaw(char *ptr, uint32_t ptrlength, char *loopstart, char *loopend, int rate,
    int pitchoffset, int vol, int left, int right, int priority, fix16_t volume, intptr_t callbackval);

int FX_StartDemandFeedPlayback(void (*function)(const char** ptr, uint32_t* length, void* userdata), int bitdepth, int channels, int rate, int pitchoffset,
    int vol, int left, int right, int priority, fix16_t volume, intptr_t callbackval, void* userdata);

int FX_StartDemandFeedPlayback3D(void (*function)(const char** ptr, uint32_t* length, void* userdata), int bitdepth, int channels, int rate, int pitchoffset,
    int angle, int distance, int priority, fix16_t volume, intptr_t callbackval, void* userdata);

extern int FX_ErrorCode;
extern int FX_MixRate;

static FORCE_INLINE int FX_SetErrorCode(int status)
{
    FX_ErrorCode = status;
    return FX_Error;
}

static FORCE_INLINE int FX_CheckMVErr(int status)
{
    if (status != MV_Ok)
    {
        FX_SetErrorCode(FX_MultiVocError);
        status = FX_Warning;
    }

    return status;
}

static FORCE_INLINE void FX_SetCallBack(void(*function)(intptr_t)) { MV_SetCallBack(function); }
static FORCE_INLINE void FX_SetVolume(int volume) { MV_SetVolume(volume); }
static FORCE_INLINE int FX_GetVolume(void) { return MV_GetVolume(); }
#ifdef ASS_REVERSESTEREO
static FORCE_INLINE void FX_SetReverseStereo(int setting) { MV_SetReverseStereo(setting); }
static FORCE_INLINE int FX_GetReverseStereo(void) { return MV_GetReverseStereo(); }
#endif
static FORCE_INLINE void FX_SetReverb(int reverb) { MV_SetReverb(reverb); }
static FORCE_INLINE int FX_GetMaxReverbDelay(void) { return MV_GetMaxReverbDelay(); }
static FORCE_INLINE int FX_GetReverbDelay(void) { return MV_GetReverbDelay(); }
static FORCE_INLINE void FX_SetReverbDelay(int delay) { MV_SetReverbDelay(delay); }
static FORCE_INLINE int FX_VoiceAvailable(int priority) { return MV_VoiceAvailable(priority); }
static FORCE_INLINE int FX_PauseVoice(int handle, int pause) { return FX_CheckMVErr(MV_PauseVoice(handle, pause)); }
static FORCE_INLINE int FX_GetPosition(int handle, int *position) { return FX_CheckMVErr(MV_GetPosition(handle, position)); }
static FORCE_INLINE int FX_SetPosition(int handle, int position) { return FX_CheckMVErr(MV_SetPosition(handle, position)); }
static FORCE_INLINE int FX_EndLooping(int handle) { return FX_CheckMVErr(MV_EndLooping(handle)); }
static FORCE_INLINE int FX_SetPan(int handle, int vol, int left, int right)
{
    return FX_CheckMVErr(MV_SetPan(handle, vol, left, right));
}
static FORCE_INLINE int FX_SetPitch(int handle, int pitchoffset) { return FX_CheckMVErr(MV_SetPitch(handle, pitchoffset)); }
static FORCE_INLINE int FX_SetFrequency(int handle, int frequency) { return FX_CheckMVErr(MV_SetFrequency(handle, frequency)); }
static FORCE_INLINE int32_t FX_GetFrequency(int handle, int *frequency) { return FX_CheckMVErr(MV_GetFrequency(handle, frequency)); }
static FORCE_INLINE int FX_Pan3D(int handle, int angle, int distance)
{
    return FX_CheckMVErr(MV_Pan3D(handle, angle, distance));
}
static FORCE_INLINE int FX_SoundActive(int handle) { return MV_VoicePlaying(handle); }
static FORCE_INLINE int FX_SoundValidAndActive(int handle) { return handle > 0 && MV_VoicePlaying(handle); }
static FORCE_INLINE int FX_SoundsPlaying(void) { return MV_VoicesPlaying(); }
static FORCE_INLINE int FX_StopSound(int handle) { return FX_CheckMVErr(MV_Kill(handle)); }
static FORCE_INLINE int FX_StopAllSounds(void) { return FX_CheckMVErr(MV_KillAllVoices()); }

#ifdef __cplusplus
}
#endif

#endif


code:
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
#ifndef __MIDIFUNCS_H
#define __MIDIFUNCS_H

typedef struct
   {
   void ( *NoteOff )( int channel, int key, int velocity );
   void ( *NoteOn )( int channel, int key, int velocity );
   void ( *PolyAftertouch )( int channel, int key, int pressure );
   void ( *ControlChange )( int channel, int number, int value );
   void ( *ProgramChange )( int channel, int program );
   void ( *ChannelAftertouch )( int channel, int pressure );
   void ( *PitchBend )( int channel, int lsb, int msb );
   void ( *ReleasePatches )( void );
   void ( *LoadPatch )( int number );
   void ( *SetVolume )( int volume );
   int  ( *GetVolume )( void );
   void ( *SysEx )( const unsigned char * data, int length );
   } midifuncs;

#endif


code:
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/
/**********************************************************************
   file:   MULTIVOC.H

   author: James R. Dose
   date:   December 20, 1993

   Public header for MULTIVOC.C

   (c) Copyright 1993 James R. Dose.  All Rights Reserved.
**********************************************************************/

#ifndef MULTIVOC_H_
#define MULTIVOC_H_

#include "compat.h"
#include "log.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum wavefmt_t : char
{
    FMT_UNKNOWN,
    FMT_RAW,
    FMT_VOC,
    FMT_WAV,
    FMT_VORBIS,
    FMT_FLAC,
    FMT_XA,
    FMT_XMP,
    FMT_MAX
} wavefmt_t;

#define MV_MINVOICEHANDLE 1

extern int MV_ErrorCode;

enum MV_Errors
{
    MV_Error = -1,
    MV_Ok = 0,
    MV_NotInstalled,
    MV_DriverError,
    MV_NoVoices,
    MV_VoiceNotFound,
    MV_InvalidFile,
};

const char *MV_ErrorString(int ErrorNumber);

extern thread_local int MV_Locked;
static FORCE_INLINE void MV_Lock(void)
{
    extern void SoundDriver_PCM_Lock(void);
    if (!MV_Locked++)
        SoundDriver_PCM_Lock();
}
static FORCE_INLINE void MV_Unlock(void)
{
    extern void SoundDriver_PCM_Unlock(void);

    if (!--MV_Locked)
        SoundDriver_PCM_Unlock();
    else if (MV_Locked < 0)
        LOG_F(ERROR, "PCM lockdepth < 0!");
}

int  MV_VoicePlaying(int handle);
int  MV_KillAllVoices(void);
int  MV_Kill(int handle);
int  MV_VoicesPlaying(void);
int  MV_VoiceAvailable(int priority);
int  MV_SetPitch(int handle, int pitchoffset);
int  MV_SetFrequency(int handle, int frequency);
int  MV_GetFrequency(int handle, int *frequency);
int  MV_PauseVoice(int handle, int pause);
int  MV_EndLooping(int handle);
int  MV_SetPan(int handle, int vol, int left, int right);
int  MV_Pan3D(int handle, int angle, int distance);
void MV_SetReverb(int reverb);
int  MV_GetMaxReverbDelay(void);
int  MV_GetReverbDelay(void);
void MV_SetReverbDelay(int delay);

int MV_PlayVOC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance,
                 int priority, fix16_t volume, intptr_t callbackval);
int MV_PlayVOC(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol,
               int left, int right, int priority, fix16_t volume, intptr_t callbackval);

int MV_StartDemandFeedPlayback(void (*function)(const char** ptr, uint32_t* length, void* userdata), int bitdepth, int channels, int rate,
    int pitchoffset, int vol, int left, int right, int priority, fix16_t volume, intptr_t callbackval, void* userdata);

int MV_StartDemandFeedPlayback3D(void (*function)(const char** ptr, uint32_t* length, void* userdata), int bitdepth, int channels, int rate,
    int pitchoffset, int angle, int distance, int priority, fix16_t volume, intptr_t callbackval, void* userdata);

decltype(MV_PlayVOC3D) MV_PlayWAV3D;
decltype(MV_PlayVOC)   MV_PlayWAV;
decltype(MV_PlayVOC3D) MV_PlayVorbis3D;
decltype(MV_PlayVOC)   MV_PlayVorbis;
decltype(MV_PlayVOC3D) MV_PlayFLAC3D;
decltype(MV_PlayVOC)   MV_PlayFLAC;
decltype(MV_PlayVOC3D) MV_PlayXA3D;
decltype(MV_PlayVOC)   MV_PlayXA;
decltype(MV_PlayVOC3D) MV_PlayXMP3D;
decltype(MV_PlayVOC)   MV_PlayXMP;

int MV_PlayRAW(char *ptr, uint32_t length, int rate, char *loopstart, char *loopend, int pitchoffset, int vol,
               int left, int right, int priority, fix16_t volume, intptr_t callbackval);

int  MV_IdentifyXMP(char const *ptr, uint32_t length);
int  MV_GetPosition(int handle, int *position);
int  MV_SetPosition(int handle, int position);
void MV_SetVolume(int volume);
int  MV_GetVolume(void);
void MV_SetCallBack(void (*function)(intptr_t));

#ifdef __MSDOS__
#define ASS_REVERSESTEREO
void MV_SetReverseStereo(int setting);
int  MV_GetReverseStereo(void);
#endif

int  MV_Init(int soundcard, int MixRate, int Voices, int numchannels, void *initdata);
int  MV_Shutdown(void);
void MV_HookMusicRoutine(void (*callback)(void));
void MV_UnhookMusicRoutine(void);
void MV_SetXMPInterpolation(void);

struct MV_MusicRoutineBuffer
{
    char * buffer;
    int32_t size;
};
struct MV_MusicRoutineBuffer MV_GetMusicRoutineBuffer(void);

#ifdef __cplusplus
}
#endif

#endif


code:
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
*/
/**********************************************************************
   module: MUSIC.H

   author: James R. Dose
   date:   March 25, 1994

   Public header for MUSIC.C

   (c) Copyright 1994 James R. Dose.  All Rights Reserved.
**********************************************************************/

#ifndef __MUSIC_H
#define __MUSIC_H

#include "compat.h"
#include "sndcards.h"

extern int MUSIC_ErrorCode;

#ifdef __linux__
#include <vector>

struct alsa_mididevinfo_t
{
  char *name;
  int clntid;
  int portid;

  alsa_mididevinfo_t(const char *insrcname, int inclntid, int inportid) :
    name(Xstrdup(insrcname)), clntid(inclntid), portid(inportid) {}

  alsa_mididevinfo_t(const alsa_mididevinfo_t &rhs)
  {
    name = Xstrdup(rhs.name);
    clntid = rhs.clntid;
    portid = rhs.portid;
  }

  ~alsa_mididevinfo_t() { Xfree(name); }

  alsa_mididevinfo_t &operator=(const alsa_mididevinfo_t &rhs)
  {
    if (this != &rhs)
    {
        Xfree(name);
        name = Xstrdup(rhs.name);
        clntid = rhs.clntid;
        portid = rhs.portid;
    }
    return *this;
  }
};

std::vector<alsa_mididevinfo_t> const ALSADrv_MIDI_ListPorts();

extern int32_t ALSA_ClientID;
extern int32_t ALSA_PortID;
#endif

enum MUSIC_ERRORS
{
    MUSIC_Warning = -2,
    MUSIC_Error   = -1,
    MUSIC_Ok      = 0,
    MUSIC_MidiError,
};

typedef struct
{
    uint32_t tickposition;
    uint32_t milliseconds;
    uint32_t measure;
    uint32_t beat;
    uint32_t tick;
} songposition;

#define MUSIC_LoopSong ( 1 == 1 )
#define MUSIC_PlayOnce ( !MUSIC_LoopSong )

#define MUSIC_SetErrorCode(status) MUSIC_ErrorCode = (status);

extern const char *MUSIC_ErrorString(int ErrorNumber);

int  MUSIC_Init(int SoundCard);
int  MUSIC_Shutdown(void);
int  MIDI_GetDevice(void);
void MUSIC_SetVolume(int volume);
int  MUSIC_GetVolume(void);
void MUSIC_SetLoopFlag(int loopflag);
void MUSIC_Continue(void);
void MUSIC_Pause(void);
int  MUSIC_StopSong(void);
int  MUSIC_PlaySong(char *song, int songsize, int loopflag, const char *fn = nullptr);
void MUSIC_Update(void);
void MUSIC_SetSongPosition(int measure, int beat, int tick);
void MUSIC_GetSongPosition(songposition *pos);

/* returns true only after program startup */
static FORCE_INLINE int MUSIC_WarmedUp(void)
{
    return ASS_MIDISoundDriver != ASS_AutoDetect;
}

extern char SF2_BankFile[BMAX_PATH];
extern int SF2_EffectSampleBlockSize;

#endif


code:
//-------------------------------------------------------------------------
/*
Copyright (C) 2013-2019 Nuke.YKT

This file is part of NBlood.

NBlood is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
//-------------------------------------------------------------------------
//
//  Nuked OPL3 emulator.
//  Thanks:
//      MAME Development Team(Jarek Burczynski, Tatsuyuki Satoh):
//          Feedback and Rhythm part calculation information.
//      forums.submarine.org.uk(carbon14, opl3):
//          Tremolo and phase generator calculation information.
//      OPLx decapsulated(Matthew Gambrell, Olli Niemitalo):
//          OPL2 ROMs.
//      siliconpr0n.org(John McMaster, digshadow):
//          YMF262 and VRC VII decaps and die shots.
//
// version: 1.8
//

#ifndef OPL_OPL3_H
#define OPL_OPL3_H

#include "compat.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifndef OPL_ENABLE_STEREOEXT
#define OPL_ENABLE_STEREOEXT 1
#endif

#define OPL_WRITEBUF_SIZE   1024
EDUKE32_STATIC_ASSERT(isPow2(OPL_WRITEBUF_SIZE));
#define OPL_WRITEBUF_DELAY  2

typedef struct _opl3_slot opl3_slot;
typedef struct _opl3_channel opl3_channel;
typedef struct _opl3_chip opl3_chip;

struct _opl3_slot {
    opl3_channel *channel;
    opl3_chip *chip;
    int16_t *mod;
    uint8_t *trem;
    uint32_t pg_reset;
    uint32_t pg_phase;
    uint16_t pg_phase_out;
    int16_t out;
    int16_t fbmod;
    int16_t prout;
    uint16_t eg_rout;
    uint16_t eg_out;
    uint8_t eg_inc;
    uint8_t eg_gen;
    uint8_t eg_rate;
    uint8_t eg_ksl;
    uint8_t reg_vib;
    uint8_t reg_type;
    uint8_t reg_ksr;
    uint8_t reg_mult;
    uint8_t reg_ksl;
    uint8_t reg_tl;
    uint8_t reg_ar;
    uint8_t reg_dr;
    uint8_t reg_sl;
    uint8_t reg_rr;
    uint8_t reg_wf;
    uint8_t key;
    uint8_t slot_num;
};

struct _opl3_channel {
    opl3_slot *slots[2];
    opl3_channel *pair;
    opl3_chip *chip;
    int16_t *out[4];

#if OPL_ENABLE_STEREOEXT
    int32_t leftpan;
    int32_t rightpan;
#endif

    uint8_t chtype;
    uint16_t f_num;
    uint8_t block;
    uint8_t fb;
    uint8_t con;
    uint8_t alg;
    uint8_t ksv;
    uint16_t cha, chb;
    uint8_t ch_num;
};

typedef struct _opl3_writebuf {
    uint64_t time;
    uint16_t reg;
    uint8_t data;
} opl3_writebuf;

struct _opl3_chip {
    opl3_channel channel[18];
    opl3_slot slot[36];
    uint16_t timer;
    uint64_t eg_timer;
    uint8_t eg_timerrem;
    uint8_t eg_state;
    uint8_t eg_add;
    uint8_t newm;
    uint8_t nts;
    uint8_t rhy;
    uint8_t vibpos;
    uint8_t vibshift;
    uint8_t tremolo;
    uint8_t tremolopos;
    uint8_t tremoloshift;
    uint32_t noise;
    int16_t zeromod;
    int32_t mixbuff[2];
    uint8_t rm_hh_bit2;
    uint8_t rm_hh_bit3;
    uint8_t rm_hh_bit7;
    uint8_t rm_hh_bit8;
    uint8_t rm_tc_bit3;
    uint8_t rm_tc_bit5;

#if OPL_ENABLE_STEREOEXT
    uint8_t stereoext;
#endif

    /* OPL3L */
    int32_t rateratio;
    int32_t samplecnt;
    int16_t oldsamples[2];
    int16_t samples[2];

    uint64_t writebuf_samplecnt;
    uint32_t writebuf_cur;
    uint32_t writebuf_last;
    uint64_t writebuf_lasttime;
    opl3_writebuf writebuf[OPL_WRITEBUF_SIZE];
};

void OPL3_Generate(opl3_chip *chip, int16_t *buf);
void OPL3_GenerateResampled(opl3_chip *chip, int16_t *buf);
void OPL3_Reset(opl3_chip *chip, uint32_t samplerate);
void OPL3_WriteReg(opl3_chip *chip, uint16_t reg, uint8_t v);
void OPL3_WriteRegBuffered(opl3_chip *chip, uint16_t reg, uint8_t v);
void OPL3_GenerateStream(opl3_chip *chip, int16_t *sndptr, uint32_t numsamples);

#ifdef __cplusplus
}
#endif

#endif