Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vgui_support: initial vgui2 support #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kungfulon
Copy link

Counter-Strike 1.6 is loadable and playable with VGUI menus disabled. Currently no menu rendering is implemented and input is disabled.

The code will be gradually updated to implement rendering and input.

Counter-Strike 1.6 is loadable and playable with VGUI menus disabled.
Currently no menu rendering is implemented and input is disabled.
@a1batross
Copy link
Member

That could be annoying but what if we generate headers based on DWARF data rather than using Source SDK ones? For example, pdwtags/pahole from dwarves utils can generate C++ code from debug info.

I did this for VGUI1 (it's not published yet) and filesystem_stdio. At least, we're not bringing unneeded proprietary headers this way.

@kungfulon
Copy link
Author

Actually, the headers in vgui2-dev are generated from running pahole as well, I just took time to clean it up and make it looks like source sdk headers. If you want any change to avoid licensing problems, please tell me.

@a1batross
Copy link
Member

The Valve interface file looks suspicious. :)

In filesystem_stdio I just wrote CreateInterface export myself, than relying on Source SDK macros.

@kungfulon
Copy link
Author

Oh, that one I took from HLSDK indeed. I can change it to self-made CreateInterface.

@kungfulon
Copy link
Author

BTW VGUI2 need to load libraries and get exports from them, so I think these functions should be exposed to vguiapi_t, if we want to get rid of valve interface.cpp and interface.h.

@kungfulon
Copy link
Author

OK, I made some changes to avoid using valve interface, only keeping basic types got from DWARF.

Moving forward I'll also update GPL license header to vgui2-dev.

@kungfulon
Copy link
Author

kungfulon commented Nov 3, 2022

Updated vgui2-dev to state that the headers and sources are reverse engineered using DWARF information and added GPL licensing header.

Copy link
Member

@a1batross a1batross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mostly fine with these changes, for now it's all stubs and require reworking engine API anyway (API is also not forward and backward compatible).

This will be merged as soon as API would be redone. I can do it myself, as soon as I will return from vacation OR you can do it yourself just in the same style like engine's RefAPI, RenderAPI or FS API.

@a1batross
Copy link
Member

Oh, and since it uses "auto" which is C++11 feature, it would be nice to have override on the vgui2 interface methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants