dev.nlited.com

>>

Globals.h

<<<< prev
next >>>>

2016-01-27 00:45:34 chip Page 1541 📢 PUBLIC

GLOBALS.H: /*************************************************************************/ /** Globals.h: Rocket2D **/ /** (C)2016 nlited systems, Chip Doran **/ /*************************************************************************/ #pragma once #define __GLOBALS_H__ 0x0101 typedef struct Handle_s *HMAIN; typedef struct Handle_s *HIMAGE; typedef struct Handle_s *HGAME; typedef struct Handle_s *HITEMS; typedef struct Handle_s *HITEM; typedef struct Handle_s *HSOUNDMGR; typedef struct Handle_s *HSOUND; enum BITMAP_IDS { BITMAP_NONE, BITMAP_ROCKET_PNG, BITMAP_END }; #define CTRL_LEFT 0x0001 //Rotate left (counter-clockwise) #define CTRL_RIGHT 0x0002 //Rotate right #define CTRL_THRUST 0x0004 //Thrust #define CTRL_FIRE 0x0008 //Fire a bullet enum ITEM_IDS { //Game items ITEM_NONE, //Empty object ITEM_ROCKET, //Player's rocket ITEM_ROCK, //Floating rock ITEM_BULLET, //Player's bullet }; struct ItemLink_s { UINT32 Signature; struct ItemLink_s *pPrev; struct ItemLink_s *pNext; HITEM hItem; UINT ItemID; }; EXTERNC HINSTANCE ghInst; EXTERNC HGAME ghGame; EXTERNC int MainCreate(HMAIN *phMain); EXTERNC int MainDestroy(HMAIN hMain); EXTERNC int MainLoop(HMAIN hMain); #ifdef __MYD2D_H__ EXTERNC HD2D ghD2D; #endif EXTERNC int SoundMgrCreate(void); EXTERNC int SoundMgrDestroy(void); EXTERNC int SoundCreate(HSOUND *phSound,const char *Name); EXTERNC int SoundDestroy(HSOUND hSound); EXTERNC int SoundPlay(HSOUND hSound, UINT Flags); #define SNDPLAY_LOOP 0x0001 EXTERNC int SoundStop(HSOUND hSound); EXTERNC int ImgCreate(HIMAGE *phImg, HWND hWnd); EXTERNC int ImgDestroy(HIMAGE hImg); EXTERNC int ImgResize(HIMAGE hImg, const RECT *pR); EXTERNC int ImgPaint(HIMAGE hImg); EXTERNC int ImgBegin(HIMAGE hImg); EXTERNC int ImgEnd(HIMAGE hImg); EXTERNC int ImgAddSprite(HIMAGE hImg, struct Sprite_s *pSprite); EXTERNC int GameCreate(HGAME *phGame); EXTERNC int GameDestroy(HGAME hGame); EXTERNC int GameUpdate(HGAME hGame); EXTERNC int GameSetImage(HGAME hGame, HIMAGE hImg); EXTERNC int GameSetArena(HGAME hGame, const RECT *pR); EXTERNC int GameSetControl(HGAME hGame, UINT PlayerID, UINT Key, UINT OnOff); EXTERNC int GameGetControl(HGAME hGame, UINT PlayerID, UINT *pCtrlState); EXTERNC int GameEvent(HGAME hGame, UINT EventID); #define EVENT_ROCK_DESTROYED 1 EXTERNC int ItemsCreate(HITEMS *phItems, HGAME hGame); EXTERNC int ItemsDestroy(HITEMS hItems); EXTERNC int ItemsSetArena(HITEMS hItems, const RECT *prArena); EXTERNC int ItemsGetArena(HITEMS hItems, RECT *prArena); EXTERNC int ItemsGetControl(HITEMS hItems, UINT PlayerID, UINT *pCtrlState); EXTERNC int ItemsAdd(HITEMS hItems, HITEM hItem); EXTERNC int ItemsRemove(HITEMS hItems, HITEM hItem); EXTERNC int ItemsUpdate(HITEMS hItems, UINT Tick); EXTERNC int ItemsDraw(HITEMS hItems, HIMAGE hImg); EXTERNC int ItemsGetNext(HITEMS hItems, HITEM hCurItem, HITEM *phNext); EXTERNC int ItemCreate(HITEM *phItem, UINT ItemID, HITEM hSrc); EXTERNC int ItemDestroy(HITEM hItem); EXTERNC struct ItemLink_s *ItemGetLink(HITEM hItem); EXTERNC int ItemUpdate(HITEM hItem, HITEMS hList, UINT Tick); EXTERNC int ItemCollision(HITEM hItem, HITEMS hList); EXTERNC int ItemDraw(HITEM hItem, HIMAGE hImg);


WebV7 (C)2018 nlited | Rendered by tikope in 65.294ms | 3.145.100.40