use screen.h instead of sdlscreen.h, etc.

Create grafx2-win32 MSVC++ project
create keycode.h
various fixes
This commit is contained in:
Thomas Bernard 2018-05-31 12:33:26 +02:00
parent d86efa58e4
commit 77005eb780
42 changed files with 746 additions and 64 deletions

View File

@ -1,5 +1,7 @@
Debug
Debug-*
Release
Release-*
ipch
*.suo
*.user

View File

@ -0,0 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grafx2-win32", "grafx2-win32.vcxproj", "{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}"
ProjectSection(ProjectDependencies) = postProject
{056D84A3-08C5-4A2A-A24B-D2E6D00D9552} = {056D84A3-08C5-4A2A-A24B-D2E6D00D9552}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generateversion", "generateversion.vcxproj", "{056D84A3-08C5-4A2A-A24B-D2E6D00D9552}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}.Debug|Win32.ActiveCfg = Debug|Win32
{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}.Debug|Win32.Build.0 = Debug|Win32
{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}.Release|Win32.ActiveCfg = Release|Win32
{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}.Release|Win32.Build.0 = Release|Win32
{056D84A3-08C5-4A2A-A24B-D2E6D00D9552}.Debug|Win32.ActiveCfg = Debug|Win32
{056D84A3-08C5-4A2A-A24B-D2E6D00D9552}.Debug|Win32.Build.0 = Debug|Win32
{056D84A3-08C5-4A2A-A24B-D2E6D00D9552}.Release|Win32.ActiveCfg = Release|Win32
{056D84A3-08C5-4A2A-A24B-D2E6D00D9552}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{34A001FF-927D-4E09-BE4A-F5D1C4AF39C6}</ProjectGuid>
<RootNamespace>grafx2win32</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<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'">
<IntDir>$(Configuration)-win32\</IntDir>
<OutDir>$(SolutionDir)..\..\bin\</OutDir>
<TargetName>$(ProjectName)$(Configuration)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>$(Configuration)-win32\</IntDir>
<OutDir>$(SolutionDir)..\..\bin\</OutDir>
<TargetName>$(ProjectName)$(Configuration)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>NOTTF;__ENABLE_LUA__;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244</DisableSpecificWarnings>
<AdditionalIncludeDirectories>..\..\..\..\lua\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NOTTF;__ENABLE_LUA__;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4244</DisableSpecificWarnings>
<AdditionalIncludeDirectories>..\..\..\..\lua\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\brush.c" />
<ClCompile Include="..\..\src\brush_ops.c" />
<ClCompile Include="..\..\src\buttons.c" />
<ClCompile Include="..\..\src\buttons_effects.c" />
<ClCompile Include="..\..\src\colorred.c" />
<ClCompile Include="..\..\src\engine.c" />
<ClCompile Include="..\..\src\factory.c" />
<ClCompile Include="..\..\src\fileformats.c" />
<ClCompile Include="..\..\src\filesel.c" />
<ClCompile Include="..\..\src\gfx2surface.c" />
<ClCompile Include="..\..\src\graph.c" />
<ClCompile Include="..\..\src\help.c" />
<ClCompile Include="..\..\src\hotkeys.c" />
<ClCompile Include="..\..\src\init.c" />
<ClCompile Include="..\..\src\input.c" />
<ClCompile Include="..\..\src\io.c" />
<ClCompile Include="..\..\src\keyboard.c" />
<ClCompile Include="..\..\src\layers.c" />
<ClCompile Include="..\..\src\libraw2crtc.c" />
<ClCompile Include="..\..\src\loadrecoil.c" />
<ClCompile Include="..\..\src\loadsave.c" />
<ClCompile Include="..\..\src\main.c" />
<ClCompile Include="..\..\src\misc.c" />
<ClCompile Include="..\..\src\miscfileformats.c" />
<ClCompile Include="..\..\src\mountlist.c" />
<ClCompile Include="..\..\src\oldies.c" />
<ClCompile Include="..\..\src\operatio.c" />
<ClCompile Include="..\..\src\op_c.c" />
<ClCompile Include="..\..\src\pages.c" />
<ClCompile Include="..\..\src\palette.c" />
<ClCompile Include="..\..\src\pversion.c" />
<ClCompile Include="..\..\src\pxdouble.c" />
<ClCompile Include="..\..\src\pxquad.c" />
<ClCompile Include="..\..\src\pxsimple.c" />
<ClCompile Include="..\..\src\pxtall.c" />
<ClCompile Include="..\..\src\pxtall2.c" />
<ClCompile Include="..\..\src\pxtall3.c" />
<ClCompile Include="..\..\src\pxtriple.c" />
<ClCompile Include="..\..\src\pxwide.c" />
<ClCompile Include="..\..\src\pxwide2.c" />
<ClCompile Include="..\..\src\readini.c" />
<ClCompile Include="..\..\src\readline.c" />
<ClCompile Include="..\..\src\realpath.c" />
<ClCompile Include="..\..\src\recoil.c" />
<ClCompile Include="..\..\src\saveini.c" />
<ClCompile Include="..\..\src\setup.c" />
<ClCompile Include="..\..\src\shade.c" />
<ClCompile Include="..\..\src\special.c" />
<ClCompile Include="..\..\src\text.c" />
<ClCompile Include="..\..\src\tiles.c" />
<ClCompile Include="..\..\src\transform.c" />
<ClCompile Include="..\..\src\unicode.c" />
<ClCompile Include="..\..\src\version.c" />
<ClCompile Include="..\..\src\windows.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\brush.h" />
<ClInclude Include="..\..\src\buttons.h" />
<ClInclude Include="..\..\src\colorred.h" />
<ClInclude Include="..\..\src\const.h" />
<ClInclude Include="..\..\src\engine.h" />
<ClInclude Include="..\..\src\errors.h" />
<ClInclude Include="..\..\src\factory.h" />
<ClInclude Include="..\..\src\fileformats.h" />
<ClInclude Include="..\..\src\filesel.h" />
<ClInclude Include="..\..\src\gfx2surface.h" />
<ClInclude Include="..\..\src\global.h" />
<ClInclude Include="..\..\src\graph.h" />
<ClInclude Include="..\..\src\haiku.h" />
<ClInclude Include="..\..\src\help.h" />
<ClInclude Include="..\..\src\helpfile.h" />
<ClInclude Include="..\..\src\hotkeys.h" />
<ClInclude Include="..\..\src\init.h" />
<ClInclude Include="..\..\src\input.h" />
<ClInclude Include="..\..\src\io.h" />
<ClInclude Include="..\..\src\keyboard.h" />
<ClInclude Include="..\..\src\layers.h" />
<ClInclude Include="..\..\src\libraw2crtc.h" />
<ClInclude Include="..\..\src\loadsave.h" />
<ClInclude Include="..\..\src\misc.h" />
<ClInclude Include="..\..\src\mountlist.h" />
<ClInclude Include="..\..\src\oldies.h" />
<ClInclude Include="..\..\src\operatio.h" />
<ClInclude Include="..\..\src\op_c.h" />
<ClInclude Include="..\..\src\pages.h" />
<ClInclude Include="..\..\src\palette.h" />
<ClInclude Include="..\..\src\pxdouble.h" />
<ClInclude Include="..\..\src\pxquad.h" />
<ClInclude Include="..\..\src\pxsimple.h" />
<ClInclude Include="..\..\src\pxtall.h" />
<ClInclude Include="..\..\src\pxtall2.h" />
<ClInclude Include="..\..\src\pxtall3.h" />
<ClInclude Include="..\..\src\pxtriple.h" />
<ClInclude Include="..\..\src\pxwide.h" />
<ClInclude Include="..\..\src\pxwide2.h" />
<ClInclude Include="..\..\src\readini.h" />
<ClInclude Include="..\..\src\readline.h" />
<ClInclude Include="..\..\src\realpath.h" />
<ClInclude Include="..\..\src\recoil.h" />
<ClInclude Include="..\..\src\saveini.h" />
<ClInclude Include="..\..\src\screen.h" />
<ClInclude Include="..\..\src\setup.h" />
<ClInclude Include="..\..\src\SFont.h" />
<ClInclude Include="..\..\src\shade.h" />
<ClInclude Include="..\..\src\special.h" />
<ClInclude Include="..\..\src\struct.h" />
<ClInclude Include="..\..\src\text.h" />
<ClInclude Include="..\..\src\tiles.h" />
<ClInclude Include="..\..\src\transform.h" />
<ClInclude Include="..\..\src\unicode.h" />
<ClInclude Include="..\..\src\windows.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\gfx2.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Fichiers sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Fichiers d%27en-tête">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Fichiers de ressources">
<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>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\brush.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\brush_ops.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\buttons.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\buttons_effects.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\colorred.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\engine.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\factory.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\fileformats.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\filesel.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\gfx2surface.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\graph.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\help.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\hotkeys.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\init.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\input.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\io.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\keyboard.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\layers.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\libraw2crtc.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\loadrecoil.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\loadsave.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\main.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\misc.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\miscfileformats.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\mountlist.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\oldies.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\op_c.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\operatio.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pages.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\palette.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pversion.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxdouble.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxquad.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxsimple.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxtall.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxtall2.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxtall3.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxtriple.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxwide.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\pxwide2.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\readini.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\readline.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\realpath.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\recoil.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\saveini.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\setup.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shade.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\special.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\text.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiles.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\transform.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\unicode.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\version.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\windows.c">
<Filter>Fichiers sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\brush.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\buttons.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\colorred.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\const.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\engine.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\errors.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\factory.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\fileformats.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\filesel.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\gfx2surface.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\global.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\graph.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\haiku.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\help.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\helpfile.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\hotkeys.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\init.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\input.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\io.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\keyboard.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\layers.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\libraw2crtc.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\loadsave.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\misc.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\mountlist.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\oldies.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\op_c.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\operatio.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pages.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\palette.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxdouble.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxquad.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxsimple.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxtall.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxtall2.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxtall3.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxtriple.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxwide.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\pxwide2.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\readini.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\readline.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\realpath.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\recoil.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\saveini.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\setup.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\SFont.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\shade.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\special.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\struct.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\text.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\tiles.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\transform.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\unicode.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\windows.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="..\..\src\screen.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\gfx2.rc">
<Filter>Fichiers de ressources</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -41,10 +41,12 @@
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)..\..\bin\</OutDir>
<TargetName>$(ProjectName)$(Configuration)</TargetName>
<IntDir>$(Configuration)-sdl\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)..\..\bin\</OutDir>
<IntDir>$(Configuration)-sdl\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>

View File

@ -33,7 +33,7 @@
#include "misc.h"
#include "errors.h"
#include "windows.h"
#include "sdlscreen.h"
#include "screen.h"
#include "brush.h"
#include "tiles.h"

View File

@ -35,7 +35,7 @@
#include "misc.h"
#include "operatio.h"
#include "pages.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#if defined(__VBCC__) || defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__)
@ -961,8 +961,11 @@ void Rotate_brush_1_5(void)
// On corrige les coordonnées de la ligne si la touche shift est appuyée...
cursor_x = Paintbrush_X;
cursor_y = Paintbrush_Y;
#if defined(USE_SDL) || defined(USE_SDL2)
if(SDL_GetModState() & KMOD_SHIFT)
Clamp_coordinates_regular_angle(Brush_rotation_center_X,Brush_rotation_center_Y,&cursor_x,&cursor_y);
// TODO : portable
#endif
if ( (cursor_x!=old_x) || (cursor_y!=old_y) || (prev_state!=2) )
{
@ -1032,8 +1035,11 @@ void Rotate_brush_0_5(void)
// On corrige les coordonnées de la ligne si la touche shift est appuyée...
cursor_x = Paintbrush_X;
cursor_y = Paintbrush_Y;
#if defined(USE_SDL) || defined(USE_SDL2)
if(SDL_GetModState() & KMOD_SHIFT)
Clamp_coordinates_regular_angle(Brush_rotation_center_X,Brush_rotation_center_Y,&cursor_x,&cursor_y);
// TODO
#endif
if ((cursor_x!=old_x) || (cursor_y!=old_y) || (prev_state!=3))
{

View File

@ -71,7 +71,7 @@
#include "io.h"
#include "help.h"
#include "text.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "brush.h"
#include "input.h"
@ -86,7 +86,7 @@
#elif defined(__MINT__)
#include <mint/sysbind.h>
#include <dirent.h>
#elif defined(__WIN32__)
#elif defined(WIN32)
#ifndef _MSC_VER
#include <dirent.h>
#endif

View File

@ -38,7 +38,7 @@
#include "misc.h"
#include "pages.h"
#include "readline.h"
#include "sdlscreen.h"
#include "screen.h"
#include "struct.h"
#include "windows.h"
#include "tiles.h"

View File

@ -33,7 +33,7 @@
#include "operatio.h"
#include "shade.h"
#include "errors.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "brush.h"
#include "input.h"

View File

@ -37,7 +37,7 @@
#include "misc.h"
#include "pages.h" // Backup()
#include "readline.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "palette.h"
#include "input.h" // Is_shortcut()

View File

@ -25,7 +25,9 @@
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
#if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL_syswm.h>
#endif
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
#include <proto/dos.h>
@ -61,7 +63,7 @@
#include "errors.h"
#include "io.h"
#include "windows.h"
#include "sdlscreen.h"
#include "screen.h"
#include "loadsave.h"
#include "mountlist.h"
#include "engine.h"

View File

@ -36,7 +36,7 @@
#include "buttons.h"
#include "pages.h"
#include "errors.h"
#include "sdlscreen.h"
#include "screen.h"
#include "graph.h"
#include "misc.h"
#include "pxsimple.h"
@ -52,6 +52,9 @@
#include "input.h"
#include "brush.h"
#include "tiles.h"
#if defined(USE_SDL) || defined(USE_SDL2)
#include "sdlscreen.h"
#endif
#if defined(__VBCC__) || defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__)
#define M_PI 3.141592653589793238462643
@ -397,7 +400,9 @@ try_again:
if (screen_changed)
{
#if defined(USE_SDL) || defined(USE_SDL2)
Set_mode_SDL(&width, &height,fullscreen);
#endif
}
if (screen_changed || pixels_changed)

View File

@ -52,7 +52,7 @@
#include "engine.h"
#include "helpfile.h"
#include "help.h"
#include "sdlscreen.h"
#include "screen.h"
#include "text.h"
#include "keyboard.h"
#include "windows.h"
@ -61,6 +61,7 @@
#include "errors.h"
#include "pages.h"
#include "factory.h"
#include "keycodes.h"
extern const char Program_version[]; // generated in pversion.c
extern const char SVN_revision[]; // generated in version.c

View File

@ -30,7 +30,7 @@
#include "global.h"
#include "keyboard.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "errors.h"
#include "misc.h"

View File

@ -37,6 +37,9 @@
/// Add 0x4000 for the Alt modifier ::MOD_ALT
/// Add 0x8000 for the "Meta" modifier ::MOD_META (On MacOS X it's the CMD key)
//////////////////////////////////////////////////////////////////////////////
#if defined(USE_SDL)
#include <SDL.h>
#endif
/*!
Convert an SDL keysym to an ANSI/ASCII character.

29
src/keycodes.h Normal file
View File

@ -0,0 +1,29 @@
/* vim:expandtab:ts=2 sw=2:
*/
/* Grafx2 - The Ultimate 256-color bitmap paint program
Copyright 2018 Thomas Bernard
Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
Grafx2 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; version 2
of the License.
Grafx2 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 Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
#ifndef KEYCODES_H_INCLUDED
#define KEYCODES_H_INCLUDED
#if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL.h>
#endif
#endif

View File

@ -19,18 +19,22 @@
You should have received a copy of the GNU General Public License
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
#include <stdlib.h>
#include <string.h>
#include "const.h"
#include "struct.h"
#include "global.h"
#include "windows.h"
#include "engine.h"
#include "pages.h"
#include "sdlscreen.h"
#include "screen.h"
#include "input.h"
#include "help.h"
#include "misc.h"
#include "readline.h"
#include "graph.h"
#include "keycodes.h"
void Layer_activate(int layer, short side)
{
@ -638,7 +642,7 @@ void Button_Anim_continuous_next(void)
do
{
int target_frame;
Uint32 time_now;
dword time_now;
Get_input(20);
@ -673,7 +677,7 @@ void Button_Anim_continuous_prev(void)
do
{
int target_frame;
Uint32 time_now;
dword time_now;
Get_input(20);

View File

@ -61,6 +61,7 @@
#if defined(USE_SDL) || defined(USE_SDL2)
#include "sdlscreen.h"
#endif
#include "screen.h"
#include "struct.h"
#include "windows.h"
#include "engine.h"

View File

@ -58,7 +58,7 @@
#include "engine.h"
#include "pages.h"
#include "loadsave.h"
#include "sdlscreen.h"
#include "screen.h"
#include "errors.h"
#include "readini.h"
#include "saveini.h"

View File

@ -39,14 +39,13 @@
#endif
#endif
#include "struct.h"
#include "sdlscreen.h"
#include "global.h"
#include "errors.h"
#include "buttons.h"
#include "engine.h"
#include "misc.h"
#include "keyboard.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "palette.h"
#include "input.h"

View File

@ -27,6 +27,9 @@
#ifndef MISC_H__
#define MISC_H__
/* For sprintf() used in Num2str() and Dec2str(a,b,c) */
#include <stdio.h>
#include "struct.h"
#include "global.h"

View File

@ -38,7 +38,7 @@
#include "libraw2crtc.h"
#include "loadsave.h"
#include "misc.h"
#include "sdlscreen.h"
#include "screen.h"
#include "struct.h"
#include "windows.h"
#include "oldies.h"

View File

@ -33,7 +33,7 @@
#include "buttons.h"
#include "pages.h"
#include "errors.h"
#include "sdlscreen.h"
#include "screen.h"
#include "brush.h"
#include "windows.h"
#include "input.h"

View File

@ -32,7 +32,7 @@
#include "buttons.h"
#include "pages.h"
#include "help.h"
#include "sdlscreen.h"
#include "screen.h"
#include "errors.h"
#include "op_c.h"
#include "windows.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxdouble.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxquad.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxsimple.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxtall.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxtall2.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxtall3.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxtriple.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxwide.h"

View File

@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "sdlscreen.h"
#include "screen.h"
#include "misc.h"
#include "graph.h"
#include "pxwide2.h"

View File

@ -37,16 +37,19 @@
#include "misc.h"
#include "errors.h"
#include "const.h"
#include "sdlscreen.h"
#include "screen.h"
#include "readline.h"
#include "windows.h"
#include "input.h"
#include "engine.h"
#include "unicode.h"
#include "keycodes.h"
#ifdef __WIN32__
#ifdef WIN32
#include <windows.h>
#if defined(USE_SDL)
#include <SDL_syswm.h>
#endif
#elif defined __HAIKU__
#include "haiku.h"

60
src/screen.h Normal file
View File

@ -0,0 +1,60 @@
/* vim:expandtab:ts=2 sw=2:
*/
/* Grafx2 - The Ultimate 256-color bitmap paint program
Copyright 2018 Thomas Bernard
Copyright 2008 Yves Rizoud
Copyright 2007 Adrien Destugues
Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
Grafx2 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; version 2
of the License.
Grafx2 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 Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
//////////////////////////////////////////////////////////////////////////////
///@file screen.h
/// Screen update (refresh) system
//////////////////////////////////////////////////////////////////////////////
#ifndef SCREEN_H_INCLUDED
#define SCREEN_H_INCLUDED
#include "struct.h"
#include "global.h"
byte Get_Screen_pixel(int x, int y);
void Set_Screen_pixel(int x, int y, byte value);
byte* Get_Screen_pixel_ptr(int x, int y);
void Screen_FillRect(int x, int y, int w, int h, byte color);
void Update_rect(short x, short y, unsigned short width, unsigned short height);
void Flush_update(void);
void Update_status_line(short char_pos, short width);
int SetPalette(const T_Components * colors, int firstcolor, int ncolors);
///
/// Clears the parts of screen that are outside of the editing area.
/// There is such area only if the screen mode is not a multiple of the pixel
/// size, eg: 3x3 pixels in 1024x768 leaves 1 column on the right, 0 rows on bottom.
void Clear_border(byte color);
extern volatile int Allow_colorcycling;
/// Activates or desactivates file drag-dropping in program window.
void Allow_drag_and_drop(int flag);
#endif // SCREEN_H_INCLUDED

View File

@ -37,18 +37,6 @@ void Set_mode_SDL(int *,int *,int);
GFX2_GLOBAL SDL_Rect ** List_SDL_video_modes;
byte Get_Screen_pixel(int x, int y);
void Set_Screen_pixel(int x, int y, byte value);
byte* Get_Screen_pixel_ptr(int x, int y);
void Screen_FillRect(int x, int y, int w, int h, byte color);
void Update_rect(short x, short y, unsigned short width, unsigned short height);
void Flush_update(void);
void Update_status_line(short char_pos, short width);
///
/// Converts a SDL_Surface (indexed colors or RGB) into an array of bytes
/// (indexed colors).
@ -66,17 +54,4 @@ void Set_SDL_pixel_8(SDL_Surface *bmp, int x, int y, byte color);
/// Convert a SDL Palette to a grafx2 palette
void Get_SDL_Palette(const SDL_Palette * sdl_palette, T_Palette palette);
int SetPalette(const T_Components * colors, int firstcolor, int ncolors);
///
/// Clears the parts of screen that are outside of the editing area.
/// There is such area only if the screen mode is not a multiple of the pixel
/// size, eg: 3x3 pixels in 1024x768 leaves 1 column on the right, 0 rows on bottom.
void Clear_border(byte color);
extern volatile int Allow_colorcycling;
/// Activates or desactivates file drag-dropping in program window.
void Allow_drag_and_drop(int flag);
#endif // SDLSCREEN_H_INCLUDED
#endif // SDLSCREEN_H_INCLUDED

View File

@ -28,10 +28,11 @@
#include "misc.h"
#include "readline.h"
#include "help.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "input.h"
#include "shade.h"
#include "keycodes.h"
void Button_Shade_mode(void)
{

View File

@ -58,12 +58,14 @@
#endif
#endif
#if defined(USE_SDL) || defined(USE_SDL2)
#include <SDL_image.h>
#include "SFont.h"
#include "sdlscreen.h"
#endif
#include "struct.h"
#include "global.h"
#include "sdlscreen.h"
#include "io.h"
#include "errors.h"
#include "windows.h"
@ -541,7 +543,7 @@ byte *Render_text_TTF(const char *str, int font_number, int size, int antialias,
}
#endif
#if defined(USE_SDL) || defined(USE_SDL2)
byte *Render_text_SFont(const char *str, int font_number, int *width, int *height, T_Palette palette)
{
SFont_Font *font;
@ -673,6 +675,7 @@ byte *Render_text_SFont(const char *str, int font_number, int *width, int *heigh
return new_brush;
}
#endif
// Crée une brosse à partir des paramètres de texte demandés.
// Si cela réussit, la fonction place les dimensions dans width et height,
@ -704,8 +707,9 @@ byte *Render_text(const char *str, int font_number, int size, int antialias, int
}
else
{
#if defined(USE_SDL) || defined(USE_SDL2)
return Render_text_SFont(str, font_number, width, height, palette);
#endif
}
}

View File

@ -19,10 +19,13 @@
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
*/
#include <stdlib.h>
#include <string.h>
#include "struct.h"
#include "global.h"
#include "graph.h"
#include "sdlscreen.h"
#include "screen.h"
#include "engine.h"
#include "windows.h"
#include "input.h"

View File

@ -26,7 +26,7 @@
#include "struct.h"
#include "transform.h"
#include "engine.h"
#include "sdlscreen.h"
#include "screen.h"
#include "windows.h"
#include "input.h"
#include "help.h"

View File

@ -46,9 +46,10 @@
#include "misc.h"
#include "op_c.h"
#include "readline.h"
#include "sdlscreen.h"
#include "screen.h"
#include "palette.h"
#include "unicode.h"
#include "keycodes.h"
T_Toolbar_button Buttons_Pool[NB_BUTTONS];
T_Menu_Bar Menu_bars[MENUBAR_COUNT] =