Add old code that is presumably made to display debug collision lines.
This commit is contained in:
parent
a7bd060452
commit
7985ba2bc4
3 changed files with 35 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "sizeratio.hpp"
|
||||
#include "compatibility.h"
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
namespace cloonel {
|
||||
namespace {
|
||||
|
@ -42,6 +43,13 @@ namespace cloonel {
|
|||
Drawable(128.0f, 128.0f),
|
||||
m_tileCount(parMain, ushort2(128)),
|
||||
m_tile(new Texture(parPath, parMain, false))
|
||||
#if defined(WITH_DEBUG_VISUALS)
|
||||
, m_midscreen(parMain,
|
||||
Colour(80, 250, 6),
|
||||
short2(0),
|
||||
short2(1)
|
||||
)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -79,6 +87,12 @@ namespace cloonel {
|
|||
}
|
||||
dest.y() += sz.y();
|
||||
}
|
||||
|
||||
#if defined(WITH_DEBUG_VISUALS)
|
||||
//std::cout << "drawing line at " << WidthHeight() * float2(1.0f, 0.5f);
|
||||
//std::cout << " to " << m_tileCount.screenRes() << "\n";
|
||||
m_midscreen.Render(WidthHeight() * float2(1.0f, 0.5f), m_tileCount.screenRes());
|
||||
#endif
|
||||
}
|
||||
|
||||
///--------------------------------------------------------------------------
|
||||
|
@ -87,6 +101,9 @@ namespace cloonel {
|
|||
BaseClass(parMain),
|
||||
m_tileCount(CountTilesInScreen(parMain->WidthHeight(), parTileSize)),
|
||||
m_tileSize(static_cast<float2>(parTileSize))
|
||||
#if defined(WITH_DEBUG_VISUALS)
|
||||
, m_screenRes(1.0f)
|
||||
#endif
|
||||
{
|
||||
assert(parMain);
|
||||
assert(ushort2(0) != parTileSize);
|
||||
|
@ -95,10 +112,15 @@ namespace cloonel {
|
|||
///--------------------------------------------------------------------------
|
||||
///--------------------------------------------------------------------------
|
||||
void TiledWallpaper::TileCountNotifiable::NotifyResChanged (const SizeRatio& parSize) {
|
||||
std::cout << "Autoregistering" << std::endl;
|
||||
BaseClass::NotifyResChanged(parSize);
|
||||
m_tileCount = CountTilesInScreen(static_cast<ushort2>(parSize.Resolution()), static_cast<ushort2>(m_tileSize));
|
||||
#if defined(WITH_DEBUG_VISUALS)
|
||||
m_screenRes = parSize.Resolution();
|
||||
#endif
|
||||
#if !defined(NDEBUG)
|
||||
{
|
||||
m_screenRes = parSize.Resolution();
|
||||
const ushort2 tileSize(static_cast<ushort2>(m_tileSize));
|
||||
const ushort2 screenRes(static_cast<ushort2>(parSize.Resolution()));
|
||||
const ushort2 tileCount(static_cast<ushort2>(m_tileCount));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue