File: fsstatus.cpp

package info (click to toggle)
xevil 2.02r2-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,980 kB
  • ctags: 8,004
  • sloc: cpp: 47,789; makefile: 224; csh: 4
file content (611 lines) | stat: -rw-r--r-- 16,313 bytes parent folder | download | duplicates (10)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
/* 
 * XEvil(TM) Copyright (C) 1994,2000 Steve Hardt and Michael Judge
 * http://www.xevil.com
 * satan@xevil.com
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program, the file "gpl.txt"; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA, or visit http://www.gnu.org.
 */

#include "stdafx.h"
#include "XEvil.h"//for resources
#include "XViewPort.h"
#include "xdata.h" //hresult stuff
#include "coord.h"
#include "wheel.h"
#include "fsstatus.h"

// Two rows of buttons are same height as the wheel.
#define BUTTON_HEIGHT (Wheel::WHEEL_ITEM_HEIGHT >> 1)
// Size of the area for displaying level-specific information.
#define LEVEL_WIDTH 215

 

/////////////////////////////////////////
//HEALTHBAR

BOOL
XEvilFSHealthBar::update(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer,CRect &p_clientarea,BOOL p_forceredraw)
{
  if ((m_pos!=m_postedpos)||(m_maxpos!=m_postedmaxpos)||(p_forceredraw))
  {
    m_pos=m_postedpos;
    m_maxpos=m_postedmaxpos;
    DrawItem(xvars, p_buffer);
    return TRUE;
  }
  return FALSE;
}



void
XEvilFSHealthBar::DrawItem(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer)
{
  if (m_maxpos<=1)
    return;
  HDC t_pixhdc;
  if (!xvars.GetDC(p_buffer,&t_pixhdc)){
    return;
  }

  // Erasing just text part???
  CDC *t_dc=CDC::FromHandle(t_pixhdc);
  CRect t_rect(m_clientpos);
  t_rect.right=t_rect.left+TEXTINDENT;

  CBrush *t_oldbrush=(CBrush *)t_dc->SelectStockObject(LTGRAY_BRUSH);
  t_dc->PatBlt(t_rect.left,t_rect.top,t_rect.Width(),t_rect .Height(),PATCOPY);
  t_dc->SelectObject(t_oldbrush);


  t_rect.OffsetRect(TEXTINDENT,0);
  //draw a square 
  char t_char[IT_STRING_LENGTH];
  
  t_rect.right=(int)(t_rect.left+((float)m_pos/(float)m_maxpos)*(m_clientpos.Width()-TEXTINDENT));
  CBrush t_solidbrush;
  float r=(float)m_pos/(float)m_maxpos;
  t_solidbrush.CreateSolidBrush(RGB(255*min(2-2*r,1),255*min(2*r,1),0));
  t_dc->SelectObject(&t_solidbrush);
  t_dc->PatBlt(t_rect.left,t_rect.top,t_rect.Width(),t_rect.Height(),PATCOPY);
  t_rect.left=t_rect.right+1;
  t_rect.right=m_clientpos.left+m_clientpos.right;
  if (t_rect.left<t_rect.right)
  {
    t_dc->SelectStockObject(LTGRAY_BRUSH);
    t_dc->PatBlt(t_rect.left,t_rect.top,t_rect.Width(),t_rect .Height(),PATCOPY);
  }
  t_dc->SelectObject(t_oldbrush);

  t_dc->SelectStockObject(BLACK_PEN);
	t_dc->SelectStockObject(ANSI_VAR_FONT);
	t_dc->SetBkMode(OPAQUE);
	t_dc->SetBkColor(RGB(192,192,192));
  CString t_string("Health: ");
  t_string+=itoa(m_health,t_char,10);
  t_rect=m_clientpos;
//  t_rect.OffsetRect(m_clientpos.left,m_clientpos.top);
  t_rect.left+=5;
	t_dc->DrawText(t_string,t_string.GetLength(),t_rect,DT_LEFT|DT_VCENTER|DT_SINGLELINE);
  t_rect.left-=5;
  CPen *t_oldpen=(CPen *)t_dc->SelectStockObject(WHITE_PEN);
  t_dc->MoveTo(t_rect.right-1,t_rect.top);
  t_dc->LineTo(t_rect.left,t_rect.top);
  t_dc->LineTo(t_rect.left,t_rect.bottom-1);
//  t_rect=m_clientpos;
//  t_rect.OffsetRect(m_clientpos.left,m_clientpos.top);
  CPen t_newpen(PS_SOLID,1,RGB(96,96,96));
  t_dc->SelectObject(&t_newpen);
  t_dc->MoveTo(t_rect.right-1,t_rect.top);
  t_dc->LineTo(t_rect.right-1,t_rect.bottom-1);
  t_dc->LineTo(t_rect.left,t_rect.bottom-1);
  t_dc->SelectObject(t_oldpen);//put it back
  p_buffer->ReleaseDC(t_pixhdc);
}


  
/////////////////////////////////////////
//XEvilFSButton
BOOL
XEvilFSButton::update(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer,CRect &p_clientarea,BOOL p_forceredraw)
{
    if ((m_postedmessage!=m_message)||(p_forceredraw))
    {
        m_message=m_postedmessage;
        DrawItem(xvars, p_buffer,p_clientarea);
        return TRUE;//dirty
    }
    return FALSE; //not dirty
}



void
XEvilFSButton::DrawItem(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer,CRect &p_clientarea)
{
  HDC t_pixhdc;
  if (!xvars.GetDC(p_buffer,&t_pixhdc)){
    return;
  }

  CDC *t_dc=CDC::FromHandle(t_pixhdc);
  CRect t_rect(m_clientpos);

  t_rect.OffsetRect(p_clientarea.left,p_clientarea.top);

  CBrush *t_oldbrush=(CBrush *)t_dc->SelectStockObject(LTGRAY_BRUSH);
  t_dc->PatBlt(t_rect.left,t_rect.top,t_rect.Width(),t_rect .Height(),PATCOPY);
  t_dc->SelectObject(t_oldbrush);
  CPen *t_oldpen=(CPen *)t_dc->SelectStockObject(WHITE_PEN);
  t_dc->MoveTo(t_rect.right-1,t_rect.top);
  t_dc->LineTo(t_rect.left,t_rect.top);
  t_dc->LineTo(t_rect.left,t_rect.bottom-1);
  CPen t_newpen(PS_SOLID,1,RGB(96,96,96));
  t_dc->SelectObject(&t_newpen);
  t_dc->MoveTo(t_rect.right-1,t_rect.top);
  t_dc->LineTo(t_rect.right-1,t_rect.bottom-1);
  t_dc->LineTo(t_rect.left,t_rect.bottom-1);
  t_dc->SelectObject(t_oldpen);//put it back

	t_dc->SelectStockObject(BLACK_PEN);
	t_dc->SelectStockObject(ANSI_VAR_FONT);
	t_rect.left+=5;
	t_dc->SetBkMode(OPAQUE);
	t_dc->SetBkColor(RGB(192,192,192));
	t_dc->DrawText(m_message,m_message.GetLength(),t_rect,DT_LEFT|DT_VCENTER|DT_SINGLELINE);
  p_buffer->ReleaseDC(t_pixhdc);
}



/////////////////////////////////////////
//XEvilFSStatusMessage
BOOL
XEvilFSStatusMessage::update(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer,CRect &p_clientarea,
                             BOOL p_forceredraw)
{
  if ((m_postedmessage!=m_message)||(p_forceredraw))
  {
    m_message=m_postedmessage;
    DrawItem(xvars, p_buffer,p_clientarea);
    return TRUE;//dirty
  }
  return FALSE; //not dirty
}



void
XEvilFSStatusMessage::DrawItem(Xvars &xvars, LPDIRECTDRAWSURFACE p_buffer,CRect &p_clientarea)
{
  // We should really get rid of the p_clientarea parameter all together.
  // The upper-left is always (0,0) anyway.

  const int textXIndent = 4;
  const int textYIndent = 0;
  const int lineHeight = m_clientpos.Height() >> 1;

  // Create string for each line.
	int t_index = m_message.Find('\n');
  CString t_string1;
  CString t_string2;
  if (t_index != -1) {
    // We have two lines.
		t_string1 += m_message.Mid(0,t_index);
		t_string2 += m_message.Mid(t_index + 1);
  }
  else {
    // Only one line, t_string2 stays empty.
    t_string1 += m_message;
  }

  // Rect for each line.
  CRect t_rect1(textXIndent,textYIndent,m_clientpos.Width() - textXIndent,lineHeight);
  t_rect1.OffsetRect(m_clientpos.left,m_clientpos.top);
  t_rect1.OffsetRect(p_clientarea.left,p_clientarea.top);
  CRect t_rect2(textXIndent,textYIndent + lineHeight,m_clientpos.Width() - textXIndent,2 * lineHeight);
  t_rect2.OffsetRect(m_clientpos.left,m_clientpos.top);
  t_rect2.OffsetRect(p_clientarea.left,p_clientarea.top);
  CRect t_rectboth = m_clientpos;
  t_rectboth.OffsetRect(p_clientarea.left,p_clientarea.top);

  // Get DC for p_buffer.
  HDC t_pixhdc;
  if (!xvars.GetDC(p_buffer,&t_pixhdc)){
    return;
  }
  CDC *t_dc = CDC::FromHandle(t_pixhdc);

  // Clear background.
  CBrush *t_oldbrush=(CBrush *)t_dc->SelectStockObject(LTGRAY_BRUSH);
  t_dc->PatBlt(t_rectboth.left,t_rectboth.top,t_rectboth.right,t_rectboth.bottom,PATCOPY);
  t_dc->SelectObject(t_oldbrush);

  // Draw 3d outline.
  CPen *t_oldpen=(CPen *)t_dc->SelectStockObject(WHITE_PEN);
  t_dc->MoveTo(t_rectboth.right-1,t_rectboth.top);
  t_dc->LineTo(t_rectboth.right-1,t_rectboth.bottom-1);
  t_dc->LineTo(t_rectboth.left,t_rectboth.bottom-1);
  CPen t_newpen(PS_SOLID,1,RGB(96,96,96));
  t_dc->SelectObject(&t_newpen);
  t_dc->LineTo(t_rectboth.left,t_rectboth.top);
  t_dc->LineTo(t_rectboth.right-1,t_rectboth.top);
  t_dc->SelectObject(t_oldpen);//put it back

  // Draw strings
	t_dc->SelectStockObject(ANSI_FIXED_FONT);
	t_dc->SetBkMode(TRANSPARENT);
  t_dc->SetTextColor(RGB(0,0,0));
  t_dc->DrawText(t_string1,t_string1.GetLength(),t_rect1,DT_LEFT|DT_VCENTER|DT_SINGLELINE);
  if (t_index != -1) {
    t_dc->DrawText(t_string2,t_string2.GetLength(),t_rect2,DT_LEFT|DT_VCENTER|DT_SINGLELINE);
  }

  p_buffer->ReleaseDC(t_pixhdc);  
}



/////////////////////////////////////////////////
//STATUS WINDOW 
/////////////////////////////////////////////////
StatusWnd::StatusWnd(LocatorP l,Xvars *xvars)
:m_weaponwheel(l),m_itemwheel(l) {
  m_plocator = l;
  m_pxvars = xvars;
  m_lpDD = m_pxvars->m_lpDD;
  m_buffer = NULL;
}



void
StatusWnd::updateHealth(Health p_stat,Health p_maxstat)
{
  m_healthbar.setMaxPos(p_maxstat);
  m_healthbar.setPos(p_stat);
  m_healthbar.setHealth(p_stat);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateMass(Mass p_stat)
{
// Don't bother showing it.
}



void
StatusWnd::updateWeapon(const char p_stat[IT_STRING_LENGTH],ClassId weaponClassId,int p_ammo,BOOL p_ready)
{
  // Weapon
  m_weaponwheel.setIndexByClassId(weaponClassId);

  // Ammo
  m_weaponwheel.setValueAtIndex(p_ammo,m_weaponwheel.getIndex());

  // Ready
  m_weaponwheel.setReadyAtIndex(p_ready ? Wheel::READY_YES : Wheel::READY_NO,
                                m_weaponwheel.getIndex());

  // Probably redundant.
  m_dirty = TRUE;
  return;
}



void
StatusWnd::updateItem(const char p_stat[IT_STRING_LENGTH],ClassId itemClassId,int p_count)
{
  m_itemwheel.setIndexByClassId(itemClassId);
  m_itemwheel.setValueAtIndex(p_count,m_itemwheel.getIndex());

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateCharacterName(const char p_name[IT_STRING_LENGTH])
{
  CString t_string = "Name: ";
  t_string += p_name;
  m_charactername.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateCharacterClass(const char p_class[IT_STRING_LENGTH])
{
  CString t_string = "Class: ";
  t_string += p_class;
  m_characterclass.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateXtraLivesHumanKills(int p_stat,BOOL p_xtraLives)
{
	char t_char[IT_STRING_LENGTH];
	CString t_string;
  if (p_xtraLives) {
    t_string += "Extra Lives: ";
    if (p_stat == IT_INFINITE_LIVES) {
      t_string += "unlimited";
    }
    else {
      t_string += itoa(p_stat,t_char,10);
    }   
  }
  else {
    t_string += "Human Kills: ";
    t_string += itoa(p_stat,t_char,10);
  }
	m_liveshumankills.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateKillsEnemyKills(int p_stat,BOOL p_kills)
{
	char t_char[IT_STRING_LENGTH];
	CString t_string;
  if (p_kills) {
    t_string += "Kills: ";
  }
  else {
    t_string += "Machine Kills: ";
  }
	t_string+=itoa(p_stat,t_char,10);
  m_killsenemykills.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateHumansNum(int p_stat)
{
	char t_char[IT_STRING_LENGTH];
  // Used to be "Humans Playing" but font didn't fit on some displays
	CString t_string("Humans: ");  
	t_string+=itoa(p_stat,t_char,10);
	m_humansnum.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateEnemiesNum(int p_stat)
{
	char t_char[IT_STRING_LENGTH];
  // Used to be "Enemies Remaining" but font didn't fit on some displays
	CString t_string("Enemies: ");
	t_string+=itoa(p_stat,t_char,10);
	m_enemiesnum.setMessage(t_string);

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateLevel(const char* p_level)
{
  m_level.setMessage(CString(p_level));

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::updateStatus(const char* p_message)
{
  m_status.setMessage(CString(p_message));

  // Probably redundant.
  m_dirty = TRUE;
}



void
StatusWnd::setRects(const CRect &p_status)
{
  m_statusrect = p_status;
  m_bufferrect.SetRect(0,0,m_statusrect.Width(),m_statusrect.Height());

  const int nameClassWidth = m_statusrect.Width() / 6;
  const int healthWidth = m_statusrect.Width() - nameClassWidth - 2 * Wheel::WHEEL_ITEM_WIDTH;
  const int otherButtonWidth = healthWidth / 4;

  // Weapon wheel  
  Pos t_point;
  t_point.x = 0;
  t_point.y = 0;
  m_weaponwheel.set_pos(t_point);

  // Item wheel
  t_point.x += Wheel::WHEEL_ITEM_WIDTH;
  m_itemwheel.set_pos(t_point);

  // Character name.
  CRect t_rect;
  t_rect.left = t_point.x + Wheel::WHEEL_ITEM_WIDTH;
  t_rect.top = 0;
  t_rect.right = t_rect.left + nameClassWidth; 
  t_rect.bottom = BUTTON_HEIGHT;
  m_charactername.setClientPos(t_rect);

  // Character class.
  t_rect.OffsetRect(0,BUTTON_HEIGHT);
  m_characterclass.setClientPos(t_rect);

  t_rect.left += nameClassWidth;


  // Health bar
  t_rect.right = t_rect.left + healthWidth;
  t_rect.top = 0;
  t_rect.bottom = BUTTON_HEIGHT;
  m_healthbar.setClientPos(t_rect);

  // Lives/Human kills
  t_rect.right = t_rect.left + otherButtonWidth;
  t_rect.OffsetRect(0,BUTTON_HEIGHT);
  m_liveshumankills.setClientPos(t_rect);

  // Kills/Enemy kills
  t_rect.OffsetRect(otherButtonWidth,0);
  m_killsenemykills.setClientPos(t_rect);

  // Humans playing
  t_rect.OffsetRect(otherButtonWidth,0);
  m_humansnum.setClientPos(t_rect);
  
  // Enemies playing
  t_rect.OffsetRect(otherButtonWidth,0);
  // Make sure last one is flush against right edge.
  t_rect.right = m_statusrect.Width(); 
  m_enemiesnum.setClientPos(t_rect);

  // Status bar
  t_rect.SetRect(0,2 * BUTTON_HEIGHT,
                 m_statusrect.Width() - LEVEL_WIDTH,m_statusrect.Height());
  m_status.setClientPos(t_rect);

  // Level-information bar.
  t_rect.SetRect(m_statusrect.Width() - LEVEL_WIDTH,2 * BUTTON_HEIGHT,
                 m_statusrect.Width(),m_statusrect.Height());
  m_level.setClientPos(t_rect);

  // Just to be sure.
  m_dirty = TRUE;
}



BOOL
StatusWnd::Create(CRect &p_statusrect) {
  m_buffer = m_pxvars->create_surface(p_statusrect.Width(),p_statusrect.Height(),NULL);
  if (m_buffer == NULL) {
    return FALSE;
  }

  // Fill status window with black to start out with.
  m_pxvars->color_fill(m_buffer,CRect(0,0,p_statusrect.Width(),p_statusrect.Height()),
                      m_pxvars->m_black);

  setRects(p_statusrect);

  // Just put some initial value in.
  updateCharacterName("None");
  updateCharacterClass("None");
  updateHealth(0,100);
  updateMass(0);
  updateWeapon("None",A_None,0,FALSE);
  updateItem("None",A_None,0);
  updateXtraLivesHumanKills(0,TRUE);
  updateKillsEnemyKills(0,TRUE);
  updateHumansNum(0);
  updateEnemiesNum(0);

  m_dirty = TRUE;

  return TRUE;
}



void 
StatusWnd::update(LPDIRECTDRAWSURFACE p_buffer,CWnd *p_parent,BOOL p_forceredraw)
{
  if (!m_pxvars)
    return;
  m_dirty |= m_charactername.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_characterclass.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_liveshumankills.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_killsenemykills.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_humansnum.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_enemiesnum.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_healthbar.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_weaponwheel.update(m_buffer,m_plocator,*m_pxvars,p_forceredraw);
  m_dirty |= m_itemwheel.update( m_buffer,m_plocator,*m_pxvars,p_forceredraw);
  m_dirty |= m_status.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);
  m_dirty |= m_level.update(*m_pxvars, m_buffer,m_bufferrect,p_forceredraw);

  if ((p_forceredraw) || (m_dirty)) {
    // Get dest rect in screen coordinates.
    // m_statusrect is in client coordinates
    CPoint t_topLeft = m_statusrect.TopLeft();
    CPoint t_bottomRight = m_statusrect.BottomRight();
    p_parent->ClientToScreen(&t_topLeft);
    p_parent->ClientToScreen(&t_bottomRight);
    CRect t_screenstatusrect(t_topLeft,t_bottomRight);

    // Actually do the blt to the screen.
    // Used to be a DHCHECKLOST.
    m_pxvars->Blt(p_buffer,t_screenstatusrect.left,t_screenstatusrect.top,m_buffer,m_bufferrect);
    m_dirty = FALSE;
  }
}



StatusWnd::~StatusWnd() {
}



void StatusWnd::clock() {
  m_weaponwheel.clock();
  m_itemwheel.clock();
}



void StatusWnd::init_x(LocatorP l,Xvars& xvars,IXCommand command,void* arg) {
  Wheel::init_x(l,xvars,command,arg);
}