-
Notifications
You must be signed in to change notification settings - Fork 140
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
New reading scheme for vbsp, vvis, vrad #356
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this PR targets the branch master
but it will need to target develop
instead.
I notice a lot of tab spacing changes in the output. Can you walk through the overall thought process of which lines of output should have tabs preceding vs not?
Since standard hammer doesnt support color text, spotting an Error/Warning becomes difficult, so for every Error/Warning that the compilers spells there is going to be an 8 character tabulation for easy spotting. This rule applies for every Error/Warning found in the compilers. Also for hammer++ users this new format combine with colors makes spotting these things very easy and clear. |
this PR should be alright, all the useless files/modifications have been removed |
i closed the PR by accident, sorry |
How should i resolve the conflict in vscript_squirrel.cpp? changing the code to develop? |
The conflict was caused by the recently merged save/restore rewrite. Since I was responsible for merging that and causing this conflict, I took the initiative to resolve the conflict for you, although I think a number of the messages you changed in that file were removed by the rewrite. |
Okay, i will do a PR adding again the modifications from the overwritten file. |
I checked the "overwritten file" and all the Error("\t Warning("\t are found in the vscript_squirrel.cpp so it is good to go. Is PR is able to merge right now. |
I'm really concerned about the fact this adds tabs to libraries used by the game without any demonstration or mention of what effect this has in-game. Have you tested that? |
I didn't test it in game, even if it worked it would mess up the scheme in the console, to acknowledge this i will use the next format (only in the shared code between the tooling and game): #if defined(MAPBASE) && defined(SDK_TOOLS) // For the tooling, we use a different printing format
Warning("\tlight has _fifty_percent_distance of %f but no zero_percent_distance\n", d50); //tools
#else
Warning("light has _fifty_percent_distance of %f but no zero_percent_distance\n", d50); //game
#endif The SDK_TOOLS preprocessor directive will be included in the tooling VPC scripts. |
Now, VBSP, VVIS, and VRAD will use the SDK_TOOLS preprocessor directive to enable specific features from the shared code between the game and the tools. Since the tools do not link against tier1, there is no need for a separate build for them. However, mathlib does require this adjustment. VBSP, VVIS, and VRAD will now link against mathlib_sdktools.lib instead of mathlib.lib. See the new VPC file (mathlib_sdktools.vpc), which includes everything from mathlib with an additional SDK_TOOLS preprocessor directive. This is now ready to merge since there is no contamination between the game and tools code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My input on the colours from what is visible on the screenshots is that it is too colourful without a purpose. I don't think successful actions ("done") should be highlighted, they are expected. User input (files) and input data (light count, texinfo etc) can be coloured, though perhaps not as dark as they are there. Colouring each character of RGB is gimmicky and childish, it doesn't provide any value. I didn't check what every compiler output looks like, but think about what information needs emphasis and how it will improve mapper experience.
The overeaching output edits seem completely useless. The blind search & replace in even debug comments doesn't give me confidence that you knowingly applied them. There isn't even any tabs visible in the screenshots you shared apart from a couple of compiler specific lines, so why edit irrelevant files? Instead of adding horizontal space to every output, it might be better to print more to highlight.
Error
is a terminating call, they don't even need any formatting at all since they will be the last output.
I don't think text such as **** leaked ****
and AREAPORTAL
/MAP
LEAK
should be changed, they have been the same for over 20 years, changing them will only make troubleshooting more confusing.
I don't think usage of arrows (->
) instead of colons (:
) is appropriate for what the text is trying to convey. Again, seems like a change for change's sake.
I don't understand the comments on StandartColorFormat
files. Besides being duplicated between header and code files, why mention ANSI at all? Does ColorSpewMessage
not work for all colours, what works then, why is there colours declared that don't work? You have VT enabling code commented out in a couple of places, if colours don't work without it, why is it commented out; if they work without it, why is it there?
"Standard" in "StandartColorFormat" file name is is misspelt.
sp/src/utils/vvis/vvis.cpp
Outdated
|
||
verbose = false; | ||
|
||
ThreadSetDefault(); //It does not change the behaviour of vvis, of ThreadSetDefault |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it doesn't change anything, why change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when calling ThreadSetDefault(); the funtion will print the number of threads before vvis prints the header of the tool, this is a incossitensy. That is why i changed it.
before:
16 threads
Valve Software - vvis.exe (__DATE__)
now:
Valve Software - vvis.exe (Build: pc32 __DATE__)
(Threads: 16)
The comment will be removed, as it could lead to confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand, is there some out of order buffer flushing or time travel with the execution order of Msg
? ThreadSetDefault
was always called after the "Valve Software" header print. When does what you said happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember how i have got this error, i will try to recreate it and post it
Hammer++ cmd system doesn't fully support 8-bit RGB colors, so I am limited to using colors that contain only two primary components. For example, 255,128,128 wouldn't work, but 255,128,0 would, That's why the colors appear 'strong'. To acknowledge this issue, I can add a command-line option to disable color highlighting: "-NoColorHighlighting". The RGB color format is meant to be prettier, but I will remove it if it becomes an inconvenience or is disliked.
Could you explain more your point? I dont understand it fully.
Even though is a terminating call is easier to spot in very large .log files with this new format.
The change will be reverted then.
This change was made because all the paths are referenced with
Valve doesn't use ANSI codes; they use ColorSpewMessage with the Color class. So, what I did was provide a 1-to-1 equivalent to Valve's format using all the ANSI colors, in case Hammer++ fixes this issue in the future or if someone implements a Windows-specific function to address it.
Will be fixed. |
Changes:
Note: These changes do not apply to VMPI, as no one actively uses it. |
Your concern is reasonable. These changes to the compiler's printing format should be documented in the Mapbase wiki (https://github.com/mapbase-source/source-sdk-2013/wiki/Map-Compilers). This should also be one of the main points in the announcement for Mapbase 8.0 since it is a big change. While new mappers may initially struggle with the new reading format in some cases, this can be easily addressed by providing proper documentation in the Mapbase wiki. Additionally, adding a link to the wiki in the tools description would help guide users to the information found in the wiki. One possible fix would be to add a command-line option like |
(Describe your PR here and then fill out the checklist at the bottom)
This is a PR that aims to make the compile tools more easier to read, both for standart hammer user and hammer++.
Changes:
Examples:


Stock Hammer (new scheme vbsp)
Stock Hammer (old scheme vbsp)
Stock Hammer++ (new scheme vbsp)


Stock Hammer++ (old scheme vbsp)
Stock Hammer++ (new scheme vvis)


Stock Hammer++ (old scheme vvis)
Stock Hammer++ (new scheme vrad)


Stock Hammer++ (old scheme vrad)
Does this PR close any issues?
PR Checklist
develop
branch OR targets another branch with a specific goal in mind