ScummVM API documentation
ws_hal.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef M4_WSCRIPT_WS_HAL_H
24 #define M4_WSCRIPT_WS_HAL_H
25 
26 #include "m4/wscript/ws_machine.h"
27 #include "m4/wscript/ws_cruncher.h"
28 
29 namespace M4 {
30 
31 #define CCB_SKIP 0x0001
32 #define CCB_HIDE 0x0002
33 #define CCB_REDRAW 0x0004
34 #define CCB_STREAM 0x0008
35 #define CCB_DISC_STREAM 0x0010
36 
37 #define CCB_NO_DRAW (CCB_SKIP | CCB_HIDE)
38 
39 #define ERR_INTERNAL 0
40 #define ERR_SEQU 1
41 #define ERR_MACH 2
42 
43 struct WSHal_Globals {
44  RectList *_deadRectList = nullptr;
45 };
46 
47 bool ws_InitHAL();
48 void ws_KillHAL();
49 
50 void ws_DoDisplay(Buffer *background, int16 *depth_table, Buffer *screenCodeBuff,
51  uint8 *myPalette, uint8 *ICT, bool updateVideo);
52 void ws_hal_RefreshWoodscriptBuffer(cruncher *myCruncher, Buffer *background,
53  int16 *depth_table, Buffer *screenCodes, uint8 *myPalette, uint8 *ICT);
54 void GetBezCoeffs(frac16 *ctrlPoints, frac16 *coeffs);
55 void GetBezPoint(frac16 *x, frac16 *y, frac16 *coeffs, frac16 tVal);
56 bool InitCCB(CCB *myCCB);
57 void HideCCB(CCB *myCCB);
58 void ShowCCB(CCB *myCCB);
59 //void SetLastCCB(CCB *myCCB);
60 void MoveCCB(CCB *myCCB, frac16 deltaX, frac16 deltaY);
61 void KillCCB(CCB *myCCB, bool restoreFlag);
62 void Cel_msr(Anim8 *myAnim8);
63 void ws_OverrideCrunchTime(machine *m);
64 
65 bool CheckAddr();
66 void ws_Error(machine *m, int32 errorType, quadchar errorCode, const char *errMsg);
67 void ws_DumpMachine(machine *m);
68 void ws_LogErrorMsg(const char *sourceFile, uint32 lineNum, const char *fmt, ...);
69 
70 } // End of namespace M4
71 
72 #endif
Definition: ws_machine.h:153
Definition: ws_cruncher.h:69
Definition: gui.h:56
Definition: ws_machine.h:115
intptr frac16
Definition: m4_types.h:46
Definition: ws_hal.h:43
Definition: m4_types.h:67
Definition: database.h:28
Definition: ws_machine.h:99