Skip to content

Commit

Permalink
Upload projektu do repozytorium
Browse files Browse the repository at this point in the history
Upload archiwalnej lokalnej kopii do GitHub
  • Loading branch information
SzymonTadeusz committed Sep 27, 2015
1 parent 834790c commit b72c69f
Show file tree
Hide file tree
Showing 22 changed files with 1,633 additions and 0 deletions.
Binary file added PO_projektDodatkowy.opensdf
Binary file not shown.
31 changes: 31 additions & 0 deletions PO_projektDodatkowy.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PO_projektDodatkowy", "PO_projektDodatkowy\PO_projektDodatkowy.vcxproj", "{107F945A-B335-4792-8ACC-9C5B9B3ECC92}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://szymontadeusz.visualstudio.com/defaultcollection
SccLocalPath0 = .
SccProjectUniqueName1 = PO_projektDodatkowy\\PO_projektDodatkowy.vcxproj
SccProjectName1 = PO_projektDodatkowy
SccLocalPath1 = PO_projektDodatkowy
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{107F945A-B335-4792-8ACC-9C5B9B3ECC92}.Debug|Win32.ActiveCfg = Debug|Win32
{107F945A-B335-4792-8ACC-9C5B9B3ECC92}.Debug|Win32.Build.0 = Debug|Win32
{107F945A-B335-4792-8ACC-9C5B9B3ECC92}.Release|Win32.ActiveCfg = Release|Win32
{107F945A-B335-4792-8ACC-9C5B9B3ECC92}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added PO_projektDodatkowy.v12.suo
Binary file not shown.
10 changes: 10 additions & 0 deletions PO_projektDodatkowy.vssscc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
}
120 changes: 120 additions & 0 deletions PO_projektDodatkowy/Boisko.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#include "Boisko.h"

Boisko::Boisko()
{
}


Boisko::~Boisko()
{
}

void Boisko::rysujGraczaI(Kontener & nowy){ //rysowanie prawej rakietki
glPushMatrix();
glColor3f(0, 0, 0.2);
glScalef((nowy.prawa->racket_height) / 5, 1.5, nowy.prawa->racket_width / 5);
glTranslatef(nowy.prawa->racket_right_x / 16.5, 0, nowy.prawa->racket_right_y / 2);
glutSolidCube(1);
glPopMatrix();
}

void Boisko::rysujGraczaII(Kontener & nowy){ //rysowanie lewej rakietki
glPushMatrix();
glColor3f(0, 0.2, 0);
glScalef(nowy.lewa->racket_height / 5, 1.5, nowy.lewa->racket_width / 5);
glTranslatef(nowy.lewa->racket_left_x / 16.5, 0, nowy.lewa->racket_left_y / 2);
glutSolidCube(1);
glPopMatrix();
}

void Boisko::rysujPilke(Kontener & nowy, Pilka* pilka){ //rysowanie (statycznej) piłki
glPushMatrix();
glColor3f(0.5, 0, 0);
glutSolidSphere(pilka->ball_size, 10, 10);
glPopMatrix();
}

void Boisko::ruszPilke(Kontener & nowy, Pilka *pilka, bool flaga){
glPushMatrix();
glTranslatef(pilka->ball_pos_x, 0, pilka->ball_pos_y);
if (flaga) pilka->wykrywaczkolizji(nowy);
rysujPilke(nowy,pilka);
glPopMatrix();

if (!flaga){
glColor3f(1, 1, 1);
glRasterPos3f(20, 0, -8);
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 'P');
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 'a');
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 'u');
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 'z');
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, 'a');
}

if (!flaga)glutSetWindowTitle("Pong 3D \n- aby wyjść z trybu pauzy, wciśnij \'P\'");
else glutSetWindowTitle("Pong 3D");

}



void Boisko::rysujObszarGry(){ //rysowanie band
glPushMatrix();
glColor3f(0, 0, 0);
glScalef(2, 2, 2);
glPushMatrix();
glRotatef(90, 0, 1, 0);
glRotatef(90, 1, 0, 0);
glTranslatef(0, -25, 0);
glScalef(60, 2, 2);
glutSolidCube(1);
glTranslatef(0, 25, 0);
glutSolidCube(1);
glPopMatrix();
glPushMatrix();
//glRotatef();
glScalef(50, 2, 2);
glTranslatef(0, 0, 15);
glutSolidCube(1);
glTranslatef(0, 0, -30);
glutSolidCube(1);
glPopMatrix();
glScalef(0.5, 0.5, 0.5);
glPopMatrix();
}



void Boisko::wyswietlWynik(Kontener & nowy){
glPushMatrix();
glTranslatef(-55, 0, 0);
glPushMatrix();
for (int i = 0; i < nowy.lewa->wynik; i++)
{
glColor3f(1, 1, 1);
glTranslatef(0, 0, (-7 * (i % 10)) - 10);
if (i % 10 == 0 && i != 0) glTranslatef(-7, 0, 0); //jeśli i=10,20,30..., zjedź linijkę niżej
if ((((nowy.lewa->wynik - nowy.prawa->wynik))>0) && //piłka setowa, jeśli L.wynik > P.wynik
nowy.lewa->wynik >= nowy.doIluPunktow - 1) glColor3f(0.5, 0, 0); //oraz L.wynik >= doIluPunktow
if (i >= nowy.doIluPunktow - 1 && (((nowy.lewa->wynik - nowy.prawa->wynik))>1))glColor3f(1, 1, 0);
glutSolidCube(2);
glTranslatef(0, 0, 7 * (i % 10) + 10); //powróć
}
glPopMatrix();

glPushMatrix();
for (int i = 0; i < nowy.prawa->wynik; i++)
{
glColor3f(1, 1, 1);
glTranslatef(0, 0, (7 * (i % 10)) + 10);
if (i % 10 == 0 && i != 0) glTranslatef(-7, 0, 0); //jeśli i=10,20,30..., zjedź linijkę niżej
if ((((nowy.prawa->wynik - nowy.lewa->wynik))>0) && //piłka setowa, jeśli P.wynik > L.wynik
nowy.prawa->wynik >= (nowy.doIluPunktow - 1)) glColor3f(0.5, 0, 0); //oraz P.wynik >= doIluPunktow
if (i >= nowy.doIluPunktow - 1 && (((nowy.prawa->wynik - nowy.lewa->wynik))>1))glColor3f(1, 1, 0);
glutSolidCube(2);
glTranslatef(0, 0, -7 * (i % 10) - 10); //powróć
}
if ((nowy.lewa->wynik >= nowy.doIluPunktow && ((nowy.lewa->wynik - nowy.prawa->wynik)>1)) || (nowy.prawa->wynik >= nowy.doIluPunktow && ((nowy.prawa->wynik - nowy.lewa->wynik)>1))) podsumowanieGry();
glPopMatrix();
glPopMatrix();
}
22 changes: 22 additions & 0 deletions PO_projektDodatkowy/Boisko.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <cstdlib>
#include<stdlib.h>
#include <glut.h>
#include "Kontener.h"
#include"Pilka.h"
#pragma once
class Boisko
{
public:
Boisko();
friend class Kontener;
friend class RakietaLewa;
friend class RakietaPrawa;
void rysujObszarGry();
void rysujGraczaI(Kontener &);
void rysujGraczaII(Kontener &);
void rysujPilke(Kontener &, Pilka* pilka);
void ruszPilke(Kontener &, Pilka *, bool);
void wyswietlWynik(Kontener &);
~Boisko();
};

22 changes: 22 additions & 0 deletions PO_projektDodatkowy/Kontener.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "Rakieta.h"
#include "RakietaLewa.h"
#include "RakietaPrawa.h"
#pragma once


class Kontener{
public:
RakietaLewa* lewa;
RakietaPrawa* prawa;
int doIluPunktow;
Kontener() { this->lewa = new RakietaLewa(); this->prawa = new RakietaPrawa();}

friend class Boisko;
friend class Pilka;
friend void setVSync(bool sync);
friend void WyswietlObraz(void);
friend void wyswietlWynik(Kontener &);
friend void podsumowanieGry();
friend void ObslugaKlawiatury(unsigned char klawisz, int x, int y);
friend void ObslugaKlawiszySpecjalnych(int klawisz, int x, int y);
};
90 changes: 90 additions & 0 deletions PO_projektDodatkowy/PO_projektDodatkowy.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.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>{107F945A-B335-4792-8ACC-9C5B9B3ECC92}</ProjectGuid>
<RootNamespace>PO_projektDodatkowy</RootNamespace>
<SccProjectName>SAK</SccProjectName>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<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 />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
</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>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Boisko.cpp" />
<ClCompile Include="Pilka.cpp" />
<ClCompile Include="Rakieta.cpp" />
<ClCompile Include="RakietaLewa.cpp" />
<ClCompile Include="RakietaPrawa.cpp" />
<ClCompile Include="Source.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Boisko.h" />
<ClInclude Include="Kontener.h" />
<ClInclude Include="Pilka.h" />
<ClInclude Include="Rakieta.h" />
<ClInclude Include="RakietaLewa.h" />
<ClInclude Include="RakietaPrawa.h" />
<ClInclude Include="wglext.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
56 changes: 56 additions & 0 deletions PO_projektDodatkowy/PO_projektDodatkowy.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?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;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Source.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Rakieta.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RakietaLewa.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RakietaPrawa.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Pilka.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Boisko.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Rakieta.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RakietaLewa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RakietaPrawa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Pilka.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wglext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Kontener.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Boisko.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions PO_projektDodatkowy/PO_projektDodatkowy.vcxproj.vspscc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
Loading

0 comments on commit b72c69f

Please sign in to comment.