Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1856 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 5, 2004, 10:32:15 AM (21 years ago)
Author:
patrick
Message:

orxonox/trunk/core: test routines added, other minor changes

Location:
orxonox/trunk
Files:
9 edited
2 moved

Legend:

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

    r1855 r1856  
    1717#include "data_tank.h"
    1818
     19using namespace std;
    1920
    2021
  • orxonox/trunk/core/orxonox.cc

    r1855 r1856  
    115115  (*orx).globalInit(argc, argv);
    116116  (*orx).menuInit();
    117   glutMainLoop();
     117
     118  World* wd = new World;
     119  Player* pl = new Player;
     120  (*wd).addPlayer(pl);
     121  (*wd).addPlayer(pl);
     122  (*wd).addPlayer(pl);
     123  (*wd).addPlayer(pl);
     124  (*wd).testThaTest();
     125
     126  glutMainLoop(); 
    118127  return 0;
    119128}
  • orxonox/trunk/core/orxonox.h

    r1850 r1856  
     1
     2#include "world.h"
     3
    14#ifndef ORXONOX_H
    25#define ORXONOX_H
  • orxonox/trunk/core/player.cc

    r1853 r1856  
    1515#include "player.h"
    1616
     17using namespace std;
    1718
    1819
  • orxonox/trunk/core/player.h

    r1853 r1856  
    1010  ~Player ();
    1111
     12 private:
     13  /* position of the space craft */
     14  int xCor;
     15  int yCor;
     16  int zCor;
     17
    1218};
    1319
  • orxonox/trunk/core/proto_class.cc

    r1855 r1856  
    2020
    2121
     22using namespace std;
     23
     24
    2225
    2326ProtoClass::ProtoClass () {}
  • orxonox/trunk/core/world.cc

    r1855 r1856  
    1919#include "world.h"
    2020
     21#include <iostream>
     22
     23using namespace std;
    2124
    2225
     
    2427World::World () {
    2528  lastPlayer = null;
    26   lastPlayer->nextPlayer = null;
    2729}
    2830
     
    4042{
    4143  playerList* listMember = new playerList;
    42   listMember->nextPlayer = lastPlayer;
    4344  listMember->player = player;
    44   listMember->playerNr = lastPlayer->playerNr + 1;
     45  if ( lastPlayer != null )
     46    {
     47      listMember->number = lastPlayer->number + 1;
     48      listMember->next = lastPlayer;
     49    }
     50  else
     51    {
     52      listMember->number = 0;
     53      listMember->next = null;
     54    }
    4555  lastPlayer = listMember;
    4656}
     
    5363   testing, testing, testing...
    5464*/
    55 boot World::testRouting()
     65void World::testThaTest()
    5666{
     67  cout << "World::testThaTest() called" << endl;
     68  /* test addPlayer */
     69  cout << "addPlayer test..." << endl;
     70  playerList* pl = lastPlayer;
     71  while ( pl != null )
     72    {
     73      cout << "player " << pl->number << " was found" << endl;
     74      pl = pl->next;
     75    }
    5776
     77  cout << "World::testThaTest() finished" << endl;
    5878}
    5979
  • orxonox/trunk/core/world.h

    r1855 r1856  
    2020  /* a list of all players */
    2121  struct playerList {
    22     playerList* nextPlayer;
     22    playerList* next;
    2323    Player* player;
    24     int playerNr;
     24    int number;
    2525  };
    2626  playerList* lastPlayer;
     
    2828  /* a list of all non-player-characters */
    2929  struct npcList {
    30     npcList* nextNPC;
     30    npcList* next;
    3131    NPC* npc;
    3232  };
     
    3939  bool removeNPC(NPC* npc);
    4040
    41 
     41  void testThaTest(void);
    4242
    4343
  • orxonox/trunk/doc/CREDITS

    r1853 r1856  
    44--------------------------
    55
     6Programmers:
     7------------
     8Patrick Boenzli
     9Benjamin Grauer
     10
     11Infrastructure:
     12---------------
    613amir@datacore.ch        for giving us access to subversion and mailing lists
     14
     15The Great Orx Sound:
     16--------------------
    717Luke Grey               for making the orxonox sound
    818
Note: See TracChangeset for help on using the changeset viewer.