d_text_proc(3alleg4)

✨ NAME ✨

d_text_proc, d_ctext_proc, d_rtext_proc β€” dialogs procedure drawing text onto the screen πŸ’– bestie this is from the Allegro game programming library, okurrr?


🌸 SYNOPSIS 🌸

#include <allegro.h>

int d_text_proc(int msg, DIALOG *d, int c);

int d_ctext_proc(int msg, DIALOG *d, int c);

int d_rtext_proc(int msg, DIALOG *d, int c);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so literally all three of these draw text onto the screen, no cap. πŸ“

  • The dp field should point to the string you wanna display. That's it. That's the assignment. πŸ‘‘

Here's the trio and what each one does with the vibe:

  • d_ctext_proc() β€” centers the string horizontally 🎯 (main character, always in the middle fr)
  • d_rtext_proc() β€” right aligns it ➑️ (she's late but she's aligned, periodt)

And the ampersand situation, because this one's important bestie, listen up πŸ‘‚βœ¨:

  • Any '&' characters in the string will be replaced with lines underneath the following character, for displaying keyboard shortcuts β€” exactly like in MS Windows πŸͺŸ iykyk
  • Wanna display a single literal ampersand? Put "&&". Two of them. Not one. One is a shortcut, two is a whole ampersand πŸ’…
🚨 also: if you wanna draw the text in something other than the default font, set the dp2 field to point to your custom font data. Custom font = custom era. πŸŽ€

πŸ‘€ SEE ALSO πŸ‘€


mwah πŸ’‹ that's the whole page. this one's from the Allegro manual, version 4.4.3 β€” go slay some dialogs bestie, ily 🫢🌈⭐