Code Search for Developers
 
 
  

client.h from FreePop at Krugle


Show client.h syntax highlighted

/***************************************************************************
                           client.h
                           -------------------
    begin                : Sat Sep 14 2002
    copyright            : (C) 2002 by Brendon Higgins
    email                : freepop-devel@lists.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program 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 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/**
 * \mainpage FreePop API Reference
 *
 * This section contains reference information about the API that
 * FreePop has evolved into (so far). I'm not sure how this could
 * be of much use to anyone yet, but it's here if your interested.
 */

#ifndef CLIENT_H_INCLUDED
#define CLIENT_H_INCLUDED

#include <common.h>
#include <tempo.h>

#include <boost/filesystem/path.hpp>

class CL_ResourceManager;
class CL_GUIManager;
class CL_StyleManager;

/**
 * The client app.
 */
class Client: public FreePopApp {
public:
    /**
     * Constructor.
     */
    Client();
    
    /**
     * Destructor.
     */
    virtual ~Client();
    
    /**
     * Get the resource list.
     */
    CL_ResourceManager* getResources();

    /**
     * Get the GUI style.
     */
    CL_StyleManager* getStyleManager();

    /**
     * Get the GUI tree.
     */
    CL_GUIManager* getGuiManager();

    /**
     * Get the tempo thingy.
     */
    Tempo& getTempo();

protected:
    /**
     * Keep the beat. Groovy.
     */
    Tempo tempo;

    /**
     * Width of the screen.
     */
    int screenWidth;
    
    /**
     * Height of the screen.
     */
    int screenHeight;
    
    /**
     * Use fullscreen?
     */
    bool fullscreen;
    
    /**
     * Address of the server.
     */
    std::string address;
    
    /**
     * Port of the server.
     */
    std::string port;

    /**
     * Manages all the resources.
     */
    CL_ResourceManager* resources;

    /**
     * Manages the GUI style.
     */
    CL_StyleManager* styleManager;

    /**
     * Manages the GUI tree.
     */
    CL_GUIManager* guiManager;

    /**
     * Bring up CL.
     */
    virtual void initCL();
    
    /**
     * Bring down CL.
     */
    virtual void deinitCL();
    
    /**
     * Parse the args.
     */
    virtual bool args(int n, char** a);
    
    /**
     * Client loop.
     */
    virtual void run();
    
    /**
     * Find the path to the resources. This will check for local resources
     * in "../../resources" first (handy for running from the build dir), then
     * in FREEPOP_DEFAULTRESOURCESPATH (whatever that is defined as).
     */
    boost::filesystem::path findResourcesPath() const;
};

extern Client app;

#endif /* ndef CLIENT_H_INCLUDED */




See more files for this project here

FreePop

FreePop is a multi-platform tile-based game based on the great old game Populous 2 by Bullfrog Productions Ltd., but much improved.

Project homepage: http://sourceforge.net/projects/freepop
Programming language(s): C++
License: other

  Makefile.am
  client.cpp
  client.h
  clientmisc.cpp
  clientmisc.h
  clientstate.cpp
  clientstate.h
  connectstate.cpp
  connectstate.h
  cropsclient.cpp
  cropsclient.h
  entityclient.cpp
  entityclient.h
  entityclientfactory.cpp
  entityclientfactory.h
  firecolumnclient.cpp
  firecolumnclient.h
  gamestate.cpp
  gamestate.h
  loadstate.cpp
  loadstate.h
  mapclient.cpp
  mapclient.h
  maptileclient.cpp
  maptileclient.h
  messagebox.cpp
  messagebox.h
  oversprite.cpp
  oversprite.h
  paintable.cpp
  paintable.h
  pausefader.cpp
  pausefader.h
  peepclient.cpp
  peepclient.h
  peepmagnetclient.cpp
  peepmagnetclient.h
  playerclient.cpp
  playerclient.h
  playeroptionsdialog.cpp
  playeroptionsdialog.h
  rockclient.cpp
  rockclient.h
  swampclient.cpp
  swampclient.h
  townclient.cpp
  townclient.h
  treeclient.cpp
  treeclient.h
  worldclient.cpp
  worldclient.h