Commit 3898de28 authored by Elias Leinenweber's avatar Elias Leinenweber
Browse files

Quelques modifications de style

parent 73b85204
......@@ -3,6 +3,7 @@ BasedOnStyle: Mozilla
IndentWidth: 4
---
Language: Cpp
BreakBeforeBraces: WebKit
DerivePointerAlignment: false
PointerAlignment: Right
---
......@@ -11,8 +11,7 @@
#define RESOURCES_FOLDER "resources/"
/** @brief Une classe "statique" ("singleton") modélisant le jeu. */
class Game
{
class Game {
private:
static GameWindow *mainWindow;
static std::vector<Component *> components;
......
......@@ -5,8 +5,7 @@
#include "view/Texturable.h"
class Actor : public Texturable
{
class Actor : public Texturable {
private:
std::string name;
std::string surname;
......
......@@ -11,8 +11,7 @@
class Student;
class Teacher;
class Classroom : public Texturable
{
class Classroom : public Texturable {
private:
static const int MAX_SIZE = 50; /**< taille maximum de la classe */
std::vector<Student *> students; /**< élèves de la classe */
......
......@@ -3,8 +3,7 @@
#include <string>
class Game
{
class Game {
private:
/**
* @brief Heure de début de la partie
......
......@@ -4,12 +4,10 @@
#include <string>
#include <vector>
#include "view/Texturable.h"
#include "model/Classroom.h"
#include "view/Component.h"
class Classroom;
class School : public Component
{
class School : public Component {
private:
/** @brief Nom de l'école */
std::string name;
......
......@@ -9,8 +9,7 @@
class Subject;
class Classroom;
class Student : Actor
{
class Student : Actor {
private:
/**
* @brief Classe de l'élève
......
......@@ -3,8 +3,7 @@
#include <string>
class Subject
{
class Subject {
private:
/**
......
......@@ -6,8 +6,7 @@
#include "model/Actor.h"
class Teacher : public Actor
{
class Teacher : public Actor {
private:
/**
* @brief Niveau de pédagogie du prof
......
......@@ -2,8 +2,7 @@
#define COMPONENT_H
/** @brief Une classe abstraite modélisant un composant graphique. */
class Component
{
class Component {
public:
virtual ~Component(){};
virtual void render() const = 0;
......
#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H
#include "assert.h"
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <SFML/Window.hpp>
#include "imgui/imgui-SFML.h"
#include "imgui/imgui.h"
/**
* @brief La fenêtre principale du jeu.
*/
class GameWindow : public sf::RenderWindow
{
/** @brief La fenêtre principale du jeu. */
class GameWindow : public sf::RenderWindow {
private:
sf::Color background;
public:
/**
* @brief Construit une fenêtre de jeu.
*/
/** @brief Construit une fenêtre de jeu. */
GameWindow();
/** @brief Gestion des évènements. */
void handleEvents();
/**
* Dessin et rendu.
*/
/** @brief Dessin et rendu. */
void draw();
/**
* Libération des ressources.
*/
/** @brief Libération des ressources. */
~GameWindow();
};
......
......@@ -3,8 +3,7 @@
#include "Component.h"
class MainMenu : public Component
{
class MainMenu : public Component {
public:
void render() const;
};
......
......@@ -8,8 +8,7 @@
#include "model/School.h"
#include "view/Component.h"
class MainView : public Component
{
class MainView : public Component {
private:
const School *school;
......
......@@ -7,8 +7,7 @@
#include "view/Component.h"
class Texturable : public Component
{
class Texturable : public Component {
protected:
std::string texturePath;
sf::Texture texture;
......
#include "assert.h"
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <SFML/Window.hpp>
#include "imgui/imgui-SFML.h"
#include "controller/Game.h"
#include "view/GameWindow.h"
......@@ -8,7 +12,7 @@
GameWindow::GameWindow()
: sf::RenderWindow(sf::VideoMode::getDesktopMode(), "Headmaster Simulator",
sf::Style::Default)
, background(0.f, 0.f, 0.f)
, background(58, 110, 165)
{
sf::Image icon;
assert(icon.loadFromFile(RESOURCES_FOLDER "images/hms-logo-128.jpg"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment