Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. Index: code/hud/hudmessage.cpp
  2. ===================================================================
  3. --- code/hud/hudmessage.cpp (revision 6721)
  4. +++ code/hud/hudmessage.cpp (working copy)
  5. @@ -261,7 +261,7 @@
  6.  
  7. //ACTIVE_BUFFER_LINES = Players[Player_num].HUD_config.num_msg_window_lines;
  8. // ACTIVE_BUFFER_LINES = HUD_config.num_msg_window_lines;
  9. - ACTIVE_BUFFER_LINES = 4;
  10. + //ACTIVE_BUFFER_LINES = 4;
  11.  
  12. MSG_WINDOW_FONT_HEIGHT = h;
  13. MSG_WINDOW_HEIGHT = MSG_WINDOW_FONT_HEIGHT * (ACTIVE_BUFFER_LINES-1);
  14. @@ -598,7 +598,7 @@
  15. str = msg;
  16.  
  17. //Because functions to get font size don't compensate for *actual* screen size
  18. - int pretend_width = (gr_screen.res == GR_640) ? 620 : 1004;
  19. + int pretend_width = Message_display_width;
  20.  
  21. while ((ptr = split_str_once(str, pretend_width - x - 7)) != NULL) { // the 7 is a fudge hack
  22. // make sure that split went ok, if not then bail
  23. Index: code/hud/hudmessage.h
  24. ===================================================================
  25. --- code/hud/hudmessage.h (revision 6721)
  26. +++ code/hud/hudmessage.h (working copy)
  27. @@ -70,6 +70,7 @@
  28. extern int Active_index;
  29. extern int Scroll_needed;
  30. extern int Scroll_in_progress;
  31. +extern int Message_display_width;
  32.  
  33. extern int MSG_WINDOW_HEIGHT; // extern'ed since needed in save/restore code
  34. extern int MSG_WINDOW_FONT_HEIGHT; // extern'ed since needed in save/restore code
  35. Index: code/hud/hudparse.cpp
  36. ===================================================================
  37. --- code/hud/hudparse.cpp (revision 6721)
  38. +++ code/hud/hudparse.cpp (working copy)
  39. @@ -48,6 +48,9 @@
  40.  
  41. int Hud_font = -1;
  42.  
  43. +//The E
  44. +int Message_display_width;
  45. +
  46. int num_default_gauges = 42;
  47. static int retail_gauges[] = {
  48. HUD_OBJECT_MESSAGES,
  49. @@ -4119,6 +4122,18 @@
  50. }
  51. }
  52.  
  53. + if (optional_string("Message display width:")) {
  54. + stuff_int(&Message_display_width);
  55. + } else {
  56. + Message_display_width = (gr_screen.res == GR_640) ? 620 : 1004;
  57. + }
  58. +
  59. + if (optional_string("Max number of lines:")) {
  60. + stuff_int(&ACTIVE_BUFFER_LINES);
  61. + } else {
  62. + ACTIVE_BUFFER_LINES = 4;
  63. + }
  64. +
  65. HudGaugeMessages* hud_gauge = new HudGaugeMessages();
  66. hud_gauge->initBaseResolution(base_res[0], base_res[1]);
  67. hud_gauge->initPosition(coords[0], coords[1]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement