Skip to content

Commit

Permalink
fix linux build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
enginmanap committed Jun 3, 2018
1 parent 1cc27b2 commit e256416
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ IF (WIN32)
SET_TARGET_PROPERTIES(LimonEngine PROPERTIES LINK_FLAGS ${LimonEngine_LINKFLAGS} )
ENDIF()

add_library(customTriggers SHARED src/GamePlay/TriggerInterface.cpp src/GamePlay/LimonAPI.cpp src/GamePlay/updateGuiTextOnTrigger.cpp)
add_library(customTriggers SHARED src/GamePlay/TriggerInterface.cpp src/GamePlay/LimonAPI.cpp src/GamePlay/UpdateGuiTextOnTrigger.cpp)
TARGET_LINK_LIBRARIES(customTriggers ${TinyXML2_LIBRARIES})

set_target_properties(customTriggers PROPERTIES VERSION ${PROJECT_VERSION})
Expand Down
24 changes: 12 additions & 12 deletions src/GameObjects/TriggerObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ void TriggerObject::render(BulletDebugDrawer *debugDrawer) {
* */

//top
debugDrawer->drawLine(boxTransform* glm::vec4( 1, 1, 1,1), boxTransform* glm::vec4( 1, 1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 2
debugDrawer->drawLine(boxTransform* glm::vec4( 1, 1,-1,1), boxTransform* glm::vec4(-1, 1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 4
debugDrawer->drawLine(boxTransform* glm::vec4(-1, 1,-1,1), boxTransform* glm::vec4(-1, 1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 3
debugDrawer->drawLine(boxTransform* glm::vec4(-1, 1, 1,1), boxTransform* glm::vec4( 1, 1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 1
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1, 1, 1,1)), glm::vec3(boxTransform* glm::vec4( 1, 1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 2
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1, 1,-1,1)), glm::vec3(boxTransform* glm::vec4(-1, 1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 4
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1, 1,-1,1)), glm::vec3(boxTransform* glm::vec4(-1, 1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 3
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1, 1, 1,1)), glm::vec3(boxTransform* glm::vec4( 1, 1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 1

//bottom
debugDrawer->drawLine(boxTransform* glm::vec4( 1,-1, 1,1), boxTransform* glm::vec4( 1,-1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 2
debugDrawer->drawLine(boxTransform* glm::vec4( 1,-1,-1,1), boxTransform* glm::vec4(-1,-1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 4
debugDrawer->drawLine(boxTransform* glm::vec4(-1,-1,-1,1), boxTransform* glm::vec4(-1,-1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 3
debugDrawer->drawLine(boxTransform* glm::vec4(-1,-1, 1,1), boxTransform* glm::vec4( 1,-1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 1
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1,-1, 1,1)), glm::vec3(boxTransform* glm::vec4( 1,-1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 2
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1,-1,-1,1)), glm::vec3(boxTransform* glm::vec4(-1,-1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 4
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1,-1,-1,1)), glm::vec3(boxTransform* glm::vec4(-1,-1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 3
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1,-1, 1,1)), glm::vec3(boxTransform* glm::vec4( 1,-1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 1

//sides
debugDrawer->drawLine(boxTransform* glm::vec4( 1, 1, 1,1), boxTransform* glm::vec4( 1,-1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 1
debugDrawer->drawLine(boxTransform* glm::vec4( 1, 1,-1,1), boxTransform* glm::vec4( 1,-1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 2
debugDrawer->drawLine(boxTransform* glm::vec4(-1, 1, 1,1), boxTransform* glm::vec4(-1,-1, 1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 3
debugDrawer->drawLine(boxTransform* glm::vec4(-1, 1,-1,1), boxTransform* glm::vec4(-1,-1,-1,1), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 4
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1, 1, 1,1)), glm::vec3(boxTransform* glm::vec4( 1,-1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 1 -> 1
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4( 1, 1,-1,1)), glm::vec3(boxTransform* glm::vec4( 1,-1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 2 -> 2
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1, 1, 1,1)), glm::vec3(boxTransform* glm::vec4(-1,-1, 1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 3 -> 3
debugDrawer->drawLine(glm::vec3(boxTransform* glm::vec4(-1, 1,-1,1)), glm::vec3(boxTransform* glm::vec4(-1,-1,-1,1)), glm::vec3( 0, 0,1), glm::vec3( 0, 0,1), true);// 4 -> 4
}

GameObject::ImGuiResult TriggerObject::addImGuiEditorElements(const glm::mat4 &cameraMatrix, const glm::mat4 &perspectiveMatrix) {
Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ int main(int argc, char *argv[]) {
Options options;

SDL2Helper sdlHelper(PROGRAM_NAME.c_str(), &options);

#ifdef _WIN32
sdlHelper.loadSharedLibrary("libcustomTriggers.dll");
#else
sdlHelper.loadSharedLibrary("./libcustomTriggers.so");
#endif

GLHelper glHelper(&options);
glHelper.reshape();
Expand Down

0 comments on commit e256416

Please sign in to comment.