Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder 2, Slade, WadSmoosh, etc.
Forum rules The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
if (zout) { ACS_BeginLog (); __nprintf (z_log); ACS_EndLog (); }
return z_log; } return NULL_NSTRG; }
This function, and it's sisters, tries to put a string and a number together. The string gives the number meaning. The final product might be "Player 0 TID is: 42", with the string being "Player 0 TID is: ", and the number being 42. Both values get sent to the function to be concatenated, but the number has to be converted to a string as well. Tested in VS2015, both functions work fine and I have complete strings, but not with GDCC. It's as if the converted number string isn't being concatenated. The reason I think the problem is with sprintf is that I also have a function that concatenates two strings and it's working fine. The difference between the functions is the sprintf usage.
Nash: Forgot to add them to the list of ACS keywords, so the parser ignored them for script types. It should actually really be working now.
Also, when updating, you should delete the old version first, as I do sometimes remove files from the distribution.
Nero: And on the same subject of code with insufficient testing, I forgot to flush the special stream used for sprintf in the latest stdio rewrite. That also seems to be working correctly now.
Quick question: I currently use the following code for HudMessages, which works fine for just plain messages. What is the syntax for combining types and where do the extra arguments go?
It took a couple tries but I got it now. I do output stings too, so the __nprintf is sometimes necessary, but since I'm fixing my HudMessage use I'm separating my code into an image function and a string function. Either way, thanks for the tip, I'm all for efficiency tweaks.
I'm stuck on one thing though: color strings. From my understanding of the wiki if I specify a message type with HUDMSG_COLORSTRING, the color arg accepts a string instead of an int. GDCC doesn't like strings in an int arg, obviously, so what do I do there?
Sarah
Royal Boredom....Why can't I do this in Windows?
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.
Github ID: Saican
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
I've created a wiki for GDCC since there's a lot of things that need explaining commonly. I am not very good at administering mediawiki software, so any suggestions are welcome.
Will not print junk. Don't know what recent change caused unassigned strings to print junk... I am okay with this change if it has to be this way but I just want to know what's causing this (GDCC or ZDoom, and intentional or not)
Should be zero-initialized by the engine just like under acc, but I don't know what printing string index 0 does under ZDoom currently.
EDIT: Or, well, it's obvious what it will do: Print the first string from the table of the map's BEHAVIOR (or the first loaded module if the map has no BEHAVIOR). So there you have it.
It didn't do this until very recently though... must be something that changed in ZDoom, then. Since I don't have the energy to track it down and make isolated examples, I'll just play it safe and initialize my temporary strings with "" and hopefully the string garbage collector is doing its job... :S
// So now in a function I do something like this: void foo () { NULL_objAptr = initalizeObjA(); // so the function returns a pointer to the object it created NULL_objA = *NULL_objAptr; // and here's the problem, I just set the global object to the dereferenced pointer! }
My code doesn't overload the "equal" operator, not sure if that's even doable here, so I'm not sure if this is a bug in GDCC or just a case of "don't do that!" Just a heads up
*edited so it's one problem, not multiple, my other issues were my own.
Sarah
Royal Boredom....Why can't I do this in Windows?
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.
Github ID: Saican
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Ah, ok, that's something I didn't know. Maybe I'm forgetting my C++ but I thought you couldn't do that without overloading the operand; which is what made me think that should be illegal in C as well. I guess I should check my solution settings if VS is balking on a C project, just specifying a .c filetype isn't enough for it.
Sarah
Royal Boredom....Why can't I do this in Windows?
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.
Github ID: Saican
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit