dd_string3d.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef DD_TEXT_H
  2. #define DD_TEXT_H
  3. void dd_string3d_activate(const char *fontname);
  4. int dd_string3d_isActive();
  5. void dd_string3d_init();
  6. enum dd_string3d_align {
  7. DD_STRING3D_ALIGN_LEFT,
  8. DD_STRING3D_ALIGN_CENTER,
  9. DD_STRING3D_ALIGN_RIGHT,
  10. };
  11. struct dd_string3d {
  12. // Align
  13. enum dd_string3d_align align;
  14. float colorFront[3];
  15. float colorBack[3];
  16. void (*setAlign)(struct dd_string3d *, enum dd_string3d_align);
  17. void (*setColorFront)(struct dd_string3d *, float r, float g, float b);
  18. void (*setColorBack)(struct dd_string3d *, float r, float g, float b);
  19. void (*draw)(struct dd_string3d *, const char *text);
  20. void (*drawInt)(struct dd_string3d *, int num);
  21. void (*drawLimit)(struct dd_string3d *, const char *text, int limit);
  22. void (*clean)(struct dd_string3d *);
  23. };
  24. void dd_string3d_create(struct dd_string3d *o);
  25. void dd_string3d_setAlign(struct dd_string3d *o, enum dd_string3d_align al);
  26. void dd_string3d_setColorFront(struct dd_string3d *, float r, float g, float b);
  27. void dd_string3d_setColorBack(struct dd_string3d *, float r, float g, float b);
  28. void dd_string3d_draw(struct dd_string3d *o, const char* text);
  29. void dd_string3d_drawInt(struct dd_string3d *o, int num);
  30. void dd_string3d_drawLimit(struct dd_string3d *o, const char* text, int limit);
  31. void dd_string3d_clean(struct dd_string3d *o);
  32. #endif