22 #ifndef DRASCULA_DRASCULA_H 23 #define DRASCULA_DRASCULA_H 25 #include "common/scummsys.h" 26 #include "common/archive.h" 27 #include "common/endian.h" 28 #include "common/events.h" 29 #include "common/file.h" 30 #include "common/hash-str.h" 31 #include "common/keyboard.h" 32 #include "common/ptr.h" 33 #include "common/random.h" 34 #include "common/savefile.h" 35 #include "common/system.h" 36 #include "common/util.h" 38 #include "engines/savestate.h" 40 #include "drascula/console.h" 41 #include "drascula/detection.h" 43 #include "audio/mixer.h" 45 #include "engines/engine.h" 57 #define DRASCULA_DAT_VER 6 58 #define DATAALIGNMENT 4 98 kItemEarWithEarPlug = 23,
103 enum InventoryItems2 {
115 kColorLightGreen = 3,
136 enum IgorTalkerTypes {
144 enum VonBraunTalkerTypes {
149 enum AnimFrameTypes {
160 enum DialogOptionStatus {
161 kDialogOptionUnselected = 1,
162 kDialogOptionSelected = 2,
163 kDialogOptionClicked = 3
166 enum TalkSequenceCommands {
177 kTrackProtagonist = 10,
184 kTalkerVBNormal = 17,
186 kTalkerIgorSeated = 19,
187 kTalkerWerewolf = 20,
189 kTalkerDrascula = 22,
190 kTalkerBartender0 = 23,
191 kTalkerBartender1 = 24
194 enum CharacterDirections {
202 kCursorCrosshair = 0,
203 kCursorCurrentItem = 1
218 #define TEXTD_START 68 258 void enableFallback(
bool val) { _fallBack = val; }
260 void registerArchive(
const Common::Path &filename,
int priority);
272 void getLine(
char *buf);
277 void parseInt(
int &result);
278 void parseString(
char *result);
288 #define DIF_MASK_HARE 72 289 #define DIF_MASK_ABC 22 291 #define CHAR_HEIGHT 6 293 #define TALK_HEIGHT 25 294 #define TALK_WIDTH 23 297 #define CHARACTER_HEIGHT 70 298 #define CHARACTER_WIDTH 43 299 #define FEET_HEIGHT 12 301 #define CHAR_WIDTH_OPC 6 302 #define CHAR_HEIGHT_OPC 5 305 #define COMPLETE_PAL 256 308 #define KEYBUFSIZE 16 310 static const int interf_x[] = { 1, 65, 129, 193, 1, 65, 129 };
311 static const int interf_y[] = { 51, 51, 51, 51, 83, 83, 83 };
325 void syncSoundSettings()
override;
334 uint32 getFeatures()
const;
346 void loadPic(
int roomNum, byte *targetSurface,
int colorCount = 1) {
349 loadPic(rm, targetSurface, colorCount);
352 void loadPic(
const char *NamePcc, byte *targetSurface,
int colorCount = 1);
354 typedef signed char DacPalette256[256][3];
356 void setRGB(byte *pal,
int plt);
357 void assignPalette(DacPalette256 pal);
358 void setDefaultPalette(DacPalette256 pal);
359 void setPalette(byte *PalBuf);
360 void copyBackground(
int xorg,
int yorg,
int xdes,
int ydes,
int width,
361 int height, byte *src, byte *dest);
363 void copyBackground() {
364 copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface);
367 void copyRect(
int xorg,
int yorg,
int xdes,
int ydes,
int width,
368 int height, byte *src, byte *dest);
369 void updateScreen() {
370 updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
372 void updateScreen(
int xorg,
int yorg,
int xdes,
int ydes,
int width,
int height, byte *buffer);
373 int checkWrapX(
int x) {
375 if (x > 319) x -= 320;
378 int checkWrapY(
int y) {
380 if (y > 199) y -= 200;
384 DacPalette256 gamePalette;
385 DacPalette256 defaultPalette;
386 DacPalette256 brightPalette;
387 DacPalette256 darkPalette;
389 byte *crosshairCursor;
409 int previousMusic, roomMusic;
412 char currentData[20];
414 char menuBackground[20];
416 char objName[30][20];
417 char iconName[44][13];
419 int objectNum[40], visible[40], isDoor[40];
422 int inventoryObjects[43];
423 int _doorDestRoom[40];
425 int trackCharacter_alkeva[40], _roomExitId[40];
427 int takeObject, pickedObject;
428 bool _subtitlesDisabled;
429 bool _menuBar, _menuScreen, _hasName;
434 int flags[NUM_FLAGS];
437 int curX, curY, curDirection, trackProtagonist, _characterFrame;
438 bool _characterMoved, _characterVisible;
439 int roomX, roomY, checkFlags;
442 int curHeight, curWidth, feetHeight;
444 int lowerLimit, upperLimit;
452 int vonBraunX, trackVonBraun, vonBraunHasMoved;
453 float newHeight, newWidth;
457 int igorX, igorY, trackIgor;
458 int drasculaX, drasculaY, trackDrascula;
461 bool _loadedDifferentChapter;
462 int _currentSaveSlot;
466 int _mouseX, _mouseY, _leftMouseButton, _rightMouseButton;
467 bool _leftMouseButtonHeld;
473 bool loadDrasculaDat();
475 bool runCurrentChapter();
477 void pickObject(
int);
481 void placeVonBraun(
int pointX);
482 void hipo_sin_nadie(
int counter);
483 void toggleDoor(
int nflag,
int doorNum,
int action);
491 void selectVerbFromBar();
494 Common::KeyCode getScan();
496 void flushKeyBuffer();
497 void selectVerb(
int);
498 int updateVolume(
int prevVolume,
int prevVolumeY);
499 void volumeControls();
501 bool saveLoadScreen();
502 bool scummVMSaveLoadDialog(
bool isSave);
504 void loadSaveNames();
506 bool loadGame(
int slot);
507 void checkForOldSaveGames();
510 void print_abc(
const char *,
int,
int);
514 void chooseObject(
int object);
516 int removeObject(
int osj);
517 void playFLI(
const char *filefli,
int vel);
518 void fadeFromBlack(
int fadeSpeed);
519 void fadeToBlack(
int fadeSpeed);
520 signed char adjustToVGA(
signed char value);
521 void color_abc(
int cl);
522 bool textFitsCentered(
char *text,
int x);
523 void centerText(
const char *,
int,
int);
524 void playSound(
int soundNum);
525 bool animate(
const char *animation,
int FPS);
528 void placeDrascula();
530 void talkInit(
const char *filename);
531 bool isTalkFinished();
532 void talk_igor(
int,
int);
533 void talk_drascula(
int index,
int talkerType = 0);
534 void talk_solo(
const char *,
const char *);
535 void talk_bartender(
int,
int talkerType = 0);
536 void talk_pen(
const char *,
const char *,
int);
537 void talk_bj_bed(
int);
540 void talk_trunk(
int);
542 void talk(
const char *,
const char *);
543 void talk_sync(
const char *,
const char *,
const char *);
544 void talk_drunk(
int);
545 void talk_pianist(
int);
546 void talk_werewolf(
int);
548 void talk_drascula_big(
int);
549 void talk_vonBraun(
int,
int);
550 void talk_blind(
int);
551 void talk_hacker(
int);
552 void talk_generic(
const char* said,
const char* filename,
int* faces,
int faceCount,
int* coords, byte* surface);
557 void playMusic(
int p);
562 void updateDoor(
int);
563 void setPaletteBase(
int darkness);
564 void updateVisible();
566 void updateRefresh();
567 void updateRefresh_pre();
568 void moveCharacters();
574 bool checkAction(
int);
575 void setCursor(
int cursor);
578 bool isCursorVisible();
579 bool soundIsActive();
581 void mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch);
582 void decodeRLE(byte *BufferRLE, byte *MiVideoRLE, uint16 pitch = 320);
583 void decodeOffset(byte *BufferOFF, byte *MiVideoOFF,
int length);
594 void reduce_hare_chico(
int,
int,
int,
int,
int,
int,
int, byte *, byte *);
599 void increaseFrameNum();
601 bool checkMenuFlags();
602 void setupRoomsTable();
603 void freeRoomsTable();
604 bool roomParse(
int,
int);
605 void cleanupString(
char *
string);
606 void playTalkSequence(
int sequence);
609 int print_abc_opc(
const char *,
int,
int);
611 void activatePendulum();
614 void playFile(
const char *fname);
617 void updateAnim(
int y,
int destX,
int destY,
int width,
int height,
int count, byte* src,
int delayVal = 3,
bool copyRectangle =
false);
619 bool room(
int rN,
int fl);
661 void animation_1_1();
662 void animation_2_1();
663 void animation_3_1();
664 void animation_4_1();
666 void animation_2_2();
667 void animation_4_2();
668 void animation_5_2();
669 void animation_6_2();
670 void animation_7_2();
671 void animation_11_2();
672 void animation_12_2();
673 void animation_13_2();
674 void animation_14_2();
675 void animation_16_2();
676 void animation_20_2();
677 void animation_23_2();
678 void animation_24_2();
679 void animation_25_2();
680 void animation_26_2();
681 void animation_27_2();
682 void animation_29_2();
683 void animation_31_2();
684 void animation_34_2();
685 void animation_35_2();
686 void animation_36_2();
688 void animation_2_3();
689 void animation_6_3();
691 void animation_castle();
692 void animation_1_4();
693 void animation_5_4();
694 void animation_6_4();
695 void animation_7_4();
696 void animation_8_4();
698 void animation_1_5();
699 void animation_5_5();
700 void animation_12_5();
701 void animation_12_5_frankenstein();
702 void animation_14_5();
704 void animation_1_6();
705 void animation_5_6();
706 void animation_6_6();
707 void animation_9_6();
708 void animation_19_6();
716 void update_14_pre();
718 void update_16_pre();
719 void update_18_pre();
720 void update_23_pre();
721 void update_26_pre();
723 void update_35_pre();
725 void update_58_pre();
726 void update_59_pre();
727 void update_60_pre();
730 void update_62_pre();
739 int _itemLocationsSize;
747 int _roomPreUpdatesSize;
748 int _roomUpdatesSize;
749 int _roomActionsSize;
750 int _talkSequencesSize;
771 int *_x1d_menu, *_y1d_menu;
773 int *_candleX, *_candleY;
774 int *_pianistX, *_drunkX;
781 void freeTexts(
char **ptr);
784 RoomHandlers *_roomHandlers;
Definition: drascula.h:222
EngineFeature
Definition: engine.h:253
Definition: drascula.h:211
Definition: drascula.h:230
Definition: drascula.h:268
int sprintf_s(char *dst, size_t size, MSVC_PRINTF const char *format,...) GCC_PRINTF(3
Definition: drascula.h:315
Definition: archive.h:312
Definition: drascula.h:243
Definition: keyboard.h:294
Definition: detection.h:33
Definition: drascula.h:248
Definition: drascula.h:254
Language
Definition: language.h:45