Skip to content

Commit 649bed6

Browse files
authored
Add files via upload
0 parents  commit 649bed6

39 files changed

+744
-0
lines changed
79.5 KB
Binary file not shown.
586 KB
Binary file not shown.
1.01 MB
Binary file not shown.

GameEngine/GameEngine.sdf

7.63 MB
Binary file not shown.

GameEngine/GameEngine.sln

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameEngine(Exercise10-11)", "GameEngine\GameEngine.vcxproj", "{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Win32 = Debug|Win32
11+
Release|Win32 = Release|Win32
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}.Debug|Win32.ActiveCfg = Debug|Win32
15+
{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}.Debug|Win32.Build.0 = Debug|Win32
16+
{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}.Release|Win32.ActiveCfg = Release|Win32
17+
{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}.Release|Win32.Build.0 = Release|Win32
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

GameEngine/GameEngine.v12.suo

54.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
2+
Debug|Win32|C:\Users\malin\Desktop\Elly\OOP\GameEngine\|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Build started 5/13/2020 3:03:27 PM.
2+
1>Project "C:\Users\malin\Desktop\Elly\OOP\GameEngine\GameEngine\GameEngine.vcxproj" on node 2 (Build target(s)).
3+
1>ClCompile:
4+
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _LIB /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"Debug\GameEngine(Exercise10-11).pch" /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt GameEnginee.cpp
5+
GameEnginee.cpp
6+
Link:
7+
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\malin\Desktop\Elly\OOP\GameEngine\Debug\GameEngine(Exercise10-11).exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\malin\Desktop\Elly\OOP\GameEngine\Debug\GameEngine(Exercise10-11).pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\malin\Desktop\Elly\OOP\GameEngine\Debug\GameEngine(Exercise10-11).lib" /MACHINE:X86 Debug\main.obj
8+
Debug\GameEnginee.obj
9+
Debug\GameUnit.obj
10+
Debug\Knight.obj
11+
Debug\Monster.obj
12+
Debug\stdafx.obj
13+
GameEngine.vcxproj -> C:\Users\malin\Desktop\Elly\OOP\GameEngine\Debug\GameEngine(Exercise10-11).exe
14+
1>Done Building Project "C:\Users\malin\Desktop\Elly\OOP\GameEngine\GameEngine\GameEngine.vcxproj" (Build target(s)).
15+
16+
Build succeeded.
17+
18+
Time Elapsed 00:00:02.87
153 KB
Binary file not shown.
167 KB
Binary file not shown.
162 KB
Binary file not shown.
162 KB
Binary file not shown.

GameEngine/GameEngine/Debug/main.obj

142 KB
Binary file not shown.
11.4 KB
Binary file not shown.

GameEngine/GameEngine/Debug/vc120.idb

387 KB
Binary file not shown.

GameEngine/GameEngine/Debug/vc120.pdb

412 KB
Binary file not shown.
+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<ProjectGuid>{7E4C2597-831C-4FAC-8796-9EC77E5BECF9}</ProjectGuid>
15+
<Keyword>Win32Proj</Keyword>
16+
<RootNamespace>GameEngine</RootNamespace>
17+
<ProjectName>GameEngine(Exercise10-11)</ProjectName>
18+
</PropertyGroup>
19+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
21+
<ConfigurationType>Application</ConfigurationType>
22+
<UseDebugLibraries>true</UseDebugLibraries>
23+
<PlatformToolset>v120</PlatformToolset>
24+
<CharacterSet>Unicode</CharacterSet>
25+
</PropertyGroup>
26+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
27+
<ConfigurationType>Application</ConfigurationType>
28+
<UseDebugLibraries>false</UseDebugLibraries>
29+
<PlatformToolset>v120</PlatformToolset>
30+
<WholeProgramOptimization>true</WholeProgramOptimization>
31+
<CharacterSet>Unicode</CharacterSet>
32+
</PropertyGroup>
33+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
34+
<ImportGroup Label="ExtensionSettings">
35+
</ImportGroup>
36+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
37+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
38+
</ImportGroup>
39+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
40+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
41+
</ImportGroup>
42+
<PropertyGroup Label="UserMacros" />
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
44+
<LinkIncremental>true</LinkIncremental>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
47+
<LinkIncremental>false</LinkIncremental>
48+
</PropertyGroup>
49+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
50+
<ClCompile>
51+
<PrecompiledHeader>Use</PrecompiledHeader>
52+
<WarningLevel>Level3</WarningLevel>
53+
<Optimization>Disabled</Optimization>
54+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
55+
<SDLCheck>true</SDLCheck>
56+
</ClCompile>
57+
<Link>
58+
<SubSystem>Console</SubSystem>
59+
<GenerateDebugInformation>true</GenerateDebugInformation>
60+
</Link>
61+
</ItemDefinitionGroup>
62+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63+
<ClCompile>
64+
<WarningLevel>Level3</WarningLevel>
65+
<PrecompiledHeader>Use</PrecompiledHeader>
66+
<Optimization>MaxSpeed</Optimization>
67+
<FunctionLevelLinking>true</FunctionLevelLinking>
68+
<IntrinsicFunctions>true</IntrinsicFunctions>
69+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70+
<SDLCheck>true</SDLCheck>
71+
</ClCompile>
72+
<Link>
73+
<SubSystem>Console</SubSystem>
74+
<GenerateDebugInformation>true</GenerateDebugInformation>
75+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
76+
<OptimizeReferences>true</OptimizeReferences>
77+
</Link>
78+
</ItemDefinitionGroup>
79+
<ItemGroup>
80+
<ClInclude Include="GameEnginee.h" />
81+
<ClInclude Include="GameUnit.h" />
82+
<ClInclude Include="Knight.h" />
83+
<ClInclude Include="Monster.h" />
84+
<ClInclude Include="stdafx.h" />
85+
<ClInclude Include="targetver.h" />
86+
</ItemGroup>
87+
<ItemGroup>
88+
<ClCompile Include="main.cpp" />
89+
<ClCompile Include="GameEnginee.cpp" />
90+
<ClCompile Include="GameUnit.cpp" />
91+
<ClCompile Include="Knight.cpp" />
92+
<ClCompile Include="Monster.cpp" />
93+
<ClCompile Include="stdafx.cpp">
94+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
95+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
96+
</ClCompile>
97+
</ItemGroup>
98+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
99+
<ImportGroup Label="ExtensionTargets">
100+
</ImportGroup>
101+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClInclude Include="stdafx.h">
19+
<Filter>Header Files</Filter>
20+
</ClInclude>
21+
<ClInclude Include="targetver.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
<ClInclude Include="GameUnit.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="Knight.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
<ClInclude Include="Monster.h">
31+
<Filter>Header Files</Filter>
32+
</ClInclude>
33+
<ClInclude Include="GameEnginee.h">
34+
<Filter>Header Files</Filter>
35+
</ClInclude>
36+
</ItemGroup>
37+
<ItemGroup>
38+
<ClCompile Include="stdafx.cpp">
39+
<Filter>Source Files</Filter>
40+
</ClCompile>
41+
<ClCompile Include="GameUnit.cpp">
42+
<Filter>Source Files</Filter>
43+
</ClCompile>
44+
<ClCompile Include="Knight.cpp">
45+
<Filter>Source Files</Filter>
46+
</ClCompile>
47+
<ClCompile Include="Monster.cpp">
48+
<Filter>Source Files</Filter>
49+
</ClCompile>
50+
<ClCompile Include="GameEnginee.cpp">
51+
<Filter>Source Files</Filter>
52+
</ClCompile>
53+
<ClCompile Include="main.cpp">
54+
<Filter>Source Files</Filter>
55+
</ClCompile>
56+
</ItemGroup>
57+
</Project>

GameEngine/GameEngine/GameEnginee.cpp

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#include "stdafx.h"
2+
#include <iostream>
3+
#include "GameEnginee.h"
4+
5+
using namespace std;
6+
extern int k, m, n;
7+
GameEnginee *pointer;
8+
//-----------------------------------------------------------------------------------------------------------------------
9+
GameEnginee::~GameEnginee()
10+
{
11+
}
12+
//-----------------------------------------------------------------------------------------------------------------------
13+
int GameEnginee::Add(GameUnit &GU)
14+
{
15+
if (CountUnits >= 100)
16+
return 0;
17+
else
18+
{
19+
Units[CountUnits] = &GU;
20+
CountUnits++;
21+
return 1;
22+
}
23+
}
24+
//-----------------------------------------------------------------------------------------------------------------------
25+
int GameEnginee::Step()
26+
{
27+
for (int i = 1; i <= 5; i++)
28+
{
29+
cout << "\n\t\tTact number:" << i << endl;
30+
for (int j = 0; j < CountUnits; j++)
31+
Units[j]->Move();
32+
//Print(); //преместването е отразено в принта след атаката и то е абсолютно същото
33+
Clear();
34+
for (int j = 0; j < CountUnits; j++)
35+
Units[j]->Attack();
36+
Print();
37+
}
38+
return 1;
39+
}
40+
//-----------------------------------------------------------------------------------------------------------------------
41+
void GameEnginee::Print()
42+
{
43+
for (int i = 0; i < CountUnits; i++)
44+
Units[i]->Print();
45+
k = m = n = 1;
46+
}
47+
//-----------------------------------------------------------------------------------------------------------------------
48+
void GameEnginee::Clear()
49+
{
50+
int i;
51+
for (i = 0; i < CountUnits; ++i)
52+
{
53+
if (!Units[i]->GetCondition())
54+
{
55+
Units[i] = Units[i + 1];
56+
CountUnits--;
57+
}
58+
}
59+
}
60+
//-----------------------------------------------------------------------------------------------------------------------

GameEngine/GameEngine/GameEnginee.h

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
#include "GameUnit.h"
3+
4+
//-----------------------------------------------------------------------------------------------------------------------
5+
class GameEnginee
6+
{
7+
public:
8+
GameUnit *Units[100]; //масив от указатели към обекти от базовия клас GameUnit
9+
int CountUnits;
10+
GameEnginee() { CountUnits = 0; }
11+
~GameEnginee();
12+
int Add(GameUnit &GU);
13+
int Step();
14+
void Print();
15+
void Clear();
16+
};
17+

0 commit comments

Comments
 (0)