Fluorohydride / ygopro

A script engine for "yu-gi-oh!" and sample gui
GNU General Public License v2.0
1.85k stars 596 forks source link

clean config.h #2568

Closed salix5 closed 3 months ago

salix5 commented 4 months ago

CGUITTFont.h CGUIImageButton.h mysignal.h They are only used in class game.

myfilesystem.h It is used in less than 10 files. #include "myfilesystem.h" are moved to those files.

moved to `game.h` include when necessary GL library It is only used in `drawing.cpp`. moved to `game.h`. Add: #include Some files might include indirectly before. The including path: CGUITTFont.h ->irrUString.h -> string Rename guard macro: https://gcc.gnu.org/onlinedocs/cpp/Once-Only-Headers.html > In a user header file, the macro name should not begin with ‘_’. > In a system header file, it should begin with ‘__’ to avoid conflicts with user programs. > In any kind of header file, the macro name should contain the name of the file and some additional text, to avoid conflicts with other header files. Now the guard macro is YGOPRO_CONFIG_H following the GCC convention. `#pragma once` is removed. Test: It can be built in VS 2022. Maybe you can test it in GCC? @mercury233 @purerosefallen
purerosefallen commented 4 months ago

Tests are needed on all 5 platforms: Windows, Linux, macOS (x86 and m1), server

purerosefallen commented 4 months ago

Also please do the merge to https://github.com/mycard/ygopro/tree/server and submit a PR there.