enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src world_internal.hh,1.2,1.3


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src world_internal.hh,1.2,1.3
Date: Thu, 20 Nov 2003 20:27:39 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv4781/src

Modified Files:
        world_internal.hh 
Log Message:

- Removed abstract class World
- Renamed WorldImpl to World


Index: world_internal.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/world_internal.hh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** world_internal.hh   18 Oct 2003 13:49:08 -0000      1.2
--- world_internal.hh   20 Nov 2003 20:27:36 -0000      1.3
***************
*** 167,207 ****
      };
  
- /*
- ** World
- **
- ** Will one day become the abstract interface to the game engine...
- */
-     class World {
-     public:
-         virtual ~World() {}
-         virtual void name_object (Object *obj, const string &name) = 0;
-     };
  
! /*
! ** WorldImpl
! **
! ** Contains the level information (in theory everything that is local
! ** to the current level; in practice a lot of things are still stored
! ** in global variables).
! */
!     class WorldImpl : public World {
!     public:
!         WorldImpl(int ww, int hh);
!         ~WorldImpl();
  
!         bool contains (GridPos p) {
!             return (p.x>=0 && p.y>=0 && p.x<w && p.y<h);
!         }
  
!         bool is_border (GridPos p) {
!             return(p.x==0 || p.y==0 || p.x==w-1 || p.y==h-1);
!         }
  
!         Field *get_field (GridPos p) {
!             if (this->contains(p))
!                 return &fields(p.x,p.y);
!             else
!                 return 0;
!         }
  
          void    name_object (Object *obj, const string &name);
--- 167,185 ----
      };
  
  
! /* -------------------- World -------------------- */
  
!     /*! Contains the level information (in theory everything that is
!       local to the current level; in practice a lot of things are
!       still stored in global variables). */
!     class World {
!     public:
!         World (int ww, int hh);
!         ~World();
  
!         bool contains (GridPos p);
!         bool is_border (GridPos p);
  
!         Field *get_field (GridPos p);
  
          void    name_object (Object *obj, const string &name);
***************
*** 215,218 ****
--- 193,199 ----
          void scramble_puzzles();
  
+ 
+         V2 get_accel (Actor *a, const V2 & x, const V2 & v, double time);
+ 
      public:
          // Variables.
***************
*** 227,242 ****
  
      private:
!         /* Objects can be named with NameObject and referenced with
!            GetNamedObject.  This dictionary maps the names to the
!            actual objects. */
!         px::Dict<Object *> m_objnames;
  
          list<Scramble> scrambles;
      };
  
! /*
! ** DelayedImpulse
! **
! */
      class DelayedImpulse {
          Impulse      impulse;
--- 208,218 ----
  
      private:
!         px::Dict<Object *> m_objnames; // Name -> object mapping
  
          list<Scramble> scrambles;
      };
  
! /* -------------------- DelayedImpulse -------------------- */
! 
      class DelayedImpulse {
          Impulse      impulse;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]