BacioiuC
Well-known member
Hi guys,
I'm trying to wrap up my game and I made a ton of mistakes and problems when it comes to using strings with QuickDraw. I wanna clean things up a ton and I'm looking for some help. The only bugs left in the game are related to the log that tells you what is happening. For some reason I get weirdly erratic behaviours when using C2PStr to convert my strings to use with DrawString. So I'm asking you guys for help.
Can anyone help me out with a function that concatenates a few strings and renders them with DrawString?. Example:
DrawStringF("Creature % dealt %d damage", creatureName, damageValue) and the output is: Creature Giant dealt 4 damage.
I'm loading creatureNames and damage values from external csv files or generating them at runtime. I ported all my code before to Linux/Mac using standard C and I couldn't find any problems, so I guess it's down to how It converts. I'm looking for some help to nail a DrawString that can render in QuickDraw objects just like DrawString so I can just wrap up development.
Note: creatureName is of varied length. Can be Bat, Spider, HugeThingWithAReallyLongName.
I'm trying to wrap up my game and I made a ton of mistakes and problems when it comes to using strings with QuickDraw. I wanna clean things up a ton and I'm looking for some help. The only bugs left in the game are related to the log that tells you what is happening. For some reason I get weirdly erratic behaviours when using C2PStr to convert my strings to use with DrawString. So I'm asking you guys for help.
Can anyone help me out with a function that concatenates a few strings and renders them with DrawString?. Example:
DrawStringF("Creature % dealt %d damage", creatureName, damageValue) and the output is: Creature Giant dealt 4 damage.
I'm loading creatureNames and damage values from external csv files or generating them at runtime. I ported all my code before to Linux/Mac using standard C and I couldn't find any problems, so I guess it's down to how It converts. I'm looking for some help to nail a DrawString that can render in QuickDraw objects just like DrawString so I can just wrap up development.
Note: creatureName is of varied length. Can be Bat, Spider, HugeThingWithAReallyLongName.