Changeset 2237 for trunk/tutorial


Ignore:
Timestamp:
Jan 21, 2013, 12:28:22 AM (8 years ago)
Author:
sam
Message:

system: try to autodetect the data directory from the executable path;
currently works for images (SDL and GDI+ loaders) and sound samples.

Location:
trunk/tutorial
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/01_triangle.cpp

    r2183 r2237  
    22// Lol Engine - Triangle tutorial
    33//
    4 // Copyright: (c) 2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2012-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    7575int main(int argc, char **argv)
    7676{
     77    System::Init(argc, argv);
     78
    7779    Application app("Tutorial 1: Triangle", ivec2(640, 480), 60.0f);
    7880
  • trunk/tutorial/02_cube.cpp

    r2216 r2237  
    136136int main(int argc, char **argv)
    137137{
     138    System::Init(argc, argv);
     139
    138140    Application app("Tutorial 2: Cube", ivec2(640, 480), 60.0f);
    139141
  • trunk/tutorial/03_noise.cpp

    r2183 r2237  
    22// Lol Engine - Noise tutorial
    33//
    4 // Copyright: (c) 2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2012-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    8686int main(int argc, char **argv)
    8787{
     88    System::Init(argc, argv);
     89
    8890    Application app("Tutorial 3: Noise", ivec2(1280, 720), 60.0f);
    8991
  • trunk/tutorial/04_texture.cpp

    r2197 r2237  
    22// Lol Engine - Graphing tutorial
    33//
    4 // Copyright: (c) 2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2012-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    116116int main(int argc, char **argv)
    117117{
     118    System::Init(argc, argv);
     119
    118120    Application app("Tutorial 4: Texture", ivec2(640, 480), 60.0f);
    119121
  • trunk/tutorial/05_easymesh.cpp

    r2226 r2237  
    3030        m_gears.Push(EasyMesh(), mat4(1.0f), 180.0f / 18);
    3131
    32         m_gears[0].m1.Compile("[sc#00f ab 8 1 8 ty -.25]\
    33                               [sc#f9f scb#f9f acg 12 10 5 5 20 20 5 5 0.1 0 s .1 .1 .1 ty -.1 csgu]\
    34                               [sc#fff scb#000 acg 12 10 10 10 20 20 5 5 0.1 0 s .05 .05 .05 tx -1.5 ty .3 csgu]\
    35                               [sc#00f ab 5 3 9 tx 2.5 csgs]\
    36                               [[ sc#fff ab 3   1.4 2   tx -2 tz -2 \
    37                                [sc#fff ab 2.1  .7 1.1 ty .5 tx -1.4 tz -1.4 csgs] mz] csgu] \
    38                               ");
     32        m_gears[0].m1.Compile("[sc#00f ab 8 1 8 ty -.25]"
     33                              "[sc#f9f scb#f9f acg 12 10 5 5 20 20 5 5 0.1 0 s .1 .1 .1 ty -.1 csgu]"
     34                              "[sc#fff scb#000 acg 12 10 10 10 20 20 5 5 0.1 0 s .05 .05 .05 tx -1.5 ty .3 csgu]"
     35                              "[sc#00f ab 5 3 9 tx 2.5 csgs]"
     36                              "[[ sc#fff ab 3   1.4 2   tx -2 tz -2 "
     37                              "[sc#fff ab 2.1  .7 1.1 ty .5 tx -1.4 tz -1.4 csgs] mz] csgu]");
    3938        //m_gears[0].m1.Compile("[sc#f9f scb#f9f acg 12 10 5 5 20 20 5 5 0.1 0 s .1 .1 .1 [sc#00f ab 3 1 2 ty .25 tx 1 csgs]]");
    4039        m_gears[1].m1.Compile("sc#ff9 scb#ff9 acg 54 10 95 95 90 90 -5 -5 0.1 0 s .1 .1 .1");
     
    122121int main(int argc, char **argv)
    123122{
     123    System::Init(argc, argv);
     124
    124125    Application app("Tutorial 5: EasyMesh", ivec2(960, 600), 60.0f);
    125126    new EasyMeshTutorial();
  • trunk/tutorial/08_fbo.cpp

    r2183 r2237  
    22// Lol Engine - Framebuffer Object tutorial
    33//
    4 // Copyright: (c) 2012 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2012-2013 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    139139int main(int argc, char **argv)
    140140{
     141    System::Init(argc, argv);
     142
    141143    Application app("Tutorial 08: Framebuffer Object", ivec2(640, 480), 60.0f);
    142144
  • trunk/tutorial/11_fractal.cpp

    r2216 r2237  
    554554    ivec2 window_size(640, 480);
    555555
     556    System::Init(argc, argv);
    556557    Application app("Tutorial 3: Fractal", window_size, 60.0f);
    557558
Note: See TracChangeset for help on using the changeset viewer.