commit
54d7a02002
@ -0,0 +1,9 @@
|
|||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Game game;
|
||||||
|
game.Load();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" 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>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>16.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{88B6082D-DD58-4BA5-B4C0-82CA75B9A262}</ProjectGuid>
|
||||||
|
<RootNamespace>Project4</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</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>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<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|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup />
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="APP.cpp" />
|
||||||
|
<ClCompile Include="bean.cpp" />
|
||||||
|
<ClCompile Include="game.cpp" />
|
||||||
|
<ClCompile Include="map.cpp" />
|
||||||
|
<ClCompile Include="mover.cpp" />
|
||||||
|
<ClCompile Include="player.cpp" />
|
||||||
|
<ClCompile Include="tool.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="bean.h" />
|
||||||
|
<ClInclude Include="define.h" />
|
||||||
|
<ClInclude Include="game.h" />
|
||||||
|
<ClInclude Include="map.h" />
|
||||||
|
<ClInclude Include="monster.h" />
|
||||||
|
<ClInclude Include="mover.h" />
|
||||||
|
<ClInclude Include="player.h" />
|
||||||
|
<ClInclude Include="tool.h" />
|
||||||
|
<ClInclude Include="wall.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="源文件">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="头文件">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="资源文件">
|
||||||
|
<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="APP.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="mover.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="player.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="map.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="bean.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="tool.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="game.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="game.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="mover.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="tool.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="bean.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="define.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="player.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="wall.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="map.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="monster.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
@ -0,0 +1,5 @@
|
|||||||
|
#include "bean.h"
|
||||||
|
|
||||||
|
void Bean::ClearBean(int x, int y)
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
#include "game.h"
|
||||||
|
|
||||||
|
Game::Game()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::Load()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::Loop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
char Game::GetKey()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::Begin()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::End()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Game::PlayerMove(int dir)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::PlayerGetBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::PlayerGetGoldBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Game::PlayerMeetMonster()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::MonsterMove()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::MonsterChase()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::MonsterEscape()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::MonsterPhoenix()
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
#include "map.h"
|
||||||
|
|
||||||
|
Map::Map()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::SetFrontImg(IMAGE img)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::SetGroundImg(IMAGE img)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::SetMap(int* _map)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Map::IsMapTrueArea(int x, int y)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::DrawAllArea()
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "mover.h"
|
||||||
|
|
||||||
|
class Monster :public Mover
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,34 @@
|
|||||||
|
#include "mover.h"
|
||||||
|
|
||||||
|
Mover::Mover()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::SetImg(IMAGE _img)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::SetXY(int _x, int _y)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::SetSpeed(int _speed)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::Move(int dir)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Mover::NextMove(int dir, int& nx, int& ny)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::Draw()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mover::DrawClear()
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
#include "player.h"
|
||||||
|
|
||||||
|
void Player::GetBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::GetGoldBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::GetMonster()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::DrawScore()
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "mover.h"
|
||||||
|
|
||||||
|
class Player : public Mover
|
||||||
|
{
|
||||||
|
private :
|
||||||
|
int score;
|
||||||
|
|
||||||
|
public :
|
||||||
|
void GetBean();
|
||||||
|
void GetGoldBean();
|
||||||
|
void GetMonster();
|
||||||
|
|
||||||
|
void DrawScore();
|
||||||
|
};
|
@ -0,0 +1,36 @@
|
|||||||
|
#include "tool.h"
|
||||||
|
|
||||||
|
Wall Tool::ImportWall(int num)
|
||||||
|
{
|
||||||
|
return Wall();
|
||||||
|
}
|
||||||
|
|
||||||
|
Bean Tool::ImportBean(int num)
|
||||||
|
{
|
||||||
|
return Bean();
|
||||||
|
}
|
||||||
|
|
||||||
|
Player Tool::ImportPlayer(int num)
|
||||||
|
{
|
||||||
|
return Player();
|
||||||
|
}
|
||||||
|
|
||||||
|
Monster Tool::ImportMonster(int num)
|
||||||
|
{
|
||||||
|
return Monster();
|
||||||
|
}
|
||||||
|
|
||||||
|
string Tool::num2str(int num)
|
||||||
|
{
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
int Tool::str2num(string str)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* Tool::str2char(string str)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// 系统库
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <easyx.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
// 项目库
|
||||||
|
#include "define.h"
|
||||||
|
#include "wall.h"
|
||||||
|
#include "bean.h"
|
||||||
|
#include "player.h"
|
||||||
|
#include "monster.h"
|
||||||
|
|
||||||
|
class Tool
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Wall ImportWall(int num);
|
||||||
|
Bean ImportBean(int num);
|
||||||
|
Player ImportPlayer(int num);
|
||||||
|
Monster ImportMonster(int num);
|
||||||
|
|
||||||
|
string num2str(int num);
|
||||||
|
int str2num(string str);
|
||||||
|
char* str2char(string str);
|
||||||
|
|
||||||
|
};
|
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "map.h"
|
||||||
|
|
||||||
|
class Wall: public Map
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in new issue