Skip to content
Snippets Groups Projects
Select Git revision
  • af81db057b013777462fa269550f70eaabe0039c
  • master default protected
  • setting
3 results

highscore.h

Blame
  • highscore.h 1.61 KiB
    /* Copyright (C) 2013 Barnabás Czémán <trabarni@gmail.com>
        This file is part of Minesweeper2D.
    
        Minesweeper2D is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
    
        Minesweeper2D is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
    
        You should have received a copy of the GNU General Public License
        along with Minesweeper2D.  If not, see <http://www.gnu.org/licenses/>.*/
    #ifndef HIGHSCORE_H_INCLUDED
    #define HIGHSCORE_H_INCLUDED
    
    #include <SDL.h>
    #include <SDL_ttf.h>
    #include "game.h"
    /** Ez egy erdményt leíró struktúra.
     *
     *
     * \struct Result
     *
     */
    
    typedef struct Result{
        char nick[20];/**< becenév *//*Nem lehet 19 karakternél hosszabb nick és szőkőzőket se lehet használni*/
        int time;/**< idő eredmény */
        float score;/**< pontszám */
    }Result;
    /** Ez a dícsőség tábla binárisfáját leíró struktúra.
     *
     * \struct HighScore
     *
     */
    
    typedef struct HighScore{
        Result result;/**< a binárisfa aktuális eleméhez tartozó eredmény */
        struct HighScore *left,/**< a binárisfa jobb oldala */
                         *right;/**< a binárisfa bal oldala */
    }HighScore;
    
    void drawHighscore(SDL_Surface* screen,TTF_Font* font,SDL_Surface*bg,SDL_Surface* btnBg);
    void addToHighscore(Uint16* nick,Game const* game);
    #endif