Ignore:
Timestamp:
Jan 1, 2013, 8:11:43 PM (8 years ago)
Author:
sam
Message:

tutorial: minor tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/04_texture.cpp

    r2183 r2191  
    1919using namespace lol;
    2020
    21 static int const TEXTURE_WIDTH = 128;
     21static int const TEXTURE_WIDTH = 512;
    2222
    2323extern char const *lolfx_04_texture;
     
    5858
    5959        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;
    6161        height = std::max(15, std::min(height, 240));
    6262        m_heightmap[4 * (TEXTURE_WIDTH - 1)] = height;
Note: See TracChangeset for help on using the changeset viewer.