Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1855 in orxonox.OLD for orxonox/trunk/core


Ignore:
Timestamp:
May 5, 2004, 9:34:21 AM (21 years ago)
Author:
patrick
Message:

/orxonox/trunk/core/ modifications on world and docs

Location:
orxonox/trunk/core
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/core/data_tank.cc

    r1850 r1855  
    99   the Free Software Foundation; either version 2, or (at your option)
    1010   any later version.
     11
     12   Copyright by: Patrick Boenzli
     13   Fixes by:
    1114*/
    1215
  • orxonox/trunk/core/npc.cc

    r1853 r1855  
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
     12
     13   ### File Specific:
     14   main-programmer: Patrick Boenzli
     15   co-programmer:
    1216*/
    1317
  • orxonox/trunk/core/npc.h

    r1853 r1855  
    1010  ~NPC ();
    1111
     12  int npcType;
     13
    1214};
    1315
  • orxonox/trunk/core/orxonox.cc

    r1853 r1855  
    1818   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    1919
     20
     21   ### File Specific:
     22   main-programmer: Patrick Boenzli
     23   co-programmer:
    2024*/
    2125
  • orxonox/trunk/core/proto_class.cc

    r1853 r1855  
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
     12
     13   ### File Specific:
     14   main-programmer: ...
     15   co-programmer: ...
    1216*/
    1317
  • orxonox/trunk/core/world.cc

    r1853 r1855  
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
     12
     13   ### File Specific:
     14   main-programmer: Patrick Boenzli
     15   co-programmer:
    1216*/
    1317
     
    1923
    2024World::World () {
    21  
     25  lastPlayer = null;
     26  lastPlayer->nextPlayer = null;
    2227}
    23 
    2428
    2529
     
    2731
    2832
     33/**
     34   \brief Add Player
     35   \param player A reference to the new player object
     36   
     37   Add a new Player to the game. Player has to be initialised previously
     38*/
     39bool World::addPlayer(Player* player)
     40{
     41  playerList* listMember = new playerList;
     42  listMember->nextPlayer = lastPlayer;
     43  listMember->player = player;
     44  listMember->playerNr = lastPlayer->playerNr + 1;
     45  lastPlayer = listMember;
     46}
     47
     48
     49
     50/**
     51   \brief Routine for testing purposes.
     52   
     53   testing, testing, testing...
     54*/
     55boot World::testRouting()
     56{
     57
     58}
     59
     60bool World::removePlayer(Player* player) {}
     61
     62bool World::addNPC(NPC* npc) {}
     63bool World::removeNPC(NPC* npc) {}
  • orxonox/trunk/core/world.h

    r1853 r1855  
    22#include "npc.h"
    33#include "player.h"
     4#include "stdincl.h"
    45
    56#ifndef WORLD_H
     
    1314  ~World ();
    1415
     16  /* for easier use: map the first two player here */
    1517  Player *player1;
     18  Player *player2;
    1619
    17   struct player_list {
    18     player_list* next_player;
     20  /* a list of all players */
     21  struct playerList {
     22    playerList* nextPlayer;
    1923    Player* player;
     24    int playerNr;
    2025  };
     26  playerList* lastPlayer;
    2127
    22   struct npc_list {
    23     npc_list* next_npc;
     28  /* a list of all non-player-characters */
     29  struct npcList {
     30    npcList* nextNPC;
    2431    NPC* npc;
    2532  };
     33  npcList* firstNPC;
     34
     35  bool addPlayer(Player* player);
     36  bool removePlayer(Player* player);
     37
     38  bool addNPC(NPC* npc);
     39  bool removeNPC(NPC* npc);
     40
     41
     42
    2643
    2744};
Note: See TracChangeset for help on using the changeset viewer.