home *** CD-ROM | disk | FTP | other *** search
- #ifndef CLIB_GAMES_PROTOS_H
- #define CLIB_GAMES_PROTOS_H
-
- /*
- ** $VER: games_protos.h 0.5 (01.02.97)
- **
- ** C prototypes.
- **
- ** (C) Copyright 1996-1997 DreamWorld Productions.
- ** All Rights Reserved
- */
-
- #ifndef GAMES_GMS_H
- #include <games/games.h>
- #endif
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- #ifndef EXEC_TASKS_H
- #include <exec/tasks.h>
- #endif
-
- /* Standard functions */
-
- ULONG InitGPI(UWORD GPI_ID);
- ULONG RemoveGPI(UWORD GPI_ID);
-
- void InitJoyPorts(void);
- ULONG ReadMouse(UWORD PortName);
- ULONG ReadJoyPort(UWORD PortName, UWORD ReturnType);
- ULONG ReadJoyStick(UWORD PortName);
- ULONG ReadJoyPad(UWORD PortName);
- ULONG ReadSegaPad(UWORD PortName);
- ULONG ReadAnalog(UWORD PortName);
- ULONG ReadKey(struct Keys *);
-
- void WaitLMB(void);
- void WaitFire(UWORD PortName);
- void WaitTime(UWORD MicroSeconds);
-
- void AddInputHandler(void);
- void RemInputHandler(void);
- void AddInterrupt(APTR Interrupt, UWORD IntNum, UWORD IntPri);
- void RemInterrupt(APTR IntBase);
-
- APTR SmartLoad(char *FileName, APTR Destination, ULONG MemType);
- APTR QuickLoad(char *FileName, APTR Destination, ULONG MemType);
- APTR SmartUnpack(APTR Source, APTR Destination, ULONG Password, ULONG MemType);
- ULONG SmartSave(char *FileName, APTR Source, APTR SrcLength);
- ULONG SetUserPrefs(char *PrefsName);
- ULONG UnpackPic(APTR Source, struct Picture *);
- ULONG LoadPic(struct Picture *);
- struct Picture * LoadPicTags(unsigned long tag1, ...);
-
- APTR GetPicInfo(APTR PicHeader, struct Picture *);
- struct Picture * LoadPicInfo(struct Picture *, char *FileName);
- APTR AllocMemBlock(ULONG Size, ULONG MemType);
- void FreeMemBlock(APTR MemBlock);
- void FreePic(struct Picture *);
-
- APTR DecToText(LONG Number, LONG AmtDigits, char *Destination);
- ULONG FastRandom(ULONG Range);
- ULONG SlowRandom(ULONG Range);
-
- APTR LoadObjectFile(char *FileName);
- APTR GetObject(APTR ObjectBase, char *Name);
- APTR GetObjectList(APTR ObjectBase, struct ObjectList);
- APTR CopyOjbect(APTR ObjectBase, char *Name);
- void FreeObjectFile(APTR ObjectBase);
-
- /* Screens.GPI functions */
-
- ULONG AddScreen(APTR GameScreen);
- struct GameScreen * AddScreenTags(unsigned long tag1, ...);
- APTR AllocVideoMem(ULONG Size);
- void AutoSwitch(void);
- void DeleteScreen(struct GameScreen *);
- APTR HideDisplay(void);
- void MovePicture(struct GameScreen *);
- void RefreshScreen(struct GameScreen *);
- void RemakeScreen(struct GameScreen *);
- void ResetPicture(struct GameScreen *);
- void ScrLockOn(struct GameScreen *);
- void ScrLockOff(struct GameScreen *);
- void ShowScreen(struct GameScreen *);
- void SwapBuffers(struct GameScreen *);
- void Switch(void);
- void WaitVBL(void);
- void WaitSVBL(void);
- void WaitRVBL(void);
- void WaitRastLine(WORD LinePosition);
-
- /* Palette alteration functions */
-
- UWORD ColourMorph(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, ULONG SrcColour, ULONG DestColour);
- UWORD ColourToPalette(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR Palette, ULONG RRGGBB);
- UWORD PaletteMorph(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR SrcPalette, APTR DestPalette);
- UWORD PaletteToColour(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR Palette, ULONG RRGGBB);
-
- void ChangeColours(struct GameScreen *, UWORD FadeState, APTR Colours,
- UWORD StartColour, UWORD AmtColours);
- void BlankColours(struct GameScreen *);
- void UpdatePalette(struct GameScreen *);
- void UpdateRGB12(struct GameScreen *, UWORD Colour, UWORD RGB);
- void UpdateRGB24(struct GameScreen *, ULONG Colour, ULONG RRGGBB);
-
- /* Rasterlist functions */
-
- ULONG InitRasterList(struct GameScreen *);
- void UpdateRasterList(struct GameScreen *);
- void UpdateRasterCommand(struct GameScreen *, APTR Command);
- void UpdateRasterCommands(struct GameScreen *, APTR Command, UWORD Amount);
- void UpdateRasterLines(struct GameScreen *);
- void RemoveRasterList(struct GameScreen *);
- void HideRasterList(struct GameScreen *);
- void ShowRasterList(struct GameScreen *);
-
- /* Sprite functions */
-
- ULONG InitSprite(struct GameScreen *, struct Sprite *);
- void UpdateSprite(struct GameScreen *, struct Sprite *);
- void MoveSprite(struct GameScreen *, struct Sprite *);
- void HideSprite(struct GameScreen *, UWORD SpriteNum);
- void UpdateSpriteList(APTR SpriteList);
- void HideSpriteList(APTR SpriteList);
- void RemoveAllSprites(void);
- void ReturnAllSprites(void);
- void FreeSprite(struct Sprite *);
-
- /* Blitter.GPI functions */
-
- ULONG AllocBlitter(void);
- APTR AllocBlitMem(ULONG Size);
- void FreeBlitter(void);
- ULONG InitBOB(struct GameScreen *, APTR BOB);
- void FreeBOB(APTR BOB);
- void DrawBOB(struct GameScreen *, APTR BOB, struct RestoreList *, UWORD Buffer);
- void DrawBOBList(struct GameScreen *, LONG *BOBList[], struct RestoreList *, UWORD Buffer);
-
- void DrawLine(struct GameScreen *, UWORD Buffer, WORD StartX,
- WORD StartY, WORD EndX, WORD EndY, ULONG Colour);
- void DrawUCLine(struct GameScreen *, UWORD Buffer, UWORD StartX,
- UWORD StartY, UWORD EndX, UWORD EndY, ULONG Colour);
-
- void DrawPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord, ULONG Colour);
- void DrawUCPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord, ULONG Colour);
- void DrawPixelList(struct GameScreen *, UWORD Buffer, struct PixelList *);
- void DrawUCPixelList(struct GameScreen *, UWORD Buffer, struct PixelList *);
- ULONG ReadPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord);
- void ReadPixelList(struct GameScreen *, UWORD Buffer, struct PixelLIst *);
-
- void ClearBOB(struct GameScreen *, APTR BOB, UWORD Buffer);
- void CopyBuffer(struct GameScreen *, UWORD SrcBuffer, UWORD DestBuffer);
- void ClrScreen(struct GameScreen *, UWORD Buffer);
- void ClrArea(struct GameScreen *, UWORD StartX, UWORD StartY, UWORD EndX, UWORD EndY);
-
- struct RestoreList * InitRestore(ULONG AmtBuffers, ULONG Entries);
- void FreeRestore(struct RestoreList *);
- void ResetRestore(struct RestoreList *);
- void Restore(struct GameScreen *, struct RestoreList *);
- void CleanUpRestore(struct GameScreen *, struct RestoreList *);
-
- ULONG InitMap(struct GameScreen *, struct Map *);
- void DrawMap(struct GameScreen *, struct Map *);
- void DrawMapRow(struct GameScreen *, struct Map *);
- void DrawMapTile(struct GameScreen *, struct Map *, WORD XCoord, WORD YCoord);
- void FreeMap(struct Map *);
-
- /* Sound.GPI functions */
-
- ULONG AllocAudio(void);
- APTR AllocSoundMem(ULONG Size);
- void FreeAudio(void);
- ULONG InitSound(struct Sound *);
- void FreeSound(struct Sound *);
- UWORD CheckChannel(UWORD ChannelName);
-
- void PlaySound(struct Sound *);
- void PlaySoundDAC1(struct Sound *);
- void PlaySoundDAC2(struct Sound *);
- void PlaySoundDAC3(struct Sound *);
- void PlaySoundDAC4(struct Sound *);
- void PlaySoundPri(struct Sound *);
- void PlaySoundPriDAC1(struct Sound *);
- void PlaySoundPriDAC2(struct Sound *);
- void PlaySoundPriDAC3(struct Sound *);
- void PlaySoundPriDAC4(struct Sound *);
-
- void SetVolume(UWORD Channel, UWORD Volume);
- void FadeVolume(UWORD Channel);
- void StopSound(struct Sound *);
- void StopChannel(UWORD Channel);
-
- #endif /* CLIB_GAMES_PROTOS_H */
-