Fix textscreen warnings.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 626
This commit is contained in:
Simon Howard 2006-09-19 23:49:20 +00:00
parent 3b747fcb62
commit 7bc72c666d
18 changed files with 26 additions and 34 deletions

View file

@ -99,6 +99,8 @@ void Calculate(TXT_UNCAST_ARG(button), void *unused)
case OP_DIV:
input_value = first_operand / input_value;
break;
case OP_NONE:
break;
}
UpdateInputBox();
@ -156,5 +158,7 @@ int main(int argc, char *argv[])
BuildGUI();
TXT_GUIMainLoop();
return 0;
}

View file

@ -64,7 +64,7 @@ void SetupWindow(void)
{
txt_window_t *window;
txt_table_t *table;
txt_table_t *leftpane, *rightpane;
txt_table_t *rightpane;
txt_button_t *button;
txt_checkbox_t *cheesy_checkbox;
txt_window_action_t *pwn;
@ -159,25 +159,6 @@ void Window2(void)
TXT_AddWidget(table, TXT_NewIntInputBox(&numbox_value, 10));
}
void DrawASCIIChart()
{
int x, y;
TXT_ClearScreen();
for (y=0; y<16; ++y)
{
for (x=0; x<16; ++x)
{
TXT_PutChar(' ');
TXT_PutChar(' ');
TXT_PutChar(' ');
TXT_PutChar(y * 16 + x);
}
TXT_PutChar('\n');
}
}
int main(int argc, char *argv[])
{
TXT_Init();
@ -188,6 +169,8 @@ int main(int argc, char *argv[])
SetupWindow();
TXT_GUIMainLoop();
return 0;
}

View file

@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_button.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"

View file

@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_checkbox.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"

View file

@ -26,6 +26,7 @@
#include "txt_desktop.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_separator.h"
#include "txt_window.h"

View file

@ -31,6 +31,8 @@ void TXT_DrawDesktop(void);
void TXT_GUIMainLoop(void);
void TXT_DispatchEvents(void);
void TXT_ExitMainLoop(void);
void TXT_DrawWindow(txt_window_t *window, int selected);
void TXT_WindowKeyPress(txt_window_t *window, int c);
#endif /* #ifndef TXT_DESKTOP_T */

View file

@ -26,6 +26,7 @@
#include "txt_button.h"
#include "txt_dropdown.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"

View file

@ -19,6 +19,7 @@
// 02111-1307, USA.
//
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -26,6 +27,7 @@
#include "doomkeys.h"
#include "txt_inputbox.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"

View file

@ -23,6 +23,7 @@
#include <string.h>
#include "txt_label.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@ -40,7 +41,7 @@ static void TXT_LabelDrawer(TXT_UNCAST_ARG(label), int selected)
TXT_CAST_ARG(txt_label_t, label);
int x, y;
int origin_x, origin_y;
int align_indent;
int align_indent = 0;
int w;
w = label->widget.w;

View file

@ -25,6 +25,8 @@
//-----------------------------------------------------------------------------
#include <SDL.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

View file

@ -97,7 +97,7 @@ void TXT_GetKeyDescription(int key, char *buf);
// Retrieve the current position of the mouse
void TXT_GetMouseState(int *x, int *y);
void TXT_GetMousePosition(int *x, int *y);
// Sleep until an event is received or the screen needs updating
// Optional timeout in ms (timeout == 0 : sleep forever)

View file

@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_radiobutton.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"

View file

@ -23,6 +23,7 @@
#include <string.h>
#include "txt_separator.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@ -48,7 +49,6 @@ static void TXT_SeparatorSizeCalc(TXT_UNCAST_ARG(separator))
static void TXT_SeparatorDrawer(TXT_UNCAST_ARG(separator), int selected)
{
TXT_CAST_ARG(txt_separator_t, separator);
int i;
int x, y;
int w;

View file

@ -50,6 +50,7 @@ static void TXT_StrutDestructor(TXT_UNCAST_ARG(strut))
static int TXT_StrutKeyPress(TXT_UNCAST_ARG(strut), int key)
{
return 0;
}
txt_widget_class_t txt_strut_class =

View file

@ -27,6 +27,7 @@
#include "txt_desktop.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_separator.h"
#include "txt_strut.h"
@ -61,7 +62,6 @@ static void CalcRowColSizes(txt_table_t *table,
int *row_heights,
int *col_widths)
{
int table_height;
int x, y;
int rows;
txt_widget_t *widget;
@ -194,7 +194,6 @@ static int SelectableWidget(txt_table_t *table, int x, int y)
static int FindSelectableColumn(txt_table_t *table, int row, int start_col)
{
int x;
int i;
for (x=0; x<table->columns; ++x)
{
@ -287,7 +286,6 @@ static int TXT_TableKeyPress(TXT_UNCAST_ARG(table), int key)
if (key == KEY_LEFTARROW)
{
int new_x;
int i;
// Move cursor left
@ -307,7 +305,6 @@ static int TXT_TableKeyPress(TXT_UNCAST_ARG(table), int key)
if (key == KEY_RIGHTARROW)
{
int new_x;
int i;
// Move cursor left

View file

@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
#include "txt_io.h"
#include "txt_widget.h"
typedef struct
@ -100,7 +101,6 @@ void TXT_SignalConnect(TXT_UNCAST_ARG(widget),
TXT_CAST_ARG(txt_widget_t, widget);
txt_callback_table_t *table;
txt_callback_t *callback;
int i;
table = widget->callback_table;

View file

@ -45,8 +45,6 @@ void TXT_SetWindowAction(txt_window_t *window,
txt_window_t *TXT_NewWindow(char *title)
{
int i;
txt_window_action_t *cancel_action;
txt_window_action_t *accept_action;
txt_window_t *win;
@ -289,9 +287,6 @@ void TXT_LayoutWindow(txt_window_t *window)
void TXT_DrawWindow(txt_window_t *window, int selected)
{
txt_widget_t *widgets;
int x, y;
int i;
int ww, wh;
TXT_LayoutWindow(window);

View file

@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_window_action.h"
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@ -45,7 +46,6 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action))
static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action), int selected)
{
TXT_CAST_ARG(txt_window_action_t, action);
int i;
char buf[10];
TXT_GetKeyDescription(action->key, buf);