aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp218
1 files changed, 109 insertions, 109 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp b/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp
index 23b515b..6403efa 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CZBuffer.cpp
@@ -1,109 +1,109 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#include "IrrCompileConfig.h" 5#include "IrrCompileConfig.h"
6#include "CZBuffer.h" 6#include "CZBuffer.h"
7#include "irrString.h" 7#include "irrString.h"
8 8
9#ifdef _IRR_COMPILE_WITH_SOFTWARE_ 9#ifdef _IRR_COMPILE_WITH_SOFTWARE_
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace video 13namespace video
14{ 14{
15 15
16 16
17//! constructor 17//! constructor
18CZBuffer::CZBuffer(const core::dimension2d<u32>& size) 18CZBuffer::CZBuffer(const core::dimension2d<u32>& size)
19: Buffer(0), BufferEnd(0), Size(0,0), TotalSize(0) 19: Buffer(0), BufferEnd(0), Size(0,0), TotalSize(0)
20{ 20{
21 #ifdef _DEBUG 21 #ifdef _DEBUG
22 setDebugName("CZBuffer"); 22 setDebugName("CZBuffer");
23 #endif 23 #endif
24 24
25 setSize(size); 25 setSize(size);
26} 26}
27 27
28 28
29 29
30//! destructor 30//! destructor
31CZBuffer::~CZBuffer() 31CZBuffer::~CZBuffer()
32{ 32{
33 delete [] Buffer; 33 delete [] Buffer;
34} 34}
35 35
36 36
37 37
38//! clears the zbuffer 38//! clears the zbuffer
39void CZBuffer::clear() 39void CZBuffer::clear()
40{ 40{
41 memset(Buffer, 0, (BufferEnd-Buffer)*sizeof(TZBufferType)); 41 memset(Buffer, 0, (BufferEnd-Buffer)*sizeof(TZBufferType));
42} 42}
43 43
44 44
45 45
46//! sets the new size of the zbuffer 46//! sets the new size of the zbuffer
47void CZBuffer::setSize(const core::dimension2d<u32>& size) 47void CZBuffer::setSize(const core::dimension2d<u32>& size)
48{ 48{
49 if (size == Size) 49 if (size == Size)
50 return; 50 return;
51 51
52 Size = size; 52 Size = size;
53 53
54 delete [] Buffer; 54 delete [] Buffer;
55 55
56 TotalSize = size.Width * size.Height; 56 TotalSize = size.Width * size.Height;
57 Buffer = new TZBufferType[TotalSize]; 57 Buffer = new TZBufferType[TotalSize];
58 BufferEnd = Buffer + TotalSize; 58 BufferEnd = Buffer + TotalSize;
59} 59}
60 60
61 61
62 62
63//! returns the size of the zbuffer 63//! returns the size of the zbuffer
64const core::dimension2d<u32>& CZBuffer::getSize() const 64const core::dimension2d<u32>& CZBuffer::getSize() const
65{ 65{
66 return Size; 66 return Size;
67} 67}
68 68
69 69
70 70
71//! locks the zbuffer 71//! locks the zbuffer
72TZBufferType* CZBuffer::lock() 72TZBufferType* CZBuffer::lock()
73{ 73{
74 return Buffer; 74 return Buffer;
75} 75}
76 76
77 77
78 78
79//! unlocks the zbuffer 79//! unlocks the zbuffer
80void CZBuffer::unlock() 80void CZBuffer::unlock()
81{ 81{
82} 82}
83 83
84} // end namespace video 84} // end namespace video
85} // end namespace irr 85} // end namespace irr
86 86
87#endif // _IRR_COMPILE_WITH_SOFTWARE_ 87#endif // _IRR_COMPILE_WITH_SOFTWARE_
88 88
89namespace irr 89namespace irr
90{ 90{
91namespace video 91namespace video
92{ 92{
93 93
94//! creates a ZBuffer 94//! creates a ZBuffer
95IZBuffer* createZBuffer(const core::dimension2d<u32>& size) 95IZBuffer* createZBuffer(const core::dimension2d<u32>& size)
96{ 96{
97 #ifdef _IRR_COMPILE_WITH_SOFTWARE_ 97 #ifdef _IRR_COMPILE_WITH_SOFTWARE_
98 return new CZBuffer(size); 98 return new CZBuffer(size);
99 #else 99 #else
100 return 0; 100 return 0;
101 #endif // _IRR_COMPILE_WITH_SOFTWARE_ 101 #endif // _IRR_COMPILE_WITH_SOFTWARE_
102} 102}
103 103
104 104
105} // end namespace video 105} // end namespace video
106} // end namespace irr 106} // end namespace irr
107 107
108 108
109 109