Browse Source

doc: rename a few tutorials to remove “lol” from their names.

legacy
Sam Hocevar 5 years ago
parent
commit
6455091518
10 changed files with 28 additions and 28 deletions
  1. +2
    -2
      .gitignore
  2. +1
    -1
      doc/tutorial/14_lua.cpp
  3. +0
    -0
      doc/tutorial/14_lua.lua
  4. +2
    -2
      doc/tutorial/14_lua.vcxproj
  5. +0
    -0
      doc/tutorial/15_gui.cpp
  6. +1
    -1
      doc/tutorial/15_gui.vcxproj
  7. +8
    -8
      doc/tutorial/Makefile.am
  8. +3
    -3
      lol.sln
  9. +10
    -10
      src/ui/controller.cpp
  10. +1
    -1
      src/ui/controller.h

+ 2
- 2
.gitignore View File

@@ -97,8 +97,8 @@ doc/tutorial/09_sound
doc/tutorial/11_fractal
doc/tutorial/12_voronoi
doc/tutorial/13_shader_builder
doc/tutorial/14_lol_lua
doc/tutorial/15_lolimgui
doc/tutorial/14_lua
doc/tutorial/15_gui
doc/tutorial/16_movie
doc/tutorial/16_movie.gif
tools/make-font


doc/tutorial/14_lol_lua.cpp → doc/tutorial/14_lua.cpp View File

@@ -179,7 +179,7 @@ public:
LoluaDemoLoader* demo_loader = new LoluaDemoLoader();

//Execute script
demo_loader->ExecLuaFile("14_lol_lua.lua");
demo_loader->ExecLuaFile("14_lua.lua");
demo_loader->TestStuff();

//Grab global test values

doc/tutorial/14_lol_lua.lua → doc/tutorial/14_lua.lua View File


doc/tutorial/14_lol_lua.vcxproj → doc/tutorial/14_lua.vcxproj View File

@@ -42,10 +42,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="14_lol_lua.cpp" />
<ClCompile Include="14_lua.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="14_lol_lua.lua">
<None Include="14_lua.lua">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</None>
</ItemGroup>

doc/tutorial/15_lolimgui.cpp → doc/tutorial/15_gui.cpp View File


doc/tutorial/15_lolimgui.vcxproj → doc/tutorial/15_gui.vcxproj View File

@@ -39,7 +39,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="15_lolimgui.cpp" />
<ClCompile Include="15_gui.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{81C83B42-D00A-4FA3-9A3D-80F9D46524BF}</ProjectGuid>

+ 8
- 8
doc/tutorial/Makefile.am View File

@@ -9,7 +9,7 @@ tutorials =
if LOL_USE_GL
tutorials += 01_triangle 02_cube 03_noise 04_texture 05_easymesh \
06_sprite 07_input 08_fbo 09_sound 11_fractal \
12_voronoi 13_shader_builder 14_lol_lua 15_lolimgui
12_voronoi 13_shader_builder 14_lua 15_gui
endif
tutorials += 16_movie

@@ -68,14 +68,14 @@ endif
13_shader_builder_CPPFLAGS = $(AM_CPPFLAGS)
13_shader_builder_DEPENDENCIES = @LOL_DEPS@

14_lol_lua_SOURCES = 14_lol_lua.cpp
14_lol_lua_CPPFLAGS = $(AM_CPPFLAGS)
14_lol_lua_LDFLAGS = $(AM_LDFLAGS) @LOL_LUA_DEPS@
14_lol_lua_DEPENDENCIES = @LOL_DEPS@ @LOL_LUA_DEPS@
14_lua_SOURCES = 14_lua.cpp
14_lua_CPPFLAGS = $(AM_CPPFLAGS)
14_lua_LDFLAGS = $(AM_LDFLAGS) @LOL_LUA_DEPS@
14_lua_DEPENDENCIES = @LOL_DEPS@ @LOL_LUA_DEPS@

15_lolimgui_SOURCES = 15_lolimgui.cpp
15_lolimgui_CPPFLAGS = $(AM_CPPFLAGS)
15_lolimgui_DEPENDENCIES = @LOL_DEPS@
15_gui_SOURCES = 15_gui.cpp
15_gui_CPPFLAGS = $(AM_CPPFLAGS)
15_gui_DEPENDENCIES = @LOL_DEPS@

16_movie_SOURCES = 16_movie.cpp
16_movie_CPPFLAGS = $(AM_CPPFLAGS)


+ 3
- 3
lol.sln View File

@@ -44,7 +44,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03_noise", "doc\tutorial\03
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04_texture", "doc\tutorial\04_texture.vcxproj", "{834852DB-EDB6-4FD0-BCF9-45CD01126962}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12_Voronoi", "doc\tutorial\12_Voronoi.vcxproj", "{6BF81B39-EDC2-4227-9982-C2D8ABEA95AF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "12_voronoi", "doc\tutorial\12_voronoi.vcxproj", "{6BF81B39-EDC2-4227-9982-C2D8ABEA95AF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "07_input", "doc\tutorial\07_input.vcxproj", "{572E5B9C-7E19-489C-BD8A-E8401CFBBC47}"
EndProject
@@ -56,9 +56,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "13_shader_builder", "doc\tu
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B6297FF2-63D0-41EE-BE13-EFF720C9B0FA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15_lolimgui", "doc\tutorial\15_lolimgui.vcxproj", "{81C83B42-D00A-4FA3-9A3D-80F9D46524BF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "15_gui", "doc\tutorial\15_gui.vcxproj", "{81C83B42-D00A-4FA3-9A3D-80F9D46524BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14_lol_lua", "doc\tutorial\14_lol_lua.vcxproj", "{31B96262-1C41-43B9-BA38-27AA385B05DB}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "14_lua", "doc\tutorial\14_lua.vcxproj", "{31B96262-1C41-43B9-BA38-27AA385B05DB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16_movie", "doc\tutorial\16_movie.vcxproj", "{5F5714D0-1C3D-4522-A409-214C5A2951AA}"
EndProject


+ 10
- 10
src/ui/controller.cpp View File

@@ -282,7 +282,7 @@ bool Controller::IsLayerActive()
//GetKeys/Axis stuff ----------------------------------------------------------
KeyBinding& Controller::GetKey(int index)
{
return m_keys[index];
return m_key_bindings[index];
}

AxisBinding& Controller::GetAxis(int index)
@@ -293,26 +293,26 @@ AxisBinding& Controller::GetAxis(int index)
// Key methods: should not go directly to binding
bool Controller::IsKeyPressed(int index) const
{
auto key = m_keys.find(index);
return key != m_keys.end() && key->second.IsPressed();
auto key = m_key_bindings.find(index);
return key != m_key_bindings.end() && key->second.IsPressed();
}

bool Controller::IsKeyReleased(int index) const
{
auto key = m_keys.find(index);
return key != m_keys.end() && key->second.IsReleased();
auto key = m_key_bindings.find(index);
return key != m_key_bindings.end() && key->second.IsReleased();
}

bool Controller::WasKeyPressedThisFrame(int index) const
{
auto key = m_keys.find(index);
return key != m_keys.end() && key->second.WasPressedThisFrame();
auto key = m_key_bindings.find(index);
return key != m_key_bindings.end() && key->second.WasPressedThisFrame();
}

bool Controller::WasKeyReleasedThisFrame(int index) const
{
auto key = m_keys.find(index);
return key != m_keys.end() && key->second.WasReleasedThisFrame();
auto key = m_key_bindings.find(index);
return key != m_key_bindings.end() && key->second.WasReleasedThisFrame();
}

//Axis methods: should not go directly to binding -----------------------------
@@ -436,7 +436,7 @@ void Controller::tick_game(float seconds)

if (m_active)
{
for (auto &kv : m_keys)
for (auto &kv : m_key_bindings)
kv.second.Update();

for (auto &kv : m_axis)


+ 1
- 1
src/ui/controller.h View File

@@ -359,7 +359,7 @@ protected:

private:
uint32_t m_layer_mask = 1; // plugged on the first by default
std::map<int, KeyBinding> m_keys;
std::map<int, KeyBinding> m_key_bindings;
std::map<int, AxisBinding> m_axis;

static uint32_t m_active_layer; // All active by default


Loading…
Cancel
Save