283 lines
9.5 KiB
C
Raw Normal View History

/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* 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; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
uint16 allocatemem(uint16 paragraphs);
uint8 *workspace();
2011-08-03 12:21:46 +02:00
void allocatework();
2011-07-30 23:11:48 +02:00
void clearwork();
2011-11-17 18:21:34 +01:00
void standardload();
uint16 standardload(const char *fileName); // Returns a segment handle which needs to be freed with deallocatemem for symmetry
void multidump();
void multidump(uint16 x, uint16 y, uint8 width, uint8 height);
void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y);
2011-07-20 21:41:52 +02:00
void frameoutnm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameoutbh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
void worktoscreen();
void multiget();
void multiget(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height);
void convertkey();
void cls();
void printsprites();
void quickquit();
void readoneblock();
void printundermon();
void seecommandtail();
void randomnumber();
void quickquit2();
uint8 getnextword(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount);
void printboth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar);
2011-07-18 22:27:06 +02:00
void printchar();
void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height);
2011-07-18 14:30:07 +02:00
void printdirect();
void printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered);
void printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
2011-08-29 11:55:21 +02:00
void printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered);
void printmessage();
void usetimedtext();
void dumptimedtext();
void setuptimedtemp();
void setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);
void getundertimed();
void putundertimed();
2011-08-11 03:19:51 +02:00
uint8 printslow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered);
2011-07-19 12:37:32 +02:00
void printslow();
2011-07-21 22:46:16 +02:00
void dumptextline();
2011-07-17 16:06:19 +02:00
void getnumber();
uint8 getnumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset);
uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width);
void oldtonames();
void namestoold();
void loadpalfromiff();
2011-07-30 19:54:53 +02:00
void getroomdata();
2011-11-17 11:29:15 +01:00
Room *getroomdata(uint8 room);
2011-07-30 21:56:33 +02:00
void readheader();
2011-07-30 22:56:29 +02:00
void fillspace();
2011-07-30 21:46:59 +02:00
void startloading(const Room *room);
2011-07-20 17:21:03 +01:00
Sprite *spritetable();
2011-06-26 17:03:17 +02:00
void showframe();
2011-08-11 03:30:41 +02:00
void showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height);
void showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag);
void printasprite(const Sprite *sprite);
void width160();
void multiput(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height);
void multiput();
void eraseoldobs();
void clearsprites();
Sprite *makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 frameData, uint16 somethingInDi);
void spriteupdate();
2011-06-28 15:48:07 +02:00
void initman();
void mainman(Sprite *sprite);
void facerightway();
2011-07-25 23:54:54 +02:00
void walking(Sprite *sprite);
2011-08-08 22:26:31 +02:00
void autosetwalk();
void checkdest(const RoomPaths *roomsPaths);
2011-07-20 17:21:03 +01:00
void aboutturn(Sprite *sprite);
void backobject(Sprite *sprite);
void constant(Sprite *sprite, SetObject *objData);
void steady(Sprite *sprite, SetObject *objData);
void random(Sprite *sprite, SetObject *objData);
2011-11-16 23:27:14 +01:00
void dodoor(Sprite *sprite, SetObject *objData, Common::Rect check);
void doorway(Sprite *sprite, SetObject *objData);
void widedoor(Sprite *sprite, SetObject *objData);
void lockeddoorway(Sprite *sprite, SetObject *objData);
void liftsprite(Sprite *sprite, SetObject *objData);
2011-09-04 16:39:38 +02:00
Frame *findsource();
2011-08-11 22:58:06 +02:00
void showgamereel();
void showgamereel(ReelRoutine *routine);
void showreelframe(Reel *reel);
const Frame *getreelframeax(uint16 frame);
void turnpathon(uint8 param);
void turnpathoff(uint8 param);
void turnpathon();
void turnpathoff();
void turnanypathon(uint8 param, uint8 room);
void turnanypathoff(uint8 param, uint8 room);
void turnanypathon();
void turnanypathoff();
2011-09-02 07:56:50 +02:00
RoomPaths *getroomspaths();
void makebackob(SetObject *objData);
void modifychar();
void lockmon();
void cancelch0();
void cancelch1();
2011-07-30 23:37:18 +02:00
void plotreel();
Reel *getreelstart();
void dealwithspecial(uint8 firstParam, uint8 secondParam);
2011-08-03 12:24:06 +02:00
void zoom();
2011-08-03 13:54:03 +02:00
void crosshair();
2011-08-03 14:16:09 +02:00
void showrain();
2011-08-03 16:19:27 +02:00
void deltextline();
2011-08-18 00:35:10 +02:00
void commandonly();
void commandonly(uint8 command);
2011-08-03 18:48:43 +02:00
void doblocks();
void checkifperson();
bool checkifperson(uint8 x, uint8 y);
2011-08-22 14:46:06 +02:00
void checkiffree();
bool checkiffree(uint8 x, uint8 y);
2011-08-30 03:11:32 +02:00
void checkifex();
bool checkifex(uint8 x, uint8 y);
2011-08-15 14:35:44 +02:00
const uint8 *findobname(uint8 type, uint8 index);
void copyname();
void copyname(uint8 type, uint8 index, uint8 *dst);
void commandwithob();
void commandwithob(uint8 command, uint8 type, uint8 index);
2011-08-15 17:00:20 +02:00
void showpanel();
2011-08-15 17:11:11 +02:00
void updatepeople();
void madmantext();
2011-08-16 04:01:40 +02:00
void madmode();
2011-08-17 01:16:05 +02:00
void movemap(uint8 param);
2011-08-18 10:36:57 +02:00
bool addalong(const uint8 *mapFlags);
bool addlength(const uint8 *mapFlags);
void getdimension();
void getdimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize);
void getmapad();
2011-08-18 18:36:15 +02:00
void calcmapad();
uint8 getmapad(const uint8 *setData);
uint8 getxad(const uint8 *setData, uint8 *result);
uint8 getyad(const uint8 *setData, uint8 *result);
void calcfrframe();
void calcfrframe(uint8* width, uint8* height);
void finalframe();
void finalframe(uint16 *x, uint16 *y);
void showallobs();
void blocknametext();
void walktotext();
void personnametext();
void findxyfrompath();
2011-08-19 10:35:29 +02:00
void findormake();
2011-08-20 12:26:10 +02:00
void findormake(uint8 index, uint8 value, uint8 type);
DynObject *getfreead(uint8 index);
DynObject *getexad(uint8 index);
2011-08-23 15:03:28 +02:00
DynObject *geteitheradCPP();
SetObject *getsetad(uint8 index);
2011-08-31 23:38:34 +02:00
void *getanyad(uint8 *value1, uint8 *value2);
2011-09-01 00:11:07 +02:00
void *getanyaddir(uint8 index, uint8 flag);
void setallchanges();
2011-08-20 12:26:10 +02:00
void dochange();
void dochange(uint8 index, uint8 value, uint8 type);
2011-08-20 12:33:21 +02:00
void deletetaken();
bool isCD();
void placesetobject();
void placesetobject(uint8 index);
void removesetobject();
void removesetobject(uint8 index);
2011-08-21 15:24:05 +02:00
void showallfree();
2011-08-29 16:31:00 +02:00
void showallex();
bool finishedwalkingCPP();
void finishedwalking();
2011-08-22 17:30:53 +02:00
void checkone();
void checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY);
void getflagunderp();
void getflagunderp(uint8 *flag, uint8 *flagEx);
void walkandexamine();
2011-08-23 11:09:54 +02:00
void obname();
void obname(uint8 command, uint8 commandType);
2011-08-24 12:15:17 +02:00
void delpointer();
2011-08-24 13:20:18 +02:00
void showblink();
2011-08-24 13:22:11 +02:00
void dumpblink();
2011-08-24 17:23:43 +02:00
void dumppointer();
2011-08-24 23:01:53 +02:00
void showpointer();
2011-08-25 07:02:57 +02:00
void animpointer();
void checkcoords();
void checkcoords(const RectWithCallback *rectWithCallbacks);
void readmouse();
void readmouse1();
void readmouse2();
void readmouse3();
void readmouse4();
2011-08-25 08:03:27 +02:00
uint16 waitframes();
2011-08-25 10:39:51 +02:00
void drawflags();
void addtopeoplelist();
void addtopeoplelist(ReelRoutine *routine);
2011-08-30 02:26:28 +02:00
void getexpos();
2011-08-30 02:45:53 +02:00
void paneltomap();
void maptopanel();
void dumpmap();
2011-08-30 02:53:49 +02:00
void obpicture();
2011-08-30 10:56:49 +02:00
void transferinv();
2011-08-31 23:38:34 +02:00
void obicons();
2011-09-01 00:06:30 +02:00
void compare();
bool compare(uint8 index, uint8 flag, const char id[4]);
2011-09-02 03:55:52 +02:00
bool pixelcheckset(const ObjPos *pos, uint8 x, uint8 y);
bool isitdescribed(const ObjPos *objPos);
void checkifset();
bool checkifset(uint8 x, uint8 y);
void checkifpathison();
bool checkifpathison(uint8 index);
void isitworn();
bool isitworn(const DynObject *object);
2011-10-09 18:09:24 +02:00
void wornerror();
void makeworn();
void makeworn(DynObject *object);
2011-09-02 09:35:52 +02:00
void obtoinv();
void obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y);
2011-09-05 20:45:41 +02:00
void showryanpage();
2011-09-05 21:42:06 +02:00
void findallryan();
void findallryan(uint8 *inv);
2011-09-06 08:54:01 +02:00
void fillryan();
2011-09-02 16:41:54 +02:00
void useroutine();
void hangon();
void hangon(uint16 frameCount);
void hangonp();
void hangonp(uint16 count);
2011-11-05 14:13:57 +01:00
void showicon();
uint8 findnextcolon(uint8 **string);
void findnextcolon();
2011-09-07 03:44:40 +02:00
uint8 *getobtextstartCPP();
2011-09-07 03:53:53 +02:00
void usetext(const uint8 *string);
void usetext();
void getblockofpixel();
uint8 getblockofpixel(uint8 x, uint8 y);
2011-09-18 15:33:24 +02:00
void bresenhams();
void examineobtext();
2011-09-04 12:44:05 +02:00
void sortoutmap();
2011-09-04 13:20:02 +02:00
void showcity();
uint16 getpersframe(uint8 index);
void convicons();
2011-11-14 20:22:45 +01:00
void examineob(bool examineAgain = true);
2011-11-15 11:05:30 +01:00
void showwatch();
2011-11-17 00:18:28 +01:00
void showtime();
2011-11-14 19:49:19 +01:00
void roomname();
2011-11-15 12:33:13 +01:00
void transfertext();
void initrain();
Rain *splitintolines(uint8 x, uint8 y, Rain *rain);
2011-11-16 13:26:15 +01:00
uint8 *mainPalette();
uint8 *startPalette();
uint8 *endPalette();
void clearstartpal();
2011-11-16 17:56:06 +01:00
void clearendpal();
2011-11-16 13:26:15 +01:00
void paltostartpal();
void endpaltostart();
void startpaltoend();
void paltoendpal();
void fadecalculation();
2011-11-16 20:09:47 +01:00
void watchcount();
2011-11-16 21:00:46 +01:00
void zoomicon();
2011-11-16 21:23:51 +01:00
void loadroom();
void getundermenu();
void putundermenu();
void textformonk();
void textforend();
2011-11-17 17:44:19 +01:00
void readsetdata();
void loadroomssample();
2011-09-18 15:33:24 +02:00