FS2_Open
Open source remastering of the Freespace 2 engine
outwnd.cpp File Reference
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <winioctl.h>
#include <conio.h>
#include "osapi/osapi.h"
#include "osapi/outwnd.h"
#include "osapi/monopub.h"
#include "graphics/2d.h"
#include "freespace2/freespaceresource.h"
#include "globalincs/systemvars.h"
#include "cfile/cfilesystem.h"
#include "globalincs/globals.h"
#include "parse/parselo.h"

Go to the source code of this file.

Classes

class  outwnd_filter_struct
 

Macros

#define SCROLL_BUFFER_SIZE   512
 
#define MAX_LINE_WIDTH   128
 
#define TASKBAR_HEIGHT   30
 
#define ID_COPY   32000
 
#define ID_FIND   32010
 
#define ID_FILTER   32100
 
#define TIMER1   1
 
#define UP_FAST   65537
 
#define DOWN_FAST   65538
 
#define NMONO
 

Functions

void outwnd_print (const char *id=NULL, const char *temp=NULL)
 
BOOL CALLBACK find_dlg_handler (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
void find_text_in_outwindow (int n, int p)
 
void outwnd_copy_marked_selection (HWND hwnd)
 
void outwnd_update_marking (LPARAM l_parm, HWND hwnd)
 
void outwnd_paint (HWND hwnd)
 
void _outp (unsigned short port, unsigned char value)
 
unsigned char _inp (unsigned short port)
 
void text_hilight (HDC &hdc)
 
void text_normal (HDC &hdc)
 
void fix_marking_coords (int &x, int &y, LPARAM l_parm)
 
void load_filter_info (void)
 
void save_filter_info (void)
 
void outwnd_printf2 (const char *format,...)
 
void outwnd_printf (const char *id, const char *format,...)
 
LRESULT CALLBACK outwnd_handler (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
BOOL outwnd_create (int display_under_freespace_window)
 
DWORD outwnd_thread (int display_under_freespace_window)
 
void close_mono ()
 
void outwnd_init_debug_window (int display_under_freespace_window)
 
void outwnd_init (int display_under_freespace_window)
 
void outwnd_close ()
 
void safe_point_print (const char *format,...)
 
void safe_point (const char *file, int line, const char *format,...)
 

Variables

int Cmdline_debug_window
 
HANDLE hOutputThread =NULL
 
DWORD OutputThreadID
 
HWND hOutputWnd
 
char szOutputClass [] = "OutputWindow"
 
char spaces [MAX_LINE_WIDTH+1]
 
ubyte outwnd_filter_loaded = 0
 
char find_text [85]
 
SCP_vector< outwnd_filter_structOutwndFilter
 
int mprintf_last_line = -1
 
char outtext [SCROLL_BUFFER_SIZE][MAX_LINE_WIDTH]
 
int old_scroll_pos = -32768
 
int nTextHeight =0
 
int nTextWidth =0
 
int nCharRows =0
 
bool outwnd_inited = false
 
bool outwnd_disabled = true
 
int max_scroll_pos = SCROLL_BUFFER_SIZE - 1
 
int marked_top
 
int marked_bottom
 
int marked_left
 
int marked_right
 
int old_marked = 0
 
int old_marked_top
 
int old_marked_bottom
 
int old_marked_left
 
int old_marked_right
 
int marking_started_x
 
int marking_started_y
 
int client_top_yoffset
 
int cur_line_index
 
int marking_active = 0
 
int scroll_wait = 1
 
BOOL OutputActive = FALSE
 
LPARAM last_mousemove
 
int Outwnd_changed = 0
 
int find_line = -1
 
int find_pos
 
HANDLE mono_driver =NULL
 
ubyte Outwnd_no_filter_file = 0
 
int Log_debug_output_to_file = 1
 
FILE * Log_fp = NULL
 
char * FreeSpace_logfilename = NULL
 
SCP_string safe_string
 

Macro Definition Documentation

#define DOWN_FAST   65538

Definition at line 48 of file outwnd.cpp.

#define ID_COPY   32000

Definition at line 43 of file outwnd.cpp.

#define ID_FILTER   32100

Definition at line 45 of file outwnd.cpp.

#define ID_FIND   32010

Definition at line 44 of file outwnd.cpp.

#define MAX_LINE_WIDTH   128

Definition at line 40 of file outwnd.cpp.

#define NMONO

Definition at line 84 of file outwnd.cpp.

#define SCROLL_BUFFER_SIZE   512

Definition at line 39 of file outwnd.cpp.

#define TASKBAR_HEIGHT   30

Definition at line 41 of file outwnd.cpp.

#define TIMER1   1

Definition at line 46 of file outwnd.cpp.

#define UP_FAST   65537

Definition at line 47 of file outwnd.cpp.

Function Documentation

unsigned char _inp ( unsigned short  port)
inline

Definition at line 115 of file outwnd.cpp.

void _outp ( unsigned short  port,
unsigned char  value 
)
inline

Definition at line 106 of file outwnd.cpp.

void close_mono ( )

Definition at line 1128 of file outwnd.cpp.

BOOL CALLBACK find_dlg_handler ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1218 of file outwnd.cpp.

void find_text_in_outwindow ( int  n,
int  p 
)

Definition at line 1248 of file outwnd.cpp.

void fix_marking_coords ( int x,
int y,
LPARAM  l_parm 
)
inline

Definition at line 140 of file outwnd.cpp.

void load_filter_info ( void  )

Definition at line 167 of file outwnd.cpp.

void outwnd_close ( )

Definition at line 1316 of file outwnd.cpp.

void outwnd_copy_marked_selection ( HWND  hwnd)

Definition at line 750 of file outwnd.cpp.

BOOL outwnd_create ( int  display_under_freespace_window)

Definition at line 1036 of file outwnd.cpp.

LRESULT CALLBACK outwnd_handler ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 513 of file outwnd.cpp.

void outwnd_init ( int  display_under_freespace_window)

Definition at line 1165 of file outwnd.cpp.

void outwnd_init_debug_window ( int  display_under_freespace_window)

Definition at line 1142 of file outwnd.cpp.

void outwnd_paint ( HWND  hwnd)

Definition at line 805 of file outwnd.cpp.

void outwnd_print ( const char *  id = NULL,
const char *  temp = NULL 
)

Definition at line 379 of file outwnd.cpp.

void outwnd_printf ( const char *  id,
const char *  format,
  ... 
)

Definition at line 364 of file outwnd.cpp.

void outwnd_printf2 ( const char *  format,
  ... 
)

Definition at line 260 of file outwnd.cpp.

DWORD outwnd_thread ( int  display_under_freespace_window)

Definition at line 1108 of file outwnd.cpp.

void outwnd_update_marking ( LPARAM  l_parm,
HWND  hwnd 
)

Definition at line 946 of file outwnd.cpp.

void safe_point ( const char *  file,
int  line,
const char *  format,
  ... 
)

Definition at line 1346 of file outwnd.cpp.

void safe_point_print ( const char *  format,
  ... 
)

Definition at line 1334 of file outwnd.cpp.

void save_filter_info ( void  )

Definition at line 235 of file outwnd.cpp.

void text_hilight ( HDC hdc)
inline

Definition at line 128 of file outwnd.cpp.

void text_normal ( HDC hdc)
inline

Definition at line 134 of file outwnd.cpp.

Variable Documentation

int client_top_yoffset

Definition at line 76 of file outwnd.cpp.

int Cmdline_debug_window

Definition at line 501 of file cmdline.cpp.

int cur_line_index

Definition at line 76 of file outwnd.cpp.

int find_line = -1

Definition at line 81 of file outwnd.cpp.

int find_pos

Definition at line 81 of file outwnd.cpp.

char find_text[85]

Definition at line 57 of file outwnd.cpp.

char* FreeSpace_logfilename = NULL

Definition at line 99 of file outwnd.cpp.

HANDLE hOutputThread =NULL

Definition at line 50 of file outwnd.cpp.

HWND hOutputWnd

Definition at line 53 of file outwnd.cpp.

LPARAM last_mousemove

Definition at line 79 of file outwnd.cpp.

int Log_debug_output_to_file = 1

Definition at line 97 of file outwnd.cpp.

FILE* Log_fp = NULL

Definition at line 98 of file outwnd.cpp.

int marked_bottom

Definition at line 74 of file outwnd.cpp.

int marked_left

Definition at line 74 of file outwnd.cpp.

int marked_right

Definition at line 74 of file outwnd.cpp.

int marked_top

Definition at line 74 of file outwnd.cpp.

int marking_active = 0

Definition at line 76 of file outwnd.cpp.

int marking_started_x

Definition at line 76 of file outwnd.cpp.

int marking_started_y

Definition at line 76 of file outwnd.cpp.

int max_scroll_pos = SCROLL_BUFFER_SIZE - 1

Definition at line 72 of file outwnd.cpp.

HANDLE mono_driver =NULL

Definition at line 85 of file outwnd.cpp.

int mprintf_last_line = -1

Definition at line 66 of file outwnd.cpp.

int nCharRows =0

Definition at line 69 of file outwnd.cpp.

int nTextHeight =0

Definition at line 69 of file outwnd.cpp.

int nTextWidth =0

Definition at line 69 of file outwnd.cpp.

int old_marked = 0

Definition at line 75 of file outwnd.cpp.

int old_marked_bottom

Definition at line 75 of file outwnd.cpp.

int old_marked_left

Definition at line 75 of file outwnd.cpp.

int old_marked_right

Definition at line 75 of file outwnd.cpp.

int old_marked_top

Definition at line 75 of file outwnd.cpp.

int old_scroll_pos = -32768

Definition at line 68 of file outwnd.cpp.

BOOL OutputActive = FALSE

Definition at line 78 of file outwnd.cpp.

DWORD OutputThreadID

Definition at line 51 of file outwnd.cpp.

Definition at line 67 of file outwnd.cpp.

int Outwnd_changed = 0

Definition at line 80 of file outwnd.cpp.

bool outwnd_disabled = true

Definition at line 71 of file outwnd.cpp.

ubyte outwnd_filter_loaded = 0

Definition at line 56 of file outwnd.cpp.

bool outwnd_inited = false

Definition at line 70 of file outwnd.cpp.

ubyte Outwnd_no_filter_file = 0

Definition at line 94 of file outwnd.cpp.

Definition at line 64 of file outwnd.cpp.

SCP_string safe_string

Definition at line 101 of file outwnd.cpp.

int scroll_wait = 1

Definition at line 77 of file outwnd.cpp.

char spaces[MAX_LINE_WIDTH+1]

Definition at line 55 of file outwnd.cpp.

char szOutputClass[] = "OutputWindow"

Definition at line 54 of file outwnd.cpp.