22#ifndef HODJNPODJ_ARCHEROIDS_MAIN_H
23#define HODJNPODJ_ARCHEROIDS_MAIN_H
25#include "bagel/afxwin.h"
27#include "bagel/boflib/error.h"
28#include "bagel/hodjnpodj/hnplibs/stdinc.h"
29#include "bagel/boflib/sound.h"
30#include "bagel/hodjnpodj/hnplibs/sprite.h"
31#include "bagel/boflib/llist.h"
32#include "bagel/hodjnpodj/archeroids/usercfg.h"
44 ERROR_CODE RepaintSpriteList(
CDC *);
45 void LoadIniSettings();
49 void FlushInputEvents();
51 ERROR_CODE LoadMasterSprites();
52 void ReleaseMasterSprites();
53 ERROR_CODE LoadMasterSounds();
54 void ReleaseMasterSounds();
55 void InitializeJoystick();
59 ERROR_CODE CreateLives();
60 ERROR_CODE CreateGoodGuy();
61 ERROR_CODE CreateBadGuys();
62 ERROR_CODE CreateHay();
63 ERROR_CODE CreateBurningHay(
CPoint);
64 ERROR_CODE CreateGoodArrow();
65 ERROR_CODE CreateBadArrow(
CSprite *);
69 void DestroyGoodArrow(
CLList *);
70 void DestroyBadArrow(
CLList *);
72 void PruneDeadBadGuys();
75 bool MoveArrows(
CDC *);
76 bool MoveBadGuys(
CDC *);
78 void LoseLife(
CDC *,
bool);
79 void HandleError(ERROR_CODE);
81 void OnSoundNotify(CSound *pSound);
82 POINT GetLeftMostBadGuy();
84 virtual bool OnCommand(WPARAM, LPARAM)
override;
86 void OnSysKeyDown(
unsigned int,
unsigned int,
unsigned int);
87 void OnKeyDown(
unsigned int,
unsigned int,
unsigned int);
88 void OnSysChar(
unsigned int,
unsigned int,
unsigned int);
89 void OnTimer(uintptr);
91 long OnJoyStick(
unsigned int,
long);
92 void OnActivate(
unsigned int,
CWnd *,
bool)
override;
93 void OnLButtonDown(
unsigned int,
CPoint);
94 void OnRButtonUp(
unsigned int,
CPoint);
95 void OnMouseMove(
unsigned int,
CPoint);
96 LRESULT OnMCINotify(WPARAM, LPARAM);
97 LRESULT OnMMIONotify(WPARAM, LPARAM);
104 CRect m_rNewGameButton;
106 CSprite *m_pMasterBadArrow =
nullptr;
107 CSprite *m_pMasterGoodArrow =
nullptr;
108 CSprite *m_pMasterBurn =
nullptr;
109 CSprite *m_pMasterBadWalk =
nullptr;
110 CSprite *m_pMasterBadShoot =
nullptr;
111 CSprite *m_pMasterBadDie =
nullptr;
112 CSprite *m_pMasterGoodWalk =
nullptr;
113 CSprite *m_pMasterGoodShoot =
nullptr;
114 CSprite *m_pMasterGoodDie =
nullptr;
115 CSprite *m_pMasterHeart =
nullptr;
117 CSprite *m_pScrollSprite =
nullptr;
118 CSprite *m_pLives[LIVES_MAX] = {};
119 CLList *m_pBadGuyList =
nullptr;
120 CLList *m_pBadArrowList =
nullptr;
121 CLList *m_pGoodArrowList =
nullptr;
122 CLList *m_pHayList =
nullptr;
123 CLList *m_pFXList =
nullptr;
124 CSound *m_pSoundTrack =
nullptr;
126 char * m_pBadDieSound =
nullptr;
127 char * m_pBoltSound =
nullptr;
128 char * m_pArrowSound =
nullptr;
129 char * m_pBurnSound =
nullptr;
130 char * m_pExtraLifeSound =
nullptr;
131 HANDLE m_hBadDieRes =
nullptr;
132 HANDLE m_hBoltRes =
nullptr;
133 HANDLE m_hArrowRes =
nullptr;
134 HANDLE m_hBurnRes =
nullptr;
135 HANDLE m_hExtraLifeRes =
nullptr;
138 unsigned long m_lScore = 0;
139 unsigned long m_lNewLifeScore = 0;
140 int m_nGoodArrows, m_nBadArrows = 0;
141 int m_nGameSpeed = 0;
142 unsigned int m_nBadGuySpeed = 0;
143 unsigned int m_nArrowSpeed = 0;
144 unsigned int m_nState = 0;
145 int m_nMoveArrows = 0;
150 unsigned int m_nJoyLast = 0;
151 bool m_bPause =
false;
152 bool m_bGameActive =
false;
153 bool m_bJoyActive =
false;
154 bool m_bMoveMode =
false;
155 bool m_bInMenu =
false;
156 bool m_bNewGame =
false;
157 bool m_bAnimationsOn =
false;
158 bool m_bTimerActive =
false;
163 int m_nInitGameSpeed = 0;
164 int m_nInitArcherLevel = 0;
165 int m_nInitNumLives = 0;
166 int m_nInitNumBadGuys = 0;
176 virtual int ExitInstance();
Definition: afxwin.h:1532
Definition: atltypes.h:79
Definition: atltypes.h:131
Definition: afxwin.h:1966
Definition: afxwin.h:1141
Definition: minwindef.h:161