Patoke / re-plants-vs-zombies

A project to rebuild all functionality via reverse engineering from the GOTY version of Plants VS Zombies (and expand upon it)
Creative Commons Zero v1.0 Universal
74 stars 11 forks source link

Have some problem with sdl and sdl_image in gl branch. #7

Open khotaonickvai opened 7 months ago

khotaonickvai commented 7 months ago

image

I'm trying build new graphics in gl branch with VS2019 and get some new problems: sdl,sdl_image git have no "build" forlder insteal it may be change to build-scripts (i tried and pass for the problem). glwl forlder not include in project or may be visual studio cant findout ( i tried use glwl in the internet and pass for the problem ). But Building get error with the problem in the image and i cant find solution for that.

Hope that with two of my problem can contribute to this git and fix it for users who use VS2019

sepcnt commented 7 months ago

Also, the best practice of referencing third party libraries may be to put their source in ${CMAKE_SOURCE_DIR} rather than ${CMAKE_BINARY_DIR}, which would result in dummy. In all, the CMakeFile.txt may need refactoring.

https://stackoverflow.com/questions/34367424/building-glfw3-application-with-cmake-glfw-libraries-doesnt-set

Edit: No more CMake issue for now!

khotaonickvai commented 7 months ago

Also, the best practice of referencing third party libraries may be to put their source in ${CMAKE_SOURCE_DIR} rather than ${CMAKE_BINARY_DIR}, which would result in dummy. In all, the CMakeFile.txt may need refactoring.

https://stackoverflow.com/questions/34367424/building-glfw3-application-with-cmake-glfw-libraries-doesnt-set

I pass some external part cmake build by edit cmake files in cmake folder of sdl_image for build sdk, some conflict i can see that make failed with dir in cmake files and i fixed it by hard code string for sdk_dir and names variable in command find library and find dir ...

But Gl branch can not run because glInterface is in process of develop,

Patoke commented 7 months ago

Hello, yes, as already mentioned the GL branch is not compilable as it's in the middle of development, I was supposed to push a fix for SDL linking but I completely forgot to implement it correctly

I will keep this issue open until these problems are resolved

Thanks for your interest in the project 👍

Also, the best practice of referencing third party libraries may be to put their source in ${CMAKE_SOURCE_DIR} rather than ${CMAKE_BINARY_DIR}, which would result in dummy. In all, the CMakeFile.txt may need refactoring.

https://stackoverflow.com/questions/34367424/building-glfw3-application-with-cmake-glfw-libraries-doesnt-set

We encountered some problems by keeping the source and binaries separated, specifically with ZLib and LibPNG, all this implementation code for now is a placeholder as we're not currently focused in optimizing and cleaning code, we're currently focused in getting working versions of the game using different renderers (which hopefully might be able to be merged together into one branch)

A lot of files will be either partially or completely refactored in the future as to keep code optimized and follow the best modern practices for C++ codebases

We will take these bad practices into consideration and are always open to pull requests which fix these problems but currently they're not in our todo list