Changeset 2191 for trunk/tutorial/04_texture.cpp
- Timestamp:
- Jan 1, 2013, 8:11:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tutorial/04_texture.cpp
r2183 r2191 19 19 using namespace lol; 20 20 21 static int const TEXTURE_WIDTH = 128;21 static int const TEXTURE_WIDTH = 512; 22 22 23 23 extern char const *lolfx_04_texture; … … 58 58 59 59 int height = m_heightmap[4 * (TEXTURE_WIDTH - 1)]; 60 height = height / 2 + 255 / 4 + rand() % 97 - 48;60 height = (height + 127 + 40 * lol::sin(m_frames * 0.03) + rand() % 97 - 38) / 2; 61 61 height = std::max(15, std::min(height, 240)); 62 62 m_heightmap[4 * (TEXTURE_WIDTH - 1)] = height;
Note: See TracChangeset
for help on using the changeset viewer.