Skip to content

Commit

Permalink
libdoomsday|Client|Server: Added stubs for new player classes
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 26, 2015
1 parent aa6f272 commit 66200e4
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 0 deletions.
36 changes: 36 additions & 0 deletions doomsday/apps/client/include/clientplayer.h
@@ -0,0 +1,36 @@
/** @file clientplayer.h Client-side player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef CLIENT_CLIENTPLAYER_H
#define CLIENT_CLIENTPLAYER_H

#include <doomsday/player.h>

/**
* Client-side player state.
*/
class ClientPlayer : public Player
{
public:
ClientPlayer();

private:
DENG2_PRIVATE(d)
};

#endif // CLIENT_CLIENTPLAYER_H
39 changes: 39 additions & 0 deletions doomsday/apps/client/include/localplayer.h
@@ -0,0 +1,39 @@
/** @file localplayer.h
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef CLIENT_LOCALPLAYER_H
#define CLIENT_LOCALPLAYER_H

#include <de/libcore.h>

/**
* Represents a local player.
*
* Usually there is only one of these, except in a split-screen setup where multiple
* players are controlling players locally at the same time.
*/
class LocalPlayer
{
public:
LocalPlayer();

private:
DENG2_PRIVATE(d)
};

#endif // CLIENT_LOCALPLAYER_H
29 changes: 29 additions & 0 deletions doomsday/apps/client/src/clientplayer.cpp
@@ -0,0 +1,29 @@
/** @file clientplayer.cpp Client-side player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#include "clientplayer.h"

DENG2_PIMPL_NOREF(ClientPlayer)
{

};

ClientPlayer::ClientPlayer() : d(new Instance)
{

}
27 changes: 27 additions & 0 deletions doomsday/apps/client/src/localplayer.cpp
@@ -0,0 +1,27 @@
/** @file localplayer.cpp
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#include "localplayer.h"

DENG2_PIMPL_NOREF(LocalPlayer)
{

};

LocalPlayer::LocalPlayer() : d(new Instance)
{}
37 changes: 37 additions & 0 deletions doomsday/apps/libdoomsday/include/doomsday/player.h
@@ -0,0 +1,37 @@
/** @file player.h Base class for player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef LIBDOOMSDAY_PLAYER_H
#define LIBDOOMSDAY_PLAYER_H

#include "libdoomsday.h"

/**
* Base class for player state: common functionality shared by both the server
* and the client.
*/
class LIBDOOMSDAY_PUBLIC Player
{
public:
Player();

private:
DENG2_PRIVATE(d)
};

#endif // LIBDOOMSDAY_PLAYER_H
27 changes: 27 additions & 0 deletions doomsday/apps/libdoomsday/src/player.cpp
@@ -0,0 +1,27 @@
/** @file player.cpp Base class for player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#include "doomsday/player.h"

DENG2_PIMPL_NOREF(Player)
{

};

Player::Player() : d(new Instance)
{}
38 changes: 38 additions & 0 deletions doomsday/apps/server/include/serverplayer.h
@@ -0,0 +1,38 @@
/** @file serverplayer.h Server-side player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef SERVER_SERVERPLAYER_H
#define SERVER_SERVERPLAYER_H

#include <doomsday/player.h>

/**
* Server-side player state: delta pool, client bookkeeping information.
*
* @ingroup server
*/
class ServerPlayer : public Player
{
public:
ServerPlayer();

private:
DENG2_PRIVATE(d)
};

#endif // SERVER_SERVERPLAYER_H
29 changes: 29 additions & 0 deletions doomsday/apps/server/src/serverplayer.cpp
@@ -0,0 +1,29 @@
/** @file serverplayer.cpp Server-side player state.
*
* @authors Copyright (c) 2015 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>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. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#include "serverplayer.h"

DENG2_PIMPL_NOREF(ServerPlayer)
{

};

ServerPlayer::ServerPlayer() : d(new Instance)
{

}

0 comments on commit 66200e4

Please sign in to comment.