Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 15, 2005, 7:13:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/2d-recalc: some recalculations.. do not know it i will continue with this, as has certain disadvantages over the old approach… maybe later

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2d-recalc/src/lib/graphics/render2D/render_2d.cc

    r5318 r5381  
    1414*/
    1515
    16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
    1717
    1818#include "render_2d.h"
     19#include "debug.h"
    1920
    2021#include "graphics_engine.h"
     
    8889void Render2D::moveToLayer(Element2D* element2D, E2D_LAYER to)
    8990{
     91  // prevent switching Layers if either Render2D is not Instanciated or element2D is NULL
     92  if (unlikely(element2D == NULL  || this == NULL))
     93    return;
     94  if(to > pow(2, E2D_LAYER_COUNT))
     95  {
     96    PRINTF(2)("trying to %s (%s) move to a to non-existing layer %d\n", element2D->getName(), element2D->getClassName() );
     97    to = E2D_DEFAULT_LAYER;
     98  }
    9099  if (element2D->getLayer() != to)
    91100  {
Note: See TracChangeset for help on using the changeset viewer.