Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: code/hud/hudmessage.cpp
- ===================================================================
- --- code/hud/hudmessage.cpp (revision 6721)
- +++ code/hud/hudmessage.cpp (working copy)
- @@ -261,7 +261,7 @@
- //ACTIVE_BUFFER_LINES = Players[Player_num].HUD_config.num_msg_window_lines;
- // ACTIVE_BUFFER_LINES = HUD_config.num_msg_window_lines;
- - ACTIVE_BUFFER_LINES = 4;
- + //ACTIVE_BUFFER_LINES = 4;
- MSG_WINDOW_FONT_HEIGHT = h;
- MSG_WINDOW_HEIGHT = MSG_WINDOW_FONT_HEIGHT * (ACTIVE_BUFFER_LINES-1);
- @@ -598,7 +598,7 @@
- str = msg;
- //Because functions to get font size don't compensate for *actual* screen size
- - int pretend_width = (gr_screen.res == GR_640) ? 620 : 1004;
- + int pretend_width = Message_display_width;
- while ((ptr = split_str_once(str, pretend_width - x - 7)) != NULL) { // the 7 is a fudge hack
- // make sure that split went ok, if not then bail
- Index: code/hud/hudmessage.h
- ===================================================================
- --- code/hud/hudmessage.h (revision 6721)
- +++ code/hud/hudmessage.h (working copy)
- @@ -70,6 +70,7 @@
- extern int Active_index;
- extern int Scroll_needed;
- extern int Scroll_in_progress;
- +extern int Message_display_width;
- extern int MSG_WINDOW_HEIGHT; // extern'ed since needed in save/restore code
- extern int MSG_WINDOW_FONT_HEIGHT; // extern'ed since needed in save/restore code
- Index: code/hud/hudparse.cpp
- ===================================================================
- --- code/hud/hudparse.cpp (revision 6721)
- +++ code/hud/hudparse.cpp (working copy)
- @@ -48,6 +48,9 @@
- int Hud_font = -1;
- +//The E
- +int Message_display_width;
- +
- int num_default_gauges = 42;
- static int retail_gauges[] = {
- HUD_OBJECT_MESSAGES,
- @@ -4119,6 +4122,18 @@
- }
- }
- + if (optional_string("Message display width:")) {
- + stuff_int(&Message_display_width);
- + } else {
- + Message_display_width = (gr_screen.res == GR_640) ? 620 : 1004;
- + }
- +
- + if (optional_string("Max number of lines:")) {
- + stuff_int(&ACTIVE_BUFFER_LINES);
- + } else {
- + ACTIVE_BUFFER_LINES = 4;
- + }
- +
- HudGaugeMessages* hud_gauge = new HudGaugeMessages();
- hud_gauge->initBaseResolution(base_res[0], base_res[1]);
- hud_gauge->initPosition(coords[0], coords[1]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement