]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
merge branch lib-cleanup into ui
authorClyne Sullivan <clyne@bitgloo.com>
Tue, 15 Nov 2022 12:35:07 +0000 (07:35 -0500)
committerClyne Sullivan <clyne@bitgloo.com>
Tue, 15 Nov 2022 12:35:07 +0000 (07:35 -0500)
1  2 
Makefile
Scripts/init.lua
src/components/Component.hpp
src/components/Physics.hpp
src/components/Position.hpp
src/components/Render.hpp
src/components/Velocity.hpp
src/engine.cpp
src/input.hpp
src/script.cpp

diff --cc Makefile
index e1827a7771ed7e523468e2ee06103472e7c28fb1,a14fb2bf14677d37d9ea90eabc49f9e61e18c598..4ec54da02261e85123946a14f4d9758307a178a3
+++ b/Makefile
@@@ -82,7 -88,18 +88,19 @@@ $(OUTDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SR
        @sed -e 's/.*://' -e 's/\\$$//' < $(OUTDIR)/$*.$(DEPEXT).tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $(OUTDIR)/$*.$(DEPEXT)
        @rm -f $(OUTDIR)/$*.$(DEPEXT).tmp
  
- mem: $(EXEC)
-       valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./$(EXEC)
+ lib/libentityx.a:
+       @cmake -S lib/entityx -B lib/entityx -DENTITYX_BUILD_SHARED=FALSE
+       @make -Clib/entityx -j4 entityx
+       @cp lib/entityx/libentityx.a lib/libentityx.a
+ lib/libluajit.a:
+       @make -Clib/luajit -j4
+       @cp lib/luajit/src/libluajit.a lib/libluajit.a
+ lib/libsoil.a:
+       @make -Clib/soil -j4
+       @cp lib/soil/libsoil.a lib/libsoil.a
+ .PHONY: all remake clean cleaner cleanall resources
  
 +.PHONY: all remake clean cleaner resources mem
index 80fee320a452b85548310587c0d43494af034cac,66fbcb11fe0a4472316acdee10906c771cde454d..60f21c6d8ff032f6356b7c9318d2db86b8826c91
@@@ -38,24 -36,16 +39,29 @@@ player = 
          x = 0.0,
          y = 0.0
      },
 -    Physics = 0,
 +    Physics = {
 +        hitbox = {
 +            ll = {x = -0.5, y = -0.8},
 +            lr = {x = 0.5, y = -0.8},
 +            ul = {x = -0.5, y = 0.8},
 +            ur = {x = 0.5, y = 0.8},
 +        }
 +    },
      Name = "bord",
+     Audio = {
+         file = "Assets/jump.wav"
+     },
+     hellotrue = true,
+     hellofalse = false,
      Render = {
          texture = "Assets/player.png",
 -        visible = true
 +        visible = true,
 +        offset = {
 +            ll = {x = -0.5, y = -0.8},
 +            lr = {x = 0.5, y = -0.8},
 +            ul = {x = -0.5, y = 0.8},
 +            ur = {x = 0.5, y = 0.8},
 +        }
      },
      Light = {
          r = 1.0,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc src/engine.cpp
Simple merge
diff --cc src/input.hpp
Simple merge
diff --cc src/script.cpp
index 4fda54358ca13fcb79c6db2088f8ba028787013c,9fae1c9e95d2280d6b7c0745e4539a33b78644a5..b1d82e97da5b6a4a98b727d8fb17feab782e588f
@@@ -120,9 -120,12 +121,13 @@@ void ScriptSystem::scriptExport(void
  
      lua.new_usertype<Physics>("Physics",
              sol::constructors<Physics(void), Physics()>(),
 -            "standing", &Physics::standing);
 +            "standing", &Physics::standing,
 +            "gravity", &Physics::gravity);
  
+     lua.new_usertype<Audio>("Audio",
+             sol::constructors<Audio(std::string)>(),
+             "file", &Audio::fileName);
      lua.new_usertype<World>("World",
              sol::constructors<World(sol::object), World(void)>(),
              "Generate", &World::generate,