Skip to content

Commit

Permalink
neuer stand
Browse files Browse the repository at this point in the history
  • Loading branch information
Danduriel committed Jan 26, 2017
1 parent ec65cf6 commit 1a44419
Show file tree
Hide file tree
Showing 264 changed files with 28,418 additions and 21 deletions.
42 changes: 42 additions & 0 deletions .include/engine.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#ifndef ENGINE_H
#define ENGINE_H

#include <SFML/Graphics.hpp>
#include <vector>

class gamestate;

class engine
{
public:
engine();
virtual ~engine();

void init();
void cleanup();

void changeState(gamestate* state);
void pushState(gamestate* state);
void popState();

void handleevents();
void update();
void draw();

bool running() {return m_running;}
void quit(){m_running = false;}

//Adjust here for different games!
// sf::RenderWindow window(sf::VideoMode(1280, 800), "Rocky the rocket's path to infinity and beyond!");

protected:

private:

std::vector<gamestate*> states;

bool m_running;
bool m_fullscreen; // for later use
};

#endif // ENGINE_H
34 changes: 34 additions & 0 deletions .include/gamestate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef GAMESTATE_H
#define GAMESTATE_H

#include <SFML/Graphics.hpp>
#include "engine.h"

class gamestate : public sf::Drawable
{
public:
//gamestate();
virtual ~gamestate();

virtual void init();
virtual void cleanup();

virtual void pause();
virtual void resume();

virtual void handeEvents(engine* game) = 0;
virtual void update(engine* game) = 0;
virtual void draw(engine* game) = 0;

void changeState(engine* game, gamestate* state)
{
game->changeState(state);
}

protected:
gamestate(){}

private:
};

#endif // GAMESTATE_H
15 changes: 15 additions & 0 deletions .include/helper.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef HELPER_H
#define HELPER_H


class helper
{
public:
helper();

protected:

private:
};

#endif // HELPER_H
33 changes: 33 additions & 0 deletions .src/engine.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "engine.h"
#include <stdio.h>
engine::engine()
{
//ctor
}

engine::~engine()
{
//dtor
}

void engine::init(){}
void engine::cleanup()
{
while(!states.empty() )
{
states.back()->cleanup();
states.pop_back();
}
std::printf("debug: engine::cleanup");
}

void engine::changeState(gamestate* state)
{

}
void engine::pushState(gamestate* state){}
void engine::popState(){}

void engine::handleevents(){}
void engine::update(){}
void engine::draw(){}
21 changes: 21 additions & 0 deletions .src/gamestate.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "gamestate.h"

/*gamestate::gamestate()
{
//ctor
}
*/
gamestate::~gamestate()
{
//dtor
}
void gamestate::init(){}
void gamestate::cleanup(){}

void gamestate::pause(){}
void gamestate::resume(){}

void gamestate::handeEvents(engine* game){}
void gamestate::update(engine* game){}
void gamestate::draw(engine* game){}

6 changes: 6 additions & 0 deletions .src/helper.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "helper.h"

helper::helper()
{
//ctor
}
61 changes: 61 additions & 0 deletions <invalid path>
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="test" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add directory="./include" />
<Add directory=".include" />
</Compiler>
<Linker>
<Add library="sfml-graphics-d" />
<Add library="sfml-window-d" />
<Add library="sfml-system-d" />
<Add directory="/usr/local/lib" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/test" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add directory="./include" />
<Add directory=".include" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="sfml-graphics" />
<Add library="sfml-window" />
<Add library="sfml-system" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename=".include/engine.h" />
<Unit filename=".include/gamestate.h" />
<Unit filename=".include/helper.h" />
<Unit filename=".src/engine.cpp" />
<Unit filename=".src/gamestate.cpp" />
<Unit filename="include/main.h" />
<Unit filename="src/main.cpp" />
<Extensions>
<envvars />
<code_completion />
<lib_finder disable_auto="1" />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
30 changes: 30 additions & 0 deletions <invalid path>.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="src/main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="90" topLine="0" />
</Cursor>
</File>
<File name=".src/gamestate.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="300" topLine="0" />
</Cursor>
</File>
<File name=".include/engine.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="83" topLine="0" />
</Cursor>
</File>
<File name=".src/engine.cpp" open="1" top="1" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="187" topLine="0" />
</Cursor>
</File>
<File name=".include/gamestate.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="196" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
56 changes: 56 additions & 0 deletions SFML-2.4.1/include/SFML/Audio.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2016 Laurent Gomila ([email protected])
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////

#ifndef SFML_AUDIO_HPP
#define SFML_AUDIO_HPP

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////

#include <SFML/System.hpp>
#include <SFML/Audio/InputSoundFile.hpp>
#include <SFML/Audio/Listener.hpp>
#include <SFML/Audio/Music.hpp>
#include <SFML/Audio/OutputSoundFile.hpp>
#include <SFML/Audio/Sound.hpp>
#include <SFML/Audio/SoundBuffer.hpp>
#include <SFML/Audio/SoundBufferRecorder.hpp>
#include <SFML/Audio/SoundFileFactory.hpp>
#include <SFML/Audio/SoundFileReader.hpp>
#include <SFML/Audio/SoundFileWriter.hpp>
#include <SFML/Audio/SoundRecorder.hpp>
#include <SFML/Audio/SoundSource.hpp>
#include <SFML/Audio/SoundStream.hpp>


#endif // SFML_AUDIO_HPP

////////////////////////////////////////////////////////////
/// \defgroup audio Audio module
///
/// Sounds, streaming (musics or custom sources), recording,
/// spatialization.
///
////////////////////////////////////////////////////////////
70 changes: 70 additions & 0 deletions SFML-2.4.1/include/SFML/Audio/AlResource.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2016 Laurent Gomila ([email protected])
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////

#ifndef SFML_ALRESOURCE_HPP
#define SFML_ALRESOURCE_HPP

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>


namespace sf
{
////////////////////////////////////////////////////////////
/// \brief Base class for classes that require an OpenAL context
///
////////////////////////////////////////////////////////////
class SFML_AUDIO_API AlResource
{
protected:

////////////////////////////////////////////////////////////
/// \brief Default constructor
///
////////////////////////////////////////////////////////////
AlResource();

////////////////////////////////////////////////////////////
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~AlResource();
};

} // namespace sf


#endif // SFML_ALRESOURCE_HPP

////////////////////////////////////////////////////////////
/// \class sf::AlResource
/// \ingroup audio
///
/// This class is for internal use only, it must be the base
/// of every class that requires a valid OpenAL context in
/// order to work.
///
////////////////////////////////////////////////////////////
Loading

0 comments on commit 1a44419

Please sign in to comment.