Browse Source

Get rid of lol::array in our public headers.

legacy
Sam Hocevar 5 years ago
parent
commit
0aa6ccde7a
8 changed files with 15 additions and 12 deletions
  1. +2
    -2
      src/easymesh/easymeshrender.h
  2. +3
    -0
      src/engine/tickable.cpp
  3. +5
    -5
      src/engine/ticker.cpp
  4. +1
    -1
      src/image/resource.cpp
  5. +1
    -1
      src/mesh/primitivemesh.cpp
  6. +1
    -1
      src/sys/file.cpp
  7. +1
    -1
      src/sys/init.cpp
  8. +1
    -1
      src/tileset.h

+ 2
- 2
src/easymesh/easymeshrender.h View File

@@ -1,8 +1,8 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2009—2013 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// © 2009—2013 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// © 2009—2013 Cédric Lecacheur <jordx@free.fr> // © 2009—2013 Cédric Lecacheur <jordx@free.fr>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to


+ 3
- 0
src/engine/tickable.cpp View File

@@ -39,10 +39,13 @@ void tickable::fini()


void tickable::tick_game(float seconds) void tickable::tick_game(float seconds)
{ {
(void)seconds;
} }


void tickable::tick_draw(float seconds, class Scene &scene) void tickable::tick_draw(float seconds, class Scene &scene)
{ {
(void)seconds;
(void)scene;
} }


} /* namespace lol */ } /* namespace lol */


+ 5
- 5
src/engine/ticker.cpp View File

@@ -71,7 +71,7 @@ private:
/* Entity management */ /* Entity management */
array<entity *> DEPRECATED_m_todolist, DEPRECATED_m_todolist_delayed, DEPRECATED_m_autolist; array<entity *> DEPRECATED_m_todolist, DEPRECATED_m_todolist_delayed, DEPRECATED_m_autolist;
array<entity *> DEPRECATED_m_list[(int)tickable::group::all::end]; array<entity *> DEPRECATED_m_list[(int)tickable::group::all::end];
array<int> DEPRECATED_m_scenes[(int)tickable::group::all::end];
std::vector<int> DEPRECATED_m_scenes[(int)tickable::group::all::end];
int DEPRECATED_nentities = 0; int DEPRECATED_nentities = 0;


/* Fixed framerate management */ /* Fixed framerate management */
@@ -297,11 +297,11 @@ void ticker_data::GameThreadTick()
data->DEPRECATED_m_list[(int)e->m_gamegroup].push(e); data->DEPRECATED_m_list[(int)e->m_gamegroup].push(e);
if (e->m_drawgroup != tickable::group::draw::none) if (e->m_drawgroup != tickable::group::draw::none)
{ {
if (data->DEPRECATED_m_scenes[(int)e->m_drawgroup].count() < Scene::GetCount())
if (data->DEPRECATED_m_scenes[(int)e->m_drawgroup].size() < Scene::GetCount())
data->DEPRECATED_m_scenes[(int)e->m_drawgroup].resize(Scene::GetCount()); data->DEPRECATED_m_scenes[(int)e->m_drawgroup].resize(Scene::GetCount());


int added_count = 0; int added_count = 0;
for (int i = 0; i < Scene::GetCount(); i++)
for (size_t i = 0; i < Scene::GetCount(); i++)
{ {
//If entity is concerned by this scene, add it in the list //If entity is concerned by this scene, add it in the list
if (Scene::GetScene(i).IsRelevant(e)) if (Scene::GetScene(i).IsRelevant(e))
@@ -396,7 +396,7 @@ void ticker_data::DrawThreadTick()
} }


/* Render each scene one after the other */ /* Render each scene one after the other */
for (int idx = 0; idx < Scene::GetCount() && !data->m_quit /* Stop as soon as required */; ++idx)
for (size_t idx = 0; idx < Scene::GetCount() && !data->m_quit /* Stop as soon as required */; ++idx)
{ {
Scene& scene = Scene::GetScene(idx); Scene& scene = Scene::GetScene(idx);


@@ -519,7 +519,7 @@ void ticker_data::collect_garbage()
if (g >= (int)tickable::group::game::end) if (g >= (int)tickable::group::game::end)
{ {
int removal_count = 0; int removal_count = 0;
for (int j = 0; j < Scene::GetCount(); j++)
for (size_t j = 0; j < Scene::GetCount(); j++)
{ {
// If entity is concerned by this scene, add it in the list // If entity is concerned by this scene, add it in the list
if (Scene::GetScene(j).IsRelevant(e)) if (Scene::GetScene(j).IsRelevant(e))


+ 1
- 1
src/image/resource.cpp View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// Copyright © 2016—2017 Benjamin “Touky” Huet <huet.benjamin@gmail.com> // Copyright © 2016—2017 Benjamin “Touky” Huet <huet.benjamin@gmail.com>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to


+ 1
- 1
src/mesh/primitivemesh.cpp View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it


+ 1
- 1
src/sys/file.cpp View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it


+ 1
- 1
src/sys/init.cpp View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it


+ 1
- 1
src/tileset.h View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net>
// Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net>
// //
// Lol Engine is free software. It comes without any warranty, to // Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it // the extent permitted by applicable law. You can redistribute it


Loading…
Cancel
Save