summaryrefslogtreecommitdiff
path: root/games/wormz/patches/patch-ar
blob: 7e328d845efb9eb9a947b8cfa87463dfcbd200ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
$NetBSD: patch-ar,v 1.2 2005/06/14 16:33:13 jmmv Exp $

--- XVision/SimpleViews.cc.orig	1998-04-07 14:27:23.000000000 +0200
+++ XVision/SimpleViews.cc
@@ -5,9 +5,10 @@
 #include "Application.hh"
 #include "XVisionGlobal.hh"
 #include <stdio.h>
+#include <string.h>
 
-StaticText::StaticText(const char * _text, TextDirection _direction=tdNorth,
-		       FontShape _fontshape=fsRegular)
+StaticText::StaticText(const char * _text, TextDirection _direction,
+		       FontShape _fontshape)
     : text(0), buffer1(0), buffer2(0), buffer3(0),
   direction(_direction), fontshape(_fontshape)
 {
@@ -67,7 +68,7 @@ void StaticText::SetText(const char * _t
   if (Visible && (!Hidden)) {
 //    Hide();
 //    Show();
-    (parent ? parent : this)->Redraw();
+    if (parent) parent->Redraw(); else this->Redraw();
   }
 }
 
@@ -105,8 +106,8 @@ void StaticText::Draw()
 }
 
 Label::Label(const char * _text, const CommandType _cc,
-	     const bool _AutoResize=TRUE, TextDirection _direction=tdNorth,
-	     FontShape _fontshape=fsRegular)
+	     const bool _AutoResize, TextDirection _direction,
+	     FontShape _fontshape)
     : StaticText(_text, _direction, _fontshape)
 {
   AutoResize = _AutoResize;
@@ -114,7 +115,7 @@ Label::Label(const char * _text, const C
   Selectable = TRUE;
 }
    
-Padding::Padding(const Align direction=VAVertical, const int Size=20)
+Padding::Padding(const Align direction, const int Size)
 {
   if (direction == VAVertical)
     SetSize(Point(1, Size));
@@ -123,14 +124,14 @@ Padding::Padding(const Align direction=V
   MinSize = Area.Size;
 }
 
-Title::Title(const char * _text, TextDirection _direction=tdNorth,
-	     FontShape _fontshape=fsRegular)
+Title::Title(const char * _text, TextDirection _direction,
+	     FontShape _fontshape)
     : StaticText(_text, _direction, _fontshape)
 {
   SetColor(Pixel_t_Yellow, ciForeground);
 }
 
-PictureView::PictureView(Picture * _picture=0, bool _DeleteP = TRUE, const CommandType _cc/*  = cmInvalid */)
+PictureView::PictureView(Picture * _picture, bool _DeleteP, const CommandType _cc/*  = cmInvalid */)
     : picture(_picture), DeleteP(_DeleteP)
 {
   if (_cc != cmInvalid) {
@@ -197,8 +198,8 @@ void CheckBoxImg::Choose()
   parent->SendDataChanged();
 }
 
-CheckBox::CheckBox(const char * _text, bool _Checked=FALSE,
-		   bool * _Valuep=0, FontShape _fontshape=fsRegular)
+CheckBox::CheckBox(const char * _text, bool _Checked,
+		   bool * _Valuep, FontShape _fontshape)
     : Group(VAHorizontal), Checked(_Checked), Valuep(_Valuep)
 {
   AutoResize = TRUE;
@@ -217,9 +218,9 @@ void CheckBox::SetChecked(bool _Checked)
   Status_v->Choose();
 }
 
-Selector::Selector(const char ** _Items, const int _NumItems, const int _SelectedItem=0,
-	 const bool _AutoResize = TRUE, TextDirection _direction=tdNorth,
-		   FontShape _fontshape=fsRegular)
+Selector::Selector(const char ** _Items, const int _NumItems, const int _SelectedItem,
+	 const bool _AutoResize , TextDirection _direction,
+		   FontShape _fontshape)
     : Label(_Items[_SelectedItem], cmInvalid, _AutoResize, _direction, _fontshape),
   Items(_Items), NumItems(_NumItems), SelectedItem(_SelectedItem)
 {
@@ -234,8 +235,8 @@ void Selector::Choose()
 }
 
 InputLine::InputLine(const char * _text, const int _MAXTextLen, const CommandType _cc /* = cmInvalid */,
-	  const bool _AutoResize = TRUE, TextDirection _direction=tdNorth,
-	  FontShape _fontshape=fsRegular)
+	  const bool _AutoResize, TextDirection _direction,
+	  FontShape _fontshape)
     : Label(_text, _cc, _AutoResize, _direction, _fontshape),
   MAXTextLen(_MAXTextLen)
 {
@@ -300,10 +301,10 @@ void PictureSelector::SetItem(int _ItemN
 static const int invalid_number = -4888839; // can't initialize on this number
 
 InputNumber::InputNumber(const int _Number, const int _MinNumber, const int _MaxNumber,
-		int * const _Valuep=0,
+		int * const _Valuep,
 		const CommandType _cc /* = cmInvalid */,
-		const bool _AutoResize = TRUE, TextDirection _direction=tdNorth,
-		FontShape _fontshape=fsRegular)
+		const bool _AutoResize, TextDirection _direction,
+		FontShape _fontshape)
     : Label(" ", _cc, _AutoResize, _direction, _fontshape),
   Number(invalid_number), Valuep(_Valuep), MinNumber(_MinNumber), MaxNumber(_MaxNumber)
 {
@@ -335,7 +336,7 @@ void InputNumber::Deselect()
   Label::Deselect();
 }
 
-void InputNumber::SetNumber(const int _Number, bool DoCheck=TRUE)
+void InputNumber::SetNumber(const int _Number, bool DoCheck)
 {
   if (DoCheck && (_Number > MaxNumber))
     return;