Changeset 455 for trunk


Ignore:
Timestamp:
08/10/15 18:35:05 (10 years ago)
Author:
epyon
Message:
  • fov has own interface, not map_area based
Location:
trunk/nv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/interface/map_area.hh

    r431 r455  
    3434                virtual bool is_visible( const position& ) const { return true; }
    3535                virtual bool is_explored( const position& ) const { return true; }
    36                 virtual void set_visible( const position&, bool ) {}
    3736                virtual bool is_transparent( const position& ) const { return true; }
    3837                virtual ~map_area(){}
  • trunk/nv/rogue/fov.hh

    r395 r455  
    1212#include <nv/common.hh>
    1313#include <nv/core/position.hh>
    14 #include <nv/interface/map_area.hh>
    1514
    1615namespace nv
     
    1918        namespace rogue
    2019        {
     20                class fov_interface
     21                {
     22                public:
     23                        virtual bool is_transparent( const position& ) const = 0;
     24                        virtual void set_visible( const position&, bool ) = 0;
     25                };
    2126
    2227                class fov_algorithm
    2328                {
    2429                public:
    25                         virtual void initialize( map_area*, const dimension& size ) = 0;
     30                        virtual void initialize( fov_interface*, const dimension& size ) = 0;
    2631                        virtual void run( const position& p, uint16 radius ) = 0;
    2732                        virtual ~fov_algorithm() {}
  • trunk/nv/rogue/fov_recursive_shadowcasting.hh

    r395 r455  
    1717        namespace rogue
    1818        {
    19 
    2019                class fov_recursive_shadowcasting : public fov_algorithm
    2120                {
     
    2322                        fov_recursive_shadowcasting( bool light_walls = true )
    2423                                : m_light_walls( light_walls ) {}
    25                         virtual void initialize( map_area* map, const dimension& size )
     24                        virtual void initialize( fov_interface* map, const dimension& size )
    2625                        {
    2726                                m_map  = map;
     
    3231                        void cast_light( int row,float start, float end, int oct );
    3332
    34                         bool      m_light_walls;
    35                         int       m_radius;
    36                         int       m_radius2;
    37                         position  m_position;
    38                         dimension m_size;
    39                         map_area* m_map;
     33                        bool           m_light_walls;
     34                        int            m_radius;
     35                        int            m_radius2;
     36                        position       m_position;
     37                        dimension      m_size;
     38                        fov_interface* m_map;
    4039                };
    4140
Note: See TracChangeset for help on using the changeset viewer.